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.

AREA 1non-backboneAREA 0backboneAREA 2non-backboneeBGPA11.1.1.1A21.1.1.2ABR11.1.1.9ABRBB110.0.0.1ASBR10.0.0.9ASBRABR22.2.2.9ABRC12.2.2.1C22.2.2.2AS 65010eBGP peer
The shape every page below cuts a slice out of: two non-backbone areas joined through the backbone, with one router speaking eBGP to another autonomous system.
01Single area, three routersWalk the adjacency state machine, elect a DR and BDR on the shared segment, then read the database and routing table that come out of it.Open →02LSA types 1 to 7One topology that produces every LSA type at once. Click a type to see who originates it and exactly how far it floods.Open →03Multi-area, three routers per areaFlip each non-backbone area between normal, stub, totally stub, and NSSA and watch the tables shrink at the border.Open →04Cost, speed, and route selectionChange link speeds and the reference bandwidth, then watch SPF pick a winner — sometimes the slow-looking path.Open →05OSPF ↔ BGP redistributionInject BGP routes as E1 or E2 externals, set seed metrics and tags, and see why E2 ignores your internal cost.Open →

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.

  1. 1DownNo hello heard yet on the interface.
  2. 2InitHelloA hello arrived, but it did not list our router ID.
  3. 32-WayHelloOur router ID appears in the neighbor's hello. Bidirectional. DR/BDR is elected here.
  4. 4ExStartDBDMaster and slave decided by the higher router ID; sequence numbers agreed.
  5. 5ExchangeDBDDatabase descriptors swapped: headers only, not full LSAs.
  6. 6LoadingLSR / LSUMissing LSAs requested and received; each one acknowledged.
  7. 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