我们都知道在
配置RIP路由协议的时候需要指定Version ,如果两个
路由器启动的版本不同,一个是VERSION 1 一个是 VERSION 2 那么会导致不兼容性问题,结果是彼此双方都不能
学习到对方的路由,但是如果我们不指定VERSION 而使用系统默认值,那么RIP会被动接受VERSION 1 和VERSION 2 的路由更新,但是只会主动发送VERSION 1 更新,下面是各种可能的组合对路由
学习的影响(见图)

lo 1.1.1.1
r1 r2 lo 2.2.2.2
现在我们讨论一下RIP VERSION 2 和默认版本组合带来的问题?
实验目录
TOP图
基本配置
实验现象及其说明
实验讨论
TOP图
----------------------------

----------------------------------------
r1 基本配置
nterface Loopback0
ip address 1.1.1.1 255.255.255.0
!interface Serial1/0
ip address 12.1.1.1 255.255.255.0
serial restart-delay 0
router
rip
version 2
network 1.0.0.0
network 12.0.0.0
!
--------------------------------
r2 基本配置
interface Loopback0
ip address 2.2.2.2 255.255.255.0
interface Serial2/0
ip address 12.1.1.2 255.255.255.0
serial restart-delay 0
!
router rip
network 2.0.0.0
network 12.0.0.0
R1路由表
r1#sh ip ro
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
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial1/0
// R1路由表没有收到R2的路由
-------------------------------------------------
r1 上DEBUG 信息
r1#debug ip rip
RIP protocol debugging is on
r1#
*Jun 28 05:17:41.455:
RIP: sending v2 update to 224.0.0.9 via Serial1/0 (12.1.1.1) //提示:R1 发送V 2 信息
*Jun 28 05:17:41.455: RIP: build update entries
*Jun 28 05:17:41.455: 1.0.0.0/8 via 0.0.0.0, metric 1, tag 0
r1#
*Jun 28 05:17:49.235: RIP: sending v2 update to 224.0.0.9 via Loopback0 (1.1.1.1)
*Jun 28 05:17:49.235: RIP: build update entries
*Jun 28 05:17:49.235: 12.0.0.0/8 via 0.0.0.0, metric 1, tag 0
*Jun 28 05:17:49.235: RIP: ignored v2 packet from 1.1.1.1 (sourced from one of our addresses)
r1#
*Jun 28 05:17:52.675:
RIP: ignored v1 packet from 12.1.1.2 (illegal version) //提示:违反规定了,因为RIP V 2 不接受 V 1 信息
r1#
*Jun 28 05:18:10.707: RIP: sending v2 update to 224.0.0.9 via Serial1/0 (12.1.1.1)
*Jun 28 05:18:10.707: RIP: build update entries
*Jun 28 05:18:10.707: 1.0.0.0/8 via 0.0.0.0, metric 1, tag 0
r1#
*Jun 28 05:18:18.095: RIP: sending v2 update to 224.0.0.9 via Loopback0 (1.1.1.1)
*Jun 28 05:18:18.095: RIP: build update entries
*Jun 28 05:18:18.095: 12.0.0.0/8 via 0.0.0.0, metric 1, tag 0
*Jun 28 05:18:18.095: RIP: ignored v2 packet from 1.1.1.1 (sourced from one of our addresses)
*Jun 28 05:18:18.467: RIP: ignored v1 packet from 12.1.1.2 (illegal version)
*Jun 28 05:18:38.943: RIP: sending v2 update to 224.0.0.9 via Serial1/0 (12.1.1.1)
*Jun 28 05:18:38.943: RIP: build update entries
-----------------------------------------------------------------
R2路由表
r2#sh ip ro
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 1.0.0.0/8 [120/1] via 12.1.1.1, 00:00:17, Serial2/0 //学习到r1的路由了
2.0.0.0/24 is subnetted, 1 subnets
C 2.2.2.0 is directly connected, Loopback0
24.0.0.0/24 is subnetted, 1 subnets
C 24.1.1.0 is directly connected, Serial1/0
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial2/0
-------------------------------------------------------------------------
R2上的DEBUG ip rip 信息
r2#deb ip rip
RIP protocol debugging is on
r2#
*Jun 28 05:18:01.691:
RIP: received v2 update from 12.1.1.1 on Serial2/0
*Jun 28 05:18:01.691: 1.0.0.0/8 via 0.0.0.0 in 1 hops//默认情况下接受版本一和版本二的更新
r2#
*Jun 28 05:18:12.891:
RIP: sending v1 update to 255.255.255.255 via Serial2/0 (12.1.1.2) //默认情况下发送版本一的更新
*Jun 28 05:18:12.891: RIP: build update entries
*Jun 28 05:18:12.891: network 2.0.0.0 metric 1
r2#
*Jun 28 05:18:22.399: RIP: sending v1 update to 255.255.255.255 via Loopback0 (2.2.2.2)
*Jun 28 05:18:22.399: RIP: build update entries
*Jun 28 05:18:22.399: network 1.0.0.0 metric 2
*Jun 28 05:18:22.399: network 12.0.0.0 metric 1
r2#
*Jun 28 05:18:30.939:
RIP: received v2 update from 12.1.1.1 on Serial2/0
*Jun 28 05:18:30.939: 1.0.0.0/8 via 0.0.0.0 in 1 hops //默认情况下接受版本一和版本二的更新
r2#
*Jun 28 05:18:38.679: RIP: sending v1 update to 255.255.255.255 via Serial2/0 (12.1.1.2)
*Jun 28 05:18:38.679: RIP: build update entries
*Jun 28 05:18:38.679: network 2.0.0.0 metric 1
r2#
*Jun 28 05:18:49.859: RIP: sending v1 update to 255.255.255.255 via Loopback0 (2.2.2.2)
*Jun 28 05:18:49.859: RIP: build update entries
*Jun 28 05:18:49.859: network 1.0.0.0 metric 2
*Jun 28 05:18:49.859: network 12.0.0.0 metric 1
-------------------------------------------------
实验结果讨论:
R1没有学习到R2发送的路由,但是R2学习到了R1发送的路由,这是因为RIP 版本不兼容性导致的,但是这一现象让我们想起来被动接口在RIP中的功能,也就是说:如果我们不想让X路由器学习到自己路由表的路由,那么可以在连接X路由器的接口上启动被动接口,使路由不被别人学习到,在以上这个实验中确实正好相反,运行了RIP V 2 的路由器不能够学习到运行了RIP 默认 版本路由器的路由,只是在默认RIP版本路由器上有了对方的路由。
比 较
