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! Here is why:

  • 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 655 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

561 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

Ask a question or join the discussion by visiting our Community Forum