侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130562 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

CCNP(BSCI)实验:配置OSPF NSSA和totally NSSA区域

2023-04-04 星期二 / 0 评论 / 0 点赞 / 79 阅读 / 9495 字

预配置:省略,可以参考stub的配置实验过程:第一步:在R5上配置重分布R5(config)#router os 11R5(config-router)#redistribute connected

.


预配置:省略,可以参考stub的配置
实验过程:
第一步:在R5上配置重分布
R5(config)#router os 11
R5(config-router)#redistribute connected subnets
第二步:在ospf区域2做nssa
R5(config)#router os 11
R5(config-router)#area 2 nssa

R4(config)#router os 11
R4(config-router)#area 2 nssa

第三步:查看R5的数据库
R5#sh ip o d

        OSPF Router with ID (5.5.5.5) (Process ID 11)            Router Link States (Area 2)

Link ID ADV Router Age Seq# Checksum Link count
4.4.4.4 4.4.4.4 85 0x80000006 0x00E71C 2
5.5.5.5 5.5.5.5 85 0x80000006 0x00CE0C 3

            Summary Net Link States (Area 2)

Link ID ADV Router Age Seq# Checksum
1.1.1.1 4.4.4.4 106 0x80000002 0x001848
2.2.2.2 4.4.4.4 106 0x80000002 0x006735
3.3.3.3 4.4.4.4 93 0x80000004 0x00B224
4.4.4.4 4.4.4.4 93 0x80000004 0x000211
12.0.0.0 4.4.4.4 106 0x80000002 0x009FB9
23.0.0.0 4.4.4.4 93 0x80000004 0x008903
34.0.0.0 4.4.4.4 93 0x80000004 0x00774A

            Type-7 AS External Link States (Area 2)

Link ID ADV Router Age Seq# Checksum Tag
5.5.6.0 5.5.5.5 91 0x80000001 0x00F766 0
5.5.7.0 5.5.5.5 91 0x80000001 0x00EC70 0
5.5.8.0 5.5.5.5 91 0x80000001 0x00E17A 0
//可以看到R5上重分布的路由器成为了lsa7型的了
第四步:在看看R4的route和数据库
R4#sh ip route
………………
34.0.0.0/24 is subnetted, 1 subnets
C 34.0.0.0 is directly connected, Serial2/1
1.0.0.0/32 is subnetted, 1 subnets
O IA 1.1.1.1 [110/193] via 34.0.0.3, 00:03:04, Serial2/1
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/129] via 34.0.0.3, 00:03:39, Serial2/1
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/65] via 34.0.0.3, 00:03:39, Serial2/1
4.0.0.0/24 is subnetted, 1 subnets
C 4.4.4.0 is directly connected, Loopback0
5.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
O 5.5.5.5/32 [110/65] via 45.0.0.5, 00:03:04, Serial2/2
O N2 5.5.6.0/24 [110/20] via 45.0.0.5, 00:03:04, Serial2/2
O N2 5.5.7.0/24 [110/20] via 45.0.0.5, 00:03:05, Serial2/2
O N2 5.5.8.0/24 [110/20] via 45.0.0.5, 00:03:05, Serial2/2
23.0.0.0/24 is subnetted, 1 subnets
O 23.0.0.0 [110/128] via 34.0.0.3, 00:03:40, Serial2/1
12.0.0.0/24 is subnetted, 1 subnets
O IA 12.0.0.0 [110/192] via 34.0.0.3, 00:03:05, Serial2/1
45.0.0.0/24 is subnetted, 1 subnets
C 45.0.0.0 is directly connected, Serial2/2
//这里为N2了

R4#sh ip o d

        OSPF Router with ID (4.4.4.4) (Process ID 11)

………………

            Type-7 AS External Link States (Area 2)

Link ID ADV Router Age Seq# Checksum Tag
5.5.6.0 5.5.5.5 254 0x80000001 0x00F766 0
5.5.7.0 5.5.5.5 254 0x80000001 0x00EC70 0
5.5.8.0 5.5.5.5 254 0x80000001 0x00E17A 0

            Type-5 AS External Link States

Link ID ADV Router Age Seq# Checksum Tag
5.5.6.0 4.4.4.4 232 0x80000001 0x00AAC1 0
5.5.7.0 4.4.4.4 232 0x80000001 0x009FCB 0
5.5.8.0 4.4.4.4 233 0x80000001 0x0094D5 0
//这里可以看到的是将R5的7型,转换为R4的5类
第五步:在这里我们在做nssa的no-summary
R4(config)#router os 11
R4(config-router)#area 2 nssa no-summary

R5(config)#router os 11
R5(config-router)#area 2 nssa no-summary

第六步:查看R5上路由表
R5#sh ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route

