HuaWei ❀ 配置OSPF的NSSA区域

配置OSPF的NSSA区域

如下图所示,所有的路由器都运行OSPF,整个自治系统划分为2个区域,其中R1和R2作为ABR来转发区域之间的路由;
在这里插入图片描述

接口IP地址配置:
[r1]int g0/0/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 1
[r1-ospf-100-area-0.0.0.1]network 1.1.1.1 0.0.0.0
[r1-ospf-100-area-0.0.0.1]network 12.1.1.0 0.0.0.255
配置类似,不在阐述;

配置RIP协议:
[r1]rip 100
[r1-rip-100]version 2
[r1-rip-100]network 1.0.0.0

路由引入:
[r1]ospf 100
[r1-ospf-100]import-route rip 100 type ?
INTEGER<1-2> Type value
[r1-ospf-100]import-route rip type 2
[r1-ospf-100]import-route rip 100 type 2

[r1]rip 100
[r1-rip-100]import-route ospf 100 ?
cost Cost of the import route
route-policy Apply the specified route policy to filter route
Please press ENTER to execute command
[r1-rip-100]import-route ospf 100 cost 2

查看R3 OSPF外部路由信息:
[r3]display ospf routing
OSPF Process 100 with Router ID 93.3.3.3
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
3.3.3.3/32 0 Stub 3.3.3.3 93.3.3.3 0.0.0.0
23.1.1.0/24 1 Transit 23.1.1.2 93.3.3.3 0.0.0.0
2.2.2.2/32 1 Inter-area 23.1.1.1 92.2.2.2 0.0.0.0
12.1.1.0/24 2 Inter-area 23.1.1.1 92.2.2.2 0.0.0.0

Routing for ASEs
Destination Cost Type Tag NextHop AdvRouter
1.1.1.1/32 1 Type2 1 23.1.1.1 91.1.1.1
Total Nets: 5
Intra Area: 2 Inter Area: 2 ASE: 1 NSSA: 0

配置NSSA区域:
[r1-ospf-100-area-0.0.0.1]nssa

[r2-ospf-100-area-0.0.0.1]nssa no-summary

查看NSSA区域内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
12.1.1.0/24 1 Stub 12.1.1.1 91.1.1.1 0.0.0.1
0.0.0.0/0 2 Inter-area 12.1.1.2 92.2.2.2 0.0.0.1
2.2.2.2/32 1 Stub 12.1.1.2 92.2.2.2 0.0.0.1
Total Nets: 3
Intra Area: 2 Inter Area: 1 ASE: 0 NSSA: 0

查看NSSA区域内OSPF LSDB:
[r1]display ospf lsdb
OSPF Process 100 with Router ID 91.1.1.1
Link State Database
Area: 0.0.0.1
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 92.2.2.2 92.2.2.2 36 60 80000003 0
Router 91.1.1.1 91.1.1.1 35 48 80000003 1
Sum-Net 0.0.0.0 92.2.2.2 46 28 80000001 1
NSSA 1.1.1.1 91.1.1.1 45 36 80000001 1
NSSA 0.0.0.0 92.2.2.2 46 36 80000001 1

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

猜你喜欢

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