解決OSPF不連續區域的3種方法

網絡拓撲圖

 

 

解決OSPF不連續區域的問題 我們有三種解決辦法:

 

1.多進程雙向重新分佈

 

2.創建tunnel通道 宣告到區域0

 

3.創建虛鏈路

 

以下是3種方法配置的詳細命令:

 

方法1:多進程雙向重新分佈

 

(1).重新啓動另外一個OSPF進程

 

(2).在2個OSPF進程中宣告不連續的網段

 

 

(3).雙向發佈OSPF進程: redistribute ospf 進程號subnets

 

 

R1

 

int s0/0

ip add 1.1.1.1 255.255.255.0

no shut

 

router ospf 110

router-id 1.1.1.1

network 1.1.1.0 0.0.0.255 area 0

 

 

R2

 

int s0/0

ip add 1.1.1.2 255.255.255.0

no shut

 

int s0/1

ip add 2.2.2.1 255.255.255.0

no shut

 

 

 

router ospf 110

router-id 2.2.2.2

network 2.2.2.0 0.0.0.255 area 1

network 1.1.1.0 0.0.0.255 area 0

 

 

router ospf 120

router-id 2.2.2.5

network

 

 

 

R3

 

int s0/0

ip add 2.2.2.2 255.255.255.0

no shut

int s0/1

ip add 3.3.3.1 255.255.255.0

no shut

 

 

 

router ospf 110

router-id 3.3.3.3

network 2.2.2.0 0.0.0.255 area 1

redistribute ospf 120 subnets

 

router ospf 120

router-id 3.3.3.5

network 3.3.3.0 0.0.0.255 area 2

redistribute ospf 110 subnets

 

 

 

R4

 

int s0/0

 

ip add 3.3.3.2 255.255.255.0

no shut

 

router ospf 110

router-id 4.4.4.4

network 3.3.3.0 0.0.0.255 area 2

 

 

方法2:創建tunnel通道 宣告到區域0

 

r1

 

int s0/0

ip add 1.1.1.1 255.255.255.0

no shut

 

router ospf 110

router-id 1.1.1.1

network 1.1.1.0 0.0.0.255 area 0

 

 

r2

 

int s0/0

ip add 1.1.1.2 255.255.255.0

no shut

 

int s0/1

ip add 2.2.2.1 255.255.255.0

no shut

 

 

int tunnel 1

tunnel source 2.2.2.1

tunnel destination 2.2.2.2

ip add 172.16.1.1 255.255.255.0

no shut

 

router ospf 110

router-id 2.2.2.2

network 2.2.2.0 0.0.0.255 area 1

network 1.1.1.0 0.0.0.255 area 0

network 172.16.1.0 0.0.0.255 area 0

 

 

r3

int s0/0

ip add 2.2.2.2 255.255.255.0

no shut

int s0/1

ip add 3.3.3.1 255.255.255.0

no shut

 

int tunnel 1

tunnel source 2.2.2.2

tunnel destination 2.2.2.1

ip add 172.16.1.2 255.255.255.0

no shut

 

router ospf 110

router-id 3.3.3.3

network 2.2.2.0 0.0.0.255 area 1

network 3.3.3.0 0.0.0.255 area 2

network 172.16.1.0 0.0.0.255 area 0

 

 

r4

 

int s0/0

 

ip add 3.3.3.2 255.255.255.0

no shut

 

router ospf 110

router-id 4.4.4.4

network 3.3.3.0 0.0.0.255 area 2

 

方法3:創建虛鏈路

 

R1路由器

 

int s0/0

ip add 1.1.1.1 255.255.255.0

no shut

 

router ospf 110

router-id 1.1.1.1

network 1.1.1.0 0.0.0.255 area 0

 

 

R2路由器

 

int s0/0

ip add 1.1.1.2 255.255.255.0

no shut

 

int s0/1

ip add 2.2.2.1 255.255.255.0

no shut

 

 

 

router ospf 110

router-id 2.2.2.2

network 2.2.2.0 0.0.0.255 area 1

network 1.1.1.0 0.0.0.255 area 0

area 1 virtual-link 3.3.3.3

 

 

R3路由器

 

int s0/0

ip add 2.2.2.2 255.255.255.0

no shut

int s0/1

ip add 3.3.3.1 255.255.255.0

no shut

 

router ospf 110

router-id 3.3.3.3

network 2.2.2.0 0.0.0.255 area 1

network 3.3.3.0 0.0.0.255 area 2

area 1 virtual-link 2.2.2.2

 

 

R4路由器

 

int s0/0

 

ip add 3.3.3.2 255.255.255.0

no shut

 

router ospf 110

router-id 4.4.4.4

network 3.3.3.0 0.0.0.255 area 2

 

 

大家可以去通過實驗來驗證效果!有什麼問題多交流,謝謝!

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