Which road gets us there with the least cost?
04Add the costs along each road. The smallest total wins; the fewest road segments need not win.
A is the start; D is the destination in this example.
Start: ADestination: D
Numbers are road costs. Blue roads are being followed in this step.
What happens if you change this?
Make one change, then watch again. Restart restores the original example.
Install the shortest-path next hop or equal-cost set.
Key idea: Shortest means lowest total link cost in this map, rather than visually shortest.
Terms
- Router
- A device that chooses where to send network packets next.
- Route
- Information describing how to reach a block of destinations. It is different from the packets using it.
- OSPF
- Open Shortest Path First: a protocol for sharing scoped link information and calculating low-cost routes.
- Adjacency / Full
- An OSPF neighbor relationship for synchronizing maps; Full means the applicable exchange is complete.
- LSA / LSDB
- A link-state advertisement is one map notice; the link-state database collects such information.
Rules & examples
Shortest means lowest total link cost in this map, rather than visually shortest.
- The root is the calculating router; link costs determine the illustrative path choice.
- Equal-cost multipath is possible; this is not an unconstrained policy protocol like BGP.
The drawing is a simplified worked example. Follow the linked RFC and its updates for implementation requirements.
A finite undirected four-router, one-area graph illustrates Dijkstra’s shortest-path calculation. Edge costs [["A","B",2],["B","D",2],["A","C",1],["C","D",6]]. Equal-cost multipath is represented by all minimum-cost paths; network vertices and the full OSPF route-type rules are outside this graph.
Sources
New to this? Start hereA quick picture + helpful background
A message needs an address.
Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.