Course contents

Module 2: OSPF OperationLesson 2.4 (4 of 4 in this module)8 of 29 in the OSPF course

DR/BDR election and network types

If four OSPF routers share one LAN, which router should coordinate their updates? Let's learn what the DR and its backup do, how the routers choose them and how they recover from a failure.

Intermediate · 13 min read

Why does a shared LAN need a DR and BDR?

Imagine four routers connected to the same switch. They all use OSPF to learn how to reach other networks. They first send small messages called Hello packets to find one another.

Next, they share information about their network links. Each router keeps a copy of this information and uses it to choose routes. If every router exchanged the full information directly with every other router, there would be more work as the network grew.

OSPF reduces that work by choosing two routers for special jobs: the designated router (DR) and the backup designated router (BDR). The other routers are called DROthers.

These are jobs given to routers already on the LAN. You do not need to buy a separate DR or BDR device.

What is the designated router (DR)?

The DR helps share OSPF updates among routers on the same LAN. In our example, R1 has this job.

Suppose R3 needs to report a change in its network links. It sends an OSPF update that the DR and BDR receive. The DR then shares the update with the routers on this LAN. Sending an update across the LAN this way is called flooding.

The DR shares network information. It does not choose routes for the other routers. Each router still chooses its own routes and forwards packets. Your computer's traffic does not have to pass through the DR.

The DR job applies to this LAN only. A router can be the DR on one LAN and have a different role on another.

R1 is the DR, R2 is BDR, and R3 and R4 are DROthers. Each DROther forms Full adjacencies with both elected routers.Grey lines are physical Ethernet connections through SW1. This is a role sketch for VLAN 10, area 0, not an interface-addressing diagram. The worked example below supplies ports, IPs and router IDs.SW1R1 · DRR2 · BDRR3 · DROtherR4 · DROtherOne shared segment · VLAN 10 · area 0
All four routers connect to switch SW1. R1 is the DR. R2 is its backup. R3 and R4 are DROthers. The blue line shows the connection from R3 to R1 through the switch.

What is the backup designated router (BDR)?

The BDR is the router ready to take over if the DR fails. In our example, R2 is the BDR.

R2 already exchanges network information with the other routers. It keeps its copy up to date while R1 is working. It does not normally send a second copy of every update that R1 shares.

If the routers detect that R1 has failed, R2 becomes the DR. They then choose a new BDR from the remaining routers that are allowed to take the job.

The backup is prepared, but the change is not instant. The routers need time to notice the failure and update their connections.

What is a DROther?

A DROther is any router on this LAN that is neither the DR nor the BDR. R3 and R4 are DROthers. They still share network information, learn routes and carry user traffic.

To understand their connections, you need two terms from the OSPF command output:

  • Full: the two routers have finished exchanging the network information needed for their OSPF connection. This connection is called a Full adjacency.
  • 2-Way: each router has seen its own router ID in the other router's Hello message. They know they can hear each other, but have not formed a Full adjacency.

R3 becomes Full with R1, the DR, and R2, the BDR. R3 and R4 stay at 2-Way with each other because both are DROthers.

2WAY/DROTHER between two DROthers is normal. It does not mean the connection is broken.

How are the DR and BDR chosen?

The routers choose the DR and BDR themselves. This choice is called an election. First, consider a new LAN where no DR or BDR has been chosen and all four routers are ready.

  1. Check eligibility: whether a router is allowed to take either job. An interface priority of 0 excludes it from both roles. It can still exchange OSPF information as a DROther.
  2. Compare the eligible routers' interface priorities. This is a number set on each connection to the LAN. Cisco's default is 1; eligible values are 1–255. The higher value wins the comparison.
  3. If priorities are equal, compare router IDs numerically. A router ID is a 32-bit number written like an IPv4 address that identifies the router in OSPF. For example, with equal priorities, 3.3.3.3 wins over 2.2.2.2. The local OSPF process number is not a tie-breaker.

In our new election, R1 has priority 100, R2 has 50, R3 has 10 and R4 has 0. R1 becomes DR and R2 becomes BDR. R3 and R4 are DROthers.

