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選路解決
在這裏插入圖片描述
在這裏插入圖片描述

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