liveBook · Manning

Dijkstra's algorithm

As explained in Acing the CCNA Exam: Volume 1 Fundamentals and Protocols

Dijkstra's algorithm is a shortest-path graph algorithm for calculating minimum-cost paths from a source node.

Dijkstra's algorithm, also called Shortest Path First (SPF), calculates minimum-cost routes from a network topology map. OSPF routers use it after building an identical link-state database (LSDB). section 18.0 section 18.1.1

Apply the process in this order:

  • Build the LSDB from link-state advertisements (LSAs) flooded throughout the OSPF area. section 18.1.1
  • Calculate a path to each destination by comparing cumulative interface costs. section 18.5
  • Recalculate when topology changes; multi-area OSPF limits the affected LSDB and SPF work to smaller areas. section 18.1.2

Routing to 10.1.1.0/24

Each router uses the shared LSDB as a detailed network diagram, including link costs, and runs SPF to select the lowest-cost route to 10.1.1.0/24. section 18.1.1

Figure 18.1 Routers flood LSAs within the OSPF area to ensure all routers have an identical LSDB. The LSAs that make up the LSDB contain information about each router’s connected networks, such as their cost. R1’s LSA indicates that it is connected to 10.0.0.0/30, 10.0.0.4/30, and 10.1.1.0/24, each with a cost of 1.

Trace how routers flood LSAs and how those advertisements record connected networks and interface costs. section 18.1.1

How Acing the CCNA Exam: Volume 1 Fundamentals and Protocols covers it

How deep it goes
Explains topology inputs, cumulative costs, and recalculation effects but does not detail the algorithm's internal iteration steps.
Examples
Uses OSPF routers calculating a route to 10.1.1.0/24 from shared link costs.
What it assumes
Assumes basic OSPF, LSAs, LSDBs, network topology, and routing costs.
What you can do after
Evaluate how OSPF selects routes and why area design changes SPF resource usage.
How it connects
Connects OSPF with link-state advertisements, link-state databases, routing costs, and multi-area networks.

Also explained in

Compare how 5 books explain Dijkstra's algorithm →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the CCNA Exam: Volume 1 Fundamentals and Protocols. The section links point to the parts of the book it draws on.