C114门户论坛百科APPEN| 举报 切换到宽版

亚星游戏官网

 找回密码
 注册

只需一步,快速开始

短信验证,便捷登录

搜索
查看: 1721|回复: 0

双向双点重分发 [复制链接]

军衔等级:

亚星游戏官网-yaxin222  新兵

注册:2010-7-20
发表于 2020-5-25 16:19:25 |显示全部楼层
亚星游戏官网-yaxin222


基本配置:
RT1:
routerospf 1
router-id 1.1.1.1
log-adjacency-changes
network 192.168.23.0 0.0.0.255 area 0
routerrip
version 2
network 192.168.12.0
no auto-summary
RT2:
routerrip
version 2
network 192.168.10.0
network 192.168.12.0
network 192.168.14.0
no auto-summary
RT3:
routerospf 1
router-id 3.3.3.3
log-adjacency-changes
network 192.168.23.0 0.0.0.255 area 0
network 192.168.30.0 0.0.0.255 area 0
network 192.168.34.0 0.0.0.255 area 0
RT4:
routerospf 1
router-id 4.4.4.4
log-adjacency-changes
network 192.168.34.0 0.0.0.255 area 0
routerrip
version 2
network 192.168.14.0
no auto-summary
RT1RT2RT3RT4
ints0/0     
ip ospf cost 1//设置开销和F口相同,以便形成负载均衡
查看RT1RT2RT3RT4路由表:
RT1#show ip route

C    192.168.12.0/24 is directly connected,FastEthernet1/0
R    192.168.14.0/24 [120/1] via 192.168.12.2,00:00:04, FastEthernet1/0
     192.168.30.0/32 is subnetted, 1 subnets
O       192.168.30.1 [110/2] via 192.168.23.2,00:00:41, Serial0/0
R    192.168.10.0/24 [120/1] via 192.168.12.2,00:00:04, FastEthernet1/0
C    192.168.23.0/24 is directly connected,Serial0/0
O    192.168.34.0/24 [110/2] via 192.168.23.2,00:00:41, Serial0/0
RT2#showip route
C    192.168.12.0/24 is directly connected,FastEthernet1/0
C    192.168.14.0/24 is directly connected,Serial0/0
C    192.168.10.0/24 is directly connected,Loopback0
RT3#showip route
C    192.168.30.0/24 is directly connected,Loopback0
C    192.168.23.0/24 is directly connected,Serial0/0
C    192.168.34.0/24 is directly connected,FastEthernet1/0
RT4#showip route
R    192.168.12.0/24 [120/1] via 192.168.14.2,00:00:20, Serial0/0
C    192.168.14.0/24 is directly connected,Serial0/0
     192.168.30.0/32 is subnetted, 1 subnets
O       192.168.30.1 [110/2] via 192.168.34.2,00:01:39, FastEthernet1/0
R    192.168.10.0/24 [120/1] via 192.168.14.2,00:00:20, Serial0/0
O    192.168.23.0/24 [110/2] via 192.168.34.2,00:01:39, FastEthernet1/0
C    192.168.34.0/24 is directly connected,FastEthernet1/0

RT1上将OSPF重分发进RIP
RT1
routerrip
redistribute ospf 1 metric 3
查看RT2RT4路由表:
RT2#show ip route

C    192.168.12.0/24 is directly connected,FastEthernet1/0
C    192.168.14.0/24 is directly connected,Serial0/0
     192.168.30.0/32 is subnetted, 1 subnets
R       192.168.30.1 [120/3]via 192.168.12.1, 00:00:13, FastEthernet1/0
C    192.168.10.0/24 is directly connected,Loopback0
R    192.168.23.0/24 [120/3]via 192.168.12.1, 00:00:13, FastEthernet1/0
R    192.168.34.0/24 [120/3]via 192.168.12.1, 00:00:13, FastEthernet1/0
RT4#showip route
R    192.168.12.0/24 [120/1] via 192.168.14.2,00:00:14, Serial0/0
C    192.168.14.0/24 is directly connected,Serial0/0
     192.168.30.0/32 is subnetted, 1 subnets
O       192.168.30.1 [110/2] via 192.168.34.2,00:07:21, FastEthernet1/0
R    192.168.10.0/24 [120/1] via 192.168.14.2,00:00:14, Serial0/0
O    192.168.23.0/24 [110/2] via 192.168.34.2,00:07:22, FastEthernet1/0
C    192.168.34.0/24 is directly connected,FastEthernet1/0

可知:RT2学习到了OSPF区域中的路由且路由正常;RT4路由表没有发生变化。
再在RT4上将OSPF重分发进RIP
RT4
routerrip
redistribute ospf 1 metric 3
查看RT2RT4路由表:
RT2#show ip route

