Routelearn.net
Course menu

Course 9: OSPFLesson 1.2 (2 of 4 in this course)63 of 91 in the CCNA series

DR/BDR election and network types

Why broadcast networks elect a designated router, how the election works, and point-to-point links that skip it.

Intermediate · 11 min read

DR (Designated Router) and BDR (Backup Designated Router) are the roles OSPF elects on a multi-access segment such as Ethernet. Every other router forms a full adjacency only with the DR and BDR and exchanges link-state information through them; the election is decided by interface priority and then by highest router ID.

In simple terms: Instead of every router on a LAN swapping maps with every other router, they all talk to one chosen router. A second router stands by to take over if the first one fails.

A real-life situation

Four routers connect to the same core switch on one VLAN, subnet 10.0.0.0/24. If every router became fully adjacent with every other router, you would have 6 adjacencies. With 10 routers it would be 45, and every change would be flooded to every router by every router. OSPF avoids that on shared Ethernet segments by electing a designated router. Then you notice something odd: two of the routers stay in the 2WAY state with each other forever. That is not a fault. This lesson explains why.

You should already know how neighbours form, covered in OSPF neighbours and adjacencies.

Gi0/0 .1Gi0/0 .2Gi0/0 .3Gi0/0 .4SW110.0.0.0/24R1RID 1.1.1.1R2RID 2.2.2.2R3RID 3.3.3.3R4RID 4.4.4.4
  1. 1. Everyone hears everyone. A hello to 224.0.0.5 reaches all three other routers, so each router has three neighbours on this segment.
  2. 2. R3 (a DROther) reports a change only to the DR and BDR. 224.0.0.6 is the all-DR-routers address. Only R1 (DR) and R2 (BDR) listen to it.
  3. 3. R1 (the DR) floods it to everyone. The DR resends the update to all OSPF routers. R4 learns about R3's change from R1, not from R3.

What the DR and BDR are

On a multi-access segment (one subnet where more than two routers can connect, like an Ethernet VLAN), OSPF elects:

  • a DR (designated router): the central point that every router synchronises its database with,
  • a BDR (backup designated router): ready to take over immediately if the DR fails,
  • everyone else is a DROther.

