OSPF DR and BDR election rules

22

On broadcast and NBMA networks, the DR and BDR selected by OSPF are electoral, lifelong, and hereditary.
Electoral DR and BDR are not designated manually. Instead, they are elected by all the routers on a network segment.
When the DR and BDR are elected on a network segment and are lifelong, each router newly added to the network segment does not replace the existing the DR or BDR even if the router has a higher priority.
If the DR and BDR are hereditary, the BDR replaces the DR when the DR is faulty and other routers compete to be the BDR.
The process of DR/BDR election on a broadcast or an NMBA link is as follows:

1. After interfaces on a device are Up, the device sends Hello packets and enters the Waiting state. The waiting timer value is the same as that of the dead timer. The default value is 40s and cannot be modified.

2. Before the waiting timer is triggered, the Hello packets sent by the device do not contain the DR and BDR fields. After the device enters the Waiting state, if it sends Hello packets containing the DR and BDR fields, it acknowledges the DR and BDR existing on the network and does not trigger an election. The device changes its state from Waiting and starts synchronization with a neighbor.

3. If the DR and BDR already exist on the network, an added device acknowledges the DR and BDR. In such a case, DR/BDR election is not performed even if this device has a largest router ID or top DR priority.

4. When the DR is Down due to faults, the BDR replaces the DR and another device of a priority higher than 0 becomes the new BDR.

5. DR election is performed only when devices with different router IDs or DR priorities start simultaneously. The election rules are as follows: The device with the highest priority functions as the DR, and the device with the second highest priority functions as the BDR. A device with the priority of 0 can only function as the DR Other. If all devices have the same priority, the device with the largest router ID functions as the DR, the device with the second largest router ID functions as the BDR, and the others as DR Others.
For more information about OSPF DR election and BDR election, click 问鼎OSPF(2) .

Other related questions:
What are DR, BDR, DR other and election rules
DR means designated router. BDR means backup designated router. DR Other indicates a device that is neither a DR or a BDR. The DR advertises link-state advertisements (LSAs) to all the devices in the network. The DR election rules are as follows: When going Up, an interface sends Hello messages and enters the waiting state. In the waiting state, a waiting timer is triggered. The waiting timer duration is the same as the dead timer duration. By default, the waiting timer duration is 40 seconds, which cannot be changed. Before the waiting timer is triggered, sent Hello messages carry no DR or BDR field. In the waiting state, if a received Hello message carries the DR and BDR fields, the DR and BDR are accepted directly without any election triggered, and neighbor state synchronization starts, directly exiting the waiting state. Assume that a DR and a BDR exist on the network. Any device newly connected to the network will accept the DR and BDR that exist on the network regardless of the router ID of the device. If the DR fails and goes down, the BDR takes over the role of the DR and the remaining devices whose priority is greater than 0 compete to become the new BDR. DR election rules are used to elect a DR only when devices with different router IDs or configured with different DR priorities are started at the same time. The election rules are that the device with the highest DR priority is elected as DR and the device with the second highest DR priority as BDR. A device with a DR priority of 0 can be a DR Other only. In the case of the same priority, the device with the greatest router ID is elected as DR, the device the second greatest router ID becomes the BDR, and other devices are DR Others.

What is the default LACP system priority and election rule ?
LACP system priority is 32768, and the device with the smaller LACP system ID is used as the Actor.

What are the rules for selecting routes belonging to different OSPF processes
OSPF supports multi-processes. Multiple OSPF processes can run on the same router independently. Assume that a router is configured with two OSPF processes: process 1 and process 2. They are independent of each other. Therefore, both of the routes belonging to process 1 and process 2 are advertised to the routing management (RM) module. Route selection between the two processes complies with the following rules: 1. The RM module checks the protocol preference of process 1 and process 2. The route belonging to the process with higher protocol preference is selected as the optimal route. NOTE: To set the preference of an OSPF route in the specified process, run the preference [ ase ] { preference | route-policy route-policy-name } * command. The default preference of an OSPF route is 10. When an ASE is specified, the default value is 150. 2. When the protocol preferences of the two processes are the same, the RM module compare the cost of the two routes. The route with smaller cost value is selected as the optimal route. NOTE: When selecting the optimal route, the RM module first compares the protocol preference. The RM module compares the cost of routes only when the protocol preferences are the same.

OSPF forwarding address
For S series switches supporting OSPF, the functions and setting rules of the OSPF forwarding address are as follows: The forwarding address (FA) field in an OSPF Type 5 LSA, similar to that of RIPv2 or BGPv4, specifies information about the next hop so that devices in a routing area can forward data to the next-hop address outside the AS through the imported route described in the Type 5 LSA. This prevents a device on a broadcast network from sending data to itself as the next hop and then forwarding the data to a device in an external routing area on the same broadcast network. For a Type 5 LSA generated by the ASBR for external routes, the FA value can be 0.0.0.0 or non-0.0.0.0. FA setting rules are as follows: If OSPF is not enabled on the next-hop interfaces of the external routes imported by an ASBR, the FA is 0.0.0.0. If the FA of a Type 5 LSA is 0.0.0.0, the device that receives the LSA calculates the route using Adv Rtr (the ASBR address) as the next-hop address. If all of the following conditions are met, the FA is a non-0.0.0.0 address. The ASBR has a routable next-hop interface. The next-hop interface on the ASBR is not configured as a silent interface. The next-hop interface on the ASBR is not an OSPF P2P or P2MP interface. The IP address of the next-hop interface on the ASBR is within the OSPF network range. If any condition is not met, the FA is 0.0.0.0. After the ASBR fills a non-0.0.0.0 address in the FA field of a Type 5 LSA, the device that receives the LSA calculates the route using the non-0.0.0.0 address as the next-hop address. The FA of an NSSA LSA cannot be 0.0.0.0. If a loopback address is configured for an interface in the NSSA, the loopback address is automatically selected as the FA. If no loopback interface exists in the NSSA, the IP address of the first Up interface is selected as the FA. Before calculating a route using an LSA, OSPF checks whether there are intra-area or inter-area routes to the ASBR. If not, OSPF does not use the LSA in route calculation and no route can be calculated.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top