双点双向重发布控制

  双点双向重发布控制
实验需求及应用环境:

version 2

network 1.0.0.0

no auto-summary

version 2

no passive-interface Serial1/0

network 192.168.12.0

no auto-summaryR3配置:

redistribute rip metric 1000 metric-type 1 subnets tag 3 route-map 11

no passive-interface Serial1/1

distance ospf external 170 //配置OSPF外部区域的管理距离为170router rip       //配置RIP

passive-interface default

no auto-summary

match ip address 10       //匹配流量

match tag 5          //匹配打标记的流量

router ospf 1        //配置OSPF

no passive-interface Serial1/0

network 192.168.34.0 0.0.0.255 area 0

router-id 5.5.5.5

  passive-interface default

network 192.168.45.0 0.0.0.255 area 0

redistribute ospf 1 metric 5 //重分布OSPF到RIP

network 192.168.25.0

route-map 5 permit 20     //允许其它所有流量通过R5的路由表:

R       1.1.1.1 [120/2] via 192.168.25.1, 00:00:12, Serial1/1

C    192.168.45.0/24 is directly connected, Serial1/0

O       4.4.4.4 [110/65] via 192.168.45.2, 00:00:28, Serial1/0

O E1 192.168.23.0/24 [110/1128] via 192.168.45.2, 00:00:28, Serial1/0

O    192.168.34.0/24 [110/128] via 192.168.45.2, 00:00:29, Serial1/0R3的路由表:

O E1    1.1.1.1 [110/1128] via 192.168.34.2, 00:01:53, Serial1/1

O    192.168.45.0/24 [110/128] via 192.168.34.2, 00:01:53, Serial1/1

O       4.4.4.4 [110/65] via 192.168.34.2, 00:01:53, Serial1/1

C    192.168.23.0/24 is directly connected, Serial1/0

C    192.168.34.0/24 is directly connected, Serial1/1

1.1.1.1         5.5.5.5         499         0x80000001 0x000B26 0

192.168.23.0    3.3.3.3         484         0x80000001 0x00C5F6 0

我们看一下R4的路由表和LSDB

O E1    1.1.1.1 [110/1064] via 192.168.45.1, 00:10:11, Serial1/1

O E1 192.168.25.0/24 [110/1064] via 192.168.45.1, 00:10:11, Serial1/1

O E1 192.168.23.0/24 [110/1064] via 192.168.34.1, 00:10:11, Serial1/0

1.1.1.1         5.5.5.5         711         0x80000001 0x000B26 0

192.168.23.0    3.3.3.3         698         0x80000001 0x00C5F6 0

从R3上的路由表没有RIP路由我们可以得知,由于OSPF的管理距离为110而RIP的为120,所以OSPF的路由优于RIP,所以全局路由表中只有OSPF的5类路由,形成了次佳路由,由于全局路由表中没有RIP路由,所以它不能发出那些外部路由的5类LSA,所以在R4也不能形成负载均衡。至于只有R3产生次佳路由,原因是R5先重发布而发出5类LSA,被R3学习到导致R3的RIP不能进全局路由表,也就不会有那些路由的5类LSA通告(只有直连外部路由通告),所以生成R3、R5上的部分次佳路由。

思考哪个方法更优?

redistribute rip metric 1000 metric-type 1 subnets tag 5 //在R5上重分布进来的RIP路由打一标记5

11.11.11.11     5.5.5.5         97          0x80000003 0x00936E 5

192.168.25.0    5.5.5.5         97          0x80000005 0x00C5E3 5

route-map 5 deny 10  //建立router-map 5 过滤匹配的路由

distribute-list route-map 5 in //在OSPF进程中过滤带标记的路由安装到全局路由表

    1.0.0.0/32 is subnetted, 1 subnets

C       3.3.3.3 is directly connected, Loopback0

    4.0.0.0/32 is subnetted, 1 subnets

O       5.5.5.5 [110/129] via 192.168.34.2, 00:00:08, Serial1/1

R       11.11.11.11 [120/2] via 192.168.23.1, 00:00:01, Serial1/0

R5是做以上配置,解决次佳路由:

route-map 3 deny 10  //建立router-map 3 过滤匹配的路由

distribute-list route-map 3 in //用分发列表在OSPF进程中过滤带标记的路由安装到全局路由表

    1.0.0.0/32 is subnetted, 1 subnets

R       3.3.3.3 [120/6] via 192.168.25.1, 00:00:14, Serial1/1

    4.0.0.0/32 is subnetted, 1 subnets

C       5.5.5.5 is directly connected, Loopback0

R       11.11.11.11 [120/2] via 192.168.25.1, 00:00:14, Serial1/1

               [110/1064] via 192.168.34.1, 00:02:48, Serial1/0

方法二:

distance ospf external 170  //定义OSPF外部路由管理距离为170

distance ospf external 170  //定义OSPF外部路由管理距离为170现在R3和R5没有次佳路由了吧,R4能走负载均衡了吧

以上两种方法哪种好了?当然是方法2了,配置命令这么少;如采用方案一的话,当R3到R2(R5到R2)的链路断了,它还能去往1.1.1.1吗?当然不能了,因为OSPF的路由被过滤了,如果是方法二就还有一条OSPF的外部路由,还是可以通的。

配置如下:

route-map 11 permit 10      //建立一个route-map

redistribute rip metric 1000 metric-type 1 subnets tag 3 route-map 11

O E1    11.11.11.11 [110/564] via 192.168.34.1, 00:00:08, Serial1/0


<span yes';="" font-size:12.0000pt;="" font-family:'宋体';="" "="" style="padding: 0px; margin: 0px; ">


你可能感兴趣的:(休闲,路由策略,ospf重发布,路由图,双点双向重发布)