Christmas Offer - Every Learner Must Check Out - Flat 88% OFF on All Access Pass
00
days
:
00
hours
:
00
minutes
:
00
seconds
PyNet Labs- Network Automation Specialists

DR and BDR in OSPF

Author : Pankaj Kumar
Last Modified: February 7, 2024 

Introduction

OSPF, which stands for Open Shortest Path First, is a link-state routing protocol that calculates the shortest course or path to any destination inside the network using the Dijkstra algorithm. However, OSPF has several limitations, mainly in terms of non-broadcast multi-access (NBMA) networks such as Ethernet or Frame Relay. In these networks, more than one router can be connected to the same segment, and each router has to exchange routing information with every other router on the segment.

This can cause a variety of network overhead and congestion and also slow down the convergence process. In order to solve such an issue, OSPF introduces the principles of DR and BDR, which stand for Designated Router and Backup Designated Router. In this blog, we will explain what DR and BDR in OSPF are, their functions, and their election process.

Before getting into more details, let’s first understand what DR and BDR are in networking.

What is DR?

The DR is the Designated Router on a segment, and it is the router with the highest priority among all the segment routers. The priority is a value between zero and 255 that may be configured manually or left at the default value of one. If two or more routers have the same priority, the router with the highest router ID (commonly the highest IP address) turns into the DR. The DR has major functions:

  • It establishes adjacencies with all other OSPF routers on the same segment. An adjacency is a logical relationship among OSPF routers that allows them to change routing information.
  • It acts as a hub for distributing link-state updates (LSUs) to all different OSPF routers at the same network segment. An LSU is a packet that incorporates information about the state of a router’s interfaces and neighbors.

The DR maintains a complete link-state database (LSDB) of the network segment, which contains all of the LSUs received from different routers. The DR additionally generates a network LSA for the network segment, which summarizes the records of all the routers connected to it. The network-LSA is flooded to all different OSPF routers inside the same area.

What is BDR?

The BDR is the Backup Designated Router on a segment, and it is the router that has the second highest priority amongst all of the routers on the segment and acts as a backup for the DR. The BDR is elected identically as the DR and chosen after the DR. The BDR has two important functions:

  • It establishes adjacencies with the DR and all different OSPF routers on the same network segment. The BDR gets all the LSUs from the DR and maintains a synchronized LSDB with it.
  • It takes over the function of the DR if the DR fails or becomes unreachable. The BDR then turns into the brand-new DR and starts generating and distributing network LSAs for the network segment.

The BDR is elected at the same time as the DR, but it does not perform any feature until the DR fails.

Now that we have a better understanding of DR and BDR in OSPF. Let’s begin with the DR and BDR election process.

DR and BDR election process in OSPF

The DR and BDR election is primarily based on criteria: the OSPF priority and the router ID.

  • The OSPF priority is a value between 0 and 255 that may be assigned to every router interface participating in OSPF. The default priority is 1. A priority of 0 means that the router is not eligible to become DR or BDR.
  • The router ID is a 32-bit number that uniquely identifies every OSPF router. The router ID can be manually configured or automatically derived from the highest IP address on any of the router’s interfaces or loopback interfaces.
DR and BDR Topology in OSPF

DR and BDR election process in OSPF takes place at some stage in the initialization phase of OSPF whilst routers form adjacencies with every other. The election method follows these steps:

  • Depending on the network type, each router sends hello packets to its neighbors on the segment through multicast or unicast. The hello packets comprise information such as router ID, priority, network mask, area ID, authentication type, and so on.
  • Each router gets hello packets from its neighbors on the segment and checks their compatibility. To be well matched, routers must have matching network mask, hello interval, dead interval, area ID, and authentication type.
  • If two routers are well suited, or we can say compatible, they become neighbors and exchange their router IDs and priorities.
  • Each router compares its very own priority and router ID with the ones of its neighbors and determines if it’s eligible to become the DR or BDR.
  • If there’s no present DR or BDR at the segment, then the router with the highest priority becomes the DR, and the router with the second highest priority turns into the BDR.
  • If there is an existing DR or BDR on the segment, then the router with the highest priority turns into the DR only if its priority is higher than the current DR’s priority. Similarly, the router with the second highest priority will become the BDR only if its priority is higher than the current BDR’s priority.
  • If the router isn’t eligible to become the DR or BDR, then it will become a DROTHER (Designated Router Other) and form an adjacency with the DR and BDR.
  • The election process is completed when all routers on the segment have formed adjacencies with each other and have agreed at the DR and BDR.

Now we have explained the DR and BDR election process in OSPF.

Frequently Asked Questions

Q1 – Why is a DR needed for OSPF?

A DR is needed for OSPF to reduce the wide number of adjacencies and LSA flooding in a multi-access network. The DR acts as a central node communication for OSPF routers.

Q2 – How does OSPF determine DR and BDR?

OSPF determines the DR and BDR based on priority. The router with the highest priority will be the DR, and the second highest priority will act as BDR. When two routers have the same priority, then router ID comes into action. The router with the highest router ID will be DR.

Q3 – What is Dr and ABR in OSPF?

DR stands for designated router, which is mainly used to connect all routers in a network segment. In contrast, ABR, which stands for area border router, is primarily used to connect OSPF areas.

Q4 – What is ABR and Asbr in OSPF?

ABR (Area Border Router) connects different OSPF areas to the backbone area (area 0). ASBR (Autonomous System Boundary Router) connects the OSPF network to other routing domains. ABR and ASBR have different roles and functions in OSPF.

Conclusion

In this blog post, I have explained the concepts of DR and BDR in OSPF and how they are elected in an OSPF network. We have also learned how to influence the election of DR and BDR by configuring each router’s priority and router ID. Join PyNet Labs’ most demanded OSPF BGP Combo Training.

We hope you have enjoyed this blog post and learned something new about OSPF. If you have any questions or feedback, please feel free to leave a comment below.

Recent Blog Post

Leave a Reply

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

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram