OSPF DR and BDR

Multi-access networks such as Ethernet (LANs) and Frame Relay networks allow more than two routers to exist on a network segment. This could cause scalability problems with OSPF as the number of routers on a segment increases. Additional routers flood more LSAs on the segment, and OSPF traffic becomes excessive as OSPF neighbor adjacencies increase. If four routers share the same multi-access network, six OSPF adjacencies form, along with six occurrences of database flooding on a network.

Having so many adjacencies per segment consumes more bandwidth, more CPU processing, and more memory to maintain each of the neighbor states.

OSPF overcomes this inefficiency by creating a pseudonode (that is, a virtual router) to manage the adjacency state with all the other routers on that broadcast network segment. A router on the broadcast segment, known as the designated router (DR), assumes the role of the pseudonode. The DR reduces the number of OSPF adjacencies on a multi-access network segment because routers form full OSPF adjacencies only with the DR and not each other. The DR is then responsible for flooding the update to all OSPF routers on that segment as updates occur.

If the DR were to fail, OSPF would need to form new adjacencies, invoking all new LSAs, and could potentially cause a temporary loss of routes. In the event of DR failure, a backup designated router (BDR) becomes the new DR; then an election occurs to replace the BDR. To minimize transition time, the BDR also forms a full OSPF adjacency with all OSPF routers on that segment.

The DR/BDR process distributes LSAs in the following manner:

Step 1

  • All OSPF routers (DR, BDR, and DROTHER) on a segment form a full OSPF adjacency with the DR and BDR.
  • As an OSPF router learns of a new route, it sends the updated LSA to the AllDRouters (224.0.0.6) address, which only the DR and BDR receive and process.

Step 2

  • The DR sends a unicast acknowledgment to the router that sent the initial LSA update.

Step 3

  • The DR floods the LSA to all the routers on the segment via the AllSPFRouters (224.0.0.5) address.

DR Elections

  • The DR/BDR election occurs during OSPF neighborship—specifically, during the last phase of the 2-Way neighbor state and just before the ExStart state.
  • Any router with the OSPF priority of 1 to 255 on its OSPF interface attempts to become the DR. By default, all OSPF interfaces use a priority of 1.
  • A priority of 0 means that a router cannot act as DR or BDR; it can be a DROTHER only. Priority can be set with the ip ospf priority command in interface configuration mode.
  • If the hello received is more favorable, the router updates its OSPF hello packet to use the more preferable RID in the DR field. OSPF deems a router more preferable if the priority for the interface is the highest for that segment. If the OSPF priority is the same, the higher RID is more favorable.
  • When all the routers have agreed on the same DR, all routers for that segment become adjacent with the DR. Then the election for the BDR takes place.
  • The OSPF DR and BDR roles cannot be preempted after the DR/BDR election. Only upon the failure (or process restart of the DR or BDR) does the election start to replace the role that is missing.

Election process:

  1. A router starting the OSPF process listens for OSPF hellos. If none are heard within the dead time, it declares itself the DR.
  2. If hellos from any other routers are heard, the router with the highest OSPF priority is elected DR and the election process starts again for BDR. A priority of zero removes a router from the election.
  3. If two or more routers have the same OSPF priority, the router with the highest RID is elected DR and the election process starts again for BDR.

DR & BDR Placement

Modifying a router’s RID for DR placement is a bad design strategy. A better technique involves modifying the interface priority to a higher value than that of the existing DR. Changing the priority to a value higher than that of the other routers (a default value of 1) increases the chance of that router becoming the DR for that segment on that node. Remember that OSPF does not preempt the DR or BDR roles, and it might be necessary to restart the OSPF process on the current DR/BDR for the changes to take effect.

Tags: ,

Leave a Reply

Related Post

OSPF AdjacenciesOSPF Adjacencies

OSPF creates adjacencies between neighboring routers for the purpose of exchanging routing information. Not every neighbor becomes adjacent in a broadcast environment. The Hello protocol is responsible for establishing and

How OSPF works?How OSPF works?

OSPF sends to neighboring routers link-state advertisements (LSAs) that contain the link state and link metric. The received LSAs are stored in a local database called the link-state database (LSDB),