LSA throttling, SPF tuning
One team wants the core to react at once; another wants a flapping link not to keep it recalculating. SPF throttling does both: timers throttle spf takes a start, a hold and a maximum wait, and on a quiet network the start interval is the whole delay. During instability the wait doubles up to the maximum. LSA throttling is the other stopwatch, on the router that floods.
By Arif, founder of Daveth · Updated
The full 6 min walkthrough is in Daveth Pro (Network). See what the plan opens
What this page answers
How does OSPF SPF throttling work?
timers throttle spf start hold max: the first change after a quiet period runs SPF after the start interval. Each wait after that is twice as long as the previous one, while changes keep arriving, until it reaches the maximum. Read it in “Forty changes in twenty seconds”
What is the difference between SPF throttling and LSA throttling?
SPF throttling limits how often a router recalculates from what it has been told. LSA throttling limits how often a router floods news of its own changes. They are different stopwatches on different devices. Read it in “The LSA side, with its defaults”
What happens if you set timers throttle spf 5 5 5?
The wait never grows, so a flapping link makes the router run SPF again and again: flattening the timers removes the protection the doubling wait gave. Read it in “The fix that removes the protection”
Two requests, one router
A regional airport runs OSPF across its operations network. Two requests arrive in the same week. The operations team wants the core to react at once when a link fails. The network team wants a flapping link in the baggage hall not to drag CORE-1 and CORE-2 into recalculating all day. Can one router do both?
Plain words first. SPF is the calculation a router runs to work out its best paths from what it knows about the network. An LSA is the message a router floods to describe its own links. A flapping link is one that keeps going down and coming back up.
From 1.4.e.i, one fact matters here: a change in the topology is what makes a router schedule SPF.
LSA and SPF throttling achieves subsecond convergence by providing a more sophisticated SPF and LSA rate-limiting mechanism that is able to react quickly to changes and also provide stability and protection during prolonged periods of instability. OSPFv3 can use static timers for rate-limiting SPF calculation and LSA generation. Although these timers are configurable, the values used are specified in seconds, which poses a limitation on OSPFv3 convergence.
Read the end of the first quote: react quickly, and stay stable during prolonged instability. Both requests, in one sentence. The second quote says what the older approach lacked: fixed timers counted in seconds.
The first change
How quickly does a router run SPF after one change on a quiet network?
The OSPF Shortest Path First Throttling feature makes it possible to configure shortest path first (SPF) scheduling in millisecond intervals and to potentially delay SPF calculations during network instability.
From elsewhere: the configuration chapter's throttle step. The names, numbers and addresses come from elsewhere, not from this scenario.
Device(config-router)# timers throttle spf 5 1000 9000
Configuration: CORE-1's SPF throttle, in the forms these commands take; the values are this course's own.
CORE-1# configure terminal CORE-1(config)# router ospf 1 CORE-1(config-router)# timers throttle spf 5 1000 9000 CORE-1(config-router)# end
The three numbers are start, hold and maximum wait, in milliseconds.
If the first topology change event is received after the current wait interval, the SPF calculation is delayed by the amount of time specified as the start interval.
Computed from the state, when CORE-1 runs SPF for one change. No command prints it in this form.
SPF run at window changes included 1 0.005 s start 1 1 change, 1 SPF run, longest wait for a change 5 ms
Look at the run: 5 ms after the change. On a quiet network the start interval is the whole delay.
Forty changes in twenty seconds
Now a cleaning trolley knocks a damaged patch lead, and BAG-1's uplink changes every 500 ms for 20 seconds. What does CORE-1 do with forty changes?
The wait interval indicates the amount of time to wait until the next SPF calculation occurs. Each wait interval after that calculation is twice as long as the previous one until the wait interval reaches the maximum wait time specified. Notice that the wait interval between SPF calculations doubles when at least one topology change event is received during the previous wait interval. Once the maximum wait time is reached, the wait interval remains the same until the topology stabilizes and no event is received in that interval. One SPF run may include multiple topology change events.
Computed from the state, when CORE-1 runs SPF through the flap. No command prints it in this form.
SPF run at window changes included 1 0.005 s start 1 2 1.005 s 1000 ms 2 3 3.005 s 2000 ms 4 4 7.005 s 4000 ms 8 5 15.005 s 8000 ms 16 6 24.005 s 9000 ms 9 7 40.005 s start 1 41 changes, 7 SPF runs, longest wait for a change 8505 ms
Read the window column: 1000, 2000, 4000, 8000, then 9000. Each run covers every change that arrived during its wait: 2, 4, 8, 16, then 9. Forty changes cost six runs, and the change at 40 seconds, after a quiet 9-second window, is back to a 5 ms wait.
By this course's reading, that timeline follows the page's sentences. Its two figures aren't text, so the model opens a wait window after each run, runs again at its end if a change arrived, and resets after a window with none.
If the first topology change event occurs after the maximum wait interval begins, the SPF calculation is again scheduled at the start interval and subsequent wait intervals are reset according the parameters specified in the timers throttle spf command. The interval at which the SPF calculations occur is chosen dynamically and is based on the frequency of topology changes in the network. The chosen interval is within the boundary of the user-specified value ranges. If the network topology is unstable, SPF throttling calculates SPF scheduling intervals to be longer until the topology becomes stable.
Notice the last line of the summary: the longest any change waited was 8505 ms. That is the price of protecting the core, paid only while the link keeps flapping.
The fix that removes the protection
Someone sees failover taking seconds during the flap and flattens the timers to 5 5 5. What happens to the same flap?
Configuration: the flattened throttle, in the forms these commands take; the values are this course's own.
CORE-1# configure terminal CORE-1(config)# router ospf 1 CORE-1(config-router)# timers throttle spf 5 5 5 CORE-1(config-router)# end
Computed from the state, when CORE-1 runs SPF with flattened timers. No command prints it in this form.
SPF run at window changes included 1 0.005 s start 1 2 0.505 s start 1 3 1.005 s start 1 runs 4 to 38: one every 500 ms, window start, 1 change each 39 19.005 s start 1 40 19.505 s start 1 41 40.005 s start 1 41 changes, 41 SPF runs, longest wait for a change 5 ms
Read the summary line: 41 changes, 41 runs. Every change now waits 5 ms, and CORE-1 recalculates for every one of them.
Three numbers, and the one that sounds like speed was already 5 ms. Flattening changed only the two that were doing the protecting.
So the change made the router do forty-one full recalculations where it had been doing a handful, and it did not make anything faster. The first number was never the bottleneck. The other two were the reason a flapping link could not turn into forty pieces of work, and they are the two that got removed.
Waiting briefly is not laziness here; it is the entire protection. A router that pauses before recalculating is a router that gets to do the job once for several changes instead of once per change.
By this course's reading, failover that is sometimes fast and sometimes slow points to backoff doing its job, and the thing to fix is what keeps changing. Here, that is a patch lead in the baggage hall, not the timers.
The LSA side, with its defaults
SPF throttling limits how often CORE-1 recalculates. What limits how often BAG-1 floods news of its own flapping link?
Two different stopwatches, on two different devices, doing two different jobs. One governs how often this router recalculates from what it has been told. The other governs how often that router is willing to tell anybody anything. Tuning either one leaves the other exactly as it was, and reaching for the wrong one is easy because both are described as throttling.
Prior to the OSPF LSA Throttling feature, LSA generation was rate-limited for 5 seconds. The OSPF LSA Throttling feature is enabled by default and allows faster OSPF convergence (in milliseconds). The first LSA is always generated immediately upon an OSPF topology change, and the next LSA generated is controlled by the minimum start interval. The subsequent LSAs generated for the same LSA are rate-limited until the maximum interval is reached. The "same LSA" is defined as an LSA instance that contains the same LSA ID number, LSA type, and advertising router ID.
Continue the lesson
The whole lesson, with its drawings and its questions. The rest of this section and 5 more after it.

