Lesson Contents
When an OSPF router receives an updated LSA, it doesn’t run SPF right away but schedules it. It does so in case there is a change in the topology. However, the local router is probably not the only one affected so it’s likely that you will receive more than one updated LSA. The router waits for a short while so that it only has to run SPF once for all updated LSAs.
If the topology change is caused by a flapping link then the router would run SPF over and over again, increasing its load. To ensure this doesn’t happen, the delay before SPF runs will keep increasing if you keep receiving updated LSAs.
This scheduling of SPF is controlled by SPF throttling. There are three values that it uses:
- spf-start: the initial wait interval before SPF starts after receiving an updated LSA.
- spf-hold: the wait interval between subsequent SPF runs. This value doubles for each time SPF runs.
- spf-max-wait: the maximum time between two SPF runs, used to cap the spf-hold value. It also defines how long the network has to be stable before the wait interval is reset to the spf-start and spf-hold values.
Let me explain how this works. Let’s assume we use the following values:
- spf-start: 5 seconds
- spf-hold: 10 seconds
- spf-max-wait: 60 seconds
Our router receives an LSA and schedules SPF according to the spf-start value, which is 5 seconds:
During this time, the router receives another LSA. This LSA is stored in the LSDB but we have to wait until the wait interval (5 seconds) expires. Once these 5 seconds have expired, SPF will run:
The router sets the wait interval to the spf-hold value which is 10 seconds:
During this time, we receive another LSA. Once the 10 seconds have expired, SPF will run:
The router now doubles the spf-hold value so now it’s 2x 10 = 20 seconds. During this time, we don’t receive any other LSAs. Once 20 seconds have elapsed, SPF runs again:
Since we didn’t receive any LSAs during the last wait interval, the router resets the wait interval to spf-start. A few seconds later, we receive another LSA:
During this time, we receive yet another LSA. After 5 seconds, SPF runs:
The wait interval doubles the value of the previous spf-hold so now we have to wait 2x 20 = 40 seconds until SPF runs. During this time, however, we don’t receive any other LSAs:
Hello Rene,
I have a question. I see that after the 2xspfhold and then second spf start there is a gap of 5 seconds(35 to 40). Could you please explain as to why is that so?
Hi Ravi,
There is no particular reason, the time from 35 to 40 seconds ( 5 seconds in total) is a period of inactivity, I made up that time.
Rene
i could not understand the SPF hold and spf-max-wait timer …??
Can u please help me with it ??
Hello Narad
The OSPF SPF scheduling and throttling feature is used to keep an OSPF topology stable in the event that there is a continuous inflow of LSAs, causing continuous recalculation of the SPF algorithm.
The
spf-hold
value is the initial amount of time to wait between one SPF calculation and the next. Every time a new LSA is received beforesfp-hold
has elapsed, this value doubles, so it waits longer before running the SPF calculation again. You can see this clearly in the diagrams in the lesson.Now imagine that you keep getting LSAs all the time. Th
... Continue reading in our forumHi, I have one question in this instance.
Even if we don’t receive any LSAs in (2x spf-hold) it still have to run SPF?