C    192.168.12.0/24 is directly connected,FastEthernet1/0
C    192.168.14.0/24 is directly connected,Serial0/0
     192.168.30.0/32 is subnetted, 1 subnets
R       192.168.30.1 [120/3] via192.168.14.1, 00:00:03, Serial0/0
                     [120/3]via 192.168.12.1, 00:00:10, FastEthernet1/0
C    192.168.10.0/24 is directly connected,Loopback0
R    192.168.23.0/24 [120/3]via 192.168.14.1, 00:00:03, Serial0/0
                     [120/3]via 192.168.12.1, 00:00:10, FastEthernet1/0
R    192.168.34.0/24 [120/3]via 192.168.14.1, 00:00:03, Serial0/0
                     [120/3] via 192.168.12.1,00:00:10, FastEthernet1/0

可知:RT2上关于OSPF区域中的路由正常,形成了负载均衡。
小结:将OSPFRIP路由表正常,没有出现问题。
RT1上将RIP重分发进OSPF
RT1
routerospf 1
redistribute rip  metric 3 subnets
查看RT1RT3RT4路由表:
RT1(config-router)#do show ip ro

C    192.168.12.0/24 is directly connected,FastEthernet1/0
R    192.168.14.0/24 [120/1] via 192.168.12.2,00:00:07, FastEthernet1/0
     192.168.30.0/32 is subnetted, 1 subnets
O       192.168.30.1 [110/65] via 192.168.23.2,00:02:24, Serial0/0
R    192.168.10.0/24 [120/1] via 192.168.12.2,00:00:07, FastEthernet1/0
C    192.168.23.0/24 is directly connected,Serial0/0
O    192.168.34.0/24 [110/65] via 192.168.23.2,00:02:24, Serial0/0
RT3#showip route
O E2192.168.12.0/24 [110/3] via 192.168.23.1, 00:00:15, Serial0/0
O E2192.168.14.0/24 [110/3] via 192.168.23.1, 00:00:15, Serial0/0
C    192.168.30.0/24 is directly connected,Loopback0
O E2192.168.10.0/24 [110/3] via 192.168.23.1, 00:00:15, Serial0/0
C    192.168.23.0/24 is directly connected,Serial0/0
C    192.168.34.0/24 is directly connected,FastEthernet1/0
RT4(config-router)#doshow ip route
O E2 192.168.12.0/24 [110/3] via 192.168.34.2, 00:01:00,FastEthernet1/0
C    192.168.14.0/24 is directly connected,Serial0/0
     192.168.30.0/32 is subnetted, 1 subnets
O       192.168.30.1 [110/2] via 192.168.34.2,00:01:00, FastEthernet1/0
O E2 192.168.10.0/24 [110/3] via 192.168.34.2, 00:01:00,FastEthernet1/0
O    192.168.23.0/24 [110/2] via 192.168.34.2,00:01:00, FastEthernet1/0
C    192.168.34.0/24 is directly connected,FastEthernet1/0

可知:RT1路由表没有变化;RT3学习到了RIP区域的路由,且单点重分发RIPOSPF时路由正常;RT4出现了次佳路径,192.168.10.0/24192.168.12.0/24网段的下一跳变为了RT3
再在RT4:上将RIP重分发进OSPF
RT4
routerospf 1
redistribute rip metric 3 subnets
查看RT1RT3RT4路由表:
RT1(config-router)#do show ip ro

C    192.168.12.0/24 is directly connected,FastEthernet1/0
O E2 192.168.14.0/24 [110/3] via 192.168.23.2, 00:00:13, Serial0/0
     192.168.30.0/32 is subnetted, 1 subnets
O       192.168.30.1 [110/2] via 192.168.23.2,00:00:13, Serial0/0
R    192.168.10.0/24 [120/1] via 192.168.12.2,00:00:23, FastEthernet1/0
C    192.168.23.0/24 is directly connected,Serial0/0
O    192.168.34.0/24 [110/2] via 192.168.23.2,00:00:13, Serial0/0
RT3#showip route
O E2 192.168.12.0/24 [110/3] via 192.168.23.1, 00:00:47, Serial0/0
O E2 192.168.14.0/24 [110/3] via 192.168.34.1, 00:00:47,FastEthernet1/0
C    192.168.30.0/24 is directly connected, Loopback0
O E2 192.168.14.0/24 [110/3] via 192.168.23.1, 00:00:47, Serial0/0
C    192.168.23.0/24 is directly connected,Serial0/0
C    192.168.34.0/24 is directly connected,FastEthernet1/0
RT4(config-router)#doshow ip ro
O E2192.168.12.0/24 [110/3] via 192.168.34.2, 00:01:35, FastEthernet1/0
C    192.168.14.0/24 is directly connected,Serial0/0
     192.168.30.0/32 is subnetted, 1 subnets
