In OSPF (Open Shortest Path First), the Router ID and the Designated Router (DR)/Backup Designated Router (BDR) play key roles in the network’s routing stability and efficiency.
1. OSPF Router ID
The Router ID is a unique identifier for each OSPF router. It’s a 32-bit value (similar to an IPv4 address) that is selected based on the following priority order:
Router ID Selection Criteria (Highest Priority First):
- Manually Configured Router ID — If set manually (e.g.,
router-id 1.1.1.1), this takes the highest priority. - Highest IP Address on a Loopback Interface — If no manual Router ID is set, the router will pick the highest IP address of a loopback interface.
- Highest IP Address on an Active (Physical) Interface — If no loopback interface is configured, the router will choose the highest IP address of its active interfaces.
Best Practice: Assign a manual Router ID for consistency and easier troubleshooting.
2. DR/BDR Election
In OSPF, DR and BDR are elected to reduce overhead in multi-access networks like Ethernet. Instead of every router forming a full mesh of adjacencies, the DR acts as the central point for exchanging LSAs (Link-State Advertisements).
Election Process:
- The router with the highest OSPF priority becomes the DR.
- The router with the second-highest OSPF priority becomes the BDR.
- In case of a tie (default priority is 1), the router with the highest Router ID wins.
- If a router’s OSPF priority is set to 0, it cannot become a DR or BDR.
Key Points:
- DR and BDR elections are not preemptive — once elected, they remain in place until they fail or their interfaces go down.
- If the DR fails, the BDR automatically takes over, and a new BDR is elected.
Default OSPF Priority Values:
- Cisco Default:
1 - To modify:
ip ospf priority <value>(on the interface level)
Example Scenario
Router A (Router ID: 1.1.1.1, Priority 100) — DR
Router B (Router ID: 2.2.2.2, Priority 50) — BDR
Router C (Router ID: 3.3.3.3, Priority 0) — DROTHER
In this case:
- Router A becomes the DR because of its higher priority.
- Router B becomes the BDR.
- Router C cannot become a DR or BDR due to its priority being 0.
Best Practices for OSPF Design
✅ Use loopback interfaces for stable Router IDs.
✅ Manually assign Router IDs for predictability.
✅ Set the OSPF priority to 0 on routers that should never be elected as DR/BDR.
✅ Ensure DR/BDR roles are assigned to routers with higher stability and performance.
Leave a comment