OSPF被隔離的區域

解決OSPF被隔離區域的三種方法:

1.雙向重分佈

2.建立Tunnel

3.建立虛鏈路

 

但有一種情況不能使用虛鏈路,那就是傳輸區域爲Stub或NSSA,所以可以使用建立Tunnel的方法來連接被隔離的區域

 

p_w_picpath

 

配置

R1:

interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip address 12.12.12.1 255.255.255.0
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 12.12.12.1 0.0.0.0 area 0

 

R2:

interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface Tunnel0
ip address 172.16.1.1 255.255.255.0
ip ospf 1 area 0                                             //Tunnel接口必須爲區域0
tunnel source FastEthernet1/0
tunnel destination 23.23.23.3
!
interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 23.23.23.2 255.255.255.0
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
area 1 nssa no-summary
network 2.2.2.2 0.0.0.0 area 0
network 12.12.12.2 0.0.0.0 area 0
network 23.23.23.2 0.0.0.0 area 1

 

R3:

interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Loopback1
ip address 133.1.1.1 255.255.255.0
!
interface Tunnel0
ip address 172.16.1.2 255.255.255.0
ip ospf 1 area 0                                             //Tunnel接口必須爲區域0
tunnel source FastEthernet0/0
tunnel destination 23.23.23.2
!
interface FastEthernet0/0
ip address 23.23.23.3 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 34.34.34.3 255.255.255.0
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
area 1 nssa
redistribute connected subnets route-map lo1           //重分發一條外部路由
network 3.3.3.3 0.0.0.0 area 1
network 23.23.23.3 0.0.0.0 area 1
network 34.34.34.3 0.0.0.0 area 2
!
no ip http server
no ip http secure-server
!
!
!
!
route-map lo1 permit 10
match interface Loopback1

 

R4:
 

interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface FastEthernet0/0
ip address 34.34.34.4 255.255.255.0
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 4.4.4.4 0.0.0.0 area 2
network 34.34.34.4 0.0.0.0 area 2

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