O       192.168.30.1 [110/2] via 192.168.34.2,00:01:35, FastEthernet1/0
O E2192.168.10.0/24 [110/3] via 192.168.34.2, 00:01:35, FastEthernet1/0
O    192.168.23.0/24 [110/2] via 192.168.34.2,00:01:35, FastEthernet1/0
C    192.168.34.0/24 is directly connected,FastEthernet1/0

可知:RT1出现了次佳路径,192.168.10.0/24网段的下一跳变为了RT3RT3学习到了RIP区域的路由,但路由不正常,双点重分发RIPOSPFRIP区域的路由没有形成负载均衡;RT4路由表较上次没有变化,依然存在次佳路径。
小结:
RIP重分发进OSPF时,OSPFASBR的路由表会出现次佳路径,因OSPFAD110)值小于RIP120)的AD值,故当进行重分发后,会选择OSPF路由放到全局路由表中,形成了次佳路径,
而其他路由器在双点重分发时关于RIP的路由没有形成负载均衡的原因,因其中一台ASBR中的RIP路由已变成了OSPF路由,重分发时不会将该路由再进行重分发。
上例的RT3RIP路由没有形成负载均衡即是因为RT4重分发后,192.168.10.0/24192.168.12.0/24没有进行重分发。RT1192.168.14.0/24也没有进行重分发。
解决方法:
修改OSPF外部AD值,使其大于RIPAD值。
配置:
RT1RT4
routerospf 1
distance ospf external 130
查看RT1RT3RT4路由表:
RT3#show ip route

O E2 192.168.12.0/24 [110/3] via 192.168.34.1, 00:00:21,FastEthernet1/0
                     [110/3] via 192.168.23.1,00:00:21, Serial0/0
O E2 192.168.14.0/24 [110/3] via 192.168.34.1, 00:00:36,FastEthernet1/0
                     [110/3]via 192.168.23.1, 00:00:36, Serial0/0
C    192.168.30.0/24 is directly connected,Loopback0
O E2 192.168.10.0/24 [110/3] via 192.168.34.1, 00:00:36,FastEthernet1/0
                     [110/3]via 192.168.23.1, 00:00:36, Serial0/0
C    192.168.23.0/24 is directly connected,Serial0/0
C    192.168.34.0/24 is directly connected,FastEthernet1/0
RT1(config-router)#doshow ip ro                      
C    192.168.12.0/24 is directly connected,FastEthernet1/0
R    192.168.14.0/24 [120/1]via 192.168.12.2, 00:00:22, FastEthernet1/0
     192.168.30.0/32 is subnetted, 1 subnets
O       192.168.30.1 [110/2] via 192.168.23.2,00:01:36, Serial0/0
R    192.168.10.0/24 [120/1]via 192.168.12.2, 00:00:22, FastEthernet1/0
C    192.168.23.0/24 is directly connected,Serial0/0
O    192.168.34.0/24 [110/2] via 192.168.23.2,00:01:36, Serial0/0
RT4(config-router)#doshow ip ro                        
R    192.168.12.0/24 [120/1]via 192.168.14.2, 00:00:04, Serial0/0
C    192.168.14.0/24 is directly connected,Serial0/0
     192.168.30.0/32 is subnetted, 1 subnets
O       192.168.30.1 [110/2] via 192.168.34.2,00:01:14, FastEthernet1/0
R    192.168.10.0/24 [120/1]via 192.168.14.2, 00:00:04, Serial0/0
O    192.168.23.0/24 [110/2] via 192.168.34.2,00:01:14, FastEthernet1/0
C    192.168.34.0/24 is directly connected,FastEthernet1/0

可知:RT3关于RIP区域的路由形成负载均衡,RT1RT4也没有出现次佳路径,问题已解决。
总结:
双点双向重分发时,需要注意两边路由协议进入全局路由表的优先级即AD值,AD值小的重分发进AD值大的不会出现问题,对于AD值大的重分发进AD值小的情况,应修改AD值,使其不会出现次佳路径等问题。还需注意的是:外部AD值、内部AD值,以及重分发的顺序问题。

举报本楼

您需要登录后才可以回帖 登录 | 注册 |

手机版|C114 ( 沪ICP备12002291号-1 )|联系大家 |网站地图  

GMT+8, 2024-11-19 05:41 , Processed in 0.682622 second(s), 15 queries , Gzip On.

Copyright © 1999-2023 C114 All Rights Reserved

Discuz Licensed

回顶部
XML 地图 | Sitemap 地图