On a switch, spanning tree elects a root bridge. In OSPF, a shared segment elects a Designated Router. Same idea — pick one boss so the network doesn't turn into chaos — but the rules are completely different, and mixing them up is a classic exam trap. This page is only about the OSPF election. For what a DR/BDR actually does once elected (and why two DROTHERs happily sit at 2-WAY), see OSPF adjacency states.

Why OSPF bothers electing a DR at all

Put n routers on one Ethernet segment and, without a DR, every router would form a full adjacency with every other router — that's n(n−1)/2 adjacencies, all flooding the same LSAs at each other. Ten routers would mean 45 adjacencies. It doesn't scale.

So OSPF elects a DR to act as the central point of contact for the segment, plus a BDR standing by in case the DR dies. Every other router — a DROTHER — forms a FULL adjacency only with the DR and BDR, and just reaches the 2-WAY state with the other DROTHERs. Routers send updates to the DR on 224.0.0.6, and the DR floods them back out to everyone on 224.0.0.5. One clearing house instead of a mesh.

The election, step by step

When routers on the segment reach the 2-WAY state (they can see each other's Router IDs in the Hello packets), the election runs:

1. Highest OSPF interface PRIORITY wins.
   default = 1     range = 0-255     higher wins
   priority 0  =  never DR/BDR (permanent DROTHER)

2. TIE?  ->  Highest ROUTER ID wins.
   router-id = manual 'router-id' > highest loopback IP
               > highest active physical interface IP

Result:  highest      -> DR
         2nd highest   -> BDR
         everyone else -> DROTHER

Here's the catch most people miss: out of the box, every interface has priority 1. So on a fresh network the priorities always tie, which means the Router ID is what actually decides the DR. If you never touch priority, the router with the highest Router ID becomes DR and the next-highest becomes BDR.

Why the newest router almost never wins

The OSPF election is non-preemptive. Once a DR and BDR are chosen, they keep their roles until they fail — even if a shinier router with a higher priority or Router ID shows up afterward. That new router just becomes a DROTHER and waits.

This trips people up in the lab constantly: you set ip ospf priority 255 on the router you want as DR, save, and… nothing changes, because the election already happened. Priority only decides future elections.

[ ! WHY BDR EXISTS ] Because the election is non-preemptive, losing the DR would normally trigger a slow re-election. The BDR fixes that: it already has a full adjacency with everyone, so when the DR dies the BDR is promoted instantly and a fresh BDR is then elected. No flooding storm, no gap.

Forcing the DR you want

Two ways to control the outcome. First, set the interface priority before adjacencies form — highest wins, and priority 0 locks a router out of the running entirely:

R1(config)# interface g0/0
R1(config-if)# ip ospf priority 255   ! make this router the DR
!
R3(config)# interface g0/0
R3(config-if)# ip ospf priority 0     ! R3 can never be DR/BDR

If the neighbors are already up, changing priority won't move the DR (non-preemptive, remember). Force a re-election by resetting the OSPF process on the segment:

R1# clear ip ospf process
Reset ALL OSPF processes? [no]: yes

Verifying the roles

Run show ip ospf neighbor. The State column shows both the adjacency state and the neighbor's role on the segment:

Neighbor ID     Pri   State           Address       Interface
2.2.2.2           1   FULL/DR         10.0.0.2      GigabitEthernet0/0
3.3.3.3           1   FULL/BDR        10.0.0.3      GigabitEthernet0/0
4.4.4.4           1   2-WAY/DROTHER   10.0.0.4      GigabitEthernet0/0

FULL/DR and FULL/BDR are the full adjacencies you expect. Seeing 2-WAY/DROTHER from one DROTHER to another is not a bug — DROTHERs never go full with each other by design. (More on that in OSPF adjacency states.) You can also confirm the local router's own role and priority with show ip ospf interface g0/0.

Don't over-elect on point-to-point links

A DR/BDR only makes sense where many routers share one segment — network types broadcast and non-broadcast (NBMA). On a point-to-point link there are only two routers, so OSPF skips the election entirely and the two just form a FULL adjacency directly. If you ever see a DR being elected on what should be a serial or point-to-point link, your OSPF network type is misconfigured.