您好,登錄后才能下訂單哦!
1、實驗拓撲
2、基礎配置
R1配置
interface Serial0/0
ip address 14.1.1.1 255.255.255.0
interface Serial0/1
ip address 13.1.1.1 255.255.255.0
R2配置
interface Serial0/0
ip address 24.1.1.2 255.255.255.0
interface Serial0/1
ip address 23.1.1.2 255.255.255.0
R3配置
interface Loopback0
ip address 3.3.3.3 255.255.255.0
interface Serial0/0
ip address 13.1.1.3 255.255.255.0
interface Serial0/1
ip address 23.1.1.3 255.255.255.0
R4配置
interface Loopback0
ip address 4.4.4.4 255.255.255.0
interface Serial0/0
ip address 14.1.1.4 255.255.255.0
interface Serial0/1
ip address 24.1.1.4 255.255.255.0
3、RIP和OSPF雙向重分布(有問題)
R1配置
router ospf 110
router-id 1.1.1.1
redistribute rip subnets
network 13.1.1.0 0.0.0.255 area 0
router rip
version 2
redistribute ospf 110 metric 1
network 14.0.0.0
no auto-summary
R2配置
router ospf 110
router-id 2.2.2.2
redistribute rip subnets
network 23.1.1.0 0.0.0.255 area 0
router rip
version 2
redistribute ospf 110 metric 1
network 24.0.0.0
no auto-summary
R3配置
router ospf 110
router-id 3.3.3.3
network 3.3.3.0 0.0.0.255 area 0
network 13.1.1.0 0.0.0.255 area 0
network 23.1.1.0 0.0.0.255 area 0
R4配置
router rip
version 2
network 4.0.0.0
network 14.0.0.0
network 24.0.0.0
no auto-summary
此時我們發現R1和R2上都有路由是不正常的,主要是因為AD值引起的。
比如R1從RIP和OSPF都學到4.4.4.0/24和24.1.1.0/24這兩條路由,按理說應該選擇從RIP學到的路由比較合理,但是因為OSPF的AD比RIP的小,所有R1優先選擇從OSPF學過來的路由。所有只要將重分布進OSPF的RIP的AD改為比120大即可解決該問題。
R1配置
router ospf 110
distance 121 2.2.2.2 0.0.0.0
R2配置
router ospf 110
distance 121 1.1.1.1 0.0.0.0
后面接的是RID。
4、RIP和EIGRP雙向重分布(沒問題)
R1配置
router eigrp 90
redistribute rip metric 1500 100 255 1 1500
network 13.1.1.0 0.0.0.255
auto-summary
router rip
version 2
redistribute eigrp 90 metric 1
network 14.0.0.0
no auto-summary
R2配置
router eigrp 90
redistribute rip metric 1500 100 255 1 1500
network 23.1.1.0 0.0.0.255
no auto-summary
router rip
version 2
redistribute eigrp 90 metric 1
network 24.0.0.0
no auto-summary
R3配置
router eigrp 90
network 3.3.3.0 0.0.0.255
network 13.1.1.0 0.0.0.255
network 23.1.1.0 0.0.0.255
no auto-summary
R4配置
router rip
version 2
network 4.0.0.0
network 14.0.0.0
network 24.0.0.0
no auto-summary
5、OSPF和EIGRP雙向重分布(沒問題)
R1配置
router eigrp 90
redistribute ospf 110 metric 1500 100 255 1 1500
network 13.1.1.0 0.0.0.255
auto-summary
router ospf 110
router-id 1.1.1.1
redistribute eigrp 90 subnets
network 14.1.1.0 0.0.0.255 area 0
R2配置
router eigrp 90
redistribute ospf 110 metric 1500 100 255 1 1500
network 23.1.1.0 0.0.0.255
no auto-summary
router ospf 110
router-id 2.2.2.2
redistribute eigrp 90 subnets
network 24.1.1.0 0.0.0.255 area 0
R3配置
router eigrp 90
network 3.3.3.0 0.0.0.255
network 13.1.1.0 0.0.0.255
network 23.1.1.0 0.0.0.255
no auto-summary
R4配置
router ospf 110
router-id 4.4.4.4
network 4.4.4.0 0.0.0.255 area 0
network 14.1.1.0 0.0.0.255 area 0
network 24.1.1.0 0.0.0.255 area 0
可以看出EIGRP與RIP或OSPF雙向重分布是不存在問題的,RIP和OSPF之前就會存在雙向重分布問題。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。