Gateway of last resort is 45.0.0.4 to network 0.0.0.0

 5.0.0.0/24 is subnetted, 4 subnets

C 5.5.5.0 is directly connected, Loopback0
C 5.5.6.0 is directly connected, Loopback1
C 5.5.7.0 is directly connected, Loopback2
C 5.5.8.0 is directly connected, Loopback3
45.0.0.0/24 is subnetted, 1 subnets
C 45.0.0.0 is directly connected, Serial2/2
*OIA 0.0.0.0/0 [110/65] via 45.0.0.4, 00:03:55, Serial2/2
//这里添加了一条默认的路由**
R5#sh ip o d

        OSPF Router with ID (5.5.5.5) (Process ID 11)            Router Link States (Area 2)

Link ID ADV Router Age Seq# Checksum Link count
4.4.4.4 4.4.4.4 549 0x80000007 0x00E51D 2
5.5.5.5 5.5.5.5 663 0x80000007 0x00CC0D 3

            Summary Net Link States (Area 2)

Link ID ADV Router Age Seq# Checksum
0.0.0.0 4.4.4.4 239 0x80000001 0x00C065

            Type-7 AS External Link States (Area 2)

Link ID ADV Router Age Seq# Checksum Tag
5.5.6.0 5.5.5.5 790 0x80000001 0x00F766 0
5.5.7.0 5.5.5.5 790 0x80000001 0x00EC70 0
5.5.8.0 5.5.5.5 790 0x80000001 0x00E17A 0
//过滤了3 . 4类


第二种方法:
在R4上添加一个默认的路由
R4(config)#router os 11
R4(config-router)#area 2 nssa default-information-originate
查看R5上路由表
R5#sh ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route

Gateway of last resort is 45.0.0.4 to network 0.0.0.0

 34.0.0.0/24 is subnetted, 1 subnets

O IA 34.0.0.0 [110/128] via 45.0.0.4, 00:01:17, Serial2/2
1.0.0.0/32 is subnetted, 1 subnets
O IA 1.1.1.1 [110/257] via 45.0.0.4, 00:01:17, Serial2/2
2.0.0.0/32 is subnetted, 1 subnets
O IA 2.2.2.2 [110/193] via 45.0.0.4, 00:01:17, Serial2/2
3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/129] via 45.0.0.4, 00:01:17, Serial2/2
4.0.0.0/32 is subnetted, 1 subnets
O IA 4.4.4.4 [110/65] via 45.0.0.4, 00:01:17, Serial2/2
5.0.0.0/24 is subnetted, 4 subnets
C 5.5.5.0 is directly connected, Loopback0
C 5.5.6.0 is directly connected, Loopback1
C 5.5.7.0 is directly connected, Loopback2
C 5.5.8.0 is directly connected, Loopback3
23.0.0.0/24 is subnetted, 1 subnets
O IA 23.0.0.0 [110/192] via 45.0.0.4, 00:01:17, Serial2/2
12.0.0.0/24 is subnetted, 1 subnets
O IA 12.0.0.0 [110/256] via 45.0.0.4, 00:01:17, Serial2/2
45.0.0.0/24 is subnetted, 1 subnets
C 45.0.0.0 is directly connected, Serial2/2
ON2 0.0.0.0/0 [110/1] via 45.0.0.4, 00:00:04, Serial2/2
//有了一条O
N2
R5#sh ip o d

        OSPF Router with ID (5.5.5.5) (Process ID 11)            Router Link States (Area 2)

Link ID ADV Router Age Seq# Checksum Link count
4.4.4.4 4.4.4.4 830 0x80000007 0x00E51D 2
5.5.5.5 5.5.5.5 944 0x80000007 0x00CC0D 3

            Summary Net Link States (Area 2)

Link ID ADV Router Age Seq# Checksum
1.1.1.1 4.4.4.4 97 0x80000001 0x001A47
2.2.2.2 4.4.4.4 97 0x80000001 0x006934
3.3.3.3 4.4.4.4 97 0x80000001 0x00B821
4.4.4.4 4.4.4.4 97 0x80000001 0x00080E
12.0.0.0 4.4.4.4 97 0x80000001 0x00A1B8
23.0.0.0 4.4.4.4 97 0x80000001 0x008FFF
34.0.0.0 4.4.4.4 97 0x80000001 0x007D47

            Type-7 AS External Link States (Area 2)

Link ID ADV Router Age Seq# Checksum Tag
0.0.0.0 4.4.4.4 23 0x80000001 0x00940D 0
5.5.6.0 5.5.5.5 1071 0x80000001 0x00F766 0
5.5.7.0 5.5.5.5 1071 0x80000001 0x00EC70 0
5.5.8.0 5.5.5.5 1071 0x80000001 0x00E17A 0

.

广告 广告

评论区