OSPF Router ID and DR/BDR Election

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):

  1. Manually Configured Router ID — If set manually (e.g., router-id 1.1.1.1), this takes the highest priority.
  2. 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.
  3. 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:

Key Points:

Default OSPF Priority Values:


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:


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.

renjithbs Avatar

Posted by

Leave a comment