OSPF DR/BDR Election Process.
To get elected as a DR or BDR depends on a few factors and rules-
Let’s take a look at a couple of rules-
- A Router gets elected as DR if it has a highest priority. By default all routers have a priority of 1.
- If there is a tie, then the router with the highest router ID wins the election and becomes the DR. The router with the second highest priority becomes the BDR.
Let’s talk about the Router-ID-
It’s important to understand that from a design perspective if the Router-ID is manually configured with the intention of always making the router a DR, then it has to be the highest IP address and the BDR has to have the second highest.
Let’s take a look at a small topology.
Looking at the topology, we can tell right away without even looking at any configuration, that R4 will be elected as the DR and R3 will be BDR based on the rules that OSPF follows during the DR/BDR election.
Let’s look at the configuration of each router.
We can see that R4 is selected as DR and R3 is BDR, we can also see the priority of all routers is 1 (default).
The results are consistent on all the routers.
Couple of things to keep in mind.
The priority can be changed with the command-
Int e0/0
ip ospf priority from 1 – 255
if we change the priority for R1 to 255, if will always be elected as DR and R4 will be BDR.
On the flip side, if change the priority of a router to 0, it will never be part of the election process.