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

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