OSPF DR and BDR Election Explained
On a broadcast segment such as Ethernet, OSPF elects a designated router (DR) and a backup designated router (BDR). The other routers on the segment, called DROTHERs, form full adjacencies with those two only. The highest interface priority wins, then the highest router ID. The election never preempts: a better router that joins later waits until the DR or BDR leaves.
Part of the OSPF learning hub. Practice on hands-on CCNA labs.
The output comes from a four-router lab on Cisco IOL running IOS XE 17.16 in Cisco Modeling Labs. R1 to R4 share 10.1.1.0/24 on Ethernet0/0 through a switch, with router IDs 1.1.1.1 to 4.4.4.4 and every priority left at 1. R1 and R2 have a second link, 10.0.12.0/30 on Ethernet0/1, set to the point-to-point network type, and each router advertises a /32 loopback, 10.255.0.1 through 10.255.0.4. For the protocol basics, start with what OSPF is.
Why a shared segment needs a DR
OSPF routers synchronize their databases only over full adjacencies. Without a DR, n routers on one segment would need n(n-1)/2 of them: 6 for four routers, 45 for ten. With a DR and BDR, each DROTHER forms just two, and the total drops to 2n-3: 5 for four routers, 17 for ten.
Flooding goes through the DR too. A DROTHER sends its link-state updates to 224.0.0.6 (AllDRouters), the address the DR and BDR listen on. The DR floods them back out to 224.0.0.5 (AllSPFRouters), which every OSPF router on the segment receives. The BDR is adjacent to the same routers as the DR, so it can take over as DR without first synchronizing with each of them.
The DR also represents the segment in the database. It originates a network LSA (type 2) that lists itself and every router fully adjacent to it, and SPF uses that LSA to treat the segment as one node. The DR does not carry the segment's traffic: every router still forwards along its own shortest path.
R1# show ip ospf database network
OSPF Router with ID (1.1.1.1) (Process ID 1)
Net Link States (Area 0)
LS age: 124
Options: (No TOS-capability, DC)
LS Type: Network Links
Link State ID: 10.1.1.4 (address of Designated Router)
Advertising Router: 4.4.4.4
LS Seq Number: 80000001
Checksum: 0xAB3E
Length: 40
Network Mask: /24
Attached Router: 4.4.4.4
Attached Router: 1.1.1.1
Attached Router: 2.2.2.2
Attached Router: 3.3.3.3The network LSA for 10.1.1.0/24. Its Link State ID is the DR's interface address, the advertising router is the DR, and all four routers on the segment are listed. Output captured on Cisco IOL (IOS XE 17.16) in Cisco Modeling Labs.
Which network types elect a DR
Only broadcast and non-broadcast multi-access (NBMA) networks run the election. Point-to-point and point-to-multipoint networks have no DR. Ethernet defaults to the broadcast type, so two routers on one cable still elect a DR, as the single-area OSPF guide shows.
Configure ip ospf network point-to-point on both ends of a two-router Ethernet link and the election disappears, along with the wait timer that delays it. The point-to-point link skips the wait entirely: there is no election, so the adjacency forms as soon as the two routers exchange hellos. Both ends must use the same network type. Network type itself is not a hello check, so a broadcast end facing a point-to-point end still reaches FULL — both default to Hello 10, Dead 40 — while SPF ignores the link and no route crosses it. Point-to-multipoint and NBMA default to Hello 30, Dead 120, so a mismatch involving either of those fails the hello check and no neighbor forms at all.
R1(config)# interface Ethernet0/1
R1(config-if)# ip ospf network point-to-point
R1(config-if)# end
R1# show ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Lo0 1 0 10.255.0.1/32 1 LOOP 0/0
Et0/1 1 0 10.0.12.1/30 10 P2P 1/1
Et0/0 1 0 10.1.1.1/24 10 DROTH 2/3Et0/1 is P2P, with one full neighbor out of one. On Et0/0, a broadcast segment, R1 is a DROTHER: full with two of its three neighbors. Output captured on Cisco IOL (IOS XE 17.16) in Cisco Modeling Labs.
How the election works
Each router runs the election separately on each broadcast interface, using the Hello packets it receives there:
- Candidates are the router itself and each neighbor in 2-Way state or later. A router with priority 0 is never a candidate.
- Priority is set per interface, from 0 to 255, and defaults to 1. The highest priority wins.
- If priorities tie, the highest router ID wins. Interface IP addresses play no part.
- The BDR is chosen first, then the DR. If no router already claims the DR role, the new BDR is promoted to DR and a second BDR election runs among the rest.
- When an interface comes up, the router waits before electing, for the length of the dead interval, 40 seconds by default. It stops waiting as soon as a neighbor's Hello claims that neighbor is the BDR, or claims it is the DR and names no BDR, and then accepts the roles already in place (RFC 2328, section 9.2).
Why the election never preempts
Routers that already hold the DR and BDR roles keep them, even when a router with a higher priority or router ID joins. The roles change hands when the DR or BDR leaves the segment: its interface goes down, its OSPF process restarts, or its Hellos stop. The full algorithm is in section 9.4 of RFC 2328.
In the lab every priority is 1, so router IDs decided the result: R4 (4.4.4.4) is DR and R3 (3.3.3.3) is BDR. That result depends on the routers booting together. A router that comes up alone on a segment becomes DR when its wait timer expires, and it keeps the role when the others arrive.
Reading the roles in show output
Two commands show the result: one for the local router's role, one for each neighbor's.
The local router's role
show ip ospf interface prints the router's own state and priority, names the DR and BDR, and counts neighbors. R1 has three neighbors on the segment and is adjacent to two of them: the DR and the BDR.
R1# show ip ospf interface Ethernet0/0 | include Network Type|State|Designated|Backup|Timer|Neighbor Count
Attached via Network Statement
Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DROTHER, Priority 1
Designated Router (ID) 4.4.4.4, Interface address 10.1.1.4
Backup Designated router (ID) 3.3.3.3, Interface address 10.1.1.3
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Neighbor Count is 3, Adjacent neighbor count is 2
Adjacent with neighbor 3.3.3.3 (Backup Designated Router)
Adjacent with neighbor 4.4.4.4 (Designated Router)R1 is a DROTHER with priority 1, adjacent only to the DR and the BDR. The Timer line shows the 40-second wait interval, equal to the dead interval. Output captured on Cisco IOL (IOS XE 17.16) in Cisco Modeling Labs.
Each neighbor's role
In show ip ospf neighbor, the role after the slash in the State column belongs to the neighbor, not the local router. R1 is FULL with the DR (4.4.4.4) and the BDR (3.3.3.3), and 2WAY with R2, the other DROTHER. DROTHERs stop at 2-Way with each other by design; the OSPF neighbor states explainer covers why. The point-to-point neighbor shows a dash instead of a role, and IOS prints its priority as 0.
R1# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 0 FULL/ - 00:00:34 10.0.12.2 Ethernet0/1
2.2.2.2 1 2WAY/DROTHER 00:00:35 10.1.1.2 Ethernet0/0
3.3.3.3 1 FULL/BDR 00:00:30 10.1.1.3 Ethernet0/0
4.4.4.4 1 FULL/DR 00:00:32 10.1.1.4 Ethernet0/0R2 appears twice, once per interface. On the segment, 2WAY/DROTHER is the normal steady state. Output captured on Cisco IOL (IOS XE 17.16) in Cisco Modeling Labs.
The DR's view
The DR is adjacent to every router on the segment, so R4 lists all three neighbors as FULL. On any router, a neighbor that stays short of FULL, other than 2WAY between two DROTHERs, points to a fault; OSPF neighbor not forming walks through the causes.
R4# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 1 FULL/DROTHER 00:00:30 10.1.1.1 Ethernet0/0
2.2.2.2 1 FULL/DROTHER 00:00:33 10.1.1.2 Ethernet0/0
3.3.3.3 1 FULL/BDR 00:00:37 10.1.1.3 Ethernet0/0The same segment from the DR: R4 is FULL with all three neighbors, both DROTHERs included. Output captured on Cisco IOL (IOS XE 17.16) in Cisco Modeling Labs.
Moving the DR: priority, then a reset
To pick the DR, raise the priority on the router you want, then force a new election. The OSPF cheat sheet lists the interface commands.
Raise the priority
A higher priority does not displace a DR or BDR that is already in place. R1 now has priority 100 but is still a DROTHER, with R4 and R3 unchanged.
R1(config)# interface Ethernet0/0
R1(config-if)# ip ospf priority 100
R1(config-if)# end
R1# show ip ospf interface Ethernet0/0 | include State|Designated|Backup
Attached via Network Statement
Transmit Delay is 1 sec, State DROTHER, Priority 100
Designated Router (ID) 4.4.4.4, Interface address 10.1.1.4
Backup Designated router (ID) 3.3.3.3, Interface address 10.1.1.3
Adjacent with neighbor 3.3.3.3 (Backup Designated Router)
Adjacent with neighbor 4.4.4.4 (Designated Router)R1 carries priority 100 and is still a DROTHER, with R4 and R3 in place: the election does not preempt. Output captured on Cisco IOL (IOS XE 17.16) in Cisco Modeling Labs.
Reset the DR, then the new DR
clear ip ospf process restarts OSPF on a router; answer yes at the confirmation prompt. Resetting the DR hands the role to the BDR, and a fresh BDR election runs among the rest. Resetting R4 made R3 the DR and left R1, by then the highest priority on the segment, as the BDR: the DR role was no longer vacant by the time R1 could contend for it. R4 came back as a DROTHER despite holding the highest router ID, so it sits at 2WAY with R2.
Resetting R3, the new DR, promoted R1 to DR and left R4 as BDR. Moving the DR onto a chosen router took two resets, not one.
R4# clear ip ospf process
R4# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 100 FULL/BDR 00:00:38 10.1.1.1 Ethernet0/0
2.2.2.2 1 2WAY/DROTHER 00:00:34 10.1.1.2 Ethernet0/0
3.3.3.3 1 FULL/DR 00:00:35 10.1.1.3 Ethernet0/0
R3# clear ip ospf process
R1# show ip ospf interface Ethernet0/0 | include State|Designated|Backup|Neighbor Count
Attached via Network Statement
Transmit Delay is 1 sec, State DR, Priority 100
Designated Router (ID) 1.1.1.1, Interface address 10.1.1.1
Backup Designated router (ID) 4.4.4.4, Interface address 10.1.1.4
Neighbor Count is 3, Adjacent neighbor count is 3
Adjacent with neighbor 4.4.4.4 (Backup Designated Router)R4 reads the new roles after its own reset. After the second reset, R1 is DR with priority 100 and adjacent to all three neighbors. Each table was read over a minute after the reset above it, once the segment had settled. Output captured on Cisco IOL (IOS XE 17.16) in Cisco Modeling Labs.
Priority 0, and the cost of a reset
Priority 0 takes an interface out of the election entirely. Use it where a router should never hold the role. Below, R2, already a DROTHER, now shows priority 0, and R4 and R3 keep theirs. If every router on a segment has priority 0, the segment gets no DR, the routers stay at 2-Way, and no routes are learned across it.
A reset drops every OSPF adjacency on that router, on all interfaces, so routes through it flap. In production, set priorities before routers join the segment, or reset during a maintenance window.
R2(config)# interface Ethernet0/0
R2(config-if)# ip ospf priority 0
R2(config-if)# end
R2# show ip ospf interface Ethernet0/0 | include State|Designated|Backup
Attached via Network Statement
Transmit Delay is 1 sec, State DROTHER, Priority 0
Designated Router (ID) 4.4.4.4, Interface address 10.1.1.4
Backup Designated router (ID) 3.3.3.3, Interface address 10.1.1.3
Adjacent with neighbor 3.3.3.3 (Backup Designated Router)
Adjacent with neighbor 4.4.4.4 (Designated Router)Priority 0 on a router that was already a DROTHER: the roles on the segment do not move. Output captured on Cisco IOL (IOS XE 17.16) in Cisco Modeling Labs.
Frequently asked questions
Does all traffic on the segment pass through the DR?
No. The DR centralizes database flooding and originates the network LSA. Packets follow each router's own shortest path, so two DROTHERs on the same segment send traffic directly to each other.
Why is my OSPF neighbor stuck in 2WAY/DROTHER?
If both routers are DROTHERs on a broadcast segment, that is normal: DROTHERs form full adjacencies only with the DR and BDR. It is a fault when the segment has no DR at all, for example because every router has priority 0.
Why didn't my router become DR after I raised its priority?
The election does not preempt. The new priority counts only at the next election, which runs when the current DR or BDR leaves the segment. Restarting OSPF on the DR with clear ip ospf process hands the role to the BDR, so moving it onto a specific router usually takes two resets: the current DR, then whichever router takes DR after that.
Is the DR elected per router or per interface?
Per interface. Each broadcast interface runs its own election, so one router can be the DR on one Ethernet segment and a DROTHER on another. That is also why ip ospf priority is an interface command, not a process-level one.
What happens when the DR fails?
Its neighbors declare it down when the dead interval expires, 40 seconds by default. The BDR becomes DR, and a new BDR is elected from the remaining routers with priority above 0. The old BDR was already adjacent to every router, so the segment's database stays synchronized while the new BDR forms its adjacencies.
Now build it
Labs that drill this on real Cisco IOS — configure it yourself, then grade your config against the answer key.
Now configure it on real Cisco IOS
Concepts stick when you configure them. Build one on real Cisco IOS and have your config graded.