Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

OSPF LSDB & LSA Types

Direct answer

The link-state database is the collection of LSAs a router holds — OSPF's map of the network. Every router in an area has the same database and calculates its routes from it.

When to use this

Use it when a route is missing or unexpected: the database shows what was actually advertised, by whom, and whether all routers agree.

First 30 seconds

1. Which router should advertise the network? Look for its LSA: show ip ospf database.

2. Missing → the originator does not advertise it; go there.

3. Present → compare sequence numbers with another router in the area.

4. Different → flooding is broken between them.

5. Same, and still no route → another source wins, or the path cannot be computed.

Operational verification

originating router issues the LSA → flooded to every router in the area → identical sequence numbers everywhere → SPF on types 1 and 2 → inter-area and external routes added → routing table

Evidence · next step

Compare those links to live OSPF interfaces/neighbors and then the SPF/RIB result for the target prefix.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common interpretation traps
  • "The neighbour is Full, so the route must be there." Full means the databases match; if the originating router does not advertise the network, it is missing from all of them equally.
  • The database is read as the routing table. An LSA can be present while its route is not installed, for example when another source has a lower administrative distance.
  • Routers in different areas are expected to have the same database. Only routers in the same area do.
  • An old LSA is taken as current. Check the age and the advertising router; an LSA from a router that has gone remains for up to an hour.
  • Type 3 LSAs are thought to carry topology. They carry a network and a cost from the ABR, nothing about the path behind it.
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 · Cisco IOS XE · IOS/IOS XE
Key commandshow ip ospf database [router|network|summary|external]
Scope / prerequisiteUse it when a route is missing or unexpected: the database shows what was actually advertised, by whom, and whether all…
Show · 7Reference · 5
What next?3 suggested next steps
Catalog command links12
Evidence2
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.

show ip ospf database router

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.

show ip ospf database network

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.

show ip ospf database 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.

show ip ospf database external [prefix]

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.

show ip ospf database nssa-external [prefix]

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.

show ip ospf database router <router-id>

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.

show ip ospf database network <link-state-id>

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.

show ip ospf database summary <prefix>

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.

show ip ospf database external <prefix>

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.

show ip ospf database nssa-external <prefix>

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.

show ip ospf database [type] [id]

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.

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

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational verification Verify boundary
show ip ospf database
show ip ospf database router 10.0.0.1
show ip ospf database database-summary
show ip route ospf

The first lists all LSAs by area and type with advertising router, age and sequence number. The second shows one router's LSA in full — the links it claims and their costs. database-summary counts LSAs per type, which is a quick way to compare two routers in the same area. The routing table shows the outcome.

Known-good: two routers in the same area have the same LSAs with the same sequence numbers, and the LSA for the network in question exists from the router that owns it.

Evidence references

Evidence · 2 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

other · 2
Command lookup Jump straight to Cisco syntax
Key points

A route is a result of the database, not a message. Routers in the same area must hold identical LSAs; routers in different areas do not. Full neighbours mean synchronised databases — not that the network you want was ever advertised.

Key checks
  • show ip ospf database — all LSAs with advertising router, age and sequence number.
  • show ip ospf database router <router-id> — one router's links and costs.
  • show ip ospf database database-summary — counts per type, for comparing two routers.
  • show ip route ospf — the outcome.
ReferenceWhat it is1 section · depth on demand

Mental model

The link-state database (LSDB) is the collection of all link-state advertisements a router has received. It is OSPF's map of the network. Each router runs the shortest-path calculation on this map to produce its routes.

ReferenceWhy it matters1 section · depth on demand

Why it matters operationally

In OSPF a route is a result, not a message: nothing arrives saying "use this path". When a route is missing or wrong, the question is what the database says — whether the right LSA is present, from the right router — and the routing table follows from that.

ReferenceHow it works1 section · depth on demand

How it works

A router keeps one database per area it belongs to. Inside an area, every router holds exactly the same LSAs. That shared picture is what guarantees that they all calculate consistent, loop-free paths.

The database is filled by flooding. When a router's links change, it issues a new version of its LSA and sends it to its neighbours; each neighbour stores it, acknowledges it, and passes it on. Within seconds every router in the area has it, and each one recalculates.

The LSA types fall into three groups:

TypesContentScope
1 Router, 2 NetworkThe area's topology: routers, links, costsOne area
3 Summary, 4 ASBR SummaryNetworks and ASBRs in other areas, as advertised by the ABROne area
5 External, 7 NSSA ExternalRoutes redistributed into OSPFThe whole domain (5) or one NSSA (7)

From types 1 and 2 the router computes the shortest path to every network in its own area. Routes to other areas and external routes are then added on top, using the cost to the ABR or ASBR that advertised them.

Each LSA carries a sequence number and an age. Its originator reissues it every 30 minutes; an LSA not refreshed for an hour is discarded.

ReferenceImportant terms & boundaries1 section · depth on demand

In depth

Working with the OSPF LSDB

The link-state database is the shared map that every router in an area runs SPF on. Reading it explains routing decisions that the routing table alone can't. RFC 2328 defines five LSA types:

  • Router LSAs (1): a router's links within an area.
  • Network LSAs (2): from the DR of each multi-access segment.
  • Summary LSAs for networks (3): inter-area prefixes from ABRs.
  • Summary LSAs for ASBRs (4).
  • AS-external LSAs (5): from ASBRs.

All routers in an area must hold identical type 1 and 2 LSAs.

Database commands

CommandShows
show ip ospf databaseSummary per area and LSA type
show ip ospf database router <rid>One router's links, neighbours and costs
show ip ospf database network <dr-ip>Routers attached to a segment
show ip ospf database summary <prefix>Inter-area routes and their advertising ABRs
show ip ospf database external <prefix>External routes: metric type, forward address, tag
show ip ospf database self-originateWhat this router advertises
show ip ospf database database-summaryLSA counts per area

Questions the LSDB answers

QuestionLook at
Why is this path chosen?Router LSAs along the path: link costs
Which ABR advertises this prefix?The summary LSA's advertising router
Why is an external route missing?Type 5 present? Is the ASBR reachable (type 4)? Forward address reachable?
Is something flapping?Sequence numbers increasing quickly; LSA age repeatedly resetting
Are two routers in sync?database-summary counts on both
R1# show ip ospf database router 10.255.0.2
  LS age: 1290
  Link State ID: 10.255.0.2
  Advertising Router: 10.255.0.2
  LS Seq Number: 80000B03
  Number of Links: 3
    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 10.255.0.1
     (Link Data) Router Interface address: 10.0.12.2
      TOS 0 Metrics: 1
R1# show ip ospf database external 0.0.0.0 | include Advertising|Metric Type|Forward
R1# show ip ospf database database-summary | include Area|Router|Network|Summary|External|Total

Spotting instability

Compare LS Seq Number for the same LSA over a few minutes. A router whose sequence number increases every few seconds is re-originating its LSA constantly, usually because one of its links is flapping. Every router in the area then runs SPF repeatedly.

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.
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 OSPF → OSPF LSDB & LSA Types. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc2328.html · confidence 94%
Confirmation

Confirm action

Continue?