RIPv1与RIPv2相结合基本配置 200705161179328295046.jpg (62.86 KB) 2007-5-19 23:55R1配置:R1(config)#int s1/0R1(config-if)#ip address 192.1.1.1 255.255.255.0R1(config-if)#no shutdownR1(config-if)#int f0/0R1(config-if)#ip address 148.1.1.254 255.255.255.0R1(config-if)#no shutdownR1(config)#router ripR1(config-router)#version 1R1(config-router)#network 192.1.1.0R1(config-router)#network 148.1.1.0R2配置:R2(config)#int s1/0R2(config-if)#ip address 192.1.1.2 255.255.255.0R2(config-if)#clock rate 64000R2(config-if)#no shutdownR2(config-if)#int s1/1R2(config-if)#ip address 193.1.1.1 255.255.255.0R2(config-if)#clock rate 64000R2(config-if)#no shutdownR2(config)#router ripR2(config-router)#version 2R2(config-router)#network 193.1.1.0R2(config-router)#network 192.1.1.0R3配置:R3(config)#int s1/1R3(config-if)#ip address 193.1.1.2 255.255.255.0R3(config-if)#no shutdownR3(config-if)#int f0/0R3(config-if)#ip address 152.1.1.254 255.255.255.0R3(config-if)#no shutdownR3(config)#router ripR3(config-router)#version 1R3(config-router)#network 193.1.1.0R3(config-router)#network 152.1.1.0在R2上输入调试命令查看:R2#debug ip ripRIP protocol debugging is onR2#*Mar 1 00:39:23.947: RIP: sending v2 update to 224.0.0.9 via Serial1/0 (192.1.1.2)*Mar 1 00:39:23.951: RIP: build update entries*Mar 1 00:39:23.951: 193.1.1.0/24 via 0.0.0.0, metric 1, tag 0R2#*Mar 1 00:39:29.239: RIP: ignored v1 packet from 193.1.1.2 (illegal version)R2#*Mar 1 00:39:33.347: RIP: ignored v1 packet from 192.1.1.1 (illegal version)R2#*Mar 1 00:39:43.823: RIP: sending v2 update to 224.0.0.9 via Serial1/1 (193.1.1.1)*Mar 1 00:39:43.827: RIP: build update entries*Mar 1 00:39:43.827: 192.1.1.0/24 via 0.0.0.0, metric 1, tag 0路由器忽略了RIPv1的更新包,所以我们还要在R2上做如下配置:R2(config)#int s1/0R2(config-if)#ip rip send version 1R2(config-if)#ip rip receive version 1R2(config-if)#int s1/1R2(config-if)#ip rip send version 1R2(config-if)#ip rip receive version 1R2#show ip routeCodes: 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 routeGateway of last resort is not setR 152.1.0.0/16 [120/1] via 193.1.1.2, 00:00:25, Serial1/1C 193.1.1.0/24 is directly connected, Serial1/1C 192.1.1.0/24 is directly connected, Serial1/0R 148.1.0.0/16 [120/1] via 192.1.1.1, 00:00:17, Serial1/0可看到R2可以接收到R1和R3的路由更新包,现在状态已经收敛完成拉。我们在R2上再输入调式命令查看:R2#debug ip ripRIP protocol debugging is onR2#*Mar 1 00:50:52.367: RIP: sending v1 update to 255.255.255.255 via Serial1/1 (193.1.1.1)*Mar 1 00:50:52.371: RIP: build update entries*Mar 1 00:50:52.371: network 148.1.0.0 metric 2*Mar 1 00:50:52.375: network 192.1.1.0 metric 1R2#*Mar 1 00:50:56.071: RIP: received v1 update from 193.1.1.2 on Serial1/1*Mar 1 00:50:56.075: 152.1.0.0 in 1 hopsR2#*Mar 1 00:50:58.415: RIP: received v1 update from 192.1.1.1 on Serial1/0*Mar 1 00:50:58.419: 148.1.0.0 in 1 hopsR2#*Mar 1 00:51:09.399: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (192.1.1.2)*Mar 1 00:51:09.403: RIP: build update entries*Mar 1 00:51:09.403: network 152.1.0.0 metric 2*Mar 1 00:51:09.407: network 193.1.1.0 metric 1可以看到R2可以发送和接受RIPv1的更新包了! 以下内容需要回复才能看到客户机配置:PC1:IP:148.1.1.1/24ip default-gateway:148.1.1.254PC2:IP:152.1.1.1/24ip default-gateway:152.1.1.254验证连通性:PC1#ping 152.1.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 152.1.1.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 188/235/328 ms

评论