实验三————配置静态路由

实验目的

通过本实验,可以掌握以下技能:

  • 配置接口IP地址。
  • 配置静态路由。
  • 验证静态路由的配置。

 设备需求

  • Cisco路由器3台,分别命名为RouterA、RouterB和RouterC。其中RouterA具有1个以太网接口和1个串行接口;RouterB具有1个以太网接口和2个串行接口;RouterC具有1个以太网接口和1个串行接口。
  • 3根交叉线序双绞线,2根串行线。
  • 1台access server,及用于反向Telnet的相应电缆。
  • 1台带有超级终端程序的PC机,以及Console电缆及转接器。
  •  拓扑结构及配置说明

实验的拓扑结构如图10-2所示。通过2根串行线分别把RouterA和RouterB连接起来,RouterB和RouterC连接起来。


各路由器使用的接口及其编号见图10-2所示的标注,各接口IP地址分配如下:

  • RouterA: E0:172.16.11.1  S0:172.16.20.1
  • RouterB:E0:172.16.10.6  S0:172.16.20.2  S1:172.16.40.1 
  • RouterC: E0:172.16.50.1  S0:172.16.40.2

实验配置

基本网络配置

这个实验的这一步和之前的实验二一样,这里不再复述,最后的网络拓扑如下


配置静态路由

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)#

验证静态路由配置

RouterA:

RouterB:

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的联通!

至此,我们的本次实验到此结束!

猜你喜欢

转载自blog.csdn.net/fly_hps/article/details/80458040