静态路由的设置及相关命令( 二 )


.....
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
C172.16.1.0 is directly connected, EthernetO
 10.0.0.0/24 is subnetted, 1 subnets
S10.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
C172.16.1.0 is directly connected Ethernet0
 10.0.0.0/24 is subnetted,1 subnets
C10.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
 S172.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
 2 10.1.1.24msec 4 msec*
R3#
(键入ctrl shift 6, x切换回终端服务器)
第4段:禁用IP路由功能
Term_Server#1
[Resuming connection I to R1 ... ]
R1#conft
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#no ip routing
R1(config)#
R1#sh ip route
Default gateway is not set
Host Gateway Last Use Total Uses Interface
ICMP
R1#
(键入ctrl shift 6,x切回换回终端服务器)
Term_Server#3
[Resuming connection 3 to R3 ... ]
R3#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:
.!!!!
Success rate. ia 80 percent (4/5), round-trip min/avg/max=4/5/8ms

推荐阅读