Configuring the calculation interval


[no] spf-throttle start-interval [1-600] wait interval [1-600] max-wait-time [1-600]

Enables and configures SPF scheduling (throttling.) This delays SPF calculations during periods of network topology changes.

SPF calculations occur at the interval set by the spf-throttle command. This command is executed in ospf context.

Default: 5 seconds

start-interval [1–600]

Specifies the initial SPF schedule delay in seconds.

wait-interval [1–600]

specifies the amount of time to wait until the next SPF calculation occurs, in seconds.

max-wait-time [1–600]

Specifies the maximum time between two consecutive SPF calculations, in seconds.

The current SPF interval is calculated; it will be twice as long as the previous interval until this value reaches the maximum-wait-time specified.


SPF throttling configuration

The last SPF calculation was scheduled and triggered at the 100th second. A new topology event occurred at the 104th second. The configured values are:
  • start-interval

    = 3 seconds

  • wait-interval

    = 3 seconds

  • max-wait-time

    = 500 seconds

switch(ospf)# spf-throttle start-interval 3 wait-interval 3 max-wait-time 500

  • The difference between the last SPF (100), added to the current SFP throttle interval (3), is less than the time of the occurrence of the network event (104.) SPF is scheduled to run instantly and the current SPF throttle interval is configured to 3 seconds (the start-interval value.)

  • Another topology event occurs within the above 3 second SPF throttle interval, at the 106th second. SPF is scheduled to run again at the 107th second (last event at 104th second+ wait-interval of 3 seconds), which is greater than the current event (106th second.) The SPF timer is scheduled to run after 1 second. After that, the current SPF throttle interval is changed to 10 seconds, the current wait-interval value.

  • If another topology event occurs at the 110th second, which is within the 10 second current wait-time. SPF is scheduled to run again at the 117th second (last SPF of 107 seconds + wait-interval of 10 seconds), which is greater than the current event (110 seconds.) The SPF timer is scheduled to run after 7 seconds. The current SPF wait-time is doubled to 20 seconds.

If any topology event occurs during the dynamic wait-interval, SPF is scheduled according to the formula:

Last SPF + current dynamic wait-interval - time of occurrence of the event

The dynamic wait-interval keeps doubling until the max-wait-time is reached. If the max-wait-time is reached and the network continues to be unstable, the dynamic wait-time is set to the max-wait-time until the network stabilizes.

If the network stabilizes during a dynamic wait-interval period, SPF is calculated immediately and the current SPF wait-interval is set to the configured start-interval.