Fresh election: priority first, then router ID
Fresh election: priority first, then router IDThis comparison assumes no established DR/BDR and all candidates participating in the same election. An existing DR/BDR changes the decision; use the walkthrough for a later priority change. R1 priority 100 becomes DR, R2 50 becomes BDR, R3 10 is DROther. R4 priority 0 cannot hold either elected role, despite its highest RID. Tied priorities are compared by the numeric router ID.RouterPriorityRouter IDResultR11001.1.1.1DRR2502.2.2.2BDRR3103.3.3.3DROtherR404.4.4.4Ineligible

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Link and interfaces
The shared VLAN 10 example: area 0, 10.0.0.0/24. R1–R4 Gi0/0 addresses are .1, .2, .3 and .4; all /24. Physical links go through SW1.
Tie and eligibility rules
Cisco default priority is 1; eligible values are 1–255. Priority 0 excludes DR/BDR eligibility. Compare RIDs numerically only when the relevant priorities tie; interface IP and local process number are not the tie-breakers.
This comparison assumes no established DR/BDR and all candidates participating in the same election. An existing DR/BDR changes the decision; use the walkthrough for a later priority change.

Why does OSPF calculate the backup first?

The ranking above shows the final result for a fresh election. The actual procedure in RFC 2328, section 9.4 also considers the roles routers announce in their Hello messages. A router considers itself and neighbours with two-way communication, excluding priority 0.

  1. Calculate the BDR. Exclude routers declaring themselves DR. Prefer those already declaring themselves BDR; compare priority, then numeric router ID within that group. If none declares itself BDR, compare the remaining eligible routers.
  2. Calculate the DR. Prefer routers declaring themselves DR, using the same tie-breakers. If there are none, promote the selected BDR.
  3. Repeat when the local role changes. This prevents one router from keeping both jobs. In our fresh example, R1 is first selected as the backup candidate and promoted to DR. Recalculation leaves R2 as BDR.

Once a working DR and BDR are in place, a router with a higher priority does not replace them just by joining the LAN. Raising R4's priority later does not remove R1 or R2 from their jobs.

This behaviour is called nonpreemption: the newcomer does not take a working router's role. Start order therefore matters. Our ranking assumes all candidates are present for the fresh election; it is not a promise that the highest-priority router always becomes DR on an existing LAN. Keeping established roles avoids unnecessary changes to OSPF adjacencies.

A router ID and an interface IP address have different jobs. R1's router ID is 1.1.1.1. Its IP address on this LAN is 10.0.0.1. These are numbers, not website URLs. OSPF Hello messages use the LAN interface addresses in their DR and BDR fields.

Follow one worked election and failure

Four routers share VLAN 10 through SW1. Each router uses Gi0/0; the addresses are 10.0.0.1–10.0.0.4/24. SW1 connects them at Layer 2 and does not run OSPF in this example. Follow the six steps below to see which roles change and why. Use Next step, choose a step directly, or open Full screen for a wider view.

The higher-priority step temporarily changes R4 to 255. The failure step returns R4 to its original priority 0. The final two steps return to the original healthy roles to explain update delivery; they are a separate example.

R1 is DR; R2 is BDR

R1 is DR; R2 is BDRAll four routers are ready and use matching OSPF settings. R1 has the highest priority, 100, so it becomes DR. R2 is next at 50, so it becomes BDR. R3 has 10. R4 has 0, so it cannot take either job. All router interfaces are Gi0/0, 10.0.0.1 through 10.0.0.4 with /24 masks; router IDs are 1.1.1.1 through 4.4.4.4. SW1 provides Layer 2 VLAN 10.SW1 · VLAN 1010.0.0.1/24Gi0/0R1 · DRPriority 100RID 1.1.1.110.0.0.2/24Gi0/0R2 · BDRPriority 50RID 2.2.2.210.0.0.3/24Gi0/0R3 · DROtherPriority 10RID 3.3.3.310.0.0.4/24Gi0/0R4 · DROtherPriority 0RID 4.4.4.4

All four routers are ready and use matching OSPF settings. R1 has the highest priority, 100, so it becomes DR. R2 is next at 50, so it becomes BDR. R3 has 10. R4 has 0, so it cannot take either job.

R3 and R4 exchange full network information with R1 and R2. They stay at 2-Way with each other.

1 of 6
Shared settings and port key

Area 0 · broadcast OSPF · Hello 10 s / Dead 40 s · compatible authentication and addressing. R1–R4 Gi0/0 connect to SW1 Gi0/1–Gi0/4 respectively. Grey lines represent connections through the switch, not direct router-to-router cables. Four routers have five Full adjacencies with one DR and BDR. Eight would have 13, versus 28 hypothetical full-mesh pairs.

What happens when the DR fails?

Suppose R1 stops sending OSPF messages. Start with the original priorities: R1 is DR at 100, R2 is BDR at 50, R3 is a DROther at 10 and R4 is a DROther at 0. We need to separate noticing the failure from changing the roles.

1. The neighbours detect that R1 is missing

