1.配置地址
2.啟動ospf協議
3.啟動rip協議
4.將PC1 的路由引入OSPF中
[R1]ospf 1
[R1-ospf-1]import-route direct
5.將 PC2重發布到RIP中
[R4]rip
[R4-rip-1]import-route direct
6.在R2 和R3上進行雙點雙向重發布
[R3]rip
[R3-rip-1]import-route ospf 1
[R3]ospf 1
[R3-ospf-1]import-route rip u
[R2]rip
[R2-rip-1]import-route ospf 1
[R2]ospf 1
[R2-ospf-1]import-route rip
R1路由表
7.在R3的路由表中 存在一個次優路由
(1)第一種解決辦法
[R2]ip ip-prefix pc1 permit 10.1.1.0 24
[R2]route-policy pc1 permit node 10
Info: New Sequence of this List.
[R2-route-policy]if-match ip-prefix pc1
[R2-route-policy]apply preference 90
[R2-route-policy]qu
[R2]route-policy pc1 permit node 20
Info: New Sequence of this List.
[R2]ospf 1
[R2-ospf-1]preference route-policy pc1
[R2-ospf-1]qu
[R3]ip ip-prefix pc1 permit 10.1.1.0 24
[R3]route-policy pc1 permit node 10
Info: New Sequence of this List.
[R3-route-policy]if-match ip-prefix pc1
[R3-route-policy]apply preference 160
[R3-route-policy]qu
[R3]route-policy pc1 permit node 20
Info: New Sequence of this List.
[R3-route-policy]qu
[R3]rip 1
[R3-rip-1]preference route-policy pc1
反應較慢 可以通過shutdown 接口來查看
R2上配置是為了以后R2故障后出現該次優路由
第二種方法:
[R3]ip ip-prefix xwl deny 10.1.1.0 24
[R3]ip ip-prefix xwl permit 0.0.0.0 0 less-equal 32
[R3-rip-1]filter-policy ip-prefix xwl import GigabitEthernet 0/0/1 學習到該次優路由的接口
第三種方法:
[R1]ospf 1
[R1-ospf-1]
[R1-ospf-1]import-route direct ?
cost Set cost
route-policy Route policy
tag Specify route tag
type Metric type of the imported external routes
Please press ENTER to execute command
[R1-ospf-1]import-route direct tag 111
然后在R2 和R3上根據需求采取第一或第二種辦法
[R3]route-policy tag permit node 10
Info: New Sequence of this List.
[R3-route-policy]if-match tag 111
[R3-route-policy]apply preference 90
[R3-route-policy]qu
[R3]route-policy pc1 permit node 20
Info: New Sequence of this List.
[R3-route-policy]qu
[R2]ospf 1
[R2-ospf-1]preference route-policy tag
[R2-ospf-1]qu
-
路由
+關注
關注
0文章
278瀏覽量
41874 -
OSPF
+關注
關注
0文章
80瀏覽量
14893
原文標題:路由協議&OSPF中雙點雙向重發布解決路由引入問題(華為)
文章出處:【微信號:網絡技術干貨圈,微信公眾號:網絡技術干貨圈】歡迎添加關注!文章轉載請注明出處。
發布評論請先 登錄
相關推薦
評論