DR & BDR
DR and BDR are elected in Broadcast and NBMA (Non-Broadcast Multiaccess Network)
Pre-Conditions for electing DR adn BDR
- Each multi-access interface of each router has a Router Priority, which is an 8-bit unsigned
integer ranging from 0 to 255. The default priority on Cisco routers is 1 and can be changed on a
per multi-access-interface basis with the command ip ospf priority. Routers with a priority of 0
are ineligible to become the DR or BDR.
- Hello packets include fields for the originating router to specify its Router Priority and for the IP
addresses of the connected interfaces of the routers it considers the DR and BDR.
- When an interface first becomes active on a multi-access network, it sets the DR and BDR to
0.0.0.0. It also sets a wait timer with a value equal to the RouterDeadInterval.
- Existing interfaces on a multi-access network record the addresses of the DR and the BDR in the
interface data structure.
The election procedure of the DR and BDR is as follows:
- After 2-Way communication has been established with one or more neighbors, examine the
Priority, DR, and BDR fields of each neighbor’s Hello. List all routers eligible for election (that is,
routers with priority greater than 0 and whose neighbor state is at least 2-Way); all routers
declaring themselves to be the DR (their own interface address is in the DR field of the Hello
packet); and all routers declaring themselves to be the BDR (their own interface address is in the
BDR field of the Hello packet). The calculating router will include itself on this list unless it is
- From the list of eligible routers, create a subset of all routers not claiming to be the DR (routers
declaring themselves to be the DR cannot be elected BDR).
- If one or more neighbors in this subset include its own interface address in the BDR field, the
neighbor with the highest priority will be declared the BDR. In a tie, the neighbor with the highest
Router ID will be chosen.
- If no router in the subset claims to be the BDR, the neighbor with the highest priority will become
the BDR. In a tie, the neighbor with the highest Router ID will be chosen.
- If one or more of the eligible routers include their own address in the DR field, the neighbor with
the highest priority will be declared the DR. In a tie, the neighbor with the highest Router ID will
- If no router has declared itself the DR, the newly elected BDR will become the DR.
- If the router performing the calculation is the newly elected DR or BDR, or if it is no longer the
DR or BDR, repeat steps 2 through 6.
OSPF Network Types :
Point-to-point networks : such as a T1 or subrate link, connect a single pair of routers. Valid neighbors on
point-to-point networks will always become adjacent. The destination address of OSPF packets on these
networks will always be the reserved class D address 126.96.36.199, known as AllSPFRouters.
Broadcast networks : such as Ethernet, Token Ring, and FDDI, might be better defined as broadcast multiaccess
networks to distinguish them from NBMA networks. Broadcast networks are multi-access in that
they are capable of connecting more than two devices, and they are broadcast in that all attached devices
can receive a single transmitted packet. OSPF routers on broadcast networks will elect a DR and a BDR. Hello packets are
multicast with the AllOSPFRouters destination address 188.8.131.52, as are all OSPF packets originated by the
DR and BDR. The destination Media Access Control (MAC) identifier of the frames carrying these
packets is 0100.5E00.0005. All other routers will multicast link state update and link state
acknowledgment packets to the reserved class D address 184.108.40.206, known as
AllDRouters. The destination MAC identifier of the frames carrying these packets is 0100.5E00.0006.
NBMA networks : such as X.25, Frame Relay, and ATM, are capable of connecting more than two routers
but have no broadcast capability. A packet sent by one of the attached routers would not be received by
all other attached routers. As a result, extra configuration may be necessary for routers on these networks
to acquire their neighbors. OSPF routers on NBMA networks elect a DR and BDR, and all OSPF packets
Point-to-multipoint networks : are a special configuration of NBMA networks in which the networks are
treated as a collection of point-to-point links. Routers on these networks do not elect a DR and BDR, and
because the networks are seen as point-to-point links, the OSPF packets are multicast.
Below are the few main points to remember in OSPF.
- Open Shortest Path First – (OSPF)
- OSPF is a link-state protocol IGP
- Uses Dijkstra’s Shortest Path First (SPF) algorithm.
- Like all link state protocols, OSPF’s major advantages over distance vector protocols are fast
reconvergence, support for much larger internetworks, and less susceptibility to bad routing information.
- OSPF does not use a TCP/IP transport protocol (UDP, TCP), but is encapsulated directly in IP datagrams with protocol number 89. This is in contrast to other routing protocols, such as the Routing Information Protocol (RIP), or the Border Gateway Protocol (BGP). OSPF handles its own error detection and correction functions.
- Features of OSPF are:
- Use of areas reduces the protocol’s impact on CPU and memory
- Fully classless behavior, eliminating such classful problems as discontiguous subnets.
- Support of classless route table lookups, VLSM, and supernetting for efficient address
- A dimensionless, arbitrary metric
- Equal-cost load balancing for more efficient use of multiple paths
- The use of reserved multicast addresses to reduce the impact on non-OSPF-speaking devices
- Support of authentication for more secure routing
- The use of route tagging for the tracking of external routes
OPERATION OF OSPF
- OSPF-speaking routers send Hello packets out all OSPF-enabled interfaces. If two routers sharing
a common data link agree on certain parameters specified in their respective Hello packets, they
will become neighbors.
- Adjacencies, which may be thought of as virtual point-to-point links, are formed between some
neighbors depending on the network type and router type.
- Each router sends link state advertisements (LSAs) over all adjacencies.
- Each router receiving an LSA from a neighbor records the LSA in its link state database and
sends a copy of the LSA to all of its other neighbors.
- By flooding LSAs throughout an area, all routers will build identical link state databases.
- When the databases are complete, each router uses the SPF algorithm to calculate a loop-free
graph describing the shortest (lowest cost) path to every known destination, with itself as the root.
This graph is the SPF tree.
- Each router builds its route table from its SPF tree.
Note: Before any LSAs can be sent, OSPF routers must discover their neighbors and establish adjacencies.
Selection Process of Router ID
1. The router chooses the numerically highest IP address on any of its loopback interfaces.
2. If no loopback interfaces are configured with IP addresses, the router chooses the numerically
highest IP address on any of its physical interfaces. The interface from which the Router ID is
taken does not have to be running OSPF.
Hello Packets : OSPF routers sends hello packets to discover neighbors.
DR & BDR : Designated Routers (DRs) and Backup Designated Routers (BDRs) on Broadcast and
Nonbroadcast Multiaccess (NBMA) networks which will make the communication easy and less overhead.
HelloInterval : The period at which two OSPF routers sends Hello packets and is configured on a per interface basis. Cisco uses a default HelloInterval of 10 seconds. The default is 30 seconds on NBMA interfaces. The value can be changed with the command ip ospf hello-interval.
Contents of Hello Packets
- The Router ID of the originating router
- The Area ID of the originating router interface
- The address mask of the originating interface
- The authentication type and authentication information for the originating interface
- The HelloInterval of the originating interface
- The RouterDeadInterval of the originating interface
- The Router Priority
- The DR and BDR
- Five flag bits signifying optional capabilities
- The Router IDs of the originating router’s neighbors. This list contains only routers from which
Hellos were heard on the originating interface within the last RouterDeadInterval.
Fields to Match in Hello Packets to establish Adj : Area ID, Authentication, Network Mask, HelloInterval, RouterDeadInterval, and Options values.
show ip ospf interface – used to observe the components of an interface data structure.