OSPF

How OSPF SPF Algorithm and LSDB Work

OSPF builds the LSDB, then runs Dijkstra (SPF) to calculate best paths. Here is what triggers partial vs full SPF and how to tune the throttle timers.
How OSPF SPF Algorithm and LSDB Work
In: OSPF

When SPF Runs

Triggers:

  • New LSA received
  • LSA ages out
  • Link state changes
  • OSPF process starts

Partial SPF: Only affected routes recalculated
Full SPF: Entire tree rebuilt

SPF Timers

router ospf 1
 timers throttle spf 5000 10000 10000

Format: start hold max (milliseconds)

  • Start: Delay before first SPF
  • Hold: Min time between SPFs
  • Max: Max wait between SPFs

Monitoring SPF

R1# show ip ospf | include SPF
  SPF algorithm last executed 00:15:23.456 ago
  SPF algorithm executed 8 times

Many SPF runs = unstable network

Summary

LSDB — Link-state database (network map)
SPF — Dijkstra's algorithm (calculates best paths)
Triggers — Topology changes
SPF timers — Control calculation frequency

Next: Route Summarization (Article 28)

Internal Links:

Written by
More from Ping Labz
Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to Ping Labz.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.