DROthers become Full only with the DR and the BDR. Between two DROthers the relationship stops at 2-Way: they are neighbours (they see each other's hellos) but they do not swap databases directly.

Routers on the segmentFull adjacencies without a DR (n × (n − 1) ÷ 2)Full adjacencies with a DR and BDR
465
104517
2019037

With a DR and BDR, each of the other routers has two adjacencies, plus one between the DR and BDR themselves: 2 × (n − 2) + 1.

Why it works this way

The saving is not just the number of adjacencies. It is the flooding. Without a DR, a change seen by one router would be sent to every neighbour, each of which would acknowledge it and send it on to the others: many copies of the same update on one wire. With a DR there is one path in (to the DR and BDR) and one path out (from the DR to everyone).

The DR also describes the segment itself in the LSDB. It creates a network LSA (type 2) that lists every router on the subnet. Other routers then only need to say "I'm connected to this segment" instead of listing every other router on it.

The BDR exists so a failure does not start from zero. It is already Full with every router and listens to the same 224.0.0.6 updates, so when the DR dies it simply takes over.

How the election works

The election happens per segment, once the routers reach 2-Way. When an interface first comes up, the router waits for a wait timer (equal to the dead interval, 40 seconds by default) to hear whether a DR already exists, then:

Ignore priority 0
Routers with OSPF priority 0 on this interface can never be DR or BDR.
Highest priority wins
Interface priority 0–255, default 1. Set with ip ospf priority.
Tie → highest router ID
With equal priorities (the default), the highest router ID wins.
BDR first, then DR
The best router becomes BDR, then is promoted to DR if there is no DR; the next best becomes BDR.
No pre-emption
A better router that joins later does not take over. The roles stay until the DR or BDR fails.
DR/BDR election on one multi-access segment.

No pre-emption is the part people forget. In practice the router whose OSPF process starts first often becomes DR, regardless of priority, simply because nobody else was there. If the DR fails, the BDR is promoted to DR and a new BDR is elected. The old DR, when it comes back, becomes a DROther.

How the router ID is chosen

The router ID breaks priority ties and names the router in every LSA, so it is worth controlling. When the OSPF process starts, IOS picks it in this order:

  1. the router-id command under router ospf,
  2. otherwise the highest IPv4 address on a loopback interface that is up,
  3. otherwise the highest IPv4 address on any other interface that is up.

The interface does not need to be running OSPF to be used. Once chosen, the router ID does not change by itself, even if you add a higher address or configure router-id. The new value is used only after the process restarts with clear ip ospf process or a reload. A loopback interface (a virtual interface that never goes down) is a common, stable source if you don't set it by hand.

OSPF network types

Whether a DR is elected depends on the interface's OSPF network type, which IOS chooses from the kind of interface:

Network typeDefault onDR/BDR?Hello / dead
BroadcastEthernetYes10 / 40 s
Point-to-pointSerial links with HDLC or PPP, tunnelsNo10 / 40 s
Non-broadcast (NBMA)Old Frame Relay style linksYes30 / 120 s
Point-to-multipointOnly when configuredNo30 / 120 s

The CCNA focuses on the first two. Here is the practical point: a link between two routers, like R1–R2 on 10.0.12.0/30 in the lab, is Ethernet, so it defaults to broadcast. OSPF runs a DR election on a link that can only ever hold two routers. Setting it to point-to-point skips the election and the 40-second wait, so the adjacency forms faster, and no type 2 LSA is needed for the link. That is why many networks configure ip ospf network point-to-point on router-to-router Ethernet links.

How to configure it on Cisco IOS

Goal on the shared segment: R1 should be DR and R2 the BDR, no matter which router boots first. R3 and R4 should never take either role.

! R1 interface GigabitEthernet0/0 ip ospf priority 100 ! R2 interface GigabitEthernet0/0 ip ospf priority 50 ! R3 and R4 interface GigabitEthernet0/0 ip ospf priority 0

Priority is set per interface, so it only affects the election on that segment. Priority 0 takes R3 and R4 out of the election completely.

router ospf 1 router-id 1.1.1.1

Set the router ID by hand on every router (2.2.2.2, 3.3.3.3, 4.4.4.4 on the others). If OSPF was already running, IOS warns that the new ID takes effect after a reload or clear ip ospf process.

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

Restarts OSPF: every neighbour on the router drops and re-forms, so routes disappear briefly. Use it in a maintenance window. Because the election is not pre-emptive, new priorities may need this on the current DR and BDR before they take effect.

On the point-to-point lab link between R1 and R2:

! R1 interface GigabitEthernet0/1 ip ospf network point-to-point ! R2 interface GigabitEthernet0/0 ip ospf network point-to-point

Configure both ends the same way. A mismatch (broadcast on one side, point-to-point on the other) causes routing problems.

How to verify it

Example output · based on Cisco documentation; exact format varies by platform and software version
R3#show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1         100   FULL/DR         00:00:36    10.0.0.1        GigabitEthernet0/0
2.2.2.2          50   FULL/BDR        00:00:33    10.0.0.2        GigabitEthernet0/0
4.4.4.4           0   2WAY/DROTHER    00:00:38    10.0.0.4        GigabitEthernet0/0
R3 is Full with the DR and BDR and only 2-Way with R4, the other DROther. That is correct. The Pri column shows each neighbour's priority, and the role after the slash is the neighbour's role, not R3's.
Example output · based on Cisco documentation; exact format varies by platform and software version
R1#show ip ospf interface brief
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Gi0/0        1     0               10.0.0.1/24        1     DR    3/3
State is this router's own role on the segment. Nbrs F/C means Full / Count: R1 is Full with all 3 neighbours. On R3 the same line would show DROTH and 2/3.
Example output · based on Cisco documentation; exact format varies by platform and software version
R1#show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           0   FULL/  -        00:00:37    10.0.12.2       GigabitEthernet0/1
Back in the lab, after setting the R1–R2 link to point-to-point: the role shows as - because there is no DR on this link (this line would appear alongside R1's neighbours on other interfaces).
show ip ospf | include ID

Shows the router ID in use, for example: Routing Process "ospf 1" with ID 1.1.1.1

What goes wrong and how to troubleshoot it

  • The "wrong" router is DR. Check the priorities with show ip ospf interface, then remember the election is not pre-emptive. Restart OSPF on the current DR (and BDR) in a maintenance window.
  • No DR at all on a segment. If every router has priority 0, nobody can be DR, and the neighbours stay at 2-Way: no routes are exchanged on that segment.
  • Network type mismatch. Broadcast on one end and point-to-point on the other. The timers still match (10/40), so the routers can reach Full, but they describe the link differently in their LSAs and routes over it may be missing. Check show ip ospf interface on both ends for Network Type.
  • Router ID did not change. You configured router-id but show ip ospf still shows the old one: the process has not been restarted.
  • Duplicate router ID. Often caused by copying a configuration template. The router logs a duplicate router ID message and adjacencies fail.

Common mistakes

  • Thinking the router with the highest priority always becomes DR. Only at election time; there is no pre-emption.
  • Thinking the highest IP address on the segment decides the tie. It is the highest router ID.
  • Reading 2WAY/DROTHER as a broken neighbour.
  • Setting the priority in router configuration mode. It is an interface command: ip ospf priority.
  • Expecting a DR on a serial point-to-point link, or forgetting that Ethernet links default to broadcast.

💡 Exam tip: expect a show ip ospf neighbor output and a question about which router is DR or BDR, or about what happens after a priority change (nothing until the next election). Know the tiebreakers (priority, then router ID), that priority 0 means "never DR", the router ID selection order (manual, loopback, physical), 224.0.0.5 vs 224.0.0.6, and that point-to-point links have no DR. Also know ip ospf network point-to-point.

Key takeaways

✅ Key takeaways
  • On broadcast (Ethernet) segments OSPF elects a DR and BDR to cut down adjacencies and flooding.
  • DROthers are Full with the DR and BDR and 2-Way with each other.
  • Highest interface priority wins (default 1, 0 = never); ties go to the highest router ID. No pre-emption.
  • Router ID: router-id command, else highest up loopback, else highest up interface. Changes need a process restart.
  • Point-to-point networks have no DR; set router-to-router Ethernet links to point-to-point on both ends.

Check yourself

Predict · scenario 1

All four routers on a segment use the default priority. Their router IDs are 1.1.1.1, 2.2.2.2, 3.3.3.3 and 4.4.4.4, and they all start at the same moment. Which becomes DR?

Predict · scenario 2

R1 is the DR. You set R4's interface priority to 255. What happens right away?

Predict · scenario 3

On a DROther, show ip ospf neighbor lists another DROther in 2WAY/DROTHER. What should you do?

Predict · scenario 4

A router has loopback 10.255.255.1, Gi0/0 192.168.1.1 and Gi0/1 172.16.0.1, all up, and no router-id command. What is its OSPF router ID?

Predict · scenario 5

Two routers are connected by a serial link using PPP. How many DRs are elected on that link?

FAQ

Is the DR elected per router or per link?
Per link (per multi-access segment). A router can be the DR on one Ethernet segment, a DROther on another, and have no DR role at all on its point-to-point links.
Why didn't my router become DR after I raised its priority?
The election is not pre-emptive. An existing DR keeps its role until it fails or its OSPF process restarts. Raising the priority only matters at the next election, so you have to wait for one or force one with clear ip ospf process on the current DR and BDR.
Does the DR forward all the traffic on the LAN?
No. The DR only coordinates the exchange of routing information (LSAs) on the segment. User traffic is forwarded by whichever router the routing table says is the best next hop.
What does priority 0 do?
A router with OSPF priority 0 on an interface can never become the DR or BDR on that segment. It still forms Full adjacencies with the DR and BDR and still routes normally.