查看完整版本: RIP中各种VERSION组合带来的问题?

还是我 2007-11-11 08:42

RIP中各种VERSION组合带来的问题?

我们都知道在配置RIP路由协议的时候需要指定Version ,如果两个路由器启动的版本不同,一个是VERSION 1 一个是 VERSION 2  那么会导致不兼容性问题,结果是彼此双方都不能学习到对方的路由,但是如果我们不指定VERSION  而使用系统默认值,那么RIP会被动接受VERSION 1 和VERSION 2 的路由更新,但是只会主动发送VERSION 1 更新,下面是各种可能的组合对路由学习的影响(见图)
[img=312,75]http://www.one-tom.com/bbs/uploads/20070628_162318_003.JPG[/img]
lo 1.1.1.1[b]  r1                                     [/b][b]r2[/b] lo 2.2.2.2

[img=551,329]http://www.one-tom.com/bbs/uploads/20070628_164128_005.JPG[/img]
[b]现在我们讨论一下RIP VERSION 2 和默认版本组合带来的问题?[/b]

实验目录
   [b][color=#ff0000] TOP图[/color][/b]
[b][color=#ff0000]    基本配置[/color][/b]
[b][color=#ff0000]    实验现象及其说明[/color][/b]
[b][color=#ff0000]    实验讨论[/color][/b]


[b]TOP图[/b]
[b]----------------------------[/b]
[img=659,291]http://www.one-tom.com/bbs/uploads/20070628_162230_002.JPG[/img]
----------------------------------------















[b]r1  基本配置[/b]

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
!

[b]--------------------------------[/b]
[b]r2  基本配置[/b]

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



[b]R1路由表[/b]

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 [color=#ff0000][b]// R1路由表没有收到R2的路由[/b][/color]
-------------------------------------------------
[b]r1 上DEBUG 信息[/b]
r1#debug ip rip
RIP protocol debugging is on
r1#
*Jun 28 05:17:41.455: [b]RIP: [color=#ff0000]sending v2 [/color]update to 224.0.0.9 via Serial1/0 (12.1.1.1) [color=#ff0000] //提示:R1 发送V 2 信息[/color]
[/b]*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: [b]RIP: ignored v1 packet from 12.1.1.2 [color=#ff0000](illegal version)  //提示:违反规定了,因为RIP  V 2 不接受 V 1 信息
[/color][/b]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
-----------------------------------------------------------------
[b]R2路由表[/b]
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
[color=#ff0000][b]R    1.0.0.0/8 [120/1] via 12.1.1.1, 00:00:17, Serial2/0  //学习到r1的路由了[/b][/color]
     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
-------------------------------------------------------------------------
[b]R2上的DEBUG  ip rip  信息[/b]
r2#deb ip rip
RIP protocol debugging is on
r2#
*Jun 28 05:18:01.691: [color=#ff0000][b]RIP: received v2 update[/b] 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//默认情况下接受版本一和版本二的更新

[/color]r2#
*Jun 28 05:18:12.891: [b]RIP: sending v1 update to 255.255.255.255 via Serial2/0 (12.1.1.2) [/b][color=#ff0000]//默认情况下发送版本一的更新[/color]

*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: [color=#ff0000][b]RIP: received v2 update[/b] 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 //默认情况下接受版本一和版本二的更新
[/color]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

-------------------------------------------------
[b][color=#333333]实验结果讨论:[/color][/b]
[b][color=#333333][/color][/b]
[color=#ff0000]R1没有学习到R2发送的路由,但是R2学习到了R1发送的路由,这是因为RIP 版本不兼容性导致的,但是这一现象让我们想起来被动接口在RIP中的功能,也就是说:如果我们不想让X路由器学习到自己路由表的路由,那么可以在连接X路由器的接口上启动被动接口,使路由不被别人学习到,在以上这个实验中确实正好相反,运行了RIP V 2 的路由器不能够学习到运行了RIP 默认 版本路由器的路由,只是在默认RIP版本路由器上有了对方的路由。[/color]


[b]比  较[/b]
[b][img=598,277]http://www.one-tom.com/bbs/uploads/20070628_164244_006.JPG[/img][/b]

苦涩寒水 2007-12-7 17:54

组合有优点也有缺点,要相容才能跟好,相克就不行
页: [1]
查看完整版本: RIP中各种VERSION组合带来的问题?