Friday, April 27, 2012

Configuring OSPF FAST hellos

The sooner we detect OSPF neighbor failure the faster the network can converge when there is a failure. In this blogtorial we will see how we can achieve fast detection of OSPF neighbor failure. Consider this simple 2 router topology and let's get started.

Let's get our interfaces configured and a simple OSPF AREA 0.

Now let's take a look at some default OSPF settings specifically the hello / dead timer which is one of the criteria that must match in-order for OSPF neighbors to form adjacency.

Notice that the hello timer is set to 10 seconds and dead interval is set to 4 x hello interval (10) so 40 seconds. This means that every 10 seconds a hello message will be sent to the multicast address (multicast address for all OSPF routers). If 4 hellos are missed from a neighbor then the neighbor adjacency will be considered down. This means by default it may take up to 40 seconds before realizing that a neighbor is down.

The timer will keep refreshing as long as it is getting hellos from the neighbor.
How can we achieve faster detection of neighbor failure? There are two options. 1) Set the hello interval to 1 second and dead interval will then be 4 seconds. 2) OSPF FAST HELLOS. Since this post is about Fast hellos let's see how we can configure OSPF fast hellos to detect failure in approximately a second. A network baseline is required and a few pings may suffice to get the RTT. Beware that setting this too low may cause neighbors to flap resulting in an unstable topology.

RTT average is 28ms so roughly 14ms (one way latency) for a packet to reach R1. Using that as our baseline let's configure OSPF fast hellos.

Notice that all routers in a segment must have the same dead / hello timer, therefore make sure to apply this command all routers involved. This command basically sets the hello timer to dead timer / hello multiplier. So dead timer (1 second) / hello multiplier (4) = 250 msec. So every 250 msec a hello will be sent totaling 4 hellos per second. So if 4 hellos are missed in a row then neighbor will be considered down rather than wait 40 seconds or 4 seconds.


Fast hellos is a great tool to fine tune OSPF, however with most tuning parameters please make careful considerations before implementing it.

Many more articles to come so stay tuned.

Please subscribe/comment/+1 if you like my posts as it keeps me motivated to write more and spread the knowledge.