|
Because multiaccess networks can support more than
two routers, OSPF elects a DR to be the focal point of all link-state updates
and LSAs. The DR's role is critical, therefore a BDR is elected to
"shadow" the DR. In the event that the DR fails, the BDR can smoothly
take over.
Like any election, the DR/BDR selection process
can be rigged. The "ballots" are hello packets, which contain a
router's ID and priority fields. The router with the highest priority value
among adjacent neighbors wins the election and becomes the DR. The router with
the second-highest priority is elected the BDR. When the DR and BDR have been
elected, they keep their roles until one of them fails, even if additional
routers with higher priorities show up on the network. Hello packets inform
newcomers of the identity of the existing DR and BDR.
OSPF routers all have the same priority value by
default: 1. You can assign a priority from 0 to 255 on any given OSPF interface.
A priority of 0 prevents the router from winning any election on that interface.
A priority of 255 ensures at least a tie. The Router ID field is used to break
ties; if two routers have the same priority, the router with the highest ID will
be selected. You can manipulate the router ID by configuring an address on a
loopback interface, although that is not the preferred way to control the DR/BDR
election process. The priority value should be used instead because each
interface can have its own unique priority value. You can easily configure a router
to win an election on one interface, and lose an election on another.
How does the DR election process affect the
example network? As shown in the figure, RTB and RTC are connected via PPP on a
point-to-point link. Thus, there is no need for a DR on the network 10.6.0.0/16
because only two routers can exist on this link.
Because 10.4.0.0/16 and 10.5.0.0/16 networks are
multiaccess Ethernet networks, they may potentially connect more than two
routers. Even if only one router is connected to a multiaccess segment, a DR is
still elected because the potential exists for more routers to be added to the
network. Thus, a DR must be elected on both 10.4.0.0/16 and 10.5.0.0/16.
Note: DRs and BDRs are elected on a per-network
basis. An OSPF area can contain more than one IP network, so each area can (and
usually does) have multiple DRs and BDRs.
In the example topology, RTA serves a dual role
as both the DR and the BDR. Because it is the only router on the 10.4.0.0/16
network, RTA elects itself as the DR. After all, the 10.4.0.0/16 network is a
multiaccess Ethernet network, so a DR is elected because multiple routers could
potentially be added to this network. RTA is also the runner-up in the election
for 10.5.0.0/16 and thus the BDR for that network. Despite claiming equal
priority value with RTA, RTB is elected as DR for 10.5.0.0/16 by virtue of the
tie-breaker: a higher router ID (10.5.0.2 vs. 10.5.0.1).
With elections complete and bi-directional
communication established, routers are ready to share routing information with
adjacent routers and build their link-state databases. This process is discussed
in the next section.
|