OSPF network types and the DR
On a multi-access segment every router being fully adjacent with every other would cost n(n-1)/2 adjacencies, 15 for six routers, so OSPF elects a designated router. The highest interface priority wins, then the highest router ID, and OSPF does not preempt. Each interface's network type decides whether a DR is elected at all.
By Arif, founder of Daveth · Updated
The full 13 min walkthrough is in Daveth Pro (Network). See what the plan opens
What this page answers
How is the OSPF DR elected?
Each router puts its router ID and interface priority, 1 by default, in its hellos; the highest priority wins, and on a tie the highest router ID. The BDR is chosen the same way. Priority 0 removes an interface from the election. Read it in “The election, played in rounds”
What are the OSPF network types?
A per-interface setting that tells the router how to behave, independent of the medium underneath: broadcast, the Ethernet default, elects a DR; point-to-point does not; others cover non-broadcast and point-to-multipoint links. Changing it can stop an election entirely. Read it in “The network type: a promise each interface makes”
How do you make a router the OSPF DR?
Raise its interface priority with ip ospf priority above the current DR's; never change router IDs to place the DR. OSPF does not preempt, so the new priority only wins at the next election. Read it in “Steering it, and what that costs”
One LAN, fifteen conversations
Six routers share one Ethernet segment. If every router had to become fully adjacent with every other one, how many adjacencies is that? Count it before you read on.
Fifteen: n(n-1)/2, so five routers give 10, and one more makes 15. Multi-access networks such as Ethernet let more than two routers sit on one segment, and that becomes a scalability problem as the number grows. More routers flood more LSAs, and OSPF traffic gets excessive as adjacencies multiply: four routers already mean six adjacencies and six rounds of database flooding. Every one of those adjacencies costs bandwidth, CPU and memory to keep its neighbor state.
OSPF's answer is a pseudonode, a virtual router that manages the adjacency state with every other router on the segment. A real router plays the part, and it's called the designated router (DR). Routers form full adjacencies only with the DR, not with each other, and the DR floods each update to the rest of the segment: four routers held together by three adjacencies.
What if the DR dies? OSPF would have to form new adjacencies and send all new LSAs, and you could lose routes for a while. So there's a backup designated router (BDR), which also forms full adjacencies with every router on the segment, so the takeover is quick. Count again with the BDR: the DR's five plus the BDR's four more is 9 adjacencies for six routers, not 15.
Everyone else is a DROTHER. Two DROTHERs stop at 2-WAY with each other, and that's the design: full with the DR and the BDR, 2-Way with everyone else. Your first assumption might be that all the routers become adjacent with each other, but that would defeat the purpose of a DR. That's the answer to the last lesson's puzzle: two neighbors sitting at 2-WAY for good were two DROTHERs.
The DR's job is to pass news on. It works the way a meeting with a secretary works, with a deputy who listens to everything too, so nobody has to repeat themselves when the chair changes:
- A router that learns of a change sends the updated LSA to AllDRouters, 224.0.0.6. Only the DR and the BDR accept and process that address.
- The DR sends a unicast acknowledgment back to the router that sent it.
- The DR floods the LSA to every router on the segment at AllSPFRouters, 224.0.0.5.
The DR also describes the segment in the database with an LSA of its own, and that's the next lesson.
The election, played in rounds
The rules first. They're short:
- Any interface with an OSPF priority from 1 to 255 tries to become the DR. Every interface starts at priority 1.
- Each router puts its RID and its priority in the hellos it sends on that segment.
- Each router reads the hellos it gets. If it's a better candidate than anything it hears, it keeps naming itself. If a hello shows a better one, it writes that router into the DR field of its own hello.
- Better means the higher priority. On a tie, the higher RID. The BDR is chosen on the same criteria.
- Once every router agrees on the DR, they all become adjacent with it. Then the BDR is elected, with the same logic, except that the DR doesn't put its own RID in the BDR field.
When does it happen? In the last phase of the 2-Way state, just before ExStart. And not instantly: when the hellos don't name a DR or BDR yet, OSPF starts a wait timer, which defaults to the dead interval, and only when it expires does a router take part in the election. The timer starts when OSPF starts on the interface, so a router alone on a segment still elects itself DR, after the wait. A point-to-point link has no DR at all.
Here's the LAN this page works on. Every router came up together:

One segment, four routers, all at the default priority 1 and all starting together. The terminals on this page come from these four; outputs from other networks are quoted and say so.
Everyone started together at priority 1, so the higher RID decides: R4 (4.4.4.4) is DR, R3 BDR, and R1 and R2 are DROTHERs. You'll read that from the outputs in a moment. Now the same four routers with a different start: R4 is switched off while the other three come up, and when it does arrive it carries priority 100, the best on the segment.

