Course contents

Module 6: Advanced OSPFLesson 6.6 (6 of 8 in this module)27 of 29 in the OSPF course

OSPF fast convergence: BFD, fast hello and SPF throttling

Where convergence time goes after a failure and which timers, BFD and throttle settings shorten it safely.

Advanced · 11 min read

Convergence is four steps, and one usually dominates

Convergence is the time between a failure and every router forwarding on the new best path. In OSPF it has four stages: detect the failure, flood a new LSA, run SPF, and install the result.

Where OSPF convergence time goes
Where OSPF convergence time goesFour stages: detect the failure, flood the new LSA, run SPF, install routes. Detection usually dominates, so BFD gives the biggest gain.1 DetectFailure noticeddead timer or BFD2 FloodNew LSA sentLSA throttle3 CalculateSPF runsSPF throttle4 InstallRoutes updatedRIB and FIBDefault: up to 40 sWith BFD: ~0.9 sThe other stages usually take milliseconds

On small screens, swipe sideways or focus the diagram and use the arrow keys.

With default timers detection takes up to 40 seconds on broadcast and point-to-point links. BFD at 300 ms with a multiplier of 3 detects in about 0.9 seconds.

On broadcast and point-to-point links the default hello is 10 seconds and the dead interval 40 seconds, so a silent failure (a switch between routers, a dying transceiver that stays up) can take up to 40 seconds to detect. Flooding, SPF and installation usually take milliseconds on modern routers. That is why detection is where to look first.

Detect faster with BFD

Bidirectional Forwarding Detection (BFD) sends small, frequent packets between two routers and reports a failure to the routing protocol after a few misses. OSPF asks BFD to watch each neighbour and drops the adjacency when BFD declares it down. Detection time is the interval multiplied by the multiplier.

interface GigabitEthernet0/0 bfd interval 300 min_rx 300 multiplier 3 ip ospf bfd ! router ospf 1 bfd all-interfaces

R2, global configuration. Use either 'ip ospf bfd' on one interface or 'bfd all-interfaces' under the process. The neighbour needs BFD on its side as well.

Illustrative Cisco IOS output written for this lesson, not a router capture
R2#show bfd neighbors
NeighAddr      LD/RD     RH/RS   State  Int
10.0.23.2      4097/4098 Up      Up     Gi0/0
The session is up, and OSPF is registered as a client of it. If the line shows Down, check the neighbour's BFD configuration and any ACL that drops UDP port 3784.

Fast hello, the alternative

interface GigabitEthernet0/0 ip ospf dead-interval minimal hello-multiplier 4

Sets the dead interval to one second and sends four hellos per second. Configure both ends. This raises control-plane load, so prefer BFD where it is available.

Control SPF and LSA bursts

How the SPF throttle spaces out repeated recalculations
How the SPF throttle spaces out repeated recalculationsWith timers throttle spf 50 200 5000 the first SPF runs 50 milliseconds after a topology change. If changes keep arriving the next runs wait 200 milliseconds, then the hold time doubles on each repeat, up to the 5000 millisecond maximum. When the network is stable for twice the maximum wait the timers reset to the start value.timers throttle spf 50 200 500050 msFirst changeSPF starts quickly200 msSecond changehold time400 msHold doubles each time5000 msNever longer than the maximumStable for twice the maximum wait: timers reset to the start value

On small screens, swipe sideways or focus the diagram and use the arrow keys.

The first failure converges fast and a flapping link cannot keep every router in constant SPF. The three numbers are start, hold and maximum wait in milliseconds.

After detection, the router floods a new LSA and runs SPF. Throttle timers let the first event run quickly but slow down repeated ones, so a link that flaps does not keep every router busy.

router ospf 1 timers throttle spf 50 200 5000 timers throttle lsa all 0 200 5000 timers lsa arrival 100

Values are in milliseconds: start, hold and maximum wait. Defaults differ between releases, so check yours before changing them.

Illustrative Cisco IOS output written for this lesson, not a router capture
R2#show ip ospf | include throttle|SPF
 Initial SPF schedule delay 50 msecs
 Minimum hold time between two consecutive SPFs 200 msecs
 Maximum wait time between two consecutive SPFs 5000 msecs
These are the values in effect. Compare them with what you intended before blaming the protocol.

Point-to-point network types also help. A point-to-point link needs no DR election, so the adjacency forms and recovers sooner than on a broadcast link between two routers.

Check your understanding

Predict · scenario 1

BFD runs with interval 300 ms and multiplier 3. About how long until a silent failure is detected?

Predict · scenario 2

Which stage normally takes the longest with default OSPF timers?

Predict · scenario 3

A link flaps every few seconds. Which setting limits repeated SPF runs?

FAQ

Should I use BFD or shorter hello timers?
BFD is usually the better choice. It detects failure in a lightweight process and can serve several protocols. Very short OSPF hellos add control-plane load on every neighbour.
What does timers throttle spf do?
It spaces out SPF runs. The first run waits the start value, repeated triggers back off towards the maximum, so a flapping link cannot keep the CPU busy.
Is faster always better?
No. Aggressive timers react to brief packet loss as if it were a failure and can make a network flap. Test with your real links and load.