RIPv1与RIPv2相结合基本

R1配置:
R1(config)#int s1/0
R1(config-if)#ip address 192.1.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#int f0/0
R1(config-if)#ip address 148.1.1.254 255.255.255.0
R1(config-if)#no shutdown
R1(config)#router rip
R1(config-router)#version 1
R1(config-router)#network 192.1.1.0
R1(config-router)#network 148.1.1.0
R2配置:
R2(config)#int s1/0
R2(config-if)#ip address 192.1.1.2 255.255.255.0
R2(config-if)#clock rate 64000
R2(config-if)#no shutdown
R2(config-if)#int s1/1
R2(config-if)#ip address 193.1.1.1 255.255.255.0
R2(config-if)#clock rate 64000
R2(config-if)#no shutdown
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#network 193.1.1.0
R2(config-router)#network 192.1.1.0
R3配置:
R3(config)#int s1/1
R3(config-if)#ip address 193.1.1.2 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#int f0/0
R3(config-if)#ip address 152.1.1.254 255.255.255.0
R3(config-if)#no shutdown
R3(config)#router rip
R3(config-router)#version 1
R3(config-router)#network 193.1.1.0
R3(config-router)#network 152.1.1.0
在R2上输入调试命令查看:
R2#debug ip rip
RIP protocol debugging is on
R2#
*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 0
R2#
*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/0
R2(config-if)#ip rip send version 1
R2(config-if)#ip rip receive version 1
R2(config-if)#int s1/1
R2(config-if)#ip rip send version 1
R2(config-if)#ip rip receive version 1
R2#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
R    152.1.0.0/16 [120/1] via 193.1.1.2, 00:00:25, Serial1/1
C    193.1.1.0/24 is directly connected, Serial1/1
C    192.1.1.0/24 is directly connected, Serial1/0
R    148.1.0.0/16 [120/1] via 192.1.1.1, 00:00:17, Serial1/0
可看到R2可以接收到R1和R3的路由更新包,现在状态已经收敛完成拉。
我们在R2上再输入调式命令查看:
R2#debug ip rip
RIP protocol debugging is on
R2#
*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 1
R2#
*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 hops
R2#
*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 hops
R2#
*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/24
ip default-gateway:148.1.1.254
PC2:
IP:152.1.1.1/24
ip default-gateway:152.1.1.254
验证连通性:
PC1#ping 152.1.1.1
Type 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

本文出自 “甜蜜的T007之家” 博客,转载请与作者联系!

你可能感兴趣的:(职场,休闲,RIPv1,IPv2)