2009/04/06

三向重发布路由缺失:只是特例情况的

三向重发布路由缺失:

-lo1(RIP)
R1--OSPF--R2--EIGRP--R3
----->
<-----

第一步: RIP--->OSPF

R2(config-router)#redistribute rip subnets

R1上有路由:
O E2 22.22.22.0 [110/20] via 12.1.1.2, 00:00:08, Serial1/1
而R3上没有
--->结论是,单点三向重发布,重发布路由作用只在相关的两个路由协议之间,不会再重发布给另一个协议。即,RIP重发布给OSPF的路由条目,OSPF不会再将这些条目重发布给EIGRP。
所以需要手动将RIP路由重发布到EIGRP中,需要执行重发布RIP两次。

R2(config-router)#redistribute rip metric 10000 255 100 1 255
R3上就会有:
D EX 22.22.22.0 [170/2235136] via 23.1.1.2, 00:00:08, Serial1/0

第二步:R2上
OSPF<----->EIGRP双向单点重发布

!
router eigrp 90
redistribute ospf 110 metric 10000 255 100 1 1500
redistribute rip metric 10000 255 100 1 255
network 2.2.2.2 0.0.0.0
network 23.1.1.2 0.0.0.0
no auto-summary
!
router ospf 110
router-id 2.2.2.2
log-adjacency-changes
redistribute eigrp 90 subnets
redistribute rip subnets
network 2.2.2.2 0.0.0.0 area 0
network 12.1.1.2 0.0.0.0 area 0
!
router rip
version 2
network 22.0.0.0
no auto-summary
!

第三步:比较三个路由器上的路由条目,都是6条路由。配置正确。

特殊情况:在重发布时使用route-map指定重发布的条目,而使用route-map是在重发布时推荐的做法。

!
router eigrp 90
redistribute connected route-map RIP2EIGRP
!
!
route-map RIP2EIGRP permit 10
match interface Loopback1
!

这样就会在R3上出现路由缺失的情况,因为route-map默认最后是deny any的,所有在redistribute connected route-map的情况下,只是重发布了route-map允许的路由,例如是lo1的路由,而redistribute connected会优于redistribute ospf,所以连R2直连的12.1.1.0网段路由都屏蔽了。如下:

R3#sh ip route

1.0.0.0/32 is subnetted, 1 subnets
D EX 1.1.1.1 [170/2235136] via 23.1.1.2, 00:01:43, Serial1/0
2.0.0.0/24 is subnetted, 1 subnets
D 2.2.2.0 [90/2297856] via 23.1.1.2, 00:01:43, Serial1/0
3.0.0.0/24 is subnetted, 1 subnets
C 3.3.3.0 is directly connected, Loopback0
23.0.0.0/24 is subnetted, 1 subnets
C 23.1.1.0 is directly connected, Serial1/0
22.0.0.0/24 is subnetted, 1 subnets
D EX 22.22.22.0 [170/2297856] via 23.1.1.2, 00:00:49, Serial1/0

实验做到这里,感觉好像是因为自己在重发布的时候画蛇添足了,为何要这样人为地制造麻烦呢,直接redistribute rip route-map 不就行了。。。但是如果在以后需要用到重发布直连redistribute connected route-map,那么可能这些考虑就用到了。。。

这种情况原因:route-map匹配考虑不周全。
解决办法:
R2(config)#route-map RIP2EIGRP permit 20
R2(config-route-map)#end
R2#

R3#sh ip route

1.0.0.0/32 is subnetted, 1 subnets
D EX 1.1.1.1 [170/2235136] via 23.1.1.2, 00:12:59, Serial1/0
2.0.0.0/24 is subnetted, 1 subnets
D 2.2.2.0 [90/2297856] via 23.1.1.2, 00:12:59, Serial1/0
3.0.0.0/24 is subnetted, 1 subnets
C 3.3.3.0 is directly connected, Loopback0
23.0.0.0/24 is subnetted, 1 subnets
C 23.1.1.0 is directly connected, Serial1/0
22.0.0.0/24 is subnetted, 1 subnets
D EX 22.22.22.0 [170/2297856] via 23.1.1.2, 00:12:05, Serial1/0
12.0.0.0/24 is subnetted, 1 subnets
D EX 12.1.1.0 [170/2681856] via 23.1.1.2, 00:00:06, Serial1/0

同样在RIP直连重发布到OSPF中如果使用route-map的时候也要考虑这些情况。

没有评论:

发表评论