What is OSPF Designated Router
In the previous lesson, we discussed the challenges of the OSPF Multi-access network. The two challenges are unwanted adjacencies and the flooding of LSAs. The solution is the Designated Router (DR). DRs are designated to coordinate topology updates.
On multiaccess networks, at initialization, a Designated Router (DR) and a backup designated router (BDR) are elected. The DR is the collection and distribution point for LSAs sent and received.
The BDR listens passively to this exchange and maintains a relationship with all the routers. If the DR stops sending Hello packets, the BDR promotes itself and assumes the Designated Router (DR) role.
The update is sent to the Designated Router (DR) when a topology change occurs. Then, the DR will update all other routers in the area. Each router must update its neighbor if the Designated Router (DR) does not exist.
If the routers are interconnected, this can lead to multiple unnecessary updates. Having a Designated Router (DR) will help eliminate this problem.
In the OSPF network, a non-DR or non-BDR router becomes a DROTHER. DROTHERs only form full adjacencies with the DR and BDR in the network. The DROTHERs send their LSAs to the DR and BDR using the multicast address 224.0.0.6, which addresses all Designated Router (DR) routers.
Now look at Figures 1, R1 has been elected as the designated router for the LAN. The number of adjacencies has been reduced to 3, which is 6 without a Designated Router (DR).
DR/BDR elections only occur in multiaccess networks, not point-to-point ones.
Default DR/BDR Election Process
There are some criteria for a Designated Router (DR) and Backup Designated Router (BDR) election:
- The first criteria for the Designated Router (DR) and backup designated router (BDR) election are the interface priorities. All OSPF-enabled routers in the network elect the router with the highest interface priority as the DR, and the router with the second-highest interface priority is elected as the BDR. The priority range is between 0 – 255. If the interface priority is set to 0, the router cannot become the DR. Serial interfaces have default priorities set to 0; therefore, they do not elect Designated Router (DR)and BDRs. The default interface priority of multiaccess broadcast interfaces is 1. Therefore, all routers have an equal priority value without configuring the interface priority, so this method must be finished on a tie.
- So, if the first method is finished on tie due to the same interface priority value, the router with the highest router ID is elected the DR, and the router with the second-highest router ID is the BDR. We can configure the router ID manually. If the router ID is not configured, the heist loopback IP address becomes the router ID. If no loopback interfaces are configured, the highest active IPv4 address determines the router ID.
- If we have a running IPv6 network and the router does not have IPv4 addresses configured, the router ID must be manually configured; otherwise, OSPFv3 does not start. The command for router ID configuration is “router-id rid.”
The DR and BDR election process starts when the first router with an OSPF-enabled interface is active on the multiaccess network. When the OSPF “network” command for the interface command is configured, the DR and BDR election process takes place. If the OSPF-enabled router is powered on, it also starts the election process, which only takes a few seconds.
Now, look at Figure 2. All Ethernet router interfaces have a default priority of 1. The OSPF router ID is used to elect the DR and BDR based on the above selection criteria. R1, with the highest router ID, becomes the DR, and R2, with the second-highest router ID, becomes the BDR.
DR/BDR Election Process
When a new router with a higher priority or higher router ID is added to the network after the DR and BDR election, this router does not take over the DR or the BDR role because those roles have already been assigned, and the new router does not initiate a new election process. After the DR is elected, it remains the DR until it fails or the OSPF process on the DR fails or is stopped, and if the multiaccess interface on the DR fails or is shut down.
When DR fails, the BDR automatically gets to the role of DR even if another DROTHER with a higher priority or router ID is added to the network after the initial DR/BDR election. So, when BDR is promoted to DR, a new BDR election process occurs, and the DROTHER with the higher priority or router ID is elected as the new BDR. In Figure 2, the R3 with the higher RID is selected as the DR, and the router with the second-highest RID is selected as the BDR.
In Figure 3 above, the current DR (R1) fails; therefore, the pre-elected BDR (R2) assumes the role of DR. Then, an election is held to choose a new BDR. R3 and R4 are the DROTHER, but R3’s RID is higher than R4’s, so R3 is elected as the BDR.
In Figure 4, R1 and R2 are both going to fail. In this situation, the existing BDR takes the role of DR, and only BROTHER, R4, is selected as the BDR.
In Figure 5, R1 rejoins the network but does not take over either the DR or BDR role; instead, it becomes a DROTHER.DR (R3) and BDR (R4) retain the DR and BDR roles. R1 automatically becomes a DROTHER.
Verifying DR/BDR Roles
When routers are connected over a common multiaccess broadcast network, OSPF automatically elects a DR and BDR. In the above example in Figure 1, R1 is elected as DR, and R2 is elected as BDR. Figures 6 to 9 illustrate the “show ip ospf interface” command output for all routers.
In the example, R1 was elected as the DR because the router ID of the R1 was the highest in this network. RW is the BDR because it has the second-highest router ID in the topology. The show ip ospf interface command can verify the OSPF router role.
Verifying DR/BDR Adjacencies
We can verify the OSPF neighbour adjacencies using the “show ip ospf neighbor” command. The state for neighbours adjacencies in the multi-access network are:
- FULL/DROTHER- This is a DR or BDR router that is fully adjacent with a non-DR or BDR router. Both neighbours can replace Hello packets, updates, queries, replies, and acknowledgements.
- FULL/DR- The router is fully adjacent with the indicated DR neighbour. The router can exchange Hello packets, updates, queries, replies, and acknowledgements with the DR.
- FULL/BDR- The router is fully adjacent with the indicated BDR router. Both can exchange Hello packets, updates, queries, replies, and acknowledgements.
- 2-WAY/DROTHER- The non-DR or BDR router has a neighbour adjacency with another non-DR or BDR router. Both can exchange Hello packets.
Usually, FULL and 2-way are the normal states of an OSPF router. If a router displays a state other than FULL and 2-way, it means that there are some problems forming neighbours’ adjacencies.
Only DROTHERs form FULL adjacencies in multi-access networks with the DR and BDR. It forms a 2-WAY neighbour adjacency with other DROTHERs joining the network. When two DROTHER routers form a neighbour adjacency, the state displays as 2-WAY/DROTHER. Figure 10 illustrates the output of the “show ip ospf neighbours” command on all four routers.