实验15:静态路由的设置及相关命令

 1.实验目的
  
  通过本实验,读者可以掌握以下技能:
  设置静态路由
  设置启用路由器的路由功能
  查看路由表
  ping和trace命令的使用
  
  2.设备需求
  
  3台Cisco路由器,其中1台具有2个以太网接口,其余2台至少具有1个以太网接口;
  2台Hub,4条双绞线 (也可以用2条交叉网线直接把3台路由器连接起来)
  1台终端服务器,如cisco 2509路由器,及用于反向Telnet的相应线缆;
  1台带有超级终端程序的PC机,以及Console电缆及转接器。
  
  3.拓扑结构及配置说明
  
  本实验的拓扑结构如图4-2所示。
  


  3台路由器分别命名为R1、R2和R3,所使用的接口和相应的IP地址分配如图4.2中的标注。图中的"/24"表示子网掩码为24位,即255.255.255.0。
  实验中,应使用静态路由的设置。实现R2到R3在IP层的连通性,即要求从R2可以ping通R3,反之亦然。
  
  4.实验配置及监测结果
  
  首先,根据拓扑结构图的要求,正确配置各路由器的以太网接口。
  接下来的实验记录是从接口的配置工作完成之后开始的,具体内容见配置清单4-1。
  
  配置清单4-1配置和监测静态路由
  
  第1段:测试基本的连通性
  Term_Server#1
  [Resuming connection I to R1 ...]
  R1#ping 10.1.1.2
  Type escape sequence to abort.
  Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:
  !!!!!
  Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms
  Ripping 172.16.1.3
  Type escape sequence to abort.
  Sending 5, 100-byte ICMP Echos to 172.16.1.3, timeout is 2 seconds:
  .!!!!
  Success rate is 80 percent (4/5), round-trip min/avg/max = 4/4/4 ms
  R1#
  (键入ctrl+shift+6,x,切换回终端服务器)
  Term_Server#2
  [Resuming connection 2 to R2 ... ]
  
  R2#ping 172.16.1.1
  Type escape sequence to abort.
  Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
  .....
  R2#sh ip route
  Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
     D - EIGRP, EX - EIGRP external, 0 - OSPF, IA - OSPF inter area
     N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
     E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
     i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
     * - candidate default, U - per-user static route, o - ODR
     P - periodic downloaded static route
  
  Gateway of last resort is not set
    第2段:加入静态路由并测试连通性
  R2#conft
  Enter configuration commands, one per line. End with CNTL/Z,
  R2(config)#ip route 172.16.1.0 255.255.255.0 10.1.1.1
  R2(config)#end
  R2#sh ip route
  Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
     D - EIGRP, EX - EIGRP external, 0 - OSPF, IA - OSPF inter area
     N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
     E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
     i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
     * - candidate default, U- per-user static route, o - ODR
     P - periodic downloaded static route
  Gateway of last resort is not set
     
     172.16.0.0/24 is subnetted, 1 subnets
   S     172.16.1.0[1/0]via 10.1.0.1
     10.0.0.0/24 is subnetted,1subnets
  C 10.1.1.0 is directly connected, EthernetO
  R2#ping 172.16.1.1
  Type escape sequence to abort.
  Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
  HW
  R2#ping 172.16.1.3
  Type escape sequence to abort.
  Sending 5, 100-byte ICMP Echos 10172.16.1.3, timeout is 2 seconds:
  .....
  success rate is 0 percent(0/5)
  R2#
  (键入ctrl+shift+6,x,切换回终端服务器)
  Term_Server#3
  [Resuming connection 3 to R3 ... ]
  R3#conft
  Enter configuration commands, one per line. End with CNTL/Z.
  R3(config)#ip route 10.1.1.0 255.255.255.0 172.16.1.1
  R3(config)#^Z
  R3#ping 10.1.1.2
  Type escape sequence to abort.
  Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:
  !!!!!
  Success rate is 100 percent (5/5), round-trip min/avg/max = 4/5/8 ms
  R3#
  R3#sh ip route
  Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
     D - EIGRP, EX - EIGRP externa1, 0 -OSPF, IA - OSPF inter area
     N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
     E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
     i - IS-IS, LI - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
     * - candidate default, U - per-user static route, o - ODR
     P - periodic downloaded static route
  
  Gateway of last resort is not set
  
     172.16.0.0/24 is subnetted, 1 subnets
  C    172.16.1.0 is directly connected, EthernetO
     10.0.0.0/24 is subnetted, 1 subnets
  S    10.1.1.0[1/0]via 172.16.1.1
  .
  R3#
  Term_Server#1
  [Resuming connection I to R1 ... ]
  R1#sh ip route
  Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
     D - EIGRP, EX - EIGRP external, 0 - OSPF, IA - OSPF inter area
     N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
     E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
     i - IS-IS, LI - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
     * - candidate default, U - per-user static route, o - ODR
     P - periodic downloaded static route
  
  Gateway of last resort is not set
  
     172.16.0.0/24 is subnetted,1 subnets
  C    172.16.1.0 is directly connected Ethernet0
     10.0.0.0/24 is subnetted,1 subnets
  C    10.1.1.0 is directly connected Ethernet0
  R1#
  (键入ctrl+shift+6, x切换回终端服务器)
  Term_Server#2
  [Resuming connection 2 to R2 ... ]
  R2#sh ip route
  Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
     D - EIGRP, EX - EIGRP external, 0 - OSPF, IA - OSPF inter area
     N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
     E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
     i - IS-IS, LI - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
     * - candidate default, U - per-user static route, o - ODR
     P - periodic downloaded static route
  
  Gateway of last resort is not set
  
   S  172.16.0.0/24 is subnetted, 1 subnets
     10.0.0.0/24 is subnetted, 1 subnets
   C   10.1.1.0 is directly connected, Ethernet0
  R2#
  (键入ctrl+shift+6, x切换回终端服器)
  第3段:使用trace命令
  Term_Server#3
  [Resuming connection 3 to R3 ... ]
  R3#trace 10.1.1.2
  Type escape sequence to abort.
  Tracing the route to 10.1.1.2
   1 172.16.1.14msec 4 msec 4 msec

本文出自 “小菜鸟” 博客,转载请与作者联系!

你可能感兴趣的:(Cisco,路由器,路由表,的,以太网)