Sub topic 6
DR and BDR Election on Multi-Access Segments
This chapter assumes you know how Hello packets discover neighbors and how OSPF network types differ. It also assumes you can read basic IOS-style interface configuration. The chapter covers why OSPF elects a Designated Router (DR) and a Backup Designated Router (BDR), how the election works, and which mistakes cause surprises in production.
Why a Multi-Access Segment Needs a DR
On a broadcast segment such as an Ethernet switch, every router can reach every other router directly. If each pair formed a full adjacency, the number of adjacencies would grow as n(n-1)/2. Each adjacency means a separate database exchange and a separate set of flooded updates.
| Routers on segment | Full-mesh adjacencies | Adjacencies with DR and BDR |
|---|---|---|
| 3 | 3 | 3 |
| 5 | 10 | 7 |
| 10 | 45 | 17 |
| 20 | 190 | 37 |
With a DR and BDR, each other router (a DROther) forms a Full adjacency only with those two. That gives 2(n-2)+1 adjacencies. The DR acts as the flooding hub for the segment. It also originates the Type 2 (network) LSA that describes the segment and lists every attached router.
The DROthers stay in the 2-Way state with each other. They are still neighbors, and they still exchange Hellos, but they do not synchronize databases directly.
The solid lines are Full adjacencies. The dotted line is a 2-Way relationship.
How Updates Flow
DROthers send LSU packets to the multicast address 224.0.0.6 (AllDRouters). Only the DR and BDR listen on that address. The DR then re-floods the update to 224.0.0.5 (AllSPFRouters), which every OSPF router on the segment receives. The BDR hears the same update and stays silent unless the DR fails. It also forms full adjacencies so that it already has a complete database when it must take over.
The Election Rules
Each router advertises two values in its Hello packets: its router priority and its router ID. The DR and BDR fields in the Hello name the current DR and BDR. The election uses these rules:
- The router with the highest interface priority wins. The default priority is 1, and the range is 0 to 255.
- A router with priority 0 can never become DR or BDR.
- If priorities tie, the highest router ID wins.
- The winner becomes the DR. The runner-up becomes the BDR.
The election runs when a router's interface comes up, after the Wait Timer expires. The Wait Timer equals the dead interval, which is 40 seconds by default on broadcast networks. During the Wait Timer, the router listens for Hellos that already name a DR and BDR.
Here is a worked example. Four routers join a segment with these values:
| Router | Priority | Router ID |
|---|---|---|
| R1 | 1 | 1.1.1.1 |
| R2 | 1 | 2.2.2.2 |
| R3 | 100 | 3.3.3.3 |
| R4 | 0 | 4.4.4.4 |
R4 is excluded because its priority is 0. R3 has the highest priority, so it becomes DR. R1 and R2 tie on priority, and R2 has the higher router ID, so R2 becomes BDR. R1 and R4 are DROthers.
The Election Does Not Preempt
This is the most common surprise. OSPF DR election is non-preemptive. If a router with a higher priority joins a segment that already has a DR and BDR, it does not take over. It accepts the existing DR and BDR named in the Hellos it hears.
The result depends on boot order, not only on configuration. If R4 in the example had priority 200 but booted last, it would still be a DROther.
When the DR fails, the BDR is promoted to DR. A new election then picks a new BDR from the remaining routers. The original DR, when it returns, becomes a DROther or a BDR, not the DR.
To force a particular router back into the DR role, you must change priorities and restart the OSPF process on the segment. On Cisco IOS, one command is clear ip ospf process. This disrupts routing on that router, so plan a maintenance window.
Configuring Priority
Set the priority per interface. Choose the intended DR and BDR deliberately, rather than letting router IDs decide.
interface GigabitEthernet0/0
ip address 10.0.0.1 255.255.255.0
ip ospf 1 area 0
ip ospf priority 100
!
interface GigabitEthernet0/1
ip address 10.0.1.1 255.255.255.0
ip ospf 1 area 0
ip ospf priority 0In this example, GigabitEthernet0/0 gives the router a strong claim to DR on that segment. On GigabitEthernet0/1, priority 0 means this router never takes part in the election there. That setting suits a branch router on a shared segment that should never carry the flooding load.
Priority applies per interface, not per router. One router can be DR on one segment and a DROther on another.
Checking the Result
Use show ip ospf neighbor to see roles and states.
show ip ospf neighbor
show ip ospf interface GigabitEthernet0/0In the neighbor table, the State column shows values such as FULL/DR, FULL/BDR, and 2WAY/DROTHER. A DROther shows 2WAY/DROTHER toward another DROther. That is normal, not a fault. The interface output also shows the DR and BDR router IDs and addresses, and the local state.
Common Problems
- Neighbors stuck in 2-Way between DROthers. This is expected behavior. Check that each DROther is Full with the DR and BDR.
- A router stuck in ExStart or Exchange with the DR. A common cause is an MTU mismatch between the two interfaces. Compare
show ip ospf interfaceoutput on both sides. - No DR elected. If every router has priority 0, no DR or BDR exists, and no router reaches Full on that segment.
- The wrong router is DR. Check boot order and priorities. The existing DR stays in place until it fails or the process is cleared.
- A weak router as DR. The DR carries extra flooding and LSA work. Set a low priority on small branch routers and a high priority on capable core routers.
When No Election Happens
DR election runs only on broadcast and non-broadcast multi-access (NBMA) network types. Point-to-point and point-to-multipoint networks do not elect a DR. Two routers connected by a point-to-point Ethernet link are often better off with ip ospf network point-to-point. That setting skips the election and the 40-second wait, so the adjacency reaches Full sooner.
Exercise
A segment has three routers. R1 has priority 1 and router ID 9.9.9.9. R2 has priority 50 and router ID 2.2.2.2. R3 has priority 50 and router ID 3.3.3.3. All three boot at the same moment. Which router is DR and which is BDR? Then R4, with priority 255, joins later. What role does R4 take, and why?
Show answer
R3 is DR. R2 and R3 tie on priority 50, and R3 has the higher router ID. R2 is BDR as the runner-up. R1 is a DROther despite its high router ID, because priority is compared first. R4 becomes a DROther. The election is non-preemptive, so a router joining an established segment accepts the DR and BDR already named in Hellos. R4 would become DR only after the current DR and BDR fail or the OSPF process is cleared.
Exercise
On a segment with five routers, how many Full adjacencies exist with one DR and one BDR? How many with a full mesh?
Show answer
With a DR and BDR, the count is 2(5-2)+1 = 7. A full mesh needs 5×4/2 = 10 adjacencies.