Visual RFC.
ALL RFCs / RFC 2328
Read the RFC ↗
RFC 2328 / PROTOCOL MECHANISMS

Which road gets us there with the least cost?

04

Add the costs along each road. The smallest total wins; the fewest road segments need not win.

RFC 2328 · § 16.1 — Shortest-path treeEXAMPLE
1 / 4 · Start at router A

A is the start; D is the destination in this example.

Start: ADestination: D

2216ABCD

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.

3 / 3
03
Install the shortest-path next hop or equal-cost set.

Install the shortest-path next hop or equal-cost set.

Which road gets us there with the least cost?Add the costs along each road. The smallest total wins; the fewest road segments need not win.SHORTEST-PATH TREE · EXAMPLE COSTS2215rootABtargetvia A: 2 + 2 = 4via B: 1 + 5 = 6Install next hop AThe calculating router is the tree root

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.

Look up a term in the glossary ↗

Rules & examples
  • 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
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
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.

All chapters in RFC 2328

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