OSPF DR/BDR Election explained

OSPF uses a DR (Designated Router) and BDR (Backup Designated Router) on each multi-access network.

OSPF uses a DR (Designated Router) and BDR (Backup Designated Router) on each multi-access network. Most CCNA students think that this DR/BDR election is done per area but this is incorrect. I'll show you how the election is done and how you can influence it. This is the topology we'll use: Here’s a



Most CCNA students think that this DR/BDR election is done per area but this is incorrect. I’ll show you how the election is done and how you can influence it. This is the topology we’ll use:

ospf 3 routers multi access

Here’s an example of a network with 3 OSPF routers on a FastEthernet network. They are connected to the same switch (multi-access network) so there will be a DR/BDR election. OSPF has been configure so all routers have become OSPF neighbors, let’s take a look:

R1#show ip ospf neighbor 

Neighbor ID     Pri   State       Dead Time   Address       Interface
192.168.123.2   1   FULL/BDR      00:00:32    192.168.123.2 FastEthernet0/0
192.168.123.3   1   FULL/DR       00:00:31    192.168.123.3 FastEthernet0/0

From R1 perspective, R2 is the BDR and R3 is the DR.

R3#show ip ospf neighbor 

Neighbor ID     Pri   State       Dead Time   Address         Interface
192.168.123.1   1   FULL/DROTHER  00:00:36    192.168.123.1 FastEthernet0/0
192.168.123.2   1   FULL/BDR      00:00:39    192.168.123.2 FastEthernet0/0

When a router is not the DR or BDR it’s called a DROTHER. I have no idea if we have to pronounce it like “BROTHER with a D” or “DR-OTHER” 🙂 Here we can see that R1 is a DROTHER.

R2#show ip ospf neighbor 

Neighbor ID     Pri   State       Dead Time   Address         Interface
192.168.123.1   1   FULL/DROTHER  00:00:31    192.168.123.1 FastEthernet0/0
192.168.123.3   1   FULL/DR       00:00:32    192.168.123.3 FastEthernet0/0

And R2 (the BDR) sees the DR and DROTHER.

Of course we can change which router becomes the DR/BDR by playing with the priority. Let’s turn R1 in the DR:

R1(config)#interface fastEthernet 0/0
R1(config-if)#ip ospf priority 200

You change the priority if you like by using the ip ospf priority command:

  • The default priority is 1.
  • A priority of 0 means you will never be elected as DR or BDR.
  • You need to use clear ip ospf process before this change takes effect.
R1#show ip ospf neighbor 

Neighbor ID     Pri   State       Dead Time   Address         Interface
192.168.123.2   1   FULL/BDR      00:00:31    192.168.123.2 FastEthernet0/0
192.168.123.3   1   FULL/DR       00:00:32    192.168.123.3 FastEthernet0/0

As you can see R3 is still the DR, we need to reset the OSPF neighbor adjacencies so that we’ll elect the new DR and BDR.

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

I’ll reset all the OPSF neighbor adjacencies.

R1#show ip ospf neighbor 

Neighbor ID     Pri   State       Dead Time   Address         Interface
192.168.123.2   1   FULL/DROTHER  00:00:36    192.168.123.2 FastEthernet0/0
192.168.123.3   1   FULL/BDR      00:00:30    192.168.123.3 FastEthernet0/0

Now you can see R1 is the DR because the other routers are DROTHER and BDR.

R3#show ip ospf neighbor
Neighbor ID     Pri  State        Dead Time   Address         Interface
192.168.123.1   200  FULL/DR      00:00:30    192.168.123.1 FastEthernet0/0
192.168.123.2   1    FULL/DROTHER 00:00:31    192.168.123.2 FastEthernet0/0

Or we can confirm it from R3, you’ll see that R1 is the DR and that the priority is 200.

Configurations

Want to take a look for yourself? Here you will find the configuration of each device.

R1

hostname R1
!
ip cef
!
interface FastEthernet0/0
 ip address 192.168.123.1 255.255.255.0
 ip ospf priority 200
!
router ospf 1
 network 192.168.123.0 0.0.0.255 area 0
!
end

R2

hostname R2
!
ip cef
!
interface FastEthernet0/0
 ip address 192.168.123.2 255.255.255.0
!
router ospf 1
 network 192.168.123.0 0.0.0.255 area 0
!
end

R3

hostname R3
!
ip cef
!
interface FastEthernet0/0
 ip address 192.168.123.3 255.255.255.0
!
router ospf 1
 network 192.168.123.0 0.0.0.255 area 0
!
end


Something you need to be aware of is that the DR/BDR election is per multi-access segment…not per area!). Let me give you an example:

Ospf R1 R2 R3 Two Broadcast Domains

In the example above we have 2 multi-access segments. Between R2 and R1, and between R2 and R3. For each segment, there will be a DR/BDR election.

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You've Ever Spent on Your Cisco Career!
  • Full Access to our 655 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

535 Sign Ups in the last 30 days

satisfaction-guaranteed
100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!

Tags: ,


Forum Replies

  1. Jason,
    DRs and BDRs are not necessarily one-to-one with Areas. I think this is the key point to answer your question. DRs and BDRs are the result of the OSPF network type defined on a Router’s interface, not because of some requirement of an Area to have them. OSPF recognizes the following network types:

    • Broadcast
    • Non-Broadcast
    • Point to Multipoint (Broadcast)
    • Point to Multipoint (Non-Broadcast)
    • Point to Point

    Out of all of those possibilities, only Broadcast and Non-Broadcast form DRs and BDRs. The Broadcast and Non-Broadcast network types describe

    ... Continue reading in our forum

  2. Hi,

    I have a question, In the process of election DR/ BDR, who will elect first? DR or BDR ?
    I have only one router in my setup. I configured OSPF on that router and I started debug message. After the end of wait period ( dead interval 40 sec), router considers himself as BDR and then moved to DR .
    please explain me, in the election process, will BDR is elected first or DR ?

    Below is the debug message:

     R1#
        *Mar  1 00:01:12.207: %SYS-5-CONFIG_I: Configured from console by console
        R1#
        *Mar  1 00:01:18.215: OSPF: Send hello to 224.0.0.5 area 0 on Fas
    ... Continue reading in our forum

  3. Azeem,
    The BDR is elected first (see step #7 below). Here is a break down of what happens during the election:

    1. Once an OSPF becomes active on a multi-access network, it sets the DR and BDR values to 0.0.0.0 which indicates these are unknown. It also starts a wait timer of the value of the dead interval.
    2. The router starts neighbor discovery. It sends the 0.0.0.0 values for DR/BDR
    3. If a received Hello includes values for DR/BDR, these are accepted and the wait timer is stopped
    4. If the wait timer expires, the DR election starts
    5. A list of neighbors on the multiac
    ... Continue reading in our forum

  4. Hi Rene,

    Thanks for sharing your knowledge. Your teaching gives us a great confidence.

    I have a doubt. Among DR and BDR, who is elected first ?

    Regards,
    David

  5. David,

    The BDR is elected first (see step 7 below). Here is a detailed list of what happens in the DR/BDR election:

    1. Once an OSPF becomes active on a multi-access network, it sets the DR and BDR values to 0.0.0.0 which indicates these are unknown. It also starts a wait timer of the value of the dead interval.
    2. The router starts neighbor discovery. It sends the 0.0.0.0 values for DR/BDR
    3. If a received Hello includes values for DR/BDR, these are accepted and the wait timer is stopped
    4. If the wait timer expires, the DR election starts
    5. A list of neighbors on the mu
    ... Continue reading in our forum

98 more replies! Ask a question or join the discussion by visiting our Community Forum