Step 2: Examine the OSPF Link-State Database
Purpose
You can determine if the correct types of LSAs are sent and received throughout the OSPF network by examining the entire OSPF link-state database. Figure 13 illustrates the flooding scope of LSAs generated and flooded in the example OSPF network.
![]()
This network should have the following distribution of LSAs:
- Backbone area
0.0.0.0should have Type 1, Type 3, Type 4, and Type 5 LSAs.- NSSA area
0.0.0.1should have Type 1, Type 3, and Type 7 LSAs.- Stub area
0.0.0.2should have Type 1 and Type 3 LSAs.- Area
0.0.0.3should have Type 1, Type 3, Type 4, and Type 5 LSAs.Because all routers in this network have SONET interfaces configured for Point-to-Point (PPP) encapsulation, all OSPF adjacencies are point-to-point, which results in Type 2 network LSAs not appearing in this network or being described in the following sections. Type 2 network LSAs are only advertised by a designated router, which is only present on broadcast or non-broadcast multiaccess (NBMA) networks.
Action
To determine if the correct LSAs appear in the different areas of the OSPF AS, enter the following CLI operational mode command:
user@host>show ospf databaseSample Output
user@R2>show ospf databaseOSPF link state database,area 0.0.0.0Type ID Adv Rtr Seq Age Opt Cksum LenRouter*10.0.0.2 10.0.0.2 0x80000049 1555 0x2 0xd72a 84Router 10.0.0.3 10.0.0.3 0x80000038 1395 0x2 0xef0e 84Router 10.0.0.4 10.0.0.4 0x80000041 914 0x2 0x46a9 84Summary*10.0.0.1 10.0.0.2 0x80000047 1855 0x2 0xf509 28Summary 10.0.0.5 10.0.0.4 0x8000003c 2114 0x2 0xd72c 28Summary 10.0.0.6 10.0.0.3 0x80000033 1995 0x2 0xe527 28Summary *10.1.12.0 10.0.0.2 0x80000047 786 0x2 0x5d98 28Summary 10.1.36.0 10.0.0.3 0x80000035 2426 0x2 0x727c 28Summary 10.1.45.0 10.0.0.4 0x8000003d 1021 0x2 0xf8e3 28ASBRSum*10.0.0.1 10.0.0.2 0x80000046 355 0x2 0xe915 28ASBRSum 10.0.0.6 10.0.0.3 0x80000032 1526 0x2 0xd933 28OSPF link state database,area 0.0.0.1Type ID Adv Rtr Seq Age Opt Cksum LenRouter10.0.0.1 10.0.0.1 0x80000058 858 0x0 0x5c26 60Router *10.0.0.2 10.0.0.2 0x80000048 1986 0x0 0xecbd 48Summary*10.0.0.2 10.0.0.2 0x80000039 1686 0x0 0x1cf2 28Summary *10.0.0.3 10.0.0.2 0x80000038 2286 0x0 0x1eef 28Summary *10.0.0.4 10.0.0.2 0x80000038 955 0x0 0x14f8 28Summary *10.0.0.5 10.0.0.2 0x80000038 186 0x0 0x14f6 28Summary *10.0.0.6 10.0.0.2 0x80000038 2155 0x0 0xaff 28Summary *10.1.23.0 10.0.0.2 0x80000046 655 0x0 0x4e9 28Summary *10.1.24.0 10.0.0.2 0x80000046 486 0x0 0xf8f3 28Summary *10.1.34.0 10.0.0.2 0x80000039 1255 0x0 0xae40 28Summary *10.1.36.0 10.0.0.2 0x80000039 55 0x0 0x9854 28Summary *10.1.45.0 10.0.0.2 0x80000039 1086 0x0 0x35ae 28NSSA*0.0.0.0 10.0.0.2 0x80000044 2455 0x0 0xd821 36NSSA 10.0.0.100 10.0.0.1 0x80000051 2916 0x8 0x797c 36OSPF AS SCOPE link state databaseType ID Adv Rtr Seq Age Opt Cksum LenExtern*10.0.0.100 10.0.0.2 0x8000005e 1386 0x2 0xcf20 36Extern 10.0.0.101 10.0.0.6 0x8000002b 333 0x2 0x9791 36user@R3>show ospf databaseOSPF link state database,area 0.0.0.0Type ID Adv Rtr Seq Age Opt Cksum LenRouter10.0.0.2 10.0.0.2 0x80000049 1668 0x2 0xd72a 84Router *10.0.0.3 10.0.0.3 0x80000038 1506 0x2 0xef0e 84Router 10.0.0.4 10.0.0.4 0x80000041 1027 0x2 0x46a9 84Summary10.0.0.1 10.0.0.2 0x80000047 1968 0x2 0xf509 28Summary 10.0.0.5 10.0.0.4 0x8000003c 2227 0x2 0xd72c 28Summary *10.0.0.6 10.0.0.3 0x80000033 2106 0x2 0xe527 28Summary 10.1.12.0 10.0.0.2 0x80000047 900 0x2 0x5d98 28Summary *10.1.36.0 10.0.0.3 0x80000036 6 0x2 0x707d 28Summary 10.1.45.0 10.0.0.4 0x8000003d 1134 0x2 0xf8e3 28ASBRSum10.0.0.1 10.0.0.2 0x80000046 468 0x2 0xe915 28ASBRSum *10.0.0.6 10.0.0.3 0x80000032 1638 0x2 0xd933 28OSPF link state database,area 0.0.0.3Type ID Adv Rtr Seq Age Opt Cksum LenRouter*10.0.0.3 10.0.0.3 0x80000036 2406 0x2 0x3452 48Router 10.0.0.6 10.0.0.6 0x8000002f 445 0x2 0x1850 60Summary*10.0.0.1 10.0.0.3 0x80000036 906 0x2 0x1cf1 28Summary *10.0.0.2 10.0.0.3 0x80000036 738 0x2 0x806 28Summary *10.0.0.3 10.0.0.3 0x80000033 1806 0x2 0xf917 28Summary *10.0.0.4 10.0.0.3 0x80000033 1038 0x2 0xf915 28Summary *10.0.0.5 10.0.0.3 0x80000033 306 0x2 0xf913 28Summary *10.1.12.0 10.0.0.3 0x80000036 606 0x2 0x8381 28Summary *10.1.23.0 10.0.0.3 0x80000036 438 0x2 0xfffa 28Summary *10.1.24.0 10.0.0.3 0x80000036 1338 0x2 0xfef9 28Summary *10.1.34.0 10.0.0.3 0x80000036 138 0x2 0x8669 28Summary *10.1.45.0 10.0.0.3 0x80000033 1206 0x2 0x1dc9 28ASBRSum*10.0.0.1 10.0.0.3 0x80000035 2238 0x2 0x10fd 28ASBRSum *10.0.0.2 10.0.0.3 0x80000035 1938 0x2 0xfb12 28OSPF AS SCOPE link state databaseType ID Adv Rtr Seq Age Opt Cksum LenExtern10.0.0.100 10.0.0.2 0x8000005e 1500 0x2 0xcf20 36Extern 10.0.0.101 10.0.0.6 0x8000002b 445 0x2 0x9791 36user@R4>show ospf databaseOSPF link state database,area 0.0.0.0Type ID Adv Rtr Seq Age Opt Cksum LenRouter10.0.0.2 10.0.0.2 0x80000049 1711 0x2 0xd72a 84Router 10.0.0.3 10.0.0.3 0x80000038 1550 0x2 0xef0e 84Router *10.0.0.4 10.0.0.4 0x80000041 1068 0x2 0x46a9 84Summary10.0.0.1 10.0.0.2 0x80000047 2011 0x2 0xf509 28Summary *10.0.0.5 10.0.0.4 0x8000003c 2268 0x2 0xd72c 28Summary 10.0.0.6 10.0.0.3 0x80000033 2150 0x2 0xe527 28Summary 10.1.12.0 10.0.0.2 0x80000047 942 0x2 0x5d98 28Summary 10.1.36.0 10.0.0.3 0x80000036 50 0x2 0x707d 28Summary *10.1.45.0 10.0.0.4 0x8000003d 1175 0x2 0xf8e3 28ASBRSum10.0.0.1 10.0.0.2 0x80000046 511 0x2 0xe915 28ASBRSum 10.0.0.6 10.0.0.3 0x80000032 1681 0x2 0xd933 28OSPF link state database,area 0.0.0.2Type ID Adv Rtr Seq Age Opt Cksum LenRouter*10.0.0.4 10.0.0.4 0x8000003f 875 0x0 0x5913 48Router 10.0.0.5 10.0.0.5 0x8000002e 1263 0x0 0x5a03 60Summary*0.0.0.0 10.0.0.4 0x80000019 768 0x0 0x4be3 28Summary *10.0.0.1 10.0.0.4 0x80000040 575 0x0 0x20e4 28Summary *10.0.0.2 10.0.0.4 0x80000040 468 0x0 0xcf8 28Summary *10.0.0.3 10.0.0.4 0x8000003f 275 0x0 0x401 28Summary *10.0.0.4 10.0.0.4 0x8000003d 168 0x0 0xf313 28Summary *10.0.0.6 10.0.0.4 0x8000003d 2075 0x0 0xf30f 28Summary *10.1.12.0 10.0.0.4 0x8000003f 1968 0x0 0x8973 28Summary *10.1.23.0 10.0.0.4 0x8000003f 1775 0x0 0x10e1 28Summary *10.1.24.0 10.0.0.4 0x8000003d 1668 0x0 0xfef4 28Summary *10.1.34.0 10.0.0.4 0x8000003d 1475 0x0 0x9059 28Summary *10.1.36.0 10.0.0.4 0x8000003d 1368 0x0 0x8462 28OSPF AS SCOPE link state databaseType ID Adv Rtr Seq Age Opt Cksum LenExtern10.0.0.100 10.0.0.2 0x8000005e 1542 0x2 0xcf20 36Extern 10.0.0.101 10.0.0.6 0x8000002b 488 0x2 0x9791 36What It Means
The sample output shows that all the ABRs have the correct distribution of LSAs. Area
0.0.0.0for all routers has Type 1 router, Type 3 summary, and Type 4 ASBR summary LSAs. Each ABR has an OSPF AS scope link-state database that includes Type 5 external LSAs.Note that Type 2 network LSAs are not found in this topology because both broadcast or NMBA network types are not present.
NSSA area
0.0.0.1, in the output forR2, has Type 1 router, Type 3 summary, and Type 7 NSSA LSAs. Stub area0.0.0.2, in the output forR4, has Type 1 router and Type 3 summary LSAs. Non-backbone area0.0.0.3, in the output forR3, has Type 1 router, Type 3 summary, Type 4 ASBR, and Type 5 external LSAs.All areas have a Type 1 router LSA because the Type 1 LSA is generated for each router that has interfaces in that area. Because this LSA has an area flooding scope, it remains within its own particular area and is not seen in other areas. For example, in the link-state database for area
0.0.0.2, there are two router LSAs: one forR4and one forR5.The ABR for that area places the routing information contained within the Type 1 LSA into a Type 3 summary or Type 4 ASBR summary LSA and forwards it across the area boundary. Whether the area receives a Type 3 or Type 4 summary LSA depends on whether the area is a stub area. Type 3 summary LSAs appear in all areas, but Type 4 LSAs only appear in non-stub areas as indicated in the link-state databases for areas
0.0.0.1,0.0.0.2, and0.0.0.3.Each ABR router has a Type 5 AS external LSA used to advertise any networks external to the OSPF AS. This LSA is flooded by the ABRs to each non-stub router in the entire AS. For example, within area
0.0.0.0, Type 5 LSAs exist for areas0.0.0.1and0.0.0.3. Both of these areas are connected to routers (external router A and external router B) from other ASs, which results in the injection of external routes into the OSPF AS. However, there are no Type 5 LSAs in stub areas0.0.0.1and0.0.0.2.A Type 7 NSSA external LSA appears in NSSA area
0.0.0.1and is used within the NSSA to advertise an external router. This LSA is flooded to each router in the NSSA and is not sent to other adjacent areas. For example, only area0.0.0.1has a Type 7 LSA. Because a Type 7 LSA does not traverse area boundaries, the ABR in the NSSA (R2) translates the Type 7 LSA into a Type 5 LSA that is forwarded to all areas (with the exception of stub areas).The sample output shows that each router has two databases, indicating that it is an ABR between the backbone and a non-backbone, stub, or NSSA area. All of the addresses preceded by an asterisk (*) are LSAs that originated with the router from which the output was taken.