R1's last Hello does not tell the others that it is about to fail. Each neighbour counts down its Dead timer: how long it may go without another valid Hello from R1. With this lab's Hello 10 / Dead 40 settings, detection can take up to 40 seconds after the last Hello if the other routers' Ethernet interfaces remain up. A local interface going down can remove its neighbours sooner. Do not assume that R1 failing makes every router's switch connection go down.

2. The existing backup takes the DR role

Once R1 is declared down, R2 becomes DR. R2 already maintains Full adjacencies and an up-to-date link-state database: its stored description of the area's links. This preparation is why we keep a backup. After the failure is detected, the current BDR is promoted; the surviving routers do not start both jobs again from an empty election.

3. A remaining eligible router becomes the new backup

R3 becomes BDR. It has priority 10, while R4 has priority 0 and cannot hold either role. R4 remains a DROther and forms a Full adjacency with the new BDR as needed. The following snapshot shows the settled roles after detection and role changes, rather than an instant view of every database-exchange message.

After R1 is declared down, R2 takes the DR role
After R1 is declared down, R2 takes the DR roleGrey lines are physical Ethernet links within one VLAN. Role labels describe OSPF on this segment; they do not make the DR a mandatory gateway for user traffic. R2: BDR → DR · R3: DROther → BDR. Separate failure sequence: start with the original 100/50/10/0 priorities. After R1 is declared down, R2 is promoted and R3 is the remaining eligible BDR candidate. All router interfaces are Gi0/0; physical connections go through Layer 2 switch SW1.R1 · Offline · P100RID 1.1.1.1Gi0/010.0.0.1/24R2 · DR · P50RID 2.2.2.2Gi0/010.0.0.2/24R3 · BDR · P10RID 3.3.3.3Gi0/010.0.0.3/24R4 · DROther · P0RID 4.4.4.4Gi0/010.0.0.4/24SW1 · VLAN 10Shared Ethernet · 10.0.0.0/24Area 0 · all router ports Gi0/0R2: BDR → DR · R3: DROther → BDR

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Shared settings
VLAN 10 · subnet 10.0.0.0/24 · mask 255.255.255.0 · OSPF area 0 · BROADCAST · Hello 10 s / Dead 40 s · no authentication
Port and identity key
Each router Gi0/0 connects to SW1 Gi0/1 (R1), Gi0/2 (R2), Gi0/3 (R3) or Gi0/4 (R4). P = interface priority; RID = router ID. SW1 forwards frames and does not run OSPF here.
Snapshot assumptions
Separate failure sequence: start with the original 100/50/10/0 priorities. After R1 is declared down, R2 is promoted and R3 is the remaining eligible BDR candidate.
Control-plane scope
RIDs and priorities are shown beside each router. All active interfaces are OSPF-enabled, non-passive, with compatible settings. Roles are per segment.
Grey lines are physical Ethernet links within one VLAN. Role labels describe OSPF on this segment; they do not make the DR a mandatory gateway for user traffic.

4. R1 returns, but does not take its old job back

R1's priority is still 100. However, R2 is now a working DR and R3 is a working BDR, so they keep their jobs. R1 learns those roles through Hello messages and rejoins as a DROther. It rebuilds Full adjacencies with R2 and R3 and exchanges the network information it needs. Select Former DR returns in the walkthrough to compare this with the failure picture.

To check recovery, run show ip ospf neighbor on R4. After the exchange finishes, expect R2 as FULL/DR and R3 as FULL/BDR. After R1 returns, its row should normally settle at 2WAY/DROTHER from R4's viewpoint. Roles belong to this shared segment; another interface can have a different role.

More detail: the startup wait is different from failure detection

When a Cisco broadcast interface first starts with default timers, its Wait timer allows up to 40 seconds to learn existing roles before an election. It can finish earlier if it hears an existing BDR, or a DR that reports no BDR. The RFC calls this a BackupSeen event. This startup wait is different from counting down a missing neighbour's Dead timer, and it is not the 2-Way neighbour state.

Does all user traffic go through the DR?

No. A computer sends traffic for other networks to its default gateway. That gateway can be a DROther. The router then uses its routing table to decide where to send the packet next. The DR job is about sharing OSPF information, not carrying every user's traffic.

