OSPF · · 1 min read

How OSPF SPF Algorithm and LSDB Work

How OSPF SPF Algorithm and LSDB Work

When SPF Runs

Triggers:

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)


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:

Read next

© 2025 Ping Labz. All rights reserved.