Designated Routers

OSPF builds adjacencies between routers for purposes of exchanging routing information. However, when OSPF has to deal with NBMA or broadcast networks, a problem presents itself. In these types of networks, there are multiple routers, which would result in too many adjacencies. To combat superfluous adjacencies, the Designated Router (DR) was introduced.

OSPF designates a single router per multiaccess network to build adjacencies among all other routers. You can calculate the number of adjacencies needed as follows:

Number of adjacencies needed = [n(n-1)]/2

where n is the number of routers on a common wire

For example, assume that you have 5 routers:

As another example, assume that you have 10 routers:

A DR is elected by OSPF's Hello protocol. The presence of a DR reduces the number of adjacencies that are formed, which in turn reduces the amount of routing protocol traffic and router overhead.

84 Chapter 2: Introduction to OSPF

DRs are beneficial, but how does OSPF figure out which router on a network is the DR? The following steps describe how OSPF determines which router will be the DR.

NOTE The steps that describe how a DR is elected assume that no DRs already exist on that network. If this is not the case, the process alters slightly; refer to RFC 2328 for additional information.

Figure 2-11 illustrates the process of selecting which router becomes the DR and BDR.

Figure 2-11 Electing a DR

Figure 2-11 Electing a DR

Has a I

• been designated the DR yet?

The process illustrated in Figure 2-11 uses the following steps:

1 OSPF selects a router at random and examines its list of neighbors; call this Router T. This list of router neighbors consists of all the routers that have begun a bidirectional communication among themselves. This communication is referred to as two-way and is the most advanced state of communication that neighboring routers can achieve without forming an adjacency.

2 Router T removes from that list all routers that are ineligible to become the DR. This would consist of routers that have an OSPF-assigned routing priority of 0. The process of altering the default priority is discussed later in this section. Proceed to the next step with the remaining routers on the list.

3 The BDR, which is chosen first, is determined through calculations on which router has the highest priority. If more than one router has the same priority value, OSPF takes the router with the highest router ID to break the tie.

4 Priority values can be defined or allowed to default. If a DR already exists, any router is ineligible for election at this point.

5 If no other router has declared itself to be the DR, assign the newly commissioned BDR to become the DR.

6 If Router T is now the new DR, the process begins again to identify which router functions as the BDR.

For example, if Router T is the DR, it is ineligible for election when Step 3 is repeated. This ensures that no Router declares itself both the DR and the BDR. As a result of these calculations, Router T has become the DR and the router's OSPF interface state is set accordingly. For example, the DR has a new interface state of DR and the BDR has an interface state of DR other.

7 The DR now begins sending Hello packets to begin the process of building the necessary adjacencies with the remainder of the network's routers.

Was this article helpful?

0 0

Post a comment