通过本实验,可以掌握以下技能:
实验的拓扑结构如图10-2所示。通过2根串行线分别把RouterA和RouterB连接起来,RouterB和RouterC连接起来。
各路由器使用的接口及其编号见图10-2所示的标注,各接口IP地址分配如下:
这个实验的这一步和之前的实验二一样,这里不再复述,最后的网络拓扑如下
RouterA:
RouterA>enable
Password:
RouterA#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
RouterA(config)#ip route 172.16.10.0 255.255.255.0 172.16.20.0
RouterA(config)#ip route 172.16.40.0 255.255.255.0 172.16.20.0
RouterA(config)#ip route 172.16.50.0 255.255.255.0 172.16.20.0
RouterA(config)#
RouterB:
RouterB>enable
RouterB#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
RouterB(config)#ip route 172.16.50.0 255.255.255.0 172.16.40.2
RouterB(config)#ip route 172.16.11.0 255.255.255.0 172.16.20.1
RouterB(config)#
RouterC:
RouterC>enable
RouterC#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
RouterC(config)#ip route 172.16.11.0 255.255.255.0 172.16.40.1
RouterC(config)#ip route 172.16.20.0 255.255.255.0 172.16.40.1
RouterC(config)#ip route 172.16.10.0 255.255.255.0 172.16.40.1
RouterC(config)#
RouterC:
查看主机PC2的ip地址
用主机PC2依次去ping RouterA \RouterB \RouterC\PC3
PC>ping 172.16.11.1
Pinging 172.16.11.1 with 32 bytes of data:
Reply from 172.16.11.1: bytes=32 time=9ms TTL=255
Reply from 172.16.11.1: bytes=32 time=0ms TTL=255
Reply from 172.16.11.1: bytes=32 time=0ms TTL=255
Reply from 172.16.11.1: bytes=32 time=0ms TTL=255
Ping statistics for 172.16.11.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 9ms, Average = 2ms
PC>ping 172.16.20.2
Pinging 172.16.20.2 with 32 bytes of data:
Reply from 172.16.20.2: bytes=32 time=1ms TTL=254
Reply from 172.16.20.2: bytes=32 time=2ms TTL=254
Reply from 172.16.20.2: bytes=32 time=5ms TTL=254
Reply from 172.16.20.2: bytes=32 time=1ms TTL=254
Ping statistics for 172.16.20.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 5ms, Average = 2ms
PC>ping 172.16.40.1
Pinging 172.16.40.1 with 32 bytes of data:
Reply from 172.16.40.1: bytes=32 time=7ms TTL=254
Reply from 172.16.40.1: bytes=32 time=8ms TTL=254
Reply from 172.16.40.1: bytes=32 time=9ms TTL=254
Reply from 172.16.40.1: bytes=32 time=5ms TTL=254
Ping statistics for 172.16.40.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 5ms, Maximum = 9ms, Average = 7ms
PC>ping 172.16.40.2
Pinging 172.16.40.2 with 32 bytes of data:
Reply from 172.16.40.2: bytes=32 time=12ms TTL=253
Reply from 172.16.40.2: bytes=32 time=15ms TTL=253
Reply from 172.16.40.2: bytes=32 time=6ms TTL=253
Reply from 172.16.40.2: bytes=32 time=7ms TTL=253
Ping statistics for 172.16.40.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 6ms, Maximum = 15ms, Average = 10ms
PC>ping 172.16.50.1
Pinging 172.16.50.1 with 32 bytes of data:
Reply from 172.16.50.1: bytes=32 time=4ms TTL=253
Reply from 172.16.50.1: bytes=32 time=9ms TTL=253
Reply from 172.16.50.1: bytes=32 time=6ms TTL=253
Reply from 172.16.50.1: bytes=32 time=2ms TTL=253
Ping statistics for 172.16.50.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 9ms, Average = 5ms
PC>ping 172.16.50.2
Pinging 172.16.50.2 with 32 bytes of data:
Request timed out.
Reply from 172.16.50.2: bytes=32 time=7ms TTL=125
Reply from 172.16.50.2: bytes=32 time=2ms TTL=125
Reply from 172.16.50.2: bytes=32 time=6ms TTL=125
Ping statistics for 172.16.50.2:
Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 7ms, Average = 5ms
PC>ping 172.16.50.2
Pinging 172.16.50.2 with 32 bytes of data:
Reply from 172.16.50.2: bytes=32 time=8ms TTL=125
Reply from 172.16.50.2: bytes=32 time=6ms TTL=125
Reply from 172.16.50.2: bytes=32 time=9ms TTL=125
Reply from 172.16.50.2: bytes=32 time=3ms TTL=125
Ping statistics for 172.16.50.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 3ms, Maximum = 9ms, Average = 6ms
PC>
PC>
由以上的测试,我们可以发现实验三在实验二的基础之上添加静态路由之后,可以实现从主机PC2到主机PC3的联通!
至此,我们的本次实验到此结束!