1、实验3 路由器配置实验 之基本配置和静态配置 实验过程及结果: router-a(config-if)# outer Con0 is now available Press RETURN to get started. Router>en Router#config t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#enable secret 1234 Router(config)#enable password 1234 Router(
2、config)#line console 0 Router(config-line)#login Router(config-line)#password1234 % Invalid input detected at '^' marker. Router(config-line)#password 1234 设置路由器A: Router Con0 is now available Press RETURN to get started. Router>en Router#config t Enter configuration comman
3、ds, one per line. End with CNTL/Z. Router(config)#hostname Router A A(config)#Hostname Router-A Router-A(config)#int e0 Router-A(config-if)#ip address 172.16.10.1 255.255.255.0 Router-A(config-if)#no shut %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to up %LINK-3-
4、UPDOWN: Interface Ethernet0, changed state to up Router-A(config-if)#int s0 Router-A(config-if)#ip address 172.16.20.1 255.255.255.0 Router-A(config-if)#no shut %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to up %LINK-3-UPDOWN: Interface Serial0, changed state to up R
5、outer-A(config-if)#int t0 % Invalid input detected at '^' marker. Router-A(config-if)#int T0 % Invalid input detected at '^' marker. Router-A(config-if)#int t0 % Invalid input detected at '^' marker. Router-A(config-if)#int s0 Router-A(config-if)#clock rate 64000 %Error: This com
6、mand applies only to DCE interfaces Router-A(config-if)#int Token Ring 0 % Invalid input detected at '^' marker. Router-A(config-if)#interface ethernet 0 % Invalid input detected at '^' marker. Router-A(config-if)#^z % Invalid input detected at '^' marker. Router-A(config-if)#int
7、to0 Router-A(config-if)#ip address 172.16.15.1 255.255.255.0 Router-A(config-if)#no shut % TokenRing0: no ring speed has been set Router-A(config-if)# 后保存: Router-A Con0 is now available Press RETURN to get started. Router-A>en Router-A#copy run start Building configuration...
8、 [OK] Router-A# 设置路由器B: Router Con0 is now available Press RETURN to get started. Router>en Router#config t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname Route-B Route-B(config)#Hostname Route-B Route-B(config)#int e0 Route-B(config-if
9、)#ip address 172.16.30.1 255.255.255.0 Route-B(config-if)#no shut %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to up %LINK-3-UPDOWN: Interface Ethernet0, changed state to up Route-B(config-if)#int s0 Route-B(config-if)#ip address 172.16.20.2 255.255.255.0 Route-B(co
10、nfig-if)#no shut %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to up %LINK-3-UPDOWN: Interface Serial0, changed state to up Route-B(config-if)#int s1 Route-B(config-if)#ip address 172.16.40.1 255.255.255.0 Route-B(config-if)#no shut %LINEPROTO-5-UPDOWN: Line protocol o
11、n Interface Serial1, changed state to up %LINK-3-UPDOWN: Interface Serial1, changed state to up Route-B(config-if)#exit Route-B(config)#exit %SYS-5-CONFIG_I: Configured from console by console Route-B#copy run start Building configuration... [OK] Route-B# 设置路由器C: Router Con0 is now avail
12、able Press RETURN to get started. Router>en Router#config t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname Router C C(config)#Hostname Router-C Router-C(config)#int e0 Router-C(config-if)#ip address 172.16.50.1 255.255.255.0 Router-C(config
13、if)#no shut %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to up %LINK-3-UPDOWN: Interface Ethernet0, changed state to up Router-C(config-if)#int s0 Router-C(config-if)#ip address 172.16.40.2 255.255.255.0 Router-C(config-if)#no shut %LINEPROTO-5-UPDOWN: Line protoco
14、l on Interface Serial0, changed state to up %LINK-3-UPDOWN: Interface Serial0, changed state to up Router-C(config-if)#int to0 Router-C(config-if)#ip address 172.16.55.1 255.255.255.0 Router-C(config-if)#no shut % TokenRing0: no ring speed has been set Router-C(config-if)#exit Router-C(config
15、)#exit %SYS-5-CONFIG_I: Configured from console by console Router-C#copy run start Building configuration... [OK] Router-C# 静态路由: 配置静态路由表A: Router-A Con0 is now available Press RETURN to get started. Router-A>en Router-A#copy run start Building configuration... [OK]
16、 Router-A# Router-A#config t Enter configuration commands, one per line. End with CNTL/Z. Router-A(config)#ip route 172.16.30.0 255.255.255.0 172.16.20.1 Router-A(config)#ip route 172.16.40.0 255.255.255.0.172.16.20.1 % Incomplete command. Router-A(config)#ip route 172.16.40.0 255.255.255.0 1
17、72.16.20.1 Router-A(config)#ip route 172.16.50.0 255.255.255.0 172.16.20.1 Router-A(config)#ip route 172.16.55.0 255.255.255.0 172.16.20.1 Router-A(config)#^Z %SYS-5-CONFIG_I: Configured from console by console Router-A#copy run start Building configuration... [OK] Router-A# 配置静态路由表B: Ro
18、ute-B Con0 is now available Press RETURN to get started. Route-B>en Route-B#config t Enter configuration commands, one per line. End with CNTL/Z. Route-B(config)#ip route 172.16.10.0 255.255.255.0 172.16.20.2 Route-B(config)#ip route 172.16.15.0 255.255.255.0 172.16.20.2 Route-B(
19、config)#ip route 172.16.50.0 255.255.255.0 172.16.20.2 Route-B(config)#ip route 172.16.55.0 255.255.255.0 172.16.20.2 Route-B(config)#^Z %SYS-5-CONFIG_I: Configured from console by console Route-B#copy run start Building configuration... [OK] Route-B# 配置静态路由表C: Router-C Con0 is now availa
20、ble Press RETURN to get started. Router-C>en Router-C#config t Enter configuration commands, one per line. End with CNTL/Z. Router-C(config)#ip route 172.16.10.0 255.255.255.0 172.16.40.2 Router-C(config)#ip route 172.16.20.0 255.255.255.0 172.16.40.2 Router-C(config)#ip route 17
21、2.16.15.0 255.255.255.0 172.16.40.2 Router-C(config)#ip rpute 172.16.30.0 255.255.255.0 172.16.40.2 % Invalid input detected at '^' marker. Router-C(config)#ip route 172.16.30.0 255.255.255.0 172.16.40.2 Router-C(config)#ip route 172.16.20.0 255.255.255.0 172.16.40.2 Router-C(config)#^Z %S
22、YS-5-CONFIG_I: Configured from console by console Router-C#copy run start Building configuration... [OK] Router-C# 检验是否正常工作:A、B在cmd中适用ping语句检查;C在模拟器界面中适用ping语句检查。 Router-C Con0 is now available Press RETURN to get started. Router-C>en Router-C#ping 172.16.10.2 Type esca
23、pe sequence to abort. Sending 5, 100-byte ICMP Echos to 172.16.10.2, timeout is 2 seconds: ..... Success rate is 0 percent (0/5) Router-C# 并未正常工作,均未成功,说明路由器配置和静态路由表配置失败。 失败感想:因为自身对软件的了解不够,知识也很欠缺,对于基本操作也不够了解,可能操作步骤上有错误或者有缺省导致没能完成实验。 实验总结:虽然本次实验失败了,但是增加了我对网络拓扑的了解,对配置路由器和配置静态路由表的过程和步骤及语法都有了进一步的了解。在实验过程中对路由A的配置中出现了各种各样的小错误,经过检查改正还是配置完成了,对于接下来的B、C的配置就会顺利的多。我觉得还是应该多加练习,目前掌握的还只是皮毛,有待我深一步的研究和学习。






