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.把R2和R3配置成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) //1型LSA 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) //3型LSA 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) //7型LSA 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上看是否將7型LSA轉換成5型LSA
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 //5型LSA 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 |