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.
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.
- 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.
- 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.
- 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.
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.
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.
- 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.
- Calculate the DR. Prefer routers declaring themselves DR, using the same tie-breakers. If there are none, promote the selected BDR.
- 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
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.
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.
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.
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
- 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.
Do two routers always need a DR and BDR?
Compare broadcast and point-to-point diagrams
- 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.
- 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.
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
On small screens, swipe sideways or focus the diagram and use the arrow keys.
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 100R1 only: set its interface priority to 100.
interface GigabitEthernet0/0
ip ospf priority 50R2 only: set its interface priority to 50.
interface GigabitEthernet0/0
ip ospf priority 10R3 only: remain eligible at priority 10.
interface GigabitEthernet0/0
ip ospf priority 0R4 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
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
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
Configure and verify the separate point-to-point link
interface GigabitEthernet0/1
ip ospf network point-to-pointR1 on the 10.0.12.0/30 lab link: global configuration mode → Gi0/1 interface mode.
interface GigabitEthernet0/0
ip ospf network point-to-pointR2 on the same separate link: global configuration mode → Gi0/0 interface mode. Configure both ends consistently.
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
Sources: Cisco OSPF interface fields and RFC 2328 election procedure.
Test yourself on DR and BDR elections
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?
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?
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?
On a DROther, show ip ospf neighbor lists another DROther in 2WAY/DROTHER. What should you do?
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?
Two routers are connected by a serial link using PPP. How many DRs are elected on that link?