Use it when a route is missing or unexpected: the database shows what was actually advertised, by whom, and whether all routers agree.
OSPF LSDB & LSA Types
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.
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.
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
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
- "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.
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.
show ip ospf database [router|network|summary|external]ShowInspect OSPF LSDB and LSA types.
Use when: Analyze LSDB/flooding.
IOS/IOS XE · mixed · verifiesshow ip ospf database routerShowShows Type-1 Router LSAs.
Use when: You need to see the router LSAs (type 1) in an area to check which links each router advertises.
Quick note: Each OSPF router originates one router LSA per area. Its links show neighbors, transit networks and stub networks with their metrics.
Cisco IOS XE · mixedshow ip ospf database networkShowShows Type-2 Network LSAs.
Cisco IOS XE · mixedshow ip ospf database externalShowShows Type-5 AS External LSAs.
Cisco IOS XE · mixedshow ip ospf database external [prefix]ShowDisplay Type-5 external LSAs including metric type, advertising router and forwarding address.
Cisco IOS XE · mixedshow ip ospf database nssa-external [prefix]ShowDisplay NSSA Type-7 external LSAs.
Cisco IOS XE · mixedshow ip ospf database router <router-id>ReferenceInspect Router-LSA header, sequence/checksum and link descriptors.
Cisco IOS XE · mixedshow ip ospf database network <link-state-id>ReferenceInspect Network-LSA and attached-router list.
Cisco IOS XE · mixedshow ip ospf database summary <prefix>ReferenceInspect inter-area Type-3 summary LSA fields.
Cisco IOS XE · mixedshow ip ospf database external <prefix>ReferenceInspect Type-5 external metric type, forwarding address and route tag.
Cisco IOS XE · mixedshow ip ospf database nssa-external <prefix>ReferenceInspect Type-7 NSSA external LSA fields and translation-related evidence.
Cisco IOS XE · mixedshow ip ospf database [type] [id]ShowInspect LSDB headers and type-specific LSA data.
Cisco IOS XE · mixedHow 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 routerLook 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 networkLook 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 externalLook 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.
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.
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 · 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.
The official Cisco source documents this command in a bounded Cisco product/release or feature context.
other · Evidence referenceCisco source context for show ip ospf database network <link-state-id>The official Cisco source documents this command in a bounded Cisco product/release or feature context.
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.
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:
| Types | Content | Scope |
|---|---|---|
| 1 Router, 2 Network | The area's topology: routers, links, costs | One area |
| 3 Summary, 4 ASBR Summary | Networks and ASBRs in other areas, as advertised by the ABR | One area |
| 5 External, 7 NSSA External | Routes redistributed into OSPF | The 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
| Command | Shows |
|---|---|
show ip ospf database | Summary 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-originate | What this router advertises |
show ip ospf database database-summary | LSA counts per area |
Questions the LSDB answers
| Question | Look 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.
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 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%