The OSPF DR & DBR Election

Posted on

As a CCNA / CCNP candidate you are expected to understand the purpose and function of the OSPF protocol. The CCNA / CCNP’s exam will ask of you to determine the purpose of the DR and BDR along with the election procedure.

OSPF Designated Router and Backup Designated Router elections

OSPF routing algorithm is CPU intensive. Each and every time the OSPF process runs the shortest path first algorithm it will have an impact on the router. In a point to point network OSPF events are limited to the periodic Hello packet (Default 10secs on a PPP, HDLC, 30sec Frame Relay NBMA), 30 mins for each route entry in the Link state database and triggered events.

In a Multi-access broadcast network where routers are connected to a common broadcast segment i.e many routers in one vlan) all routers would need to create an adjacency with all other routers in the same broadcast domain. Also event which causes an LSA to be generated would require the advertising router to create one LSA to be multicasted to all neighbours. The more routers there are in the broadcast multicast network the more adjacencies would be required. Two routers require the following number of adjacencies: 2(2-1) / 2 = 1

Four routers require the following number of adjacencies: 4(4-1)/2=6

Ten routers require the following number of adjacencies: 10(10-1)/2=45

Note: DR’s and BDR’s are not elected on point-to-point links because there can be only one adjacency and the point of electing the DR and BDR is for efficiency. The more routers you have on a segment will increase the number of adjacencies consume more bandwidth and use more processing power on the routers. We need to reduce the amount of work which each router has to do on the next by electing one router as a Designated Router which all other routers with form adjacencies with. When you use a Designated Router in your Multiaccess broadcast network the number of adjacencies is reduced along with the reduction in processing and bandwidth. All routers will form full adjacencies with the Designated router, when you run the command on a cisco router which is not the DR: R1#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface 1 FULL/DR 00:00:39 Ethernet0/0

You will see that your router has formed a “FULL” neighbour adjacency with the DR and the output also defines which neighbor is the DR. The router ID of the neighbour in the output above is and that this neighbour is the DR

Any events which occur are advertised to the DR using the Multicast address of

When the DR advertises any events to the Non-DR devices it is done using the address of

Designated and Backup Designated Router Election:

The DR is elected based on the router with the highest router priority. The default router priority is 1, the range is 0 to 255. Setting the router priority to 0 means the interface cannot participate in any DR or BDR election. If you set a current DR’s r current BDR’s router priority to 0 it will relinquish the role immediately. Routers which are not elected either as DR or BDR still form neighbor adjacencies, although they will not exchange any routing information between each other, only hellos are exchanged and these are sent to multicast address of

Despite the name “router priority” it is in fact a priority which s set on an interface level as follows:

R1(conf)#interface fastethernet 0/0 R1(conf-if)#ip ospf priority 1

In the event that two or more interfaces sharing a common broadcast domain have the same router priority the OSPF router ID is used as a tie-breaker. The election process is as follows:

1. To participate in the election any router with its OSPF priority set between 1-255 can attempt to become DR by putting its own Router ID into the DR field of its sent hellos. You can view the election process by running the command “debug ip ospf adj”, the elections occurs during the 2-way process. 2. Each and every router in the common broadcast domain examine the received Hellos, looking at other routers’ priority settings 3. If a received Hello from another router has a better router priority then that router stops claiming to be DR and asserts that the better candidate should be the DR by placing the Router ID of the DR into the DR field of it’s Hello packets. Therefore the first criteria for better is a router with the highest priority 4. If the Router Priorities are identical, the router with the higher RID is chosen as the DR 5. The with the next highest priority or next highest Router ID in the case hat there is a tie in the value of the Router Priority becomes the BDR, (Backup Designated Router). 6. If a new router comes onto the network after the election of the DR and/or BDR, or if any existing router improves it’s priority it will not be able to pre-empt the existing DR or even the BDR, remember that DR and BDR roles are non-preemptive. 7. If the DR fails the existing BDR will take over as DR and another election is held for the BDR. 8. If the previous DR comes back online it will not be able to resume it’s previous role.

When a router which is neither the DR or the BDR needs to advertise an event to its neighbors on the common broadcast network it will send the LSA (Type 1) to the DR using the address of (The BDR listens passively to this exchange and maintains a relationship with all the routers), the DR will then advertise the event to all adjacent routers on the common broadcast network LSA (Type 2) All routers will then acknowledge the receipt with an ACK packet ensures that each has a synchronized copy of the LSDB.

Facts about the DR and BDR

1. These roles are not pre-emptive, once a device is a DR or BDR the only events that can cause it to give up the roles are as follows:

a. Shut the interface down b. Set Priority to 0 c. Restart the router d. Restart the OSPF router process (clear ip ospf process) e. Unplug the cable from the interface

2. The router which becomes the DR is the first one which boots up, starts it’s OSPF processes and gets past the 40sec wait timer, before it sees another router sending it’s own hello packet claiming the DR role. The wait timer can be seen in the output below, 8th line down.

R1_x#show ip ospf interface

Fastethernet0/0 is up, line protocol is up Internet Address 192.168.x.1/24, Area 0 Process ID 1, Router ID, Network Type BROADCAST, Cost: 10 Transmit Delay is 1 sec, State DR, Priority 1 Designated Router (ID), Interface address Backup Designated router (ID), Interface address Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

3. A router should only be a DR for one LAN segment. 4. Set the DR by setting it’s Router priority to 255. 5. Set the BDR by setting it’s Router Priority to 250 6. Set all other routers Router Priority to 1, never set them to 0 because in the event that you lose both the DR and BDR the routers with the Router Priority of 0 will never become fully adjacent neighbors and in turn will never exchange routing information

Leave a Reply

Your email address will not be published. Required fields are marked *