熟悉OSPF的特殊区域:NSSA

简介:

试验目的:熟悉OSPF的特殊区域:NSSA

使用拓扑:

clip_image002

NSSA区域:

说明R5上也起一个LO1接口:Ip地址为100.100.100.100,然后充分布进R5这样R5也就成为了ASBR,

将R1,R2上配置area 1 nssa后,

R2#show ip route os

200.200.200.0/32 is subnetted, 1 subnets

O N2 200.200.200.200 [110/20] via 10.1.12.1, 00:03:17, Serial1/0

1.0.0.0/32 is subnetted, 1 subnets

O 1.1.1.1 [110/65] via 10.1.12.1, 00:03:17, Serial1/0

100.0.0.0/32 is subnetted, 1 subnets

O E2 100.100.100.100 [110/20] via 10.1.23.3, 00:03:17, Serial1/1

3.0.0.0/32 is subnetted, 1 subnets

O 3.3.3.3 [110/65] via 10.1.23.3, 00:03:17, Serial1/1

4.0.0.0/32 is subnetted, 1 subnets

O IA 4.4.4.4 [110/129] via 10.1.23.3, 00:03:17, Serial1/1

5.0.0.0/32 is subnetted, 1 subnets

O IA 5.5.5.5 [110/193] via 10.1.23.3, 00:03:17, Serial1/1

10.0.0.0/24 is subnetted, 4 subnets

O IA 10.1.45.0 [110/192] via 10.1.23.3, 00:03:17, Serial1/1

O 10.1.34.0 [110/128] via 10.1.23.3, 00:03:17, Serial1/1

R2#show ip ospf database

OSPF Router with ID (2.2.2.2) (Process ID 1)

Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link count

2.2.2.2 2.2.2.2 23 0x80000005 0x008FAB 2

3.3.3.3 3.3.3.3 1888 0x80000006 0x003AD4 5

4.4.4.4 4.4.4.4 935 0x80000005 0x008490 2

Summary Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum

1.1.1.1 2.2.2.2 8 0x80000001 0x00AB44

2.2.2.2 2.2.2.2 1354 0x80000003 0x00F633

4.4.4.4 4.4.4.4 930 0x80000002 0x0060BA

5.5.5.5 4.4.4.4 159 0x80000001 0x00B621

10.1.12.0 2.2.2.2 1354 0x80000003 0x00B823

10.1.45.0 4.4.4.4 930 0x80000002 0x0012A1

Summary ASB Link States (Area 0)

Link ID ADV Router Age Seq# Checksum

5.5.5.5 4.4.4.4 86 0x80000001 0x009E39

Router Link States (Area 1)

Link ID ADV Router Age Seq# Checksum Link count

1.1.1.1 1.1.1.1 17 0x8000000C 0x000934 3

2.2.2.2 2.2.2.2 17 0x8000000B 0x003004 3

Summary Net Link States (Area 1)

Link ID ADV Router Age Seq# Checksum

3.3.3.3 2.2.2.2 24 0x80000003 0x00F0EE

4.4.4.4 2.2.2.2 24 0x80000002 0x004755

5.5.5.5 2.2.2.2 24 0x80000002 0x009BBC

10.1.23.0 2.2.2.2 24 0x80000003 0x00E4E5

10.1.34.0 2.2.2.2 24 0x80000003 0x00ED91

10.1.45.0 2.2.2.2 24 0x80000002 0x00F83C

Type-7 AS External Link States (Area 1)

Link ID ADV Router Age Seq# Checksum Tag

200.200.200.200 1.1.1.1 42 0x80000001 0x005318 0

Type-5 AS External Link States

Link ID ADV Router Age Seq# Checksum Tag

100.100.100.100 5.5.5.5 92 0x80000001 0x0047B3 0

200.200.200.200 2.2.2.2 3 0x80000001 0x00C9A7 0

R1#show ip ospf database

OSPF Router with ID (1.1.1.1) (Process ID 1)

Router Link States (Area 1)

Link ID ADV Router Age Seq# Checksum Link count

1.1.1.1 1.1.1.1 10 0x8000000C 0x000934 3

2.2.2.2 2.2.2.2 11 0x8000000B 0x003004 3

Summary Net Link States (Area 1)

Link ID ADV Router Age Seq# Checksum

3.3.3.3 2.2.2.2 18 0x80000003 0x00F0EE

