Open Shortest Path First · interactive reference
OSPF Topology Visualization
Two non-backbone areas joined through the backbone, with one router speaking eBGP to another autonomous system. Every router in an area floods link-state advertisements until all of them hold an identical database, then each runs its own shortest-path calculation. The five pages below let you change priorities, link speeds, area types and redistribution metrics, and watch the database and the routing table recompute.
The four ideas everything else hangs off
Key point
Areas exist to limit flooding, not to limit reachability. An LSA does not leave its area; a summary of it does.
Cost is bandwidth, not delay or hop count. Reference bandwidth divided by interface bandwidth, truncated, minimum 1.
Type 1 and 2 are topology; type 3, 4, 5 and 7 are hearsay. Routers run SPF on the first pair and simply add to the metric on the rest.
Route source beats metric. An intra-area route with cost 800 wins over an E2 external with cost 5.
Adjacency, in seven states
Neighbors are not routes. Nothing gets installed until both sides reach Full.
- 1Down—No hello heard yet on the interface.
- 2InitHelloA hello arrived, but it did not list our router ID.
- 32-WayHelloOur router ID appears in the neighbor's hello. Bidirectional. DR/BDR is elected here.
- 4ExStartDBDMaster and slave decided by the higher router ID; sequence numbers agreed.
- 5ExchangeDBDDatabase descriptors swapped: headers only, not full LSAs.
- 6LoadingLSR / LSUMissing LSAs requested and received; each one acknowledged.
- 7FullLSAckDatabases identical. SPF runs and routes are installed.
LSA cheat sheet
The full decode, with scope, lives on the LSA page.
Type 1 · Router LSA
Flooded within a single area only
Type 2 · Network LSA
Flooded within a single area only
Type 3 · Summary LSA (inter-area prefix)
Flooded into other areas, one hop of areas at a time
Type 4 · ASBR Summary LSA
Flooded into areas that do not contain the ASBR
Type 5 · AS External LSA
Flooded through the whole OSPF domain, except stub and NSSA areas
Type 6 · Group Membership LSA (MOSPF)
Never used
Type 7 · NSSA External LSA
Flooded within the NSSA only, then translated to a type 5 by the NSSA ABR