02.22 网络中解决OSPF不连续区域的3种方法

实验:

01

拓扑:

网络中解决OSPF不连续区域的3种方法

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上查看路由表:

网络中解决OSPF不连续区域的3种方法

R4上查看路由表情况:

网络中解决OSPF不连续区域的3种方法

ping测试:

网络中解决OSPF不连续区域的3种方法


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上查看路由表:

网络中解决OSPF不连续区域的3种方法

R4上查看路由表:

网络中解决OSPF不连续区域的3种方法

ping测试:

网络中解决OSPF不连续区域的3种方法


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上查看路由表:

网络中解决OSPF不连续区域的3种方法

R4上查看路由表:

网络中解决OSPF不连续区域的3种方法

ping 测试:

网络中解决OSPF不连续区域的3种方法


至此实验完成,大家可以通过实验验证效果,有什么问题可以加群多交流。


分享到:


相關文章: