What is DR/BDR ?

DR (Designed Router)/BDR (Backup Designated Router) is a router that is chosen to efficiently synchronize LSDB on a multi-access network such as Ethernet. The DR is an OSPF router representing a multi-access network. And the BDR is the backup of the DR. If the DR goes down, the BDR becomes the next DR. The OSPF router that is neither the DR nor the BDR in a multi-access network is the DROTHER.

This section explains in detail the mechanism of synchronizing LSDB on a multi-access network by DR.

Synchronization of LSDB over Ethernet (multi-access network)

In a multi-access network such as Ethernet, two or more OSPF routers may be connected. Each OSPF router on the multi-access network will then eventually synchronize its LSDB.

Consider a simple multi-access network example. In the following figure, four OSPF routers, R1 to R4, are connected on the Ethernet. Initially, each router has only its own LSA registered in its LSDB. It will eventually synchronize the LSDB of each router so that all LSAs of R1 to R4 are registered in the LSDB of R1 to R4.

Figure Synchronization of LSDB over Ethernet
Figure Synchronization of LSDB over Ethernet
The LSAs included in the LSDB in the figure are simplified and only LSA type 1 is considered. In reality, LSA type 2 will also be included in the LSDB.

LSDB synchronization via DR

In order to achieve this synchronization, OSPF elects a DR on the multi-access network; it establishes an adjacency between the DR and the OSPF routers on the multi-access network. Each router sends its own LSA to the DR. Each router sends its own LSA to the DR, which means that all LSAs will be gathered in the DR.

Figure Synchronization of LSDB via DR Part 1
Figure Synchronization of LSDB via DR Part 1

Then, have the DR send the missing LSAs, and finally synchronize the LSDBs of all OSPF routers on the multi-access network.

Figure Synchronization of LSDB via DR Part 2
Figure Synchronization of LSDB via DR Part 2
In the diagram of LSDB synchronization via DR, BDR is not considered. The figure is for clarity only and does not show the actual LSA transmission behavior itself. As shown in the figure, multiple routers are not sending LSAs to the DR at the right time.
I sometimes see people confuse DR with ABR, but DR and ABR are completely different. DR is a router representing a multi-access network, and ABR is a router interconnecting OSPF areas.

DR and neighbor/adjacency

The relationship between R1 to R4 neighbors and the adjacency is as follows.

Figure DR and neighbor/adjacency
Figure DR and neighbor/adjacency
Router-to-Router RelationshipInter-router
neighborR2-R3、R2-R4、R3-R4
adjacencyR1-R2、R1-R3、R1-R4
Table Neighbor and Adjacency

Only the relationship with R1, which is the DR, is an adjacency. All other routers are just neighbors. Routers in a simple neighbor relationship do not exchange LSAs directly with each other, but they ultimately have the same LSDB.

Election of DR/BDR

The election of DR/BDR is done by the following two parameters.

  • router priority
  • router ID

Router Priority and Router ID are both included in the Hello packet. The router priority is an 8-bit value set for the OSPF interface; in decimal, the value ranges from 0 to 255. The router with the highest router priority value becomes the DR, and the next highest router becomes the BDR. And, Priority “0” means that it will not be DR/BDR.

When the router priority has the same value and DR/BDR cannot be determined by router priority, selection by router ID is performed. The router with the highest router ID becomes the DR, and the router with the next highest router ID becomes the BDR. Since the router ID is unique, the router ID will always determine the DR/BDR in the end.

Switching DR

LSDB synchronization is ensured on a multi-access network with the DR at the center; if the DR is changed, LSDB synchronization cannot be maintained and packets can no longer be routed. So, Once a DR/BDR is determined, it is kept as unchanged as possible. Even if a router with a higher router priority is added later, the existing DR/BDR will not change. Also, when a DR goes down, the BDR becomes the new DR.

In the following figure, R1’s router priority is 5, making it a DR, and R2’s router priority is 2, making it a BDR. Even if we add a new R5 with router priority 10, the DR and BDR will not change.

Fig. Switching DR Part 1
Fig. Switching DR Part 1

Then, if R1, the DR, goes down, R2, which was the BDR, becomes the new DR. R5 does not become the DR; the BDR is the router that will always become the next DR when the current DR becomes unavailable. In this case, R5 becomes the BDR.

Fig. Switching DR Part 2
Fig. Switching DR Part 2

As described above, the behavior is such that as little DR/BDR change as possible will occur. Therefore, when there are multiple OSPF routers in a multi-access network, the order in which the routers are started should be considered, because if the router that you want to be DR starts late, it may not become DR even if its priority is high.

Example of DR election

So far, we have been thinking about DR/BDR using a single Ethernet network as an example. Let’s consider DR election in a more realistic network topology as follows.

Figure Example of DR election Part 1
Figure Example of DR election Part 1

The point-to-point network between R1 and R5 in this figure is a serial connection. Everything else is assumed to be an Ethernet multi-access network. Also, the OSPF router priority is set to 1 for all other parts not shown.

The DR/BDR is elected for each multi-access network. In a point-to-point network, DR/BDR election is not required. In this example, the DR election is as follows.

NetworkDR
192.168.12.0/24R2
192.168.134.0/24R1
192.168.15.0/24No Election of DR required (point-to-point)
192.168.2.0/24R2
192.168.3.0/24R3
192.168.4.0/24R4
192.168.5.0/24R5
Table Election of DR
BDR is omitted.

In 192.168.12.0/24, R2 with high router priority is the DR; in 192.168.134.0/24, R1 with high router priority is the DR. Then, in a multiple-access network, it becomes the adjacency and synchronizes the LSDB with the DR. In a point-to-point network, the DR is not elected, but R1 and R5 are the neighbors i.e., they are the adjacency and synchronize the LSDB. Eventually, the LSDBs of all OSPF routers in R1 to R5 will be synchronized.

Figure Example of DR election Part 2
Figure Example of DR election Part 2

Summary

Point

  • The DR/BDR is a router that is elected to efficiently synchronize the LSDB on a multi-access network such as Ethernet; OSPF router establishes an adjacency with the DR/BDR, exchanges LSAs, and synchronizes the LSDB.
  • In point-to-point networks, DR/BDR election is not required.
  • DR/BDR is selected by router priority and router ID. If the DR goes down, the BDR becomes the new DR.

How the OSPF works