OSPF SPF Scheduling and Throttling

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:

spf throttling initial lsa

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:

ospf spf throttling second lsa

The router sets the wait interval to the spf-hold value which is 10 seconds:

ospf spf throttling spf-hold

During this time, we receive another LSA. Once the 10 seconds have expired, SPF will run:

ospf spf throttling hold value expires

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:

ospf spf throttling hold value doubles

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:

ospf spf throttling wait interval reseted

During this time, we receive yet another LSA. After 5 seconds, SPF runs:

ospf spf throttling wait interval reseted

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:

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now!

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You’ve Ever Spent on Your Cisco Career!
  • Full Access to our 800 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)
534 Sign Ups in the last 30 days
satisfaction-guaranteed

  • 100% Satisfaction Guaranteed!
  • You may cancel your monthly membership at any time.
  • No Questions Asked!

Tags:


Forum Replies

  1. 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?

  2. 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

  3. i could not understand the SPF hold and spf-max-wait timer …??

    Can u please help me with it ??

  4. 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 before sfp-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 forum

  5. Hi, 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?

5 more replies! Ask a question or join the discussion by visiting our Community Forum