CCNP 重发布

重发布

重发布,就是将一种路由协议中的路由条目转换为另一种路由协议的路由条目,达到多种路由协议环境下的网络互通。

规则

  • 将A协议发布到B协议,在ASBR上的B协议中配置
  • 将A协议发布到B协议,是将ASBR上通过A协议学习,及本地工作于A的直连全部发入B协议

注意事项

rip
  • 动态路由协议重发布进入rip默认种子度量为16不可达,所以重发布必须定义种子度量
ospf
  • ospf必须携带subnets才能发布无类条目,且默认重发布进入的种子度量为20和不叠加内部度量的类型2路由条目
R1(config)#router ospf 1
R1(config-router)#redistribute eigrp 90 subnets
eigrp
  • 动态路由协议重发布进入eigrp默认种子度量为无穷大,所以必须配置
  • 直连和静态路由默认重发布进入为最佳度量

路由回馈

使用OSPF协议和RIP协议运行多点双向重发布环境时,将出现路由回馈问题,原因在于RIP的管理的距离大于OSPF
解决方法:修改从该邻居处学习到的路由条目的管理距离即可

路由策略

基于控制层面流量(针对路由协议的流量)进行策略,最终影响路由表的生成,导致路径的选择被人为控制。

  • 偏移列表—在rip或EIGRP工作时,基于控制层面的流量,在其进出时进行增加;可以叠加生效;只能使用ACL来抓取流量
  • 分发列表—在控制层面流量的进出的接口上限制条目的传递

实验在这里插入图片描述

实验拓扑如下:
在这里插入图片描述
1.IP配置和协议略
2.多点双向重发布

R2(config)#router rip 
R2(config-router)#redistribute ospf 100 metric 1定义度量,默认为16不可达
R2(config-router)#exit 
R2(config)#router ospf 100 
R2(config-router)#redistribute rip subnets 默认为类型2,不叠加内部度量
R2(config-router)#exit 
---------------------------------------------------------------------
R4(config)#router ospf 100
R4(config-router)#redistribute rip subnets 
R4(config-router)#exit 
R4(config)#router rip 
R4(config-router)#redistribute ospf 100 metric 1
R4(config-router)#exit 

3.因为RIP的管理距离大于OSPF,所以会产生路由回馈,要修改对端重发布环境下的收到的路由条目的管理距离

R2(config)#router ospf 100
R2(config-router)#distance 121 4.4.4.4 0.0.0.0从2.2.2.2出学习到的路由条目,管理距离为121
-----------------------------------------------------------------------
R4(config)#router ospf 100
R4(config-router)#distance 121 2.2.2.2 0.0.0.0

R1的路由表
R3的路由表
4.路由回馈虽然解决,但是选路依然不佳,在RIP上可用偏移列表进行选路,解决R1选路问题

R2(config)#access-list 1 permit 34.1.1.0 0.0.0.255 抓取该流量
R2(config)#router rip 
R2(config-router)#offset-list 1 out 5 fastEthernet 0/0  将R3-R4网段流量进入rip都增加度量5
R2(config-router)#exit 
--------------------------------------------------------------------------
R4(config)#access-list 1 permit 23.1.1.0 0.0.0.255
R4(config)#router rip 
R4(config-router)#offset-list 1 out 5 fastEthernet 1/0将R2-R3网段流量进入rip都增加度量5

5.R3的选路问题可用route-map和前缀列表解决

R2(config)#ip prefix-list xx permit 14.1.1.0/24
R2(config)#route-map yy deny 10
R2(config-route-map)#match ip address prefix-list xx 
R2(config-route-map)#set metric-type type-1  修改该重发布路由条目为叠加内部度量的类型1
R2(config-route-map)#exit 
R2(config)#route-map yy permit 20  建立空表
R2(config-route-map)#exit 
R2(config)#router ospf 100 
R2(config-router)#redistribute rip subnets route-map yy  匹配
R2(config-router)#exit
----------------------------------------------------------------------------
在R3f1/0接口上拒绝前缀列表xx匹配的流量
R3(config)#ip prefix-list xx deny 2.2.2.0/24
R3(config)#ip prefix-list xx deny 12.1.1.0/24             
R3(config)#ip prefix-list xx permit 0.0.0.0/0 le 32  允许所有
R3(config)#router ospf 100
R3(config-router)#distribute-list prefix xx in fastEthernet 1/0 

R1和R3选路解决
在这里插入图片描述
在这里插入图片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章