OSPF DR/BDR Election explained

Hi Dani,

The OSPF DR/BDR election is non-preemptive so once a router has been elected as DR/BDR then it will keep this role until you reset OSPF. Because of this, it’s possible that another router got elected as DR or BDR.

Rene

Hi Ashok,

On a point-to-point network you know that there’s only one device on the other end. With multi-access networks, there can be 0, 1 or multiple OSPF routers…we don’t know. We could send our traffic as a broadcast so everyone receives it but that’s very inefficient.

Using multicast for this works well, everyone that listens to the multicast address (routers running OSPF) will receive it.

224.0.0.5 is the “all OSPF routers” address and they decided to use 224.0.0.6 to send information to the DR/BDR.

Rene

Thank You Rene for clarification.

Hey Rene,

Great explanation on OSPF DR/BDR selection. One question I have is, if you modify the priority on the interface of 1 router of a 3 route multi-access segment, do you need to reload the OSPF process on each router for the DR/BDR to change? Thanks

Ryan

Hi Ryan,

The DR/BDR is non-preemptive so once the roles have been elected, it will stay like that. You will have to reset the OSPF process to force a new election yes.

Rene

I really like your lessons, one thing that confuses me is how you name routers with actual names, its hard to keep track and get confusing. Guess I am a R1/R2/R3 guy :slight_smile:
Other than that, I enjoy your lessons !!

Hi Veeral,

I agree, some of the older lessons still have names while all the newer material uses R1/R2/R2, SW1/SW2/SW3, ASA1/ASA2, etc. Much easier :slight_smile:

Rene

PS - I might rename some of the older lessons when I have some spare time.

Does a DR and/or BDR have to be directly connected to every router in its area? If I have 20 routers in a single area. One of the 20 will be the DR. Another will be BDR and the rest will be DROTHER (18). Do those DROTHERs have to be directly connected to the DR and BDR? … and following along those lines… does a FULL MESH have to exist in a single OSPF area… can’t it be a partial mesh?

If your answers is no - all DROTHERs do not have to be directly connected to the DR/BDR -than do type 2 LSAs travel through DROTHERS to go between DR and DROTHER? In other words. If R1 is DR. Can R1 send type 2 LSA through R2, R3, R4 to get to R5?

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 a multi-access network media, such as Ethernet. In this case OSPF requires that all routers on the same network segment have direct reachability both to the DR and BDR, otherwise the network will break. While reachability to the DR and BDR is required, reachability between DROthers is not.

An OSPF Area might have zero, one, or more than one DR–it all comes down to what type of networks there are and how many in your Area. Below is the output on a router that connects together two different Ethernet segments, all in the same Area:

Neighbor ID     Pri   State           Dead Time   Address         Interface
0.0.0.2           1   FULL/DROTHER    00:00:35    10.1.1.2        FastEthernet0/1
1.1.1.1           1   FULL/DR         00:00:34    10.1.1.1        FastEthernet0/1
0.0.0.1           1   FULL/BDR        00:00:35    10.0.0.1        FastEthernet0/0
0.0.0.2           1   FULL/DR         00:00:39    10.0.0.2        FastEthernet0/0

See how there are multiple DRs? Each Ethernet segment would have its own DR and BDR election. Therefore, there is no need to pass Type 2 LSAs through another router. In fact, that couldn’t happen anyway, because the multicast addresses, both 224.0.0.5 (all routers) and 224.0.0.6 (all DR/BDR) have a “link-local” scope, where their TTL is set to 1, so the packet would be discarded beyond the local segment. I have attached a Wireshark capture as an example.

1 Like

This whole time… I thought the requirement was one DR/BDR per Area. Thanks

I think it would be a good idea to specify clearly the algorithm in the beginning (higher priority is better, if priority is a tie, highest RID wins).

1 Like

Hi Rene, I have a question, It’s correct to say that the elections occur by broadcast domains? Because, I understand that when you have more than two routers connected by a switch, and the switch is a layer 2 device, you have only one broadcast domain with one DR and one BDR, and when you have a router that divides a network in two broadcast domains, each broadcast domain will have your own DR and BDR.

Hi Fabio,

It’s best to let this go as the DR/BDR election doesn’t have a direct relation with broadcast domains. To give you a quick example, on a frame-relay hub and spoke topology we can also have a DR/BDR election (depending on which OSPF network type you use). Frame-relay is NBMA (non broadcast) though.

The DR/BDR election is done for EACH multi-access segment. That could be 2-3 routers connected to the same switch and in the same VLAN or 3 routers in a hub/spoke topology in frame-relay.

Rene

Hi Fabio,

It’s best to let this go as the DR/BDR election doesn’t have a direct relation with broadcast domains. To give you a quick example, on a frame-relay hub and spoke topology we can also have a DR/BDR election (depending on which OSPF network type you use). Frame-relay is NBMA (non broadcast) though.

The DR/BDR election is done for EACH multi-access segment. That could be 2-3 routers connected to the same switch and in the same VLAN or 3 routers in a hub/spoke topology in frame-relay.

Rene

Hi Fabio,

It’s best to let this go as the DR/BDR election doesn’t have a direct relation with broadcast domains. To give you a quick example, on a frame-relay hub and spoke topology we can also have a DR/BDR election (depending on which OSPF network type you use). Frame-relay is NBMA (non broadcast) though.

The DR/BDR election is done for EACH multi-access segment. That could be 2-3 routers connected to the same switch and in the same VLAN or 3 routers in a hub/spoke topology in frame-relay.

Rene

Hi

I am new to this site and lessons here, sorry to ask if it had been answered.
when all routers have same priority numbers, how DR / BDR get elected and based on what qualification?

Thank you

Hoan,
DR/BDR is chosen by the following criteria

  1. Highest OSPF Priority (0-255, 0 is exclusion from election, 1 is default)
  2. Highest Router ID
  3. Highest Loopback Address
  4. Highest IP Address (must be up/up)
    In most cases, there is no DR/BDR preemption - if a better DR/BDR candidate comes online after an election, it will not take over the role without clearing the ospf process.
1 Like

19 posts were merged into an existing topic: OSPF DR/BDR Election explained

Dear Rene,

Amazing , Mind Blowing …

DR/BDR election will happen on Broadcast Multi-access Network to reduce the OSPF trrafic , right ?? One more clarification , It only reduce the Hello Packect, Not any LSA ??

br/
zaman

Hi Mohammad,

The main idea of DR election in a Broadcast network is to have all OSPF routers to send their updates to a single OSPF router (which is the DR) who in turn will forward it to all the other OSPF routers.
All OSPF routers will know about all the routing information from the DR which lead to have far less OSPF traffic.

In the Broadcast network, all OSPF routers will only form a “full” neighbor adjacency with the DR and not with all the other routers and the hello packet is always sent between the DR and the neighbor routers. So selecting a DR has nothing to do with reducing the hello Packet between the DR and other Routers.

I advise you to read this lesson for more information: Introduction to OSPF