Undestanding Wait timer in OSPF

By | July 10, 2020

When we are reading OSPF at the beginning level, the most of the books only highlight about the two important timers of OSPF i.e. Hello and Dead interval but there is another timer which OSPF speaking router uses during DR and BDR election i.e. wait timer.


If we look at our above topology, we have three router connected to switch and this network known as broad cast network as single broadcast packet will be flooded by this switch . In broad cast network OSPF elect DR and BDR in order to limit unnecessary LSA flooding and to simply the shortest path tree calculation by using type 2 network LSA [generated by DR of network].

Why wait timer:

By using wait timer router keep its interface to be in waiting state and once wait timer expires the router interface come out of waiting state and start DR and BDR election process. In waiting state, router wait and monitor the hello message to see if there is already a DR or BDR on the network, if any it is going to accept them.This prevents unnecessary changes of DR and BDR on the network.

Working with Wait timer:

When OSPF speaking router becomes active, it set wait timer according to router dead interval timer [in our case as default dead interval timer is 40 second on broadcast network the wait timer will set to 40 second by all three router] and if we change dead interval timer using ip ospf dead-interval command < value >, it also going to changes the wait timer to that value. By referring wait timer local router wait this amount of time [in our case 40 second] for DR AND BDR to be adverted in neighbor hello packet before beginning DR and BDR election. If we see this in our case, once we turn on ospf on R3, its interface fa0/0 goes into waiting state and it start to count down the wait timer.

As there were no active router on network, the wait timer expires and R3 begin election process and select itself as BDR initially and as there was no active DR in the network, it promote itself as DR with BDR left none.

Debug ip ospf event output:

First line on R3 console indicate wait timer expire and it started immediately election process

Now let’s see what happen when we turn on R2 and R3.

Once we turn on R2, it immediately receive hello message [ with R3 as DR] from R3 before wait timer, so it immediately begin election process and elect itself as BDR [as R3 cannot join the BDR election process as it already announced itself as DR ] and accept R3 as DR of the network.

The same thing happen when we turn on R1, once it receive hello packet from R2 or R3 it immediately come out of waiting state and it cancel wait timer and begin election process and accept R3 and R2 as DR and BDR respectively.

Conclusion: In this article, we have seen how wait timer helps to prevent unnecessary change of DR and BDR in broadcast network. I hope this article help