In this part, you will configure OSPF DR and BDR placement on the multiaccess network.
By default, an OSPF router tries to establish neighbor adjacencies with all other OSPF routers. This is a concern with large multiaccess (i.e. Ethernet) networks. For instance, 10 routers interconnected to the same Layer 2 switch would require a total of 45 adjacencies to be established. This can cause excessive OSPF traffic and waste router resources.
For this reason, OSPF routers interconnected to the same multiaccess network elect a designated router (DR) and a backup designated router (BDR). All non-DR and BDR routers are referred to as DROTHERS and only form adjacencies with DR and BDR routers. This reduces the total number of adjacencies and improves network operations.
DR and BDR are automatically elected during the last phase of the 2-Way OSPF neighbor state, before the ExStart state.
DR and BDR elections are conducted as follows:
1) An OSPF router interface with a priority greater than 0 attempts to become BDR on the link.
2) If no BDR exists, then it elects itself the BDR. If there is a tie with another router, the highest router ID is used.
3) If there is no DR, the BDR promotes itself as DR.
4) The neighbor with the next highest priority is elected BDR.
The DR and BDR are the central focal points on a multiaccess network. In a large network, it is advantageous to choose which router should be DR and BDR.
When all OSPF routers have the same OSPF priority, the election is based on the higher router ID. Altering router ID to choose DR/BDR routers may not be convenient. A better alternative is to alter the interface priority.
By default, all OSPF routers on a multiaccess network have a priority of 1 assigned. An interface priority can be changed using the ip ospf priority value interface configuration command. The value can be between 0 and 255. Setting the value to 0 ensures the router will never become a DR or BDR. Setting the value greater than the default value of 1, makes the router a candidate to become the DR or BDR.
Note: It may be necessary to use the clear ip ospf process to ensure the proper devices are elected.
In the topology, R1, D1, and D2 are interconnected on the same Ethernet network. Therefore, a DR/BDR election has already transpired. The easiest way to determine the interface role is by viewing the OSPF interface with the show ip ospf neighbor command.
a. On R1, verify the current DR/BDR status using the show ip ospf neighbor command.
Open configuration window
R1# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface 2.2.2.2 1 FULL/DROTHER 00:00:19 10.10.0.2 GigabitEthernet0/0/1 3.3.3.3 1 FULL/DR 00:00:18 10.10.0.3 GigabitEthernet0/0/1 |
From the perspective of R1, D1 (i.e., 2.2.2.2) is a DROTHER and D2 (i.e., router ID 3.3.3.3) is the DR. We must then assume that R1 is the BDR.
b. Verify the current status of R1 using the show ip ospf interface G0/0/1 command.
R1# show ip ospf interface g0/0 GigabitEthernet0/0/1 is up, line protocol is up Internet Address 10.10.0.1/29, Interface ID 7, Area 0 Attached via Interface Enable Process ID 123, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 10 Topology-MTID Cost Disabled Shutdown Topology Name 0 10 no no Base Enabled by interface config, including secondary ip addresses Transmit Delay is 1 sec, State BDR, Priority 1 Designated Router (ID) 3.3.3.3, Interface address 10.10.0.3 Backup Designated router (ID) 1.1.1.1, Interface address 10.10.0.1 Timer intervals configured, Hello 5, Dead 20, Wait 20, Retransmit 5 oob-resync timeout 40 Hello due in 00:00:02 Supports Link-local Signaling (LLS) Cisco NSF helper support enabled IETF NSF helper support enabled Can be protected by per-prefix Loop-Free FastReroute Can be used for per-prefix Loop-Free FastReroute repair paths Not Protected by per-prefix TI-LFA Index 1/2/2, flood queue length 0 Next 0x0(0)/0x0(0)/0x0(0) Last flood scan length is 1, maximum is 2 Last flood scan time is 0 msec, maximum is 1 msec Neighbor Count is 2, Adjacent neighbor count is 2 Adjacent with neighbor 2.2.2.2 Adjacent with neighbor 3.3.3.3 (Designated Router) Suppress hello for 0 neighbor(s) |
The output confirms that R1 is the BDR and that D2 (i.e., 3.3.3.3) is the DR.
c. Verify the current DR/BDR status on D1 and D2 using the show ip ospf neighbor command.
Close configuration window
It is sometimes advantageous to choose which router is selected as DR and BDR. For example, we will change the DR and BDR assignment as follows:
· R1 is currently the BDR but should be the DR using a priority of 255.
· D1 is currently a DROTHER but should be the BDR using the default priority.
· D2 is currently DR but should never become DR or BDR using a priority of 0.
a. Starting on D2, enter interface G0/2 and set the priority to 0 as shown.
Open configuration window
D2(config)# interface g0/2 D2(config-if)# ip ospf priority 0 D2(config-if)# *Mar 1 17:23:20.195: %OSPF-5-ADJCHG: Process 123, Nbr 2.2.2.2 on GigabitEthernet0/2 from LOADING to FULL, Loading Done D2(config-if)# end |
Notice the OSPF message. The reason is because D1 (i.e., 2.2.2.2) just assumed either the DR or BDR role and has established an adjacency with D2.
b. Verify the current DR / BDR placement.
D2# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 1.1.1.1 1 FULL/DR 00:00:18 10.10.0.1 GigabitEthernet0/2 2.2.2.2 1 FULL/BDR 00:00:18 10.10.0.2 GigabitEthernet0/2 |
The output confirms that R1 (i.e., 1.1.1.1) is now the DR and D1 (i.e., 2.2.2.2) is the BDR.
The reason R1 became the DR is because it had already been elected as BDR. When a DR fails, the elected BDR is automatically elected as DR to avoid network instability.
c. Although R1 is already the DR, change the interface priority to ensure it is always a candidate to be DR.
R1(config)# interface g0/0 R1(config-if)# ip ospf priority 255 R1(config-if)# end |
d. Verify that R1 is now the DR.
R1# show ip ospf interface g0/0 | include State Transmit Delay is 1 sec, State DR, Priority 255 |
e. Verify the roles of D1 and D2.
R1# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface 2.2.2.2 1 FULL/BDR 00:00:19 10.10.0.2 GigabitEthernet0/0 3.3.3.3 0 FULL/DROTHER 00:00:15 10.10.0.3 GigabitEthernet0/0 |