Step 1 of 4 Round 1: three routers start together. All at priority 1, so the higher router ID decides: R3 (3.3.3.3) is DR and R2 (2.2.2.2) is BDR. R1 is a DROTHER.

Step 2 of 4 Round 2: R4 joins, priority 100. R4's first hello from a neighbor already names a DR and a BDR, so R4 takes them as they are. Priority 100 changes nothing: R4 is a DROTHER.

Step 3 of 4 Round 3: R3, the DR, fails. The BDR, R2, becomes DR at once. Then the BDR role is elected again, and now R4's priority counts: R4 is the BDR.

Step 4 of 4 Round 4: R2 fails too. Only now is R4 the DR. The best router on the segment needed two departures. R1 is the new BDR.
Here's why. A router that reaches 2-Way has already received a hello from its neighbor, and if that hello names a DR or BDR other than 0.0.0.0, the newcomer takes them as the real DR and BDR. The roles can't be pre-empted. Only a failure, or a process restart, of the DR or BDR starts an election, and only for the role that's missing. When the DR fails, the BDR takes over and an election fills the BDR role. A better candidate turning up never unseats anyone.
Reading the result
Each router tells you its own view, interface by interface. Here's R1, which came out a DROTHER on the LAN above:
R1# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 2.2.2.2 1 2WAY/DROTHER 00:00:35 10.123.0.2 GigabitEthernet0/0 ! two DROTHERs: 2-Way, by design 3.3.3.3 1 FULL/BDR 00:00:35 10.123.0.3 GigabitEthernet0/0 4.4.4.4 1 FULL/DR 00:00:35 10.123.0.4 GigabitEthernet0/0 ! adjacent with the DR R1#
R1# show ip ospf interface GigabitEthernet0/0
GigabitEthernet0/0 is up, line protocol is up
Internet Address 10.123.0.1/24, Area 0, Attached via Network Statement
Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Transmit Delay is 1 sec, State DROTHER, Priority 1
! this router's role, and the priority it offered
Designated Router (ID) 4.4.4.4, Interface address 10.123.0.4
! who it believes is the DR
Backup Designated router (ID) 3.3.3.3, Interface address 10.123.0.3
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Neighbor Count is 3, Adjacent neighbor count is 2
! three neighbors; adjacent with two
Adjacent with neighbor 3.3.3.3 (Backup Designated Router)
Adjacent with neighbor 4.4.4.4 (Designated Router)
Suppress hello for 0 neighbor(s)
R1#Read it top to bottom:
- Network Type BROADCAST: the promise this interface makes (more below).
- State DROTHER, Priority 1: this router's role on the segment, and the priority it offered.
- Designated Router (ID) 4.4.4.4, Interface address 10.123.0.4: who it believes is the DR, by RID and by address.
- Timer intervals … Wait 40: the wait timer, next to the hello and dead timers.
- Neighbor Count is 3, Adjacent neighbor count is 2, with the two it's adjacent with listed underneath. The adjacent count is how many routers have become adjacent on the segment; the neighbor count is how many other OSPF routers are on it. On a DROTHER, the gap between the two numbers is its 2-WAY neighbors.
R1# show ip ospf interface brief Interface PID Area IP Address/Mask Cost State Nbrs F/C Gi0/0 1 0 10.123.0.1/24 1 DROTH 2/3 ! Nbrs F/C 2/3: two full, three in all R1#
R4# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 1.1.1.1 1 FULL/DROTHER 00:00:35 10.123.0.1 GigabitEthernet0/0 2.2.2.2 1 FULL/DROTHER 00:00:35 10.123.0.2 GigabitEthernet0/0 3.3.3.3 1 FULL/BDR 00:00:35 10.123.0.3 GigabitEthernet0/0 ! the DR is full with everyone R4#
show ip ospf neighbor gives each neighbor's priority, and after the slash its role: FULL/DR, FULL/BDR, FULL/DROTHER. The DR, R4, is FULL with everyone. Each output is one router's opinion, though. On this LAN every router can reach the DR, and the four opinions agree. On the hub-and-spoke at the end of this page they won't.
Steering it, and what that costs
You want the core router, not the oldest one, holding the DR role. What do you change? Not the router ID: changing an RID to place the DR is bad design. Raise the interface priority above the existing DR's instead. Anything above the default of 1 raises that interface's chance of becoming the DR: it now outranks every interface left at 1.
- The command:
ip ospf priority <0-255>on the interface. - Priority 0 removes the interface from the DR/BDR election immediately. It's how you tell a router never to take either role, and it's the one change that doesn't wait: raising someone else's priority does.
- And the cost: OSPF doesn't preempt, so after raising a priority it might be necessary to restart the OSPF process on the current DR or BDR for the change to take effect. That's
clear ip ospf process.
Here's the same LAN with R1 at priority 100 and R4 at priority 0, all starting together. R2's view:
R2# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 1.1.1.1 100 FULL/DR 00:00:35 10.123.0.1 GigabitEthernet0/0 ! priority 100 wins 3.3.3.3 1 FULL/BDR 00:00:35 10.123.0.3 GigabitEthernet0/0 4.4.4.4 0 2WAY/DROTHER 00:00:35 10.123.0.4 GigabitEthernet0/0 ! priority 0: never DR or BDR R2#
Which router do you restart, if the roles were already taken? A is DR, B is BDR, and you've just raised P's priority above both. Restart A: B becomes DR and P wins the BDR election. Restart B next: P, now the BDR, becomes DR. Two restarts, and each one drops every adjacency that router's OSPF process holds, on every interface, until they re-form. That's why "the DR isn't the router I'd have picked" is often a thing to leave alone until a maintenance window.
The network type: a promise each interface makes
Same Ethernet link, two routers. On Monday they elect a DR and one shows the other as FULL/BDR. On Tuesday the line reads FULL/ - and there's no election at all. Nobody touched the cable. What changed?
The network type, changed by one interface command on each end. Different media have different characteristics, and some limit how many nodes a segment can hold. Frame Relay and Ethernet support more than two nodes on a segment, so they need a DR; on a serial link a DR would just waste CPU cycles. OSPF sets a default network type from the media, and you can change it independently of the medium actually underneath. The router then behaves according to the type, not the cable. Cisco's implementation has five types, plus a nonbroadcast form of point-to-multipoint:
| Type | Default on | DR/BDR fields in the hello | Neighbors | Hello / Dead |
|---|---|---|---|---|
| Broadcast | Ethernet; LAN interfaces | yes, elected automatically | discovered automatically | 10 / 40 |
| Nonbroadcast (NBMA) | Frame Relay main interfaces and multipoint subinterfaces | yes; on a hub-and-spoke the DR must be set by hand on the hub | statically configured | 30 / 120 |
| Point-to-point | Frame Relay point-to-point subinterfaces; point-to-point serial too | none | discovered automatically | 10 / 40 |
| Point-to-multipoint | not a default anywhere; best for hub-and-spoke | none | discovered automatically | 30 / 120 |
| Point-to-multipoint nonbroadcast | not a default; hub-and-spoke where broadcast and multicast don't work | none | statically configured | 30 / 120 |
| Loopback | loopback interfaces | n/a | n/a | n/a |
Read the table by column, because each column is a separate promise. "Is there a DR?" decides elections and 2-WAY. "Are neighbors discovered?" decides whether hellos go out by multicast or to addresses you list. And the timers decide whether two ends accept each other's hellos at all. show ip ospf interface <intf> shows the network type and the timers; compare it across the two ends. Two of the LAN's interfaces, retyped only to read what each type prints (you wouldn't run a four-router segment as point-to-point):
R1# show ip ospf interface GigabitEthernet0/0 | include Type|Timer Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 1 ! point-to-point: 10/40, no DR Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 R1#
The timer line still prints a Wait value on the point-to-point interface. It's configured, but with no election there's nothing for it to time.
R2# show ip ospf interface GigabitEthernet0/0 | include Type|Timer Process ID 1, Router ID 2.2.2.2, Network Type NON_BROADCAST, Cost: 1 Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5 ! nonbroadcast: 30/120 R2#
Broadcast
The full name is broadcast multi-access, to keep it apart from NBMA: more than two devices can connect, and a broadcast sent out one interface reaches every interface on the segment. It's the default on Ethernet, and it needs a DR because several routers may share the segment and their flooding has to be controlled. The hello is 10 seconds, as RFC 2328 defines it. ip ospf network broadcast overrides whatever was set automatically and makes an interface broadcast.
Point-to-point
A link that can only ever hold two devices. Because of the medium it doesn't use ARP, and broadcasts aren't the limiting factor. OSPF makes serial interfaces with HDLC or PPP, GRE tunnels and point-to-point Frame Relay subinterfaces point-to-point by default. Only two nodes can exist, so OSPF doesn't spend CPU on a DR, and the hello is 10 seconds. A serial pair needs no special commands at all, and on another network its neighbor reads like this:

A serial pair: only two routers can ever be on it, so there's nothing to elect.
R1# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 192.168.2.2 0 FULL/ - 00:00:36 10.12.1.2 Serial0/1
No role after the slash, because there's no DR on this link; the Pri column reads 0 here. A point-to-point interface forms its adjacency quickly, because the DR election is skipped and there's no wait timer. So an Ethernet link with only two OSPF speakers on it can be changed to point-to-point, to form the adjacency faster and simplify the SPF calculation. The command is ip ospf network point-to-point on the interface. Change both ends: a broadcast end facing a point-to-point end is one of the pairs further down.
Continue the lesson
The whole lesson, with its drawings and its questions. The rest of this section and 3 more after it.







