资源描述
双点双向重分布路由环路的产生
左边运行OSPF协议,右边运行RIPV2协议,首先在R2上进行双向重分布,再在R3上进行路由重分布。
基本配置省略。
R2(config-router)#redistribute rip metric 10 subnets
R2(config-router)#redistribute ospf 1 metric 4
R3上进行相同配置;
R2#sh ip rou
34.0.0.0/24 is subnetted, 1 subnets
O E2 34.34.34.0 [110/10] via 12.12.12.1, 01:45:24, Serial0/0
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/65] via 12.12.12.1, 01:45:24, Serial0/0
5.0.0.0/32 is subnetted, 1 subnets
R 5.5.5.5 [120/2] via 24.24.24.4, 00:00:26, Serial0/1
24.0.0.0/24 is subnetted, 1 subnets
C 24.24.24.0 is directly connected, Serial0/1
12.0.0.0/24 is subnetted, 1 subnets
C 12.12.12.0 is directly connected, Serial0/0
13.0.0.0/24 is subnetted, 1 subnets
O 13.13.13.0 [110/128] via 12.12.12.1, 01:45:26, Serial0/0
45.0.0.0/24 is subnetted, 1 subnets
R 45.45.45.0 [120/1] via 24.24.24.4, 00:00:01, Serial0/1
R3#sh ip rou
34.0.0.0/24 is subnetted, 1 subnets
C 34.34.34.0 is directly connected, Serial0/1
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/65] via 13.13.13.1, 01:46:10, Serial0/0
5.0.0.0/32 is subnetted, 1 subnets
O E2 5.5.5.5 [110/10] via 13.13.13.1, 01:46:10, Serial0/0
24.0.0.0/24 is subnetted, 1 subnets
O E2 24.24.24.0 [110/10] via 13.13.13.1, 01:46:10, Serial0/0
12.0.0.0/24 is subnetted, 1 subnets
O 12.12.12.0 [110/128] via 13.13.13.1, 01:46:10, Serial0/0
13.0.0.0/24 is subnetted, 1 subnets
C 13.13.13.0 is directly connected, Serial0/0
45.0.0.0/24 is subnetted, 1 subnets
O E2 45.45.45.0 [110/10] via 13.13.13.1, 01:46:13, Serial0/0
会看到,在R3上5.5.5.5这条路由条目的下一跳指向了13.13.13.1,即指向了R1,其路由类型为O E2,也就是从OSPF内学到。
当我们追踪到5.5.5.5的报文转发过程时,会发现绕了一圈,才到达5.5.5.5
R3#traceroute 5.5.5.5
Type escape sequence to abort.
Tracing the route to 5.5.5.5
1 13.13.13.1 84 msec 36 msec 36 msec
2 12.12.12.2 80 msec 44 msec 40 msec
3 24.24.24.4 40 msec 72 msec 24 msec
4 45.45.45.5 84 msec * 64 msec
-----------------------------------------------------------------------
分析:为什么会产生这个问题?
AD值。
首先在R2上进行双向重分布时,R2会把5.5.5.5这个路由条目传递到OSPF路由协议区域,此条目的优先级就是110,R1收到这个条目也会把它传递给R3;
这样R3由R1得到一条5.5.5.5路由条目,又由RIP路由协议区域内得到一条路由条目,其优先级为120。比较二者优先级,R3丢弃后者,先把了由R1学习到的路由条目
我们也可以看到1.1.1.1这条路由条目在两个边界路由器上的下一跳都没有问题,也就是说,当AD值 高的向AD值 低 的里面重分布时,会产生环路问题
展开阅读全文