4.4.4.4 2.2.2.2 18 0x80000002 0x004755

5.5.5.5 2.2.2.2 18 0x80000002 0x009BBC

10.1.23.0 2.2.2.2 18 0x80000003 0x00E4E5

10.1.34.0 2.2.2.2 18 0x80000003 0x00ED91

10.1.45.0 2.2.2.2 18 0x80000002 0x00F83C

Type-7 AS External Link States (Area 1)

Link ID ADV Router Age Seq# Checksum Tag

200.200.200.200 1.1.1.1 34 0x80000001 0x005318 0

R1#ping 100.100.100.100

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 100.100.100.100, timeout is 2 seconds:

.....为什么不通呢?因为没有到200.200.200.200的路由

在R5上R5#p 200.200.200.200

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 200.200.200.200, timeout is 2 seconds:

!!!!!他能通是因为回程路由的地址是R5的出接口地址10.1.45.5,在R1上有这个路由,所以能通。

在R1上没有回程的路由,该怎么解决呢,这个就需要在R2上指定一个回程的默认路由给R1:

R2(config-router)#area 1 nssa default-information-originate

此时在看R1上的路由表:

R1#show ip route os

2.0.0.0/32 is subnetted, 1 subnets

O 2.2.2.2 [110/65] via 10.1.12.2, 00:12:22, Serial1/1

3.0.0.0/32 is subnetted, 1 subnets

O IA 3.3.3.3 [110/129] via 10.1.12.2, 00:12:22, Serial1/1

4.0.0.0/32 is subnetted, 1 subnets

O IA 4.4.4.4 [110/193] via 10.1.12.2, 00:12:22, Serial1/1

5.0.0.0/32 is subnetted, 1 subnets

O IA 5.5.5.5 [110/257] via 10.1.12.2, 00:12:22, Serial1/1

10.0.0.0/24 is subnetted, 4 subnets

O IA 10.1.23.0 [110/128] via 10.1.12.2, 00:12:22, Serial1/1

O IA 10.1.45.0 [110/256] via 10.1.12.2, 00:12:22, Serial1/1

O IA 10.1.34.0 [110/192] via 10.1.12.2, 00:12:22, Serial1/1

O*N2 0.0.0.0/0 [110/1] via 10.1.12.2, 00:10:25, Serial1/1

总结:NSSA区域是不能有LSA5产生的,但是由于存在ASBR,他必定会产生LSA5,这样怎么办呢,这个就产生了一个新的区域类型:NSSA,他允许ASBR产生外部的LSA7,在连接到骨干区域的路由器将其转换成LSA5(因为骨干区域不能识别LSA7),从而也就不能通告给其他区域了,在这个拓扑中,完成这个转换的是R2(他既是ABR又是ASBR)

R2#show ip ospf database router 2.2.2.2

OSPF Router with ID (2.2.2.2) (Process ID 1)

Router Link States (Area 0)

LS age: 1018

Options: (No TOS-capability, DC)

LS Type: Router Links

Link State ID: 2.2.2.2

Advertising Router: 2.2.2.2

LS Seq Number: 80000005

Checksum: 0x8FAB

Length: 48

Area Border Router

AS Boundary Router //因为将外部的LSA转换成了LSA5,所以他也就成了双重身份。

在R2上R2(config-router)#area 1 nssa no-summary (不通告LSA3)后,R1的路由表条目更加的少了:

R1# show ip route os

2.0.0.0/32 is subnetted, 1 subnets

O 2.2.2.2 [110/65] via 10.1.12.2, 00:27:48, Serial1/1

O*IA 0.0.0.0/0 [110/65] via 10.1.12.2, 00:01:18, Serial1/1

如果在R2上做了一下配置的话;

R2(config-router)#int lo1

R2(config-if)#ip add 22.22.22.22 255.255.255.255

R2(config-if)#router rip

R2(config-router)#ver 2

R2(config-router)#no au

R2(config-router)#net 22.0.0.0

R2(config-router)#redistribute rip subnets

在R1上的数据库会产生

Type-7 AS External Link States (Area 1)

Link ID ADV Router Age Seq# Checksum Tag

0.0.0.0 2.2.2.2 88 0x80000002 0x00336D 0

22.22.22.22 2.2.2.2 2 0x80000001 0x00FB3A 0

200.200.200.200 1.1.1.1 245 0x80000002 0x005119 0

R1#show ip route os

