在学习ccnp之前想通做ccna所有的实验!就在刚上手时就遇到问题了!废话不多说!直接进入主题:
做最简单的静态浮动路由,通过e口做默认的静态路由,通过s口做管理距离为100的静态路由,然后查看路由表:结果默认管理距离的路由被添加到路由表,完全正确,接下来问题出现了!
我down掉其中一台路由器的e口,在其查看路由表,果然管理距离为100的浮动路由被加进来了,但是另一台路由器路由表却保持不变,还是管理距离为1的路由条目:
R1的配置:
!
interface Loopback0
ip address 172.16.1.1 255.255.255.0
!
interface Ethernet0/0
ip address 172.16.21.1 255.255.255.0
shutdown
interface Serial1/0
ip address 172.16.12.1 255.255.255.0
serial restart-delay 0
no ip http server
ip route 172.16.2.0 255.255.255.0 172.16.21.2
ip route 172.16.2.0 255.255.255.0 172.16.12.2 100
R2的配置:
interface Loopback0
ip address 172.16.2.2 255.255.255.0
!
interface Ethernet0/0
ip address 172.16.21.2 255.255.255.0
half-duplex
interface Serial1/0
ip address 172.16.12.2 255.255.255.0
serial restart-delay 0
!
no ip http server
ip route 172.16.1.0 255.255.255.0 172.16.21.1
ip route 172.16.1.0 255.255.255.0 172.16.12.1 100
down掉R1的e口之前的路由表:
R1:
R1#show ip rout
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - 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
i - IS-IS, su - IS-IS summary, 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, 4 subnets
C 172.16.21.0 is directly connected, Ethernet0/0
C 172.16.12.0 is directly connected, Serial1/0
C 172.16.1.0 is directly connected, Loopback0
S 172.16.2.0 [1/0] via 172.16.21.2
R2:
R2#show ip rout
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - 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
i - IS-IS, su - IS-IS summary, 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, 4 subnets
C 172.16.21.0 is directly connected, Ethernet0/0
C 172.16.12.0 is directly connected, Serial1/0
S 172.16.1.0 [1/0] via 172.16.21.1
C 172.16.2.0 is directly connected, Loopback0
down掉之前路由表完全正确,下面down掉R1的e口:路由表如下
R1:
R1#
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#int e0/0
R1(config-if)#shut
R1(config-if)#end
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - 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
i - IS-IS, su - IS-IS summary, 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, 3 subnets
C 172.16.12.0 is directly connected, Serial1/0
C 172.16.1.0 is directly connected, Loopback0
S 172.16.2.0 [100/0] via 172.16.12.2
R1的路由表添加了管理距离为100的浮动路由,下面看R2的路由表
R2:
R2#show ip rout
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - 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
i - IS-IS, su - IS-IS summary, 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, 4 subnets
C 172.16.21.0 is directly connected, Ethernet0/0
C 172.16.12.0 is directly connected, Serial1/0
S 172.16.1.0 [1/0] via 172.16.21.1
C 172.16.2.0 is directly connected, Loopback0
R2的路由表却没有变
下面我们从R2ping172.16.1.1
R2#show ip rout
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - 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
i - IS-IS, su - IS-IS summary, 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, 4 subnets
C 172.16.21.0 is directly connected, Ethernet0/0
C 172.16.12.0 is directly connected, Serial1/0
S 172.16.1.0 [1/0] via 172.16.21.1
C 172.16.2.0 is directly connected, Loopback0
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:
.....
Success rate is 0 percent (0/5)
大家看明白了吧?这个问题不懂是什么问题,配置应该没问题,但是问题却出现了,大家各抒己见!目的是解决问题
|