OSPF Designated Router (DR) and Backup Designated Router (BDR)
Learn how OSPF elects DR and BDR routers on Ethernet and NBMA networks, including priorities, router IDs, neighbor states, Cisco IOS configuration, verification, and troubleshooting.
On a shared multiaccess network, several OSPF routers can reach one another through the same Layer 2 segment. OSPF uses a Designated Router (DR) and Backup Designated Router (BDR) to reduce unnecessary adjacencies and link-state flooding.
This lesson focuses on Ethernet broadcast networks and Non-Broadcast Multi-Access (NBMA) networks. It also compares them with point-to-point and point-to-multipoint OSPF network types.
Why OSPF Uses a DR and BDR
Imagine a shared Ethernet segment with four OSPF routers. If every router formed a full adjacency with every other router, the number of relationships would grow quickly. With n routers, the number of possible pairwise adjacencies is n(n-1)/2.
Each full adjacency can exchange Database Description packets, Link-State Requests, Link-State Updates, and acknowledgments. OSPF would also have to manage many redundant flooding relationships.
The DR provides a central representation of the shared segment. Each eligible router forms a full adjacency with the DR and BDR, while routers that are neither DR nor BDR normally do not form full adjacencies with one another. This reduces control-plane overhead and makes link-state flooding more orderly.
DR and BDR roles are segment-specific. They are not area-wide leaders and do not control all OSPF routers in an area. A single physical router can be DR on one interface, BDR on another, and DROther on a third.
OSPF Network Types and DR/BDR Elections
An OSPF network type describes how routers communicate and discover neighbors on an interface. Changing the network type can change whether a DR/BDR election occurs.
| OSPF network type | Typical medium | Uses DR/BDR | Neighbor discovery behavior | Typical adjacency behavior |
|---|---|---|---|---|
| Broadcast | Ethernet and other broadcast-capable multiaccess media | Yes | OSPF uses multicast Hellos | Full with DR and BDR; normally 2-Way with other DROthers |
| NBMA | Non-Broadcast Multi-Access networks | Yes | Neighbor discovery may require configured neighbors or special operational support | Uses DR/BDR rules, subject to NBMA neighbor reachability |
| Point-to-point | Dedicated link between two routers | No | Hellos are exchanged directly between the two endpoints | The two routers normally form a Full adjacency |
| Point-to-multipoint | One interface reaching multiple remote endpoints | No | OSPF treats relationships as separate point-to-point-style connections | Each neighbor forms a direct adjacency; no DR or BDR is elected |
Ethernet is the most common DR/BDR environment. NBMA networks also use elections, but neighbor discovery is different because the medium may not support broadcast or multicast delivery in the same way.
DR, BDR, and DROther Roles
- DR: The elected router that represents the shared transit network during OSPF flooding and originates the network's Type 2 Network LSA.
- BDR: The standby elected router. It maintains full adjacencies and can become DR if the current DR fails.
- DROther: Any eligible OSPF router on the segment that is neither the DR nor the BDR. It forms full adjacencies with the DR and BDR.
The DR is not a default gateway, a Layer 2 switch leader, or an OSPF area leader. Its role applies only to one OSPF interface and its attached multiaccess segment.
Neighbor States on a Multiaccess Segment
OSPF neighbors begin by exchanging Hello packets. Hellos identify routers, advertise parameters such as the router ID and interface priority, and confirm that communication is bidirectional.
| State | Meaning |
|---|---|
| Down | No valid Hello has been received from the neighbor. |
| Init | A Hello has been received, but the local router's own router ID has not yet appeared in the neighbor's Hello. Bidirectional communication is not confirmed. |
| 2-Way | Both routers see one another in their Hellos. On a broadcast segment, two DROthers normally remain in this state rather than becoming fully adjacent. |
| ExStart | The routers negotiate master and slave roles and begin determining Database Description packet sequencing. |
| Exchange | The routers exchange summaries of their link-state databases using Database Description packets. |
| Loading | A router requests missing or newer LSAs and receives Link-State Updates. |
| Full | The link-state databases are synchronized and the adjacency is complete. |
On a normal broadcast segment, each DROther becomes Full with the DR and BDR. Two DROthers normally remain in 2-Way because the DR coordinates their shared-segment information. Seeing 2-Way between DROthers is not automatically a fault.
How the DR and BDR Election Works
OSPF routers advertise their interface priority and router ID in Hello packets. The election uses the following criteria:
| Criterion | Order of use | Effect | Notes |
|---|---|---|---|
| Eligibility | First | An interface with priority 0 cannot become DR or BDR. | It can still form OSPF adjacencies with the DR and BDR. |
| Interface priority | Next | The highest eligible priority is preferred. | The value is local to the interface and segment; Cisco IOS commonly supports 0 through 255. |
| Router ID | Tie-breaker | If priorities are equal, the highest router ID wins. | The router ID is a 32-bit OSPF identity. |
Operationally, eligible routers select a BDR and then select a DR, while an already declared DR is retained when applicable. The exact result depends on the current neighbor state and which routers are already recognized in the election.
OSPF elections are generally nonpreemptive. A router that joins later with a higher priority or higher router ID does not normally replace an existing DR or BDR. This stability prevents unnecessary adjacency rebuilding and link-state flooding.
Example: Equal Priorities
Suppose R1, R2, and R3 share an Ethernet subnet and all use the default priority. If their router IDs are 1.1.1.1, 2.2.2.2, and 3.3.3.3, respectively, R3 is preferred as DR, R2 as BDR, and R1 is DROther.
Example: Priority Controls the Result
If R1 has priority 200, R2 has priority 100, and R3 has priority 1, R1 is preferred as DR and R2 as BDR. Router ID matters only when eligible routers have equal priorities.
Example: Priority Zero
Setting R3's priority to 0 prevents R3 from becoming DR or BDR. R3 can still participate in OSPF and form full adjacencies with the elected DR and BDR.
Election Stability and Reelection
Normal OSPF operation avoids preemption because replacing a functioning DR would force unnecessary adjacency changes and flooding. A new election can occur after events such as:
- An interface is reset or goes down.
- The OSPF process restarts.
- The DR or BDR fails.
- OSPF neighbors or the OSPF process are cleared.
- A planned maintenance operation causes the current roles to be withdrawn.
If the DR fails, the BDR promotes itself to DR. The remaining eligible routers then elect a new BDR. This is why a healthy BDR is important: it can take over without waiting for a completely new DR selection.
A planned role change and an unplanned failure are operationally different. A planned change may involve maintenance and a controlled process reset, while an unplanned failure causes temporary adjacency and route reconvergence.
OSPF Multicast Addresses
| Multicast address | Name | Recipients | Typical use |
|---|---|---|---|
| 224.0.0.5 | AllSPFRouters | All OSPF routers on the local segment | General OSPF communication, including Hellos and flooding to all OSPF routers |
| 224.0.0.6 | AllDRouters | The DR and BDR | DROthers send link-state updates toward the DR and BDR |
A common flooding pattern is that DROthers send updates to 224.0.0.6, reaching the DR and BDR. The DR then distributes the information to the segment through the AllSPFRouters group, 224.0.0.5. The BDR listens and maintains its synchronized database so it can assume the DR role if necessary.
Type 2 Network LSAs
On a broadcast or NBMA transit network, the DR originates a Type 2 Network LSA. This LSA represents the shared network and lists the routers attached to it, including the DR and other participating routers.
A Type 2 Network LSA is different from a Type 1 Router LSA:
- A Type 1 Router LSA describes a router's OSPF links and is originated by each OSPF router.
- A Type 2 Network LSA describes a transit multiaccess network and its attached OSPF routers. It is originated by the DR.
If the DR fails, the BDR becomes the new DR and originates the replacement Network LSA. The old LSA ages out or is replaced as the topology converges. This change, along with adjacency rebuilding where necessary, can temporarily affect the link-state database and routing calculations.
Cisco IOS Configuration
Set an Explicit Router ID
router ospf 1
router-id 1.1.1.1An explicit router ID makes election results predictable and avoids dependence on changing interface addresses. If the router ID is changed after the OSPF process is active, a process reset may be required for the new value to take effect.
Enable OSPF on an Ethernet Interface
interface GigabitEthernet0/0
ip address 192.0.2.1 255.255.255.0
ip ospf 1 area 0Influence the Election with Interface Priority
interface GigabitEthernet0/0
ip ospf priority 200Priority affects only the specified interface and its local segment. A high priority on one interface does not make the router DR on every interface.
Prevent DR/BDR Eligibility
interface GigabitEthernet0/0
ip ospf priority 0The router remains an OSPF participant but cannot hold the DR or BDR role on that interface.
Cisco IOS Verification Commands
| Command | Information shown | What to check |
|---|---|---|
show ip ospf interface GigabitEthernet0/0 | Interface OSPF details | Network type, interface priority, DR, BDR, timers, area, and neighbor information |
show ip ospf neighbor | Neighbor table | Neighbor state, router ID, address, and whether the relationship is Full or 2-Way |
show ip ospf | OSPF process information | Active router ID, areas, timers, and process-level details |
show ip ospf database network | Type 2 Network LSAs | Network LSA originator and routers attached to the transit segment |
show ip ospf interface brief | Summary of OSPF-enabled interfaces | Interface participation and the segment on which each election occurs |
Practical Failure Example
Assume a segment has R1 as DR, R2 as BDR, and R3 as DROther. If R1's interface fails:
- Neighbors detect that the DR is no longer reachable using OSPF failure detection.
- R2 promotes itself from BDR to DR.
- The eligible remaining routers, such as R3, select a new BDR.
- OSPF updates the Network LSA and rebuilds or confirms required adjacencies.
- SPF calculations and routing tables converge on the new topology.
In a lab, you can observe or force a process-wide reevaluation with:
clear ip ospf processDesign and Operational Guidance
- Prefer a stable, capable router as DR and another reliable router as BDR when deliberate control is needed.
- Use explicit router IDs and planned interface priorities for predictable elections.
- Set access or less-capable routers to priority 0 when they should never become DR or BDR.
- Review each Layer 2 segment independently. DR/BDR selection is not a network-wide or area-wide election.
- Avoid frequent process resets because they interrupt adjacencies and trigger reconvergence.
- Confirm the OSPF network type before diagnosing a missing DR or BDR. Point-to-point and point-to-multipoint interfaces do not elect them.
Troubleshooting DR and BDR Problems
DROthers Show 2-Way Instead of Full
This is normally expected on a broadcast or NBMA multiaccess segment. Run show ip ospf neighbor and confirm that each DROther is Full with the DR and BDR. If those relationships are Full, no correction is needed.
The Intended Router Did Not Become DR
- Check whether its priority is lower than the current winner.
- Confirm that priority is not 0.
- Check the router ID when priorities are equal.
- Remember that a later-arriving router does not normally preempt an existing DR.
Use show ip ospf interface, show ip ospf, and show ip ospf neighbor. Correct the design, then schedule an appropriate reelection event if a role change is required.
No DR or BDR Appears
Possible explanations include a point-to-point or point-to-multipoint network type, only one active OSPF router on the segment, or failed neighbor formation. Check:
show ip ospf interface
show ip ospf neighbor
show running-config interface GigabitEthernet0/0Validate the intended network type, Layer 2 connectivity, addressing, area, authentication, Hello and Dead timers, and OSPF enablement.
Neighbors Remain in Init or Are Absent
Init indicates that a Hello was received but bidirectional communication has not been confirmed. Check for incompatible area, subnet, authentication, timers, network type, or MTU settings. Also verify that the interface is not passive and that OSPF is enabled.
A DR Change Causes Temporary Route Instability
A reset or failure can require adjacency rebuilding and a new Network LSA. Check show ip ospf neighbor, show ip route ospf, and show ip ospf database network. Avoid unnecessary resets, verify that the BDR is healthy, and allow convergence to finish.
Exam-Relevant Summary
- Broadcast Ethernet and NBMA networks use DR/BDR elections.
- Point-to-point and point-to-multipoint networks do not elect a DR or BDR.
- Priority 0 makes an interface ineligible.
- Higher interface priority wins; router ID breaks equal-priority ties.
- Elections are generally nonpreemptive.
- The BDR becomes DR when the DR fails, followed by election of a new BDR.
- DROthers are normally 2-Way with one another and Full with the DR and BDR.
- 224.0.0.5 is AllSPFRouters; 224.0.0.6 is AllDRouters.
- The DR originates the Type 2 Network LSA for the shared transit network.
- DR and BDR status is local to each eligible OSPF interface segment.