Designated routers (DRs)

In an OSPF network having two or more routers, one router is elected to serve as the DR and another router to act as the BDR. All other routers in the area forward their routing information to the DR and BDR, and the DR forwards this information to all of the routers in the network. This minimizes the amount of repetitive information that is forwarded on the network by eliminating the need for each individual router in the area to forward its routing information to all other routers in the network. If the area includes multiple networks, each network elects its own DR and BDR.

In an OSPF network with no DR and no BDR, the neighboring router with the highest priority is elected the DR, and the router with the next highest priority is elected the BDR. If the DR goes off-line, the BDR automatically becomes the DR, and the router with the next highest priority then becomes the new BDR. If multiple routing switches on the same OSPF network are declaring themselves DRs, both priority and router ID are used to select the DR and BDRs.

Priority is configurable by using the vlan vid ip ospf priority 0-255 command at the interface level. You can use this parameter to help bias one router as the DR. For more information, see Changing priority per-interface. If two neighbors share the same priority, the router with the highest router ID is designated the DR. The router with the next highest router ID is designated the BDR.

For example, in Figure 41: Example of DRs in an OSPF area, the DR and BDR for 10.10.10.0 network in area 5 are determined as follows:

Router A

Priority: 0

Cannot become a DR or BDR

Router B

Priority: 1

DR for the 10.10.10.0 network

Router C

Priority: 2

BDR for the 10.10.10.0 network

Router D

Priority: 3

Cannot become a DR or BDR

Router E

Priority: 4

Becomes the new BDR if router B becomes unavailable and router C becomes the new DR

Figure 41: Example of DRs in an OSPF area

To learn the router priority on an interface, use the show ip ospf interface command and check the Pri setting under OSPF interface configuration.

NOTE:

By default, the router ID is typically the lowest-numbered IP address or the lowest-numbered (user-configured) loopback interface configured on the device.

If multiple networks exist in the same OSPF area, the recommended approach is to ensure that each network uses a different router as its DR. Otherwise, if a router is a DR for more than one network, latency in the router could increase because of the increased traffic load resulting from multiple DR assignments.

When only one router on an OSPF network claims the DR role despite neighboring routers with higher priorities or router IDs, this router remains the DR. This is also true for BDRs.

The DR and BDR election process is performed when one of the following events occurs:
  • Interface is in a waiting state and the wait time expires

  • Interface is in a waiting state and a hello packet is received that addresses the BDR

  • Change in the neighbor state occurs, such as:

    • Neighbor state transitions from 2 or higher

    • Communication to a neighbor is lost

    • Neighbor declares itself to be the DR or BDR for the first time