OSPF DR/BDR Election explained

Hello Americo

When we have a BMA situation, and all routers boot up together, ALL routers declare that they are the DR. So at the beginning, the subset of all routers not claiming to be the DR is an empty set. There are NO routers in this subset. So initially, this list of eligible routers will be empty. As hello packets are exchanged however, routers will receive the priority and router IDs and any routers ineligible to be a DR will CHANGE that information in the next hellos.

Now if a router creates a subset of all routers not claiming to be the DR, then this subset is non zero. It all depends on WHEN that subset will be created. Don’t forget that the DR and BDR election process is an iterative process as the network converges and even when network changes occur. At some point, routers some will stop declaring themselves DRs and the process can continue as described.

A clearer albeit dryer explanation of the election process can be found at RFC 2328 for OSPFv2 in seciton 9.4 Electing the Designated Router. It is true that the BDR is elected first and then the DR. The RFC explains why:

The reason behind the election algorithm’s complexity is the
desire for an orderly transition from Backup Designated Router
to Designated Router, when the current Designated Router fails.
This orderly transition is ensured through the introduction of
hysteresis: no new Backup Designated Router can be chosen until
the old Backup accepts its new Designated Router
responsibilities.

This can be clearly seen in the case where the current DR fails and the election process is repeated (per step (4) in section 9.4 of RFC) the router it elected to BDR and DR is no longer eligible for BDR (because it is DR), and so the “correct” BDR is elected.

I hope this has been helpful!

Laz

2 Likes