HuaWei ❀ 配置OSPF虚链路

配置OSPF虚链路

如下图所示,Area 2没有与骨干区域Area 0直接连接,Area 1被用作传输区域来连接Area 2和Area 0,R1和R2之间配置一条虚链路;
在这里插入图片描述

接口IP地址配置:
[r1]int g0/00/0
[r1-GigabitEthernet0/0/0]ip address 12.1.1.1 24
配置类似,不在阐述;

OSPF协议配置:
[r1]ospf 100 router-id 91.1.1.1
[r1-ospf-100]area 0
[r1-ospf-100-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[r1-ospf-100-area-0.0.0.0]network 12.1.1.0 0.0.0.255

[r2]ospf 100 router-id 92.2.2.2
[r2-ospf-100]area 0
[r2-ospf-100-area-0.0.0.0]network 12.1.1.0 0.0.0.255
[r2-ospf-100]area 1
[r2-ospf-100-area-0.0.0.1]network 23.1.1.0 0.0.0.25

[r3]ospf 100 router-id 93.3.3.3
[r3-ospf-100]area 1
[r3-ospf-100-area-0.0.0.1]network 23.1.1.0 0.0.0.255
[r3-ospf-100]area 2
[r3-ospf-100-area-0.0.0.2]network 34.1.1.0 0.0.0.255

[r4]ospf 100 router-id 94.4.4.4
[r4-ospf-100]area 2
[r4-ospf-100-area-0.0.0.2]network 34.1.1.0 0.0.0.255
[r4-ospf-100-area-0.0.0.2]network 4.4.4.4 0.0.0.0

查看OSPF路由信息:
[r1]display ospf routing
OSPF Process 100 with Router ID 91.1.1.1
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
1.1.1.1/32 0 Stub 1.1.1.1 91.1.1.1 0.0.0.0
12.1.1.0/24 1 Transit 12.1.1.1 91.1.1.1 0.0.0.0
23.1.1.0/24 2 Inter-area 12.1.1.2 92.2.2.2 0.0.0.0
Total Nets: 3
Intra Area: 2 Inter Area: 1 ASE: 0 NSSA: 0
(由于非骨干区域Area 2未直连骨干区域Area 0,所以R1上并没有Area 2的路由信息)

虚链路配置:
[r2-ospf-100-area-0.0.0.1]vlink-peer 93.3.3.3
(93.3.3.3为对端Router-id)
[r3-ospf-100-area-0.0.0.1]vlink-peer 92.2.2.2

查看OSPF路由信息:
[r1]display ospf routing
OSPF Process 100 with Router ID 91.1.1.1
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
1.1.1.1/32 0 Stub 1.1.1.1 91.1.1.1 0.0.0.0
12.1.1.0/24 1 Transit 12.1.1.1 91.1.1.1 0.0.0.0
4.4.4.4/32 3 Inter-area 12.1.1.2 93.3.3.3 0.0.0.0
23.1.1.0/24 2 Inter-area 12.1.1.2 92.2.2.2 0.0.0.0
34.1.1.0/24 3 Inter-area 12.1.1.2 93.3.3.3 0.0.0.0
Total Nets: 5
Intra Area: 2 Inter Area: 3 ASE: 0 NSSA: 0

发布了208 篇原创文章 · 获赞 572 · 访问量 7万+

猜你喜欢

转载自blog.csdn.net/qq_42197548/article/details/105415740