In Open Shortest Path First (OSPF), the Designated Router (DR) and Backup Designated Router (BDR) optimize operations on multi-access network segments by reducing Link-State Advertisement (LSA) flooding and adjacency requirements. This post details the purpose of DR/BDR, their election process, operational mechanics, network types where they apply, and verification commands.
Purpose of DR and BDR
In multi-access networks (e.g., Ethernet, Frame Relay), OSPF routers without a DR would form a full-mesh adjacency with every other router, resulting in N(N-1)/2 adjacencies for N routers. This leads to excessive LSA flooding, consuming bandwidth and router resources.
DR Role: The DR acts as a central point (hub) for the multi-access segment, forming full adjacencies with all routers and managing LSA exchanges. Non-DR/BDR routers (DROTHERs) maintain full adjacency only with the DR and BDR, staying in the Two-Way state with other DROTHERs, reducing the number of full adjacencies.
BDR Role: The BDR mirrors the DR’s LSDB and listens to the same multicast address, ready to take the DR role if the DR fails. A new BDR is elected upon DR failure.
Benefits:
Minimizes LSA flooding by centralizing updates through the DR.
Reduces full adjacency count, improving scalability and resource efficiency.
Simplifies topology representation via a hub-and-spoke model.
DR/BDR Election Process
The DR and BDR are elected when routers initialize on a multi-access segment. The election process is as follows:
Router Priority (Highest Priority Wins):
Configured per interface:
R1(config)# interface GigabitEthernet0/0
R1(config-if)# ip ospf priority 100
Range: 0–255 (default: 1).
Priority 0 excludes the router from becoming DR or BDR.
Higher priority wins; if priorities are equal, the tiebreaker is used.
Router ID (RID) (Highest RID Wins):
If priorities are equal (e.g., default 1), the router with the highest Router ID becomes the DR, and the second-highest becomes the BDR.
Router ID is a 32-bit identifier, typically set manually or derived from the highest loopback or physical interface IP address.
Non-Preemptive Election:
Once elected, the DR and BDR roles are stable. A router with a higher priority or RID does not preempt the existing DR/BDR unless the OSPF process is cleared:
R1# clear ip ospf process
Clearing the OSPF process disrupts adjacencies and triggers SPF recalculation, so use cautiously in production.
Note: If a single router boots first and sends Hello packets, it may temporarily assume the DR role until other routers join, triggering a full election based on priority and RID.
DR/BDR Operational Mechanics
The DR and BDR streamline LSA exchange and topology representation on multi-access segments:
Multicast Addresses:
224.0.0.5 (AllSPFRouters): Used by all OSPF routers to send Hello packets and by the DR to flood LSAs to all routers.
224.0.0.6 (AllDRouters): Used by DROTHERs to send updates to the DR/BDR and by the DR/BDR to receive updates.
LSA Exchange Process:
DROTHERs send LSAs (via Link-State Update packets) to 224.0.0.6, targeting the DR/BDR.
The DR floods these LSAs to 224.0.0.5, ensuring all routers on the segment receive the update.
The originating router receives its own LSA and discards it.
Routers acknowledge LSAs via Link-State Acknowledgment packets. If no acknowledgment is received, the DR unicasts the LSA to the non-responding router.
Network LSA (Type 2):
The DR generates a Type 2 Network LSA to represent the multi-access segment (similar to a “pseudo-node” in IS-IS).
This LSA lists all routers attached to the segment, including their Router IDs.
BDR Failover:
The BDR maintains an identical LSDB to the DR by listening to 224.0.0.6.
If the DR fails, the BDR assumes the DR role, and a new BDR is elected among DROTHERs.
Network Types and DR/BDR Usage
DR/BDR roles are used only in specific OSPF network types:
Broadcast: Default for Ethernet interfaces. Uses multicast (224.0.0.5, 224.0.0.6) for Hello and LSA exchanges. Requires DR/BDR.
Non-Broadcast Multi-Access (NBMA): Default for Frame Relay. Uses unicast for Hello packets but still requires DR/BDR due to multi-access nature.
Point-to-Multipoint Broadcast/Non-Broadcast: Treated as a collection of point-to-point links, so DR/BDR is not used.
Point-to-Point: Default for HDLC/PPP interfaces. No DR/BDR, as only two routers exist per link.
Hub-and-Spoke Design Note: In a hub-and-spoke topology (e.g., Frame Relay), ensure the hub router is the DR by setting a high priority (e.g., 100) and DROTHERs (spokes) to a lower priority (e.g., 1) or 0 to prevent them from becoming DR/BDR:
R1(config)# interface Serial0/0
R1(config-if)# ip ospf priority 100 ! Hub
R2(config)# interface Serial0/0
R2(config-if)# ip ospf priority 0 ! Spoke
Verification Commands
To verify DR/BDR status and roles, use the following Cisco IOS/IOS XE commands:
Show OSPF Neighbors:
R1# show ip ospf neighbor
Displays neighbor roles (DR, BDR, DROTHER), Router ID, and adjacency state.
Show OSPF Interface Brief:
R1# show ip ospf interface brief
Shows local router’s role (DR, BDR, DROTHER) and interface details.
Show OSPF Interface Details:
R1# show ip ospf interface [type number] | include State
Confirms the local router’s role (e.g., DR, BDR, DROTHER) for a specific interface.
Debug OSPF Adjacency (use with caution in production):
R1# debug ip ospf adj
Displays DR/BDR election events and adjacency issues.
IOS XR Equivalents:
show ospf neighbor
show ospf interface brief
show ospf interface [type number] | include State
debug ospf adj
Key Considerations
Adjacency Efficiency: The DR reduces adjacencies from N(N-1)/2 to approximately N, significantly lowering resource usage.
Non-Preemptive Election: DR/BDR roles are stable; changes require clear
ing the OSPF process, which disrupts routing.
Hub-and-Spoke Design: Always configure the hub as the DR to optimize LSA flooding and adjacency management.
Network Type Impact: DR/BDR is only relevant for Broadcast and NBMA networks; point-to-point and point-to-multipoint networks do not use DR/BDR.
LSA Type 2: The DR’s generation of Network LSAs simplifies multi-access segment representation in the LSDB.
BDR Failover: The BDR ensures continuity by taking over if the DR fails, minimizing disruption.