OSPF LSDB & LSA Types
Cheat sheet · https://pcornel.dk/topic.php?topic=353
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.
Remember
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.
First 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.
Commands
show ip ospf database [router|network|summary|external]- Inspect OSPF LSDB and LSA types.
show ip ospf database router- Shows Type-1 Router LSAs.
show ip ospf database network- Shows Type-2 Network LSAs.
show ip ospf database external- Shows Type-5 AS External LSAs.
show ip ospf database external [prefix]- Display Type-5 external LSAs including metric type, advertising router and forwarding address.
show ip ospf database nssa-external [prefix]- Display NSSA Type-7 external LSAs.
show ip ospf database router <router-id>- Inspect Router-LSA header, sequence/checksum and link descriptors.
show ip ospf database network <link-state-id>- Inspect Network-LSA and attached-router list.
show ip ospf database summary <prefix>- Inspect inter-area Type-3 summary LSA fields.
show ip ospf database external <prefix>- Inspect Type-5 external metric type, forwarding address and route tag.
show ip ospf database nssa-external <prefix>- Inspect Type-7 NSSA external LSA fields and translation-related evidence.
show ip ospf database [type] [id]- Inspect LSDB headers and type-specific LSA data.
show ip ospf databaseshow ip ospf database router <rid>show ip ospf database network <dr-ip>show ip ospf database self-originate
Verify in this order
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
Where it usually breaks
underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=353