解决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