JNCIP-SP: OSPF DR/BDR operations explained.
For multiaccess segments, the flooding procedure is optimized through the use of a Designated Router (DR) and a Backup Designated Router (BDR). This article is about explaining the DR/BDR operations on a multiaccess segment.
An Ethernet segment attached to only two routers can be configured as a point-to-point link. In these cases, the whole DR/BDR operation will not play any role in OSPF.
Across a point-to-point link, both router will form a full neighbor relationship. On a multiaccess segment however, things change. If all routers would engage in a full neighbor relationship, the number of adjacencies would be n*(n-1) / 2. Imagine a multiaccess segment with 6 routers attached. Every individual router would have 5 neighbors and there would be a grand total of 6*(6 – 1 ) / 2 = 15 adjacencies. Take a look at the following picture (every blue line is an adjacency);
If there would be an LSDB change in network displayed in the picture above, the amount of LSAs flooded would be enormous.
To reduce the amount of bandwidth and processing all these messages cost, three router roles are introduces. The DR, the BDR and the DRother.
The DR router.
On every broadcast and NBMA network running OSPF, there will be a Designated Router. According to the RFC, the DR has two main functions:
• originating the network-LSA on behalf of the network:
All devices connected to the broadcast segment will have an IP address in the same subnet. This subnet will be advertised as a type 2 LSA, a network LSA. This network LSA is generated and advertised to the rest of the network by the DR.
• establishing an adjacency with all other routers on the network segment
The DR will also establish an adjacency with all other devices on the segment. In OSPF, LSDBs are synchronized when routers form a neighbor relationship. Since the DR will establish such a relationship with all other routers, it plays a central part.
The BDR router.
The BDR is the DR’s backup. When a DR fails, the BDR will become the new DR and an election for a new BDR will be held.
Besides the DR and BDR roles, there is the DRother. This is a non-DR router that establishes a full adjacency with both the DR and BDR. The DRother routers will not form a full adjacency amongst themselves.
Let's continue and discuss the election. The role that each routers assumes is based on the device priority. Junos devices have a default priority of 128. When all routers share the same default priority, the router with the highest router-id wins the election.
The role that each routers assumes is based on the device priority. Junos devices have a default priority of 128. When all routers share the same default priority, the router with the highest router-id wins the election.
When a router is configured with a priority of 0, the router will be ineligible for DR election. The highest configurable priority is 255.
Another thing worth noting is that the role a router has cannot be preempted. When a DR is elected on a multiaccess segment, that router cannot be preempted. When a router with a higher priority enters the multiaccess segment, it will not become the new DR.
Let’s look at the adjacencies on a multiaccess segment where we have a DR and a BDR:
On a multiaccess segment , all LSAs send by DRothers are send to 22.214.171.124. This is the ‘All designated routers’ address and only designated routers (the DR and the BDR) are listening to this address. After receiving LSAs, the DR will distribute the LSAs to the other routers active on the multiaccess segment by sending information to the 126.96.36.199 multicast address, the ‘all OSPF routers’ address.
In this case, not every router has 5 adjacencies. Only the DR and BDR routers maintain a full relationship with the DRothers. The total number of adjacencies on a multiaccess segment with a DR and a BDR would be: 2n – 3. In our case, with 6 routers, it would be 9 full adjacencies.
This whole process of not having to synchronize between every pair of routers greatly reduces the amount of LSAs sent over the network.