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
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
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.
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).
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
- Highest OSPF Priority (0-255, 0 is exclusion from election, 1 is default)
- Highest Router ID
The router ID in turn is chosen based on the following criteria
- Manually configured router ID
- Highest Loopback Address
- 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.
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
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 FastEthernet0/0 from 100.100.100.1
R1#
*Mar 1 00:01:28.215: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet0/0 from 100.100.100.1
R1#
*Mar 1 00:01:38.215: OSPF: end of Wait on interface FastEthernet0/0
*Mar 1 00:01:38.215: OSPF: DR/BDR election on FastEthernet0/0
*Mar 1 00:01:38.215: OSPF: Elect BDR 13.1.1.1
*Mar 1 00:01:38.215: OSPF: Elect DR 13.1.1.1
*Mar 1 00:01:38.215: OSPF: Elect BDR 0.0.0.0
*Mar 1 00:01:38.215: OSPF: Elect DR 13.1.1.1
*Mar 1 00:01:38.215: DR: 13.1.1.1 (Id) BDR: none
*Mar 1 00:01:38.215: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet0/0 from 100.100.100.1
R1#
*Mar 1 00:01:48.215: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet0/0 from 100.100.100.1
R1#
Azeem,
The BDR is elected first (see step #7 below). Here is a break down of what happens during the election:
- 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.
- The router starts neighbor discovery. It sends the 0.0.0.0 values for DR/BDR
- If a received Hello includes values for DR/BDR, these are accepted and the wait timer is stopped
- If the wait timer expires, the DR election starts
- A list of neighbors on the multiaccess network is established that are eligible for being DR/BDR (their priority is higher than zero)
- A subset of routers from this list is created. This subset excludes routers listing their own address as the DR (so routers claiming to be the DR are excluded)
- From this subset, select the router with the highest priority/RID/Loopback/Address to be the BDR
- From the original (not subset list), select the Router with the highest priority/RID/loopback/address to be the DR
- If there are no routers originally claiming to be the DR, then promote the chosen BDR to a DR, and elect another BDR via the same method