預配置:
R1(config-if)#int s2/1
R1(config-if)#ip add 12.0.0.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#int f0/0
R1(config-if)#ip add 123.0.0.1 255.255.255.0
R1(config-if)#ip add 123.0.0.1 255.255.255.0
R1(config-if)#no shide
R2(config)#int lo0
R2(config-if)#ip add 2.2.2.2 255.255.255.0
R2(config-if)#int s2/1
R2(config-if)#no sh
R2(config-if)#ip add 12.0.0.2 255.255.255.0
R2(config-if)#int f0/0
R2(config-if)#ip add 123.0.0.2 255.255.255.0
R2(config-if)#no shblog
第一步:在R1上添加兩條靜態路由並查看路由表
R1(config)#ip route 2.2.2.0 255.255.255.0 12.0.0.2
R1(config)#ip route 2.2.2.0 255.255.255.0 123.0.0.2 2接口
R1#sh ip rou
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 routeip
Gateway of last resort is not set路由
2.0.0.0/24 is subnetted, 1 subnets
S 2.2.2.0 [1/0] via 12.0.0.2
//這裏爲12.0.0.2
123.0.0.0/24 is subnetted, 1 subnets
C 123.0.0.0 is directly connected, FastEthernet0/0
12.0.0.0/24 is subnetted, 1 subnets
C 12.0.0.0 is directly connected, Serial2/1
R1#
第二步:模擬本地R1路由器上的S2/1接口death了
R1(config)#int s2/1
R1(config-if)#sh
R1(config-if)#exit
R1(config)#exit
第三步:查看down後的路由表
R1#sh ip rou
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 routeit
Gateway of last resort is not setio
2.0.0.0/24 is subnetted, 1 subnets
S 2.2.2.0 [2/0] via 123.0.0.2
//這裏爲123.0.0.2
123.0.0.0/24 is subnetted, 1 subnets
C 123.0.0.0 is directly connected, FastEthernet0/0
R1#
第四步:模擬工程人員修好了線路並查看路由表
R1(config)#int s2/1
R1(config-if)#no sh
R1(config-if)#exit
R1(config)#ast
R1(config)#do sh 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 routeclass
Gateway of last resort is not setmobile
2.0.0.0/24 is subnetted, 1 subnetsS 2.2.2.0 [1/0] via 12.0.0.2//高興的是12.0.0.2回來了,在這裏咱們向它問聲好吧!123.0.0.0/24 is subnetted, 1 subnetsC 123.0.0.0 is directly connected, FastEthernet0/012.0.0.0/24 is subnetted, 1 subnetsC 12.0.0.0 is directly connected, Serial2/1R1(config)#