Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

OSPF LSAs & LSDB

Direct answer

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).

When to use this

Use this lookup to decide whether OSPF prefix or topology information has actually been originated, flooded and learned locally, before moving on to SPF, the RIB and CEF.

First 30 seconds

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.

Operational verification

router floods LSAs → identical area LSDB → SPF → OSPF routes in RIB

Failure signatureExternal or inter-area routes are missing inside a stub or NSSA area

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
Platform / version applicability
Protocol standard + deployed implementation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformProtocol standard · IOS/IOS XE
Key commandshow ip ospf database [router|network|summary|external]
Scope / prerequisiteUse this lookup to decide whether OSPF prefix or topology information has actually been originated, flooded and learned…
Show · 1
What next?3 suggested next steps
Catalog command links1
Evidence0
On this pageJump to a specific section
Verification

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.

Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

6 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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
  • show ip ospf border-routers — Display ABR/ASBR reachability.
  • show ip ospf database — Inspect OSPF LSDB and LSA types.
Step 3 Common failure modes Narrow the fault

Missing LSA due to area type, redistribution/summarization issue, adjacency/flooding failure or stale assumptions about LSA scope.

Step 4 Troubleshooting workflow Narrow the fault

Focus for this topic: Missing LSA due to area type, redistribution/summarization issue, adjacency/flooding failure or stale assumptions about LSA scope.

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.
Command lookup Jump straight to Cisco syntax
Key points

Think of the chain: LSA → LSDB → SPF → RIB → CEF. A FULL neighbor state proves adjacency and database synchronization, not that a specific route is in the RIB or can be forwarded.

Key checks
  • show ip ospf database — LSA summary per area and type
  • show ip ospf database router <rid> — one router's links
  • show ip ospf database database-summary — LSA counts per type
ReferenceWhat it is1 section · depth on demand

Concept overview

Router, network, summary, external and NSSA LSA roles and how LSDB topology becomes SPF routes.

Key ideas: LSAs describe topology/reachability. Routers flood LSAs within defined scopes, build synchronized LSDBs and run SPF to derive paths.

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

For a missing route, separate four stages: Does the expected LSA exist? Does SPF derive a path/cost? Does the RIB install the OSPF route? Does CEF resolve the next hop? This chain makes it possible to localize a problem to flooding, topology calculation, route preference or data-plane resolution.

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

TypeNameOriginated byFlooded withinRouting table code
1RouterEvery routerIts areaO
2NetworkThe DRIts areaO
3Summary (network)ABROther areasO IA
4Summary (ASBR)ABROther areas(used to reach ASBRs)
5AS-externalASBRAll except stub areasO E1 / O E2
7NSSA external (RFC 3101)ASBR in an NSSAThe NSSAO N1 / O N2

Reading the database

CommandShows
show ip ospf databaseA summary per area and type
show ip ospf database router <rid>One router's links and costs
show ip ospf database networkDR 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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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 typeOriginatorScope
1 RouterEvery routerArea
2 NetworkDRArea
3 SummaryABRArea
4 ASBR summaryABRArea
5 ExternalASBRWhole domain (not stub)
7 NSSA externalASBR in NSSANSSA
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
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docProtocol standard + deployed implementation RFC 2328

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%
Terminology layer

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.

Aliases that resolve here
OSPF LSDBLSDBLink-State DatabaseOSPF databaseshow ip ospf databaseOSPF LSA database
Embedded reference data

Quick lookup tables

OSPF LSA quick reference

Common OSPFv2 LSA roles and scope.

TypeName / roleTypical origin / scope
1Router LSAEvery OSPF router; describes links inside one area
2Network LSADR on a multiaccess segment; describes attached routers inside one area
3Summary / inter-areaABR advertises reachability between areas
4ASBR SummaryABR advertises how to reach an ASBR
5AS ExternalASBR advertises external routes; not flooded into stub areas
7NSSA ExternalASBR inside NSSA; translated at the NSSA boundary when appropriate
Depth when you need it

Deep reference

Healthy vs suspicious evidence

How to read the evidence

Verification: Match neighbor state and timers on both peers, inspect the relevant LSA/prefix, confirm the selected RIB entry and CEF adjacency, then generate the original flow and inspect forward/return behavior.

Design & tradeoffs

ENCOR design tradeoffs

Understanding LSA type and flooding scope is more useful than memorizing route codes alone when troubleshooting multiarea/external reachability.

Confirmation

Confirm action

Continue?