OSPF LSAs & LSDB
The LSDB (Link-State Database) is OSPF's local topology database for the relevant flooding scope or area. LSAs are the entries in that database; SPF uses the LSDB as input to calculate route candidates. The LSDB is therefore not the same as the routing table (RIB).
1. The LSDB holds every LSA a router has for each area; all routers in an area must hold identical copies.
2. Type 1 router and type 2 network LSAs stay inside an area; type 3 summaries cross ABRs.
3. Type 4/5 (and 7 in NSSA) describe external routes and their ASBRs.
4. Compare database-summary counts across routers in the same area.
5. Age near 3600 s or rapid sequence increments point to flapping or a duplicate router ID.
Routers in an area lack routes that exist elsewhere, while the default route may be present.
Possible stored cause: The area type filters LSA types by design (stub blocks type 5, totally stubby also type 3, NSSA uses type 7), or the area type differs between routers.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show ip ospf database [router|network|summary|external]Show Commands
Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.
How to read the output
show ip ospf database [router|network|summary|external]Look first: LSA type, link-state ID, advertising router, sequence/age
Healthy: Expected LSAs are present and consistent with topology.
Warning: Missing/stale/unexpected LSAs or differing topology view.
Does not prove: LSDB presence does not prove route wins in RIB.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Routers in an area lack routes that exist elsewhere, while the default route may be present.
Step 1 Verification & evidence Verify boundary
show ip ospf database; show ip ospf database router/network/summary/external/nssa-external.
Step 2 Commands & verification Verify boundary
Step 3 Common failure modes Narrow the fault
Step 4 Troubleshooting workflow Narrow the fault
Step 5 Compare advertising path, not just one database dump Narrow the fault
If an LSA is missing at one site, identify where it should originate and which ABR/ASBR or area boundary should propagate it. Compare databases along that path. Summarization/filtering can make neighboring routers healthy and FULL while a specific prefix intentionally or accidentally disappears beyond the boundary.
Step 6 Common mistakes Narrow the fault
- Expecting type 5 LSAs inside stub areas.
- Reading one router's LSDB as the whole picture.
show ip ospf database— LSA summary per area and typeshow ip ospf database router <rid>— one router's linksshow ip ospf database database-summary— LSA counts per type
ReferenceWhat it is1 section · depth on demand
ReferenceWhy it matters1 section · depth on demand
Why it matters
LSAs describe topology/reachability. Routers flood LSAs within defined scopes, build synchronized LSDBs and run SPF to derive paths.
ReferenceHow it works3 sections · depth on demand
LSA and LSDB reasoning
Treat the LSDB as the topology database, not the routing table. Router LSAs describe router links inside an area; Network LSAs describe a multi-access segment represented by the DR; Summary LSAs carry inter-area reachability; External LSAs represent redistributed external prefixes. NSSA Type-7 LSAs are translated by an ABR when leaving the NSSA.
When a route is missing, determine whether the failure is LSA origination, flooding, LSDB contents, SPF/route selection, or route filtering.
From LSA flooding to one shared topology view
Each OSPF router originates and floods Link-State Advertisements appropriate to its role and area. Routers in the same flooding scope build a logically consistent LSDB and run SPF against that topology. Router, Network, Summary/Inter-Area and External information answer different topology questions.
The LSDB is protocol topology evidence. It can contain a prefix/topology element even if the final route is not selected into the RIB because another source wins or the resulting path is otherwise unusable.
LSDB → SPF → RIB → CEF
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
LSA types and the link-state database
The LSDB is OSPF's map of the network. Each router runs SPF on it to build its routing table. RFC 2328 defines five LSA types:
- Router-LSAs (1): each router's links within an area.
- Network-LSAs (2): originated by the DR for each multi-access segment.
- Summary-LSAs for networks (3): inter-area prefixes from ABRs.
- Summary-LSAs for ASBRs (4): how to reach an ASBR in another area.
- AS-external-LSAs (5): external routes from ASBRs.
Type 7 for NSSAs comes from RFC 3101.
LSA types and their scope
| Type | Name | Originated by | Flooded within | Routing table code |
|---|---|---|---|---|
| 1 | Router | Every router | Its area | O |
| 2 | Network | The DR | Its area | O |
| 3 | Summary (network) | ABR | Other areas | O IA |
| 4 | Summary (ASBR) | ABR | Other areas | (used to reach ASBRs) |
| 5 | AS-external | ASBR | All except stub areas | O E1 / O E2 |
| 7 | NSSA external (RFC 3101) | ASBR in an NSSA | The NSSA | O N1 / O N2 |
Reading the database
| Command | Shows |
|---|---|
show ip ospf database | A summary per area and type |
show ip ospf database router <rid> | One router's links and costs |
show ip ospf database network | DR segments and attached routers |
show ip ospf database summary <prefix> | Which ABR advertises an inter-area prefix |
show ip ospf database external <prefix> | Which ASBR, metric type and forward address |
R1# show ip ospf database | begin Router Link
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
10.255.0.1 10.255.0.1 412 0x80000a1c 0x00a2b1 4
10.255.0.2 10.255.0.2 1290 0x80000b03 0x0063c0 3
R1# show ip ospf database summary 10.10.0.0
R1# show ip ospf database external 0.0.0.0 | include Advertising|Metric Type|Forward
R1# show ip ospf statistics | include SPF|Last
What age and sequence numbers tell you
LSAs are refreshed periodically, and RFC 2328 says self-originated LSAs persist for up to MaxAge if not flushed. A sequence number that keeps rising quickly for one router shows that router's LSA is changing often. That usually means a flapping link and repeated SPF runs.
Documented example, not captured output.
Quick reference
Each OSPF router stores the LSAs it knows in the LSDB, separately per area. LSAs carry a sequence number and an age, are refreshed every 30 minutes and expire at 60 minutes (MaxAge), so the database stays current. SPF runs on the LSDB to build the shortest-path tree.
| LSA type | Originator | Scope |
|---|---|---|
| 1 Router | Every router | Area |
| 2 Network | DR | Area |
| 3 Summary | ABR | Area |
| 4 ASBR summary | ABR | Area |
| 5 External | ASBR | Whole domain (not stub) |
| 7 NSSA external | ASBR in NSSA | NSSA |
show ip ospf database
show ip ospf database router 10.0.0.1
show ip ospf database external
Documented example, not captured output.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Infrastructure → OSPF LSAs & LSDB. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc2328.html · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Link-State Advertisement: an OSPF database entry that describes topology or reachability.
OSPF · relatedLSDBOSPF Link-State Database: the local database of LSAs for one flooding scope or area.
Routing · relatedRIBRouting Information Base: the routing table of routes selected for installation.
Quick lookup tables
OSPF LSA quick reference
Common OSPFv2 LSA roles and scope.
| Type | Name / role | Typical origin / scope |
|---|---|---|
| 1 | Router LSA | Every OSPF router; describes links inside one area |
| 2 | Network LSA | DR on a multiaccess segment; describes attached routers inside one area |
| 3 | Summary / inter-area | ABR advertises reachability between areas |
| 4 | ASBR Summary | ABR advertises how to reach an ASBR |
| 5 | AS External | ASBR advertises external routes; not flooded into stub areas |
| 7 | NSSA External | ASBR inside NSSA; translated at the NSSA boundary when appropriate |
Deep reference
Healthy vs suspicious evidence
How to read the evidence
Design & tradeoffs
ENCOR design tradeoffs
Understanding LSA type and flooding scope is more useful than memorizing route codes alone when troubleshooting multiarea/external reachability.