16.R4上的Area 1配置成NSSA区域

R4(config)#router ospf 1

R4(config-router)#area 1 nssa default-information-originate //default-information-originate的参数目的是向area 1区域注入一条默认路由。

R4(config-router)#end

17.R2R3配置成NSSA区域

R2(config)#router ospf 1

R2(config-router)#area 1 nssa

R2(config-router)#end

R3(config)#router ospf 1

R3(config-router)#area 1 nssa

R3(config-router)#end

18.查看R3的路由表和链路状态数据库

R3#show ip ospf da

 

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

 

                Router Link States (Area 1)  //LSA 1

 

Link ID         ADV Router      Age         Seq#       Checksum Link count

172.16.255.1    172.16.255.1    67          0x80000005 0x002BB8 2

172.16.255.5    172.16.255.5    63          0x80000006 0x0015E6 4

172.16.255.9    172.16.255.9    71          0x80000003 0x00507B 2

 

                Summary Net Link States (Area 1)  //LSA 2

 

Link ID         ADV Router      Age         Seq#       Checksum

172.16.255.8    172.16.255.9    212         0x80000002 0x00FE6F

 

                Type-7 AS External Link States (Area 1)  //LSA 7

 

Link ID         ADV Router      Age         Seq#       Checksum Tag

0.0.0.0         172.16.255.9    212         0x80000001 0x00C464 0

131.131.1.0     172.16.255.1    87          0x80000001 0x00213D 0

131.131.2.0     172.16.255.1    87          0x80000001 0x001647 0

R3#show ip route

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 172.16.255.6 to network 0.0.0.0

 

     172.16.0.0/30 is subnetted, 3 subnets

C       172.16.255.0 is directly connected, Serial0/1

C       172.16.255.4 is directly connected, Serial0/2

O IA    172.16.255.8 [110/128] via 172.16.255.6, 00:01:23, Serial0/2

     131.131.0.0/24 is subnetted, 2 subnets

O N2    131.131.1.0 [110/200] via 172.16.255.1, 00:01:23, Serial0/1

O N2    131.131.2.0 [110/200] via 172.16.255.1, 00:01:23, Serial0/1

O*N2 0.0.0.0/0 [110/1] via 172.16.255.6, 00:01:23, Serial0/2  //到达R5所连接的网络,由默认路由替代。

19.测试连通性

R1#ping 192.168.2.1

 

Type escape sequence to abort.

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

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 20/89/172 ms

20.为了进一步简化area 1区域的路由器的路由表,我们采用完全次末节区域(Totally NSSA)特性来配置area 1

 

21.NSSA的基础上配置Totally NSSA区域特性,只需要在R4的路由器上作如下配置:

R4(config)#router ospf 1

R4(config-router)#area 1 nssa no-summary //no-summary参数指出:不要向区域1发送类型3的区域间汇总路由。

R4(config-router)#end

22.再次查看R3的链路状态数据库和路由表

R3#show ip ospf da

 

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

 

                Router Link States (Area 1)  //1LSA

 

Link ID         ADV Router      Age         Seq#       Checksum Link count

172.16.255.1    172.16.255.1    588         0x80000005 0x002BB8 2

172.16.255.5    172.16.255.5    584         0x80000006 0x0015E6 4

172.16.255.9    172.16.255.9    592         0x80000003 0x00507B 2

 

                Summary Net Link States (Area 1)   //3LSA

 

Link ID         ADV Router      Age         Seq#       Checksum

0.0.0.0         172.16.255.9    113         0x80000001 0x0070FF

 

                Type-7 AS External Link States (Area 1)  //7LSA

 

Link ID         ADV Router      Age         Seq#       Checksum Tag

0.0.0.0         172.16.255.9    733         0x80000001 0x00C464 0

131.131.1.0     172.16.255.1    607         0x80000001 0x00213D 0

131.131.2.0     172.16.255.1    607         0x80000001 0x001647 0

R3#show ip route

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 172.16.255.6 to network 0.0.0.0

 

     172.16.0.0/30 is subnetted, 2 subnets

C       172.16.255.0 is directly connected, Serial0/1

C       172.16.255.4 is directly connected, Serial0/2

     131.131.0.0/24 is subnetted, 2 subnets

O N2    131.131.1.0 [110/200] via 172.16.255.1, 00:09:54, Serial0/1

O N2    131.131.2.0 [110/200] via 172.16.255.1, 00:09:54, Serial0/1

O*IA 0.0.0.0/0 [110/65] via 172.16.255.6, 00:02:07, Serial0/2  //到达其它OSPF区域和非R2路由器通告的外网路由均被此条默认替代。

23.测试连通性

R1#ping 192.168.2.1

 

Type escape sequence to abort.

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

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 48/85/128 ms

24.R5上看是否将7LSA转换成5LSA

R5#show ip ospf da

 

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

 

                Router Link States (Area 0)

 

Link ID         ADV Router      Age         Seq#       Checksum Link count

172.16.255.9    172.16.255.9    1207        0x80000003 0x005FC1 2

192.168.1.1     192.168.1.1     1886        0x80000002 0x002B51 2

 

                Summary Net Link States (Area 0)

 

Link ID         ADV Router      Age         Seq#       Checksum

172.16.255.0    172.16.255.9    1061        0x80000001 0x002E0F

172.16.255.4    172.16.255.9    2000        0x80000001 0x0083F5

 

                Type-5 AS External Link States  //5LSA

 

Link ID         ADV Router      Age         Seq#       Checksum Tag

131.131.1.0     172.16.255.9    1050        0x80000001 0x0085DA 0

131.131.2.0     172.16.255.9    1050        0x80000001 0x007AE4 0

192.168.1.0     192.168.1.1     1885        0x80000001 0x0021F4 0

192.168.2.0     192.168.1.1     1885        0x80000001 0x0016FE 0