2.0.0.0/32 is subnetted, 1 subnets

O 2.2.2.2 [110/65] via 10.1.12.2, 00:35:27, Serial1/1

3.0.0.0/32 is subnetted, 1 subnets

O IA 3.3.3.3 [110/129] via 10.1.12.2, 00:05:06, Serial1/1

4.0.0.0/32 is subnetted, 1 subnets

O IA 4.4.4.4 [110/193] via 10.1.12.2, 00:05:06, Serial1/1

5.0.0.0/32 is subnetted, 1 subnets

O IA 5.5.5.5 [110/257] via 10.1.12.2, 00:05:06, Serial1/1

22.0.0.0/32 is subnetted, 1 subnets

O N2 22.22.22.22 [110/20] via 10.1.12.2, 00:01:49, Serial1/1

10.0.0.0/24 is subnetted, 4 subnets

O IA 10.1.23.0 [110/128] via 10.1.12.2, 00:05:06, Serial1/1

O IA 10.1.45.0 [110/256] via 10.1.12.2, 00:05:06, Serial1/1

O IA 10.1.34.0 [110/192] via 10.1.12.2, 00:05:06, Serial1/1

O*N2 0.0.0.0/0 [110/1] via 10.1.12.2, 00:05:01, Serial1/1

然而在R2上做了如下配置后:

R2(config-router)#area 1 nssa no-redistribution

R1上的路由表中将缺少22.22.22.22的路由,到达外部的路由全部走缺省的路由条目。

R1#show ip route os

2.0.0.0/32 is subnetted, 1 subnets

O 2.2.2.2 [110/65] via 10.1.12.2, 00:36:56, Serial1/1

3.0.0.0/32 is subnetted, 1 subnets

O IA 3.3.3.3 [110/129] via 10.1.12.2, 00:06:35, Serial1/1

4.0.0.0/32 is subnetted, 1 subnets

O IA 4.4.4.4 [110/193] via 10.1.12.2, 00:06:35, Serial1/1

5.0.0.0/32 is subnetted, 1 subnets

O IA 5.5.5.5 [110/257] via 10.1.12.2, 00:06:35, Serial1/1

10.0.0.0/24 is subnetted, 4 subnets

O IA 10.1.23.0 [110/128] via 10.1.12.2, 00:06:35, Serial1/1

O IA 10.1.45.0 [110/256] via 10.1.12.2, 00:06:35, Serial1/1

O IA 10.1.34.0 [110/192] via 10.1.12.2, 00:06:35, Serial1/1

O*N2 0.0.0.0/0 [110/1] via 10.1.12.2, 00:06:30, Serial1/1



本文转自 gehailong 51CTO博客,原文链接:http://blog.51cto.com/gehailong/297394,如需转载请自行联系原作者

相关文章
|
1月前
|
网络协议 网络架构
OSPF中的Not-So-Stubby Area (NSSA):概念、配置与应用
OSPF中的Not-So-Stubby Area (NSSA):概念、配置与应用
35 3
|
1月前
|
网络协议 安全 网络性能优化
OSPF中的Totally Not-So-Stubby Area (Totally NSSA):概念、配置与应用
OSPF中的Totally Not-So-Stubby Area (Totally NSSA):概念、配置与应用
36 3
|
7月前
|
网络协议 vr&ar 网络架构
1. OSPF 基础实验(四):Stub 区域与 NSSA 区域
1. OSPF 基础实验(四):Stub 区域与 NSSA 区域
|
网络协议 数据安全/隐私保护 网络架构
多区域的OSPF实战配置
多区域的OSPF实战配置
78 0
|
网络协议 网络架构
OSPF高级配置——虚接口,NSSA
OSPF高级配置——虚接口,NSSA
173 0
OSPF高级配置——虚接口,NSSA
|
网络协议 网络架构
OSPF路由协议——OSPF多区域原理和配置
六 OSPF的三种通信量 1.域内通信量 (lntra-Area Traffic) 单个区域内的路由器之间交换数据包构成的通信量 2.域间通信量 (Inter-Area Traffic) 不同区域的路由器之间交换数据包构成的通信量 3.外部通信量 (External Traffic) OSPF域内的路由器与OSPF区域外或另一个自治系统内 的路由器之间交换机数据包构成的通信量
611 0
OSPF路由协议——OSPF多区域原理和配置
|
网络协议 网络架构
下一篇
DataWorks