In a multi-access Network, OSPF needs to select a DR (Designated Router) and BDR (Backup designated Router). LAN is the best example of Multi-access Network type when OSPF DR and BDR routers are selected so that all OSPF specking Routers in that LAN segment have complete OSPF Database.
To send Routing information to a DR or BDR the multicast address of 18.104.22.168 is used by other Routers in the same LAN. DR sends routing updates to the multicast address of 22.214.171.124. If DR fails, BDR takes over its role of distributing routing information.
Every router on a network segment establishes a full neighbor relationship with the DR and BDR. Non-DR and non-BDR routers establish a 2-way neighbor relationship between themselves.
DR and BDR selection rules apply below –
- Router with the highest OSPF priority will become a DR. Router with the second highest OSPF priority or router ID will become a BDR (By default, all routers have a priority of 1)
- In case of a tie, Router with the highest router ID wins the election.
Priority plays a pivotal role in OSPF DR and BDR selection. Some Key takeaways on Router OSPF priority are –
- The Priority can be set on the Router Interface using “ip ospf priority” command.
- The default priority is 1.
- A priority of 0 means you will never be elected as DR or BDR.
- You need to use “clear ip ospf process” before this change takes effect.
Also, it’s important to understand that OSPF DR and BDR election is non-preemptive activity i.e. even if a new OSPF Router with better priority or RouterID comes up on the segment, still the new Router will not take DR role until the OSPF process is cleared.
Let’s understand through the below scenario in detail how DR and BDR election process takes place –
OSPF is configured on interface Fa0/0 of all the Routers (R1 – R4) as per the below table –
It is assumed that all OSPF configured Routers come up at same time, the output on R1 and R4 will be as per snapshot below –
Router R1 output of “show ip ospf neighbor” shows that R4 is the DR
Router R4 output of “show ip ospf neighbor” shows that R1 as the DRother.
Now , lets see the change is OSPF DR election once R1 priority is changed to 255 as below –
The above output of Router R4 shows that new DR is Router R1 since it has got highest priority of 255.