实训:路由器访问与配置
实训目的
要求学生掌握从 PC 机上直接和远程访问路由器的基本方法,
掌握路由器的基本配置和使用方法,掌握路由器帮助系统的使用方
法,理解路由器的启动顺序。
(1)连接路由器和 PC 机,通过 Console 口访问路由器
要求:掌握计算机串口和路由器 Console 口的连接方法,使用
超级终端配置路由器的方法。
内容要求
(2)通过 Telnet 访问路由器
要求:掌握配置路由器以太网接口 IP 地址以及密码的技能,
能够通过 Telnet 访问路由器。
(3)CLI 的使用与 IOS 基本命令
要求:熟悉 CLI 的各种命令模式、帮助系统,掌握 IOS 基本命
令,能够使用相关命令查看路由器有关信息。
实验材料
(1)所用设备:路由器、PC 机、网线
(2)消耗性器材:无
实 训 数 据 记 录
一、实验场景描述(也可自行设计)
假设你是某公司新来的网络管理员,公司要求熟悉网络产品,首先要求你登录路由器,
了解、掌握路由器的命令行操作。同时作为网管,你第一次在设备机房对路由器进行了初次
配置后,希望以后再办公司或出差时也可以对设备进行远程管理,现在要在路由器上做适当
的配置。
二、实验命令
三、网络拓扑图及描述
四、实验步骤
步骤及简述:
路由器基本配置(一):
实验拓补图
1、用标准 console 线缆连接计算机的串口和路由器的 console 口,在计算机上启用超级终
端,并配置超级终端的参数,使计算机与路由器通过 console 口建立连接;
2、配置路由器的管理 IP 地址,并为 telnet 用户配置用户名和登录口令。配置计算机的 IP
地址(与路由器管理 IP 地址在同一个网段),通过网线将计算机和路由器相连,通过计算机
telnet 到路由器上进行查看配置;
3、更改路由器的主机名;
4、擦除配置信息、保存配置信息、显示配置信息;
5、显示当前配置信息;
6、显示历史命令:
Router>en
Router#conf t
Enter configuration commands, one per line.
Router(config)#interface fa0/0
Router(config-if)#no shutdow
End with CNTL/Z.
//路由器端口默认关闭,开启 fa0/0 端口
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state
to up
//修改路由器主机名
Router(config-if)#exit
Router(config)#hostname R1
R1(config)#enable password 123456
R1(config)#line vty 0 4
R1(config-line)#password abc123
R1(config-line)#login
R1(config-line)#exit
R1(config)#interface fa0/0
R1(config-if)#ip address 192.168.1.1
% Incomplete command.
R1(config-if)#ip address 192.168.1.1 255.255.255.0
地址
R1(config-if)#no shutdown
R1(config-if)#end
//开启端口
//设置进入特权模式密码
//设置 telnet 远程登录密码
//配置路由器的管理 IP
%SYS-5-CONFIG_I: Configured from console by console
R1#
PC 端登录测试:
2
1、验证进入特权模式的密码
Switch>en
Password:
2、验证 telnet 远程登录密码
a. 给 PC 机设置 IP 地址
b、打开 Command Prompt
路由器基本配置二:
拓补结构图
1、用标准 console 线缆连接计算机1的串口和路由器的 console 口,用交叉线连接计算机2
的 fastetrernet 和路由器的 fastethernet 0/0口,用 V.3.5线缆连接来个路由器的 serial
2/0接口。
2、分别两个配置路由器的管理 IP 地址,并为 telnet 用户配置用户名和登录口令。配置计
算机的 IP 地址,通过网线将计算机和路由器相连,通过计算机 telnet 到路由器上进行查看
配置。
3、将两个路由器的主机名分别更改为 RA 和 RB。
4、显示当前配置信息。
5、配置路由器的远程密码。
6、显示历史命令:
Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname RA
RA(config)#interface fastethernet 0/0
RA(config-if)#ip address 192.168.1.1 255.255.255.0
RA(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
RA(config-if)#exit
RA(config)#interface fastethernet 1/0
RA(config-if)#ip address 10.10.1.1 255.255.255.0
RA(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up
RA(config-if)#exit
RA(config)#inerface serial 2/0
% Invalid input detected at '^' marker.
^
RA(config)#interface serial 2/0
RA(config-if)#ip address 172.159.1.1 255.255.255.0
RA(config-if)#clock rate 64000
RA(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial2/0, changed state to down
RA(config-if)#exit
RA(config)#line vty 0 4
RA(config-line)#password star
RA(config-line)#login
RA(config-line)#end
RA#
%SYS-5-CONFIG_I: Configured from console by console
RA#en
RA#config t
Enter configuration commands, one per line. End with CNTL/Z.
RA(config)#enable secret abc
RA(config)#enable password star
RA(config)#exit
RA#
%SYS-5-CONFIG_I: Configured from console by console
RA#show ip interface brief
Interface
IP-Address
OK? Method Status
Protocol
FastEthernet0/0
192.168.1.1
YES manual up
FastEthernet1/0
10.10.1.1
YES manual up
up
down
down
Serial2/0
Serial3/0
FastEthernet4/0
172.159.1.1
YES manual down
unassigned
unassigned
YES unset
administratively down down
YES unset
administratively down down
unassigned
FastEthernet5/0
RA#
Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname RB
RB(config)#interface fastethernet 0/0
RB(config-if)#ip address 192.168.1.2 255.255.255.0
RB(config-if)#no shutdown
YES unset
administratively down down
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
RB(config-if)#exit
RB(config)#interface serial 2/0
RB(config-if)#ip address 192.168.3.1 255.255.255.0
RB(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial2/0, changed state to up
RB(config-if)#exit
RB(config)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to up
RB(config)#end
RB#
%SYS-5-CONFIG_I: Configured from console by console
RB#show ip interface brief
Interface
IP-Address
OK? Method Status
FastEthernet0/0
192.168.1.2
YES manual up
Protocol
up
FastEthernet1/0
unassigned
YES unset
administratively down down
Serial2/0
Serial3/0
FastEthernet4/0
FastEthernet5/0
RB#
192.168.3.1
YES manual up
up
unassigned
unassigned
unassigned
YES unset
administratively down down
YES unset
administratively down down
YES unset
administratively down down
1、验证进入特权模式的密码
Switch>en
Password:
2、验证 telnet 远程登录密码
a. 给 PC 机设置 IP 地址
b、打开 Command Prompt
伍、实验总结
通过这次的实验,对路由器有了更进一步的了解。了解了路由器的基本设置
方式,常用命令,以及怎样在路由器上配置 IP 地址。特别是在路由器上设置 IP
地址和配置路由器远程密码时,要细心。还要特别注意路由器和 PC,以及路由
器和路由器之间的端口连接。
在实验过程中,对路由器的常用命令的运用还不是很熟悉,所以,在以后的,学
习中要更加注意,尽量熟悉掌握和运用路由器的常用命令。尽量熟练掌握,常用
命令的命令状态(enable,end 等)、显示命令(show running-config,show version
等)、基本设置命令(hostname,no shutdown 等)。
实训成绩:
指导教师签名:
实训日期: