實驗:
01
拓撲:
02
解決方法:
- 多進程雙向重分佈
- 創建tunnel通道,宣告到區域0
- 創建虛鏈接
03
實驗過程
1.方法1:多進程雙向重分佈
(1)重新啟動另一個OSPF進程
(2)在2個OSPF進程中宣告不連續的網段
(3)雙向發佈OSPF進程:redistribute ospf 進程號 subnets
R1:
int s1/0
ip add 1.1.1.1 255.255.255.0
no shutdown
exit
router ospf 110
router-id 1.1.1.1
network 1.1.1.0 0.0.0.255 area 0
R2:
int s1/0
ip add 1.1.1.2 255.255.255.0
no shutdown
int s1/1
ip add 2.2.2.1 255.255.255.0
no shutdown
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
R3:
int s1/1
ip add 2.2.2.2 255.255.255.0
no shutdown
int s1/0
ip add 3.3.3.1 255.255.255.0
no shutdown
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
ruoter-id 3.3.3.5
network 3.3.3.0 0.0.0.255 area 2
redistribute ospf 110 subnets
R4:
int s1/0
ip add 3.3.3.2 255.255.255.0
no shutdown
router ospf 120
router-id 4.4.4.4
network 3.3.3.0 0.0.0.255 area 2
驗證:
R1上查看路由表:
R4上查看路由表情況:
ping測試:
2.創建tunnel通道宣告到區域0
R1:
int s1/0
ip add 1.1.1.1 255.255.255.0
no shutdown
exit
router ospf 110
router-id 1.1.1.1
network 1.1.1.0 0.0.0.255 area 0
R2:
int s1/0
ip add 1.1.1.2 255.255.255.0
no shutdown
int s1/1
ip add 2.2.2.1 255.255.255.0
no shutdown
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 shutdown
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 s1/1
ip add 2.2.2.2 255.255.255.0
no shutdown
int s1/0
ip add 3.3.3.1 255.255.255.0
no shutdown
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 s1/0
ip add 3.3.3.2 255.255.255.0
no shutdown
router ospf 110
router-id 4.4.4.4
network 3.3.3.0 0.0.0.255 area 2
驗證:
R1上查看路由表:
R4上查看路由表:
ping測試:
3.創建虛鏈路
R1:
int s1/0
ip add 1.1.1.1 255.255.255.0
no shutdown
exit
router ospf 110
router-id 1.1.1.1
network 1.1.1.0 0.0.0.255 area 0
R2:
int s1/0
ip add 1.1.1.2 255.255.255.0
no shutdown
int s1/1
ip add 2.2.2.1 255.255.255.0
no shutdown
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 s1/1
ip add 2.2.2.2 255.255.255.0
no shutdown
int s1/0
ip add 3.3.3.1 255.255.255.0
no shutdown
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 s1/0
ip add 3.3.3.2 255.255.255.0
no shutdown
router ospf 110
router-id 4.4.4.4
network 3.3.3.0 0.0.0.255 area 2
驗證:
R1上查看路由表:
R4上查看路由表:
ping 測試:
至此實驗完成,大家可以通過實驗驗證效果,有什麼問題可以加群多交流。
閱讀更多 網事如煙釋然 的文章