Show the user packet path through a DROther gateway
The DR is not automatically the user’s gateway
The DR is not automatically the user’s gatewayGrey lines are Ethernet links; the purple arrow is the user packet path. R3 routes to its directly connected server LAN. The DR role coordinates OSPF on the shared segment; it does not override the host gateway or the routing table. PC-A at 10.0.0.100/24 uses gateway R3 at 10.0.0.3. Traffic crosses SW1 to R3, a DROther, then directly to server 192.168.30.10 on R3's connected LAN. R1 is DR and R2 BDR on the shared LAN but are not on this selected packet path.R1 · DRR2 · BDRPC-ASW1R3 · DROtherServerRID 1.1.1.1Gi0/0 · 10.0.0.1/24RID 2.2.2.2Gi0/0 · 10.0.0.2/24VLAN 10 · 10.0.0.0/24192.168.30.0/2410.0.0.100/24192.168.30.10/24RID 3.3.3.3Gi0/0 .3 → Gi0/1 192.168.30.1/24
PC, server and gateways
PC-A: 10.0.0.100/24, gateway 10.0.0.3. Server: 192.168.30.10/24, gateway 192.168.30.1. These are device/gateway addresses, not URLs.
Router interfaces and RIDs
R1 Gi0/0: 10.0.0.1/24, RID 1.1.1.1. R2 Gi0/0: 10.0.0.2/24, RID 2.2.2.2. R3 Gi0/0: 10.0.0.3/24; Gi0/1: 192.168.30.1/24; RID 3.3.3.3.
Switch and connections
SW1 Gi0/1 → R1; Gi0/2 → R2; Gi0/3 → R3; Gi0/5 → PC-A Ethernet. R3 Gi0/1 connects to server Ethernet. R4 is omitted from this packet-path view.
OSPF scope
DR/BDR roles are on VLAN 10, 10.0.0.0/24, area 0, broadcast type. R3’s server LAN is a different /24 network. A valid return route and permitting policy are still required.
Grey lines are Ethernet links; the purple arrow is the user packet path. R3 routes to its directly connected server LAN. The DR role coordinates OSPF on the shared segment; it does not override the host gateway or the routing table.

Do two routers always need a DR and BDR?

Compare broadcast and point-to-point diagrams
Two routers on Ethernet still default to broadcast OSPF
Two routers on Ethernet still default to broadcast OSPFThe physical cable and /30 addressing do not choose the OSPF network type. Configure compatible types on both ends. No change of router ID or interface address is required for this comparison. R1 and R2 use broadcast network type. Assume a fresh election with both present and default priority 1: R2, RID 2.2.2.2, becomes DR and R1 BDR. R1 sees FULL/DR.R1 · BDRR2 · DREthernet · subnet 10.0.12.0/30BROADCASTRID 1.1.1.1RID 2.2.2.2Gi0/1 · 10.0.12.1/30Gi0/0 · 10.0.12.2/30R1’s neighbour row: FULL/DR
Interface addresses
R1 Gi0/1: 10.0.12.1/30 ↔ R2 Gi0/0: 10.0.12.2/30. Mask: 255.255.255.252. RIDs: R1 1.1.1.1 / R2 2.2.2.2.
OSPF and expected state
Area 0 · BROADCAST · Hello 10 / Dead 40 s · default priority 1. Both active routers can form Full adjacency; the DR/BDR roles apply to this link.
The physical cable and /30 addressing do not choose the OSPF network type. Configure compatible types on both ends. No change of router ID or interface address is required for this comparison.
Same Ethernet cable, configured as point-to-point
Same Ethernet cable, configured as point-to-pointThe physical cable and /30 addressing do not choose the OSPF network type. Configure compatible types on both ends. No change of router ID or interface address is required for this comparison. R1 and R2 are configured with OSPF network type point-to-point. They form Full adjacency without a DR/BDR election. R1 sees its neighbour as FULL/-.R1 · no DR roleR2 · no DR roleEthernet · subnet 10.0.12.0/30POINT_TO_POINTRID 1.1.1.1RID 2.2.2.2Gi0/1 · 10.0.12.1/30Gi0/0 · 10.0.12.2/30R1’s neighbour row: FULL/–
Interface addresses
R1 Gi0/1: 10.0.12.1/30 ↔ R2 Gi0/0: 10.0.12.2/30. Mask: 255.255.255.252. RIDs: R1 1.1.1.1 / R2 2.2.2.2.
OSPF and expected state
Area 0 · POINT_TO_POINT · Hello 10 / Dead 40 s · priority is not used for an election. Expected Full without a DR role.
The physical cable and /30 addressing do not choose the OSPF network type. Configure compatible types on both ends. No change of router ID or interface address is required for this comparison.

No. OSPF has a point-to-point network type for a link between two routers. With this type, the routers exchange information directly and do not choose a DR or BDR.

Having only two routers, or using a /30 subnet mask, does not automatically change an Ethernet link to this type. Configure OSPF point-to-point on both ends when that is the intended setup.

