用RIP进行路径拓展
现在我们已经完成了Cisco路由器和Zebra软件的设置,接下来我们可以查看那些正在拓展的路径。在MRLG状态下,我们选择“show ip route”项,点击“Execute”,我们将获得一些报告。
利用Zebra显示的RIP路径:
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
B - BGP, > - selected route, * - FIB route
R>* 10.0.0.0/24 [120/2] via 192.168.2.2, eth0, 00:11:05
R>* 10.0.1.0/24 [120/2] via 192.168.1.2, eth1, 00:02:08
C>* 10.0.2.0/24 is directly connected, dummy0
K * 127.0.0.0/8 is directly connected, lo
C>* 127.0.0.0/8 is directly connected, lo
R>* 192.168.0.0/30 [120/2] via 192.168.2.2, eth0, 00:11:05
C>* 192.168.1.0/30 is directly connected, eth1
C>* 192.168.2.0/30 is directly connected, eth0
有R标志的路径是通过RIP获得的。
Zebra现在已经识别了基于路由器A和路由器B的两个网络10.0.0.0/24 和 10.0.1.0/24。我们可以在ThinkPad上运行ping 10.0.0.1和ping 10.0.1.1对网络连通情况进行检测。
为了检验网络发生故障时的应对措施,我们将连接路由器A的网络断开,大约超时2分钟后,Zebra开始通过路由器B绕道连接入10.0.0.0/24网。我们将在下期文中详解。
在上一期,我们已经完成了Cisco路由器和Zebra软件的设置,并介绍了查看那些正在拓展的路径的方法。而且,为了检验网络发生故障时的应对措施,我们将连接路由器A的网络断开。大约超时2分钟后,Zebra开始通过路由器B绕道接入10.0.0.0/24网。
断开路由器A后,Zebra显示的RIP路径为:
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
B - BGP, > - selected route, * - FIB route
R>* 10.0.0.0/24 [120/3] via 192.168.1.2, eth0, 00:00:26
R>* 10.0.1.0/24 [120/2] via 192.168.1.2, eth1, 00:06:02
C>* 10.0.2.0/24 is directly connected, dummy0
K * 127.0.0.0/8 is directly connected, lo
C>* 127.0.0.0/8 is directly connected, lo
R>* 192.168.0.0/30 [120/2] via 192.168.1.2, eth1, 00:00:26
C>* 192.168.1.0/30 is directly connected, eth1
C>* 192.168.2.0/30 is directly connected, eth0
为何总超时时间要超过2分钟呢?缺省的RIP超时只有30秒,但是RIP协议指定在确定无效路径前要进行3次重试(90秒),冲掉无效路径还需要大约240秒时间。由此可以证实RIP对于无效路径的反应是较迟钝的。
网络断开前,路由器A的路由选择如下:
RouterA#show ip route
Codes: C - connected, S - static, I - IGRP, 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, 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
10.0.0.0/24 is subnetted, 3 subnets
R 10.0.2.0 [120/1] via 192.168.2.1, 00:00:11, FastEthernet0/0
C 10.0.0.0 is directly connected, Loopback0
R 10.0.1.0 [120/1] via 192.168.0.2, 00:00:18, Serial0/0
192.168.0.0/30 is subnetted, 1 subnets
C 192.168.0.0 is directly connected, Serial0/0
192.168.1.0/30 is subnetted, 1 subnets
R 192.168.1.0 [120/1] via 192.168.0.2, 00:00:18, Serial0/0
[120/1] via 192.168.2.1, 00:00:11, FastEthernet0/0
192.168.2.0/30 is subnetted, 1 subnets
C 192.168.2.0 is directly connected, FastEthernet0/0
网络断开后,
)L|n5C8育:Z
路由器A的路由选择如下:
RouterA#show ip route
Codes: C - connected, S - static, I - IGRP, 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, 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
10.0.0.0/24 is subnetted, 3 subnets
R 10.0.2.0 [120/2] via 192.168.0.2, 00:00:09, Serial0/0
C 10.0.0.0 is directly connected, Loopback0
R 10.0.1.0 [120/1] via 192.168.0.2, 00:00:09, Serial0/0
192.168.0.0/30 is subnetted, 1 subnets
C 192.168.0.0 is directly connected, Serial0/0
192.168.1.0/30 is subnetted, 1 subnets
R 192.168.1.0 [120/1] via 192.168.0.2, 00:00:09, Serial0/0
192.168.2.0/30 is subnetted, 1 subnets
R 192.168.2.0 [120/2] via 192.168.0.2, 00:00:10, Serial0/0
通过Zebra设置OSPF路由选择
对RIP的设置完成后,接下来我们对OSPF路由选择进行设置。尽管OSPF和RIP可以同时使用,我们选择只使用OSPF,这样可以更加简单。要想从Zebra中终止RIP,只要利用下面的命令关闭ripd服务就行了。
# service ripd stop
