OSPF Fundamentals
Cheat sheet · https://pcornel.dk/topic.php?topic=627
Answer
OSPF fundamentals: every router in an area holds the same link-state database, runs the SPF algorithm on it, and installs the shortest paths. Adjacencies carry the database; areas limit how far detail spreads.
Remember
Neighbours must agree on area, subnet, hello and dead timers, authentication, area type, network type and MTU. FULL is the normal end state (2WAY between two non-DR routers on a LAN). Every area must touch area 0.
First checks
show ip ospf neighbor— neighbours with state and DR/BDR role.show ip ospf interface brief— OSPF interfaces, area, cost, state.show ip ospf interface <interface>— timers, network type, priority, authentication.show ip ospf database— the LSAs per area.show ip route ospf— the routes OSPF installed.show ip protocols— router ID, areas, passive interfaces.
Commands
show ip ospf interface- Detailed OSPF interface timers, network type, cost and adjacency context.
show ip ospf database- OSPF LSDB inventory and LSA visibility.
show ip ospf neighbor- Display OSPF neighbor adjacencies.
show ip protocols- Display active routing protocol parameters.
show ip ospf- Display OSPF process Router ID, area/process metadata and operational state.
show ip ospf interface briefshow ip route ospf
Verify in this order
interface in OSPF and not passive → hellos match → 2WAY → DR/BDR elected on broadcast links → database exchange → FULL → LSAs in the database → SPF → routes installed
Where it usually breaks
underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path
OSPF packet types
| Type | Name | Role |
|---|---|---|
| 1 | Hello | Neighbor discovery/maintenance and election information |
| 2 | Database Description (DBD) | Summarizes LSDB contents during synchronization |
| 3 | Link-State Request (LSR) | Requests specific LSAs |
| 4 | Link-State Update (LSU) | Carries one or more LSAs |
| 5 | Link-State Acknowledgment (LSAck) | Acknowledges reliable LSA flooding |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=627