Other OSPF network types
Do two routers always need a DR and BDR?
Do two routers always need a DR and BDR?Type; DR/BDR?; Common Cisco default timers. Non-broadcast (NBMA): Yes Hello 30 / Dead 120 seconds Point-to-multipoint: No Hello 30 / Dead 120 secondsTypeDR/BDR?Common Cisco default timersNon-broadcast (NBMA)YesHello 30 / Dead 120 secondsPoint-to-multipointNoHello 30 / Dead 120 seconds

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Read each row across: the left box names the item, the others describe it.

Verify the actual type and timers on the platform; do not infer a tunnel’s network type from its name.

Configure priorities for the shared-LAN example

These commands use Cisco IOS-style syntax. Each router already has an IP address and OSPF running on Gi0/0. Start in global configuration mode on the named router, then enter its command block. The commands set the priorities used in our example; they do not replace a working DR or BDR.

interface GigabitEthernet0/0 ip ospf priority 100

R1 only: set its interface priority to 100.

interface GigabitEthernet0/0 ip ospf priority 50

R2 only: set its interface priority to 50.

interface GigabitEthernet0/0 ip ospf priority 10

R3 only: remain eligible at priority 10.

interface GigabitEthernet0/0 ip ospf priority 0

R4 only: exclude this interface from DR/BDR eligibility. R4 still participates in OSPF.

Changing priorities or restarting a process can affect adjacencies and routes. Verify the existing roles first; resetting OSPF is not required just because a healthy election result differs from the preferred ranking.

Check the roles from R3

Example output
R3#show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1         100   FULL/DR         00:00:36    10.0.0.1        GigabitEthernet0/0
2.2.2.2          50   FULL/BDR        00:00:33    10.0.0.2        GigabitEthernet0/0
4.4.4.4           0   2WAY/DROTHER    00:00:38    10.0.0.4        GigabitEthernet0/0
Read one row at a time. FULL/DR means R3 has a Full connection with a neighbour that is the DR: R1. FULL/BDR identifies R2. The last row shows R4 at 2-Way because R3 and R4 are both DROthers. These results are normal for our example.
Example output
R3#show ip ospf interface GigabitEthernet0/0
GigabitEthernet0/0 is up, line protocol is up
  Internet Address 10.0.0.3/24, Area 0
  Process ID 1, Router ID 3.3.3.3, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State DROTHER, Priority 10
  Designated Router (ID) 1.1.1.1, Interface address 10.0.0.1
  Backup Designated router (ID) 2.2.2.2, Interface address 10.0.0.2
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
  Neighbor Count is 3, Adjacent neighbor count is 2
State DROTHER tells us R3's own role on Gi0/0. R1 is listed with router ID 1.1.1.1 and LAN address 10.0.0.1. R2 is the backup at 10.0.0.2. R3 sees three neighbours, but has Full connections with only two of them: R1 and R2.

Configure and verify the separate point-to-point link

interface GigabitEthernet0/1 ip ospf network point-to-point

R1 on the 10.0.12.0/30 lab link: global configuration mode → Gi0/1 interface mode.

interface GigabitEthernet0/0 ip ospf network point-to-point

R2 on the same separate link: global configuration mode → Gi0/0 interface mode. Configure both ends consistently.

Example output
R1#show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           0   FULL/  -        00:00:37    10.0.12.2       GigabitEthernet0/1
The dash indicates no DR/BDR role on this point-to-point adjacency. Verify Network Type on both interfaces as well; Full alone does not prove their link descriptions agree.

Sources: Cisco OSPF interface fields and RFC 2328 election procedure.

Test yourself on DR and BDR elections

Predict · scenario 1

All four routers participate in a fresh election with no existing DR or BDR. They use default priority 1 and RIDs 1.1.1.1, 2.2.2.2, 3.3.3.3 and 4.4.4.4. Which becomes DR?

Predict · scenario 2

R1 is DR and R2 is BDR; both are healthy. You raise DROther R4's interface priority to 255. What happens to the DR role?

Predict · scenario 3

R1 is DR, R2 is BDR, R3 and R4 are DROthers, all with priority 1. Their RIDs are 1.1.1.1 through 4.4.4.4 respectively. R1 fails. What happens?

Predict · scenario 4

On a DROther, show ip ospf neighbor lists another DROther in 2WAY/DROTHER. What should you do?

Predict · scenario 5

At OSPF startup, a router has loopback 10.255.255.1, Gi0/0 192.168.1.1 and Gi0/1 172.16.0.1, all up, and no router-id command. What router ID does it select?

Predict · scenario 6

Two routers are connected by a serial link using PPP. How many DRs are elected on that link?