2.3.11 Packet Tracer - Determine the DR and BDR Answers
Topology

Addressing Table
| Device | Interface | IP Address | Subnet Mask |
|---|---|---|---|
| RA | G0/0 | 192.168.1.1 | 255.255.255.0 |
| Lo0 | 192.168.31.11 | 255.255.255.255 | |
| RB | G0/0 | 192.168.1.2 | 255.255.255.0 |
| Lo0 | 192.168.31.22 | 255.255.255.255 | |
| RC | G0/0 | 192.168.1.3 | 255.255.255.0 |
| Lo0 | 192.168.31.33 | 255.255.255.255 |
Objectives
- Part 1: Examine DR and BDR Changing Roles
- Part 2: Modify OSPF Priority and Force Elections
Scenario
In this activity, you will examine DR and BDR roles and watch the roles change when there is a change in the network. You will then modify the priority to control the roles and force a new election. Finally, you will verify routers are filling the desired roles.
Instructions
Part 1: Examine DR and BDR Changing Roles
Step 1: Wait until the amber link lights turn green.
When you first open the file in Packet Tracer, you may notice that the link lights for the switch are amber. These link lights will stay amber for 50 seconds while the STP protocol on the switch makes sure that one of the routers is not another switch. Alternatively, you can click Fast Forward Time to bypass this process.

Step 2: Verify the current OSPF neighbor states.
Use the appropriate command on each router to examine the current DR and BDR. If a router shows FULL/DROTHER it means that the router is not a DR or a BDR.
RA# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 192.168.31.33 2 FULL/DR 00:00:35 192.168.1.3 GigabitEthernet0/0 192.168.31.22 1 FULL/BDR 00:00:35 192.168.1.2 GigabitEthernet0/0
RB# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.168.31.11 1 FULL/DROTHER 00:00:36 192.168.1.1 GigabitEthernet0/0
192.168.31.33 2 FULL/DR 00:00:36 192.168.1.3 GigabitEthernet0/0RC# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.168.31.11 1 FULL/DROTHER 00:00:39 192.168.1.1 GigabitEthernet0/0
192.168.31.22 1 FULL/BDR 00:00:38 192.168.1.2 GigabitEthernet0/0Which router is the DR?
RC
Which router is the BDR?
RB
What is the OSPF state of router RA?
DROTHER
Step 3: Turn on IP OSPF adjacency debugging.
You can monitor the DR and BDR election process with a debug command. On RA and RB, enter the following command.
RA# debug ip ospf adj
RB# debug ip ospf adj
Step 4: Disable the Gigabit Ethernet 0/0 interface on RC.
a. Use the shutdown command to disable the link between RC and the switch to cause roles to change.
RC(config)# interface gigabitethernet 0/0 RC(config-if)# shutdown
b. Wait about 30 seconds for the dead timers to expire on RA and RB.
According to the debug output, which router was elected DR and which router was elected BDR?
RB is now DR and RA is now BDR.
Step 5: Restore the Gigabit Ethernet 0/0 interface on RC.
a. Re-enable the link between RC and the switch.
RC(config)# interface gigabitethernet 0/0 RC(config-if)# no shutdown
b. Wait for the new DR/BDR elections to occur.
Did DR and BDR roles change? Explain.
No, because OSPF does not update the DR/BDR when the existing ones are active.
c. Verify the DR and BDR assignments using the show ip ospf neighbor command on router RC.
RC# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 192.168.31.22 1 FULL/DR 00:00:34 192.168.1.2 GigabitEthernet0/0 192.168.31.11 1 FULL/BDR 00:00:34 192.168.1.1 GigabitEthernet0/0
Note: if the show ip ospf neighbor command does not return RB as the DR and RA as the BDR, turn off debugging on RA and RB with the undebug all command and retry steps 4 and 5.
Step 6: Disable the GigabitEthernet0/0 interface on RB.
a. Disable the link between RB and the switch to cause roles to change.
RB(config)# interface gigabitethernet 0/0 RB(config-if)# shutdown
b. Wait about 30 seconds for the dead timers to expire on RA and RC.
According to the debug output on RA, which router was elected DR and which router was elected BDR?
RC is now BDR and RA is now DR. RA was the BDR, when the DR failed (RB) it became the DR.
Step 7: Restore the GigabitEthernet0/0 interface on RB.
a. Re-enable the link between RB and the switch.
RB(config)# interface gigabitethernet 0/0 RB(config-if)# no shutdown
Wait for the new DR/BDR elections to occur. Did DR and BDR roles change? Explain.
No, roles did not change because the current DR and BDR are still active. A router that comes online with a higher router ID will not assume the BDR role until the BDR fails.
b. Use the show ip ospf interface command on router RC.
RC# show ip ospf interface GigabitEthernet0/0 is up, line protocol is up Internet address is 192.168.1.3/24, Area 0 Process ID 1, Router ID 192.168.31.33, Network Type BROADCAST, Cost: 1 Transmit Delay is 1 sec, State BDR, Priority 2 Designated Router (ID) 192.168.31.22, Interface address 192.168.1.2 Backup Designated Router (ID) 192.168.31.33, Interface address 192.168.1.3 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:00 Index 1/1, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length is 1, maximum is 1 Last flood scan time is 0 msec, maximum is 0 msec Neighbor Count is 2, Adjacent neighbor count is 2 Adjacent with neighbor 192.168.31.11 Adjacent with neighbor 192.168.31.22 (Designated Router) Suppress hello for 0 neighbor(s)
What is the status of router RC now?
BDR
Step 8: Turn off Debugging.
Enter the command undebug all on RA and RB to disable debugging.
RA# undebug all
RB# undebug all
Part 2: Modify OSPF Priority and Force Elections
Step 1: Configure OSPF priorities on each router.
a. To change the DR and BDR, use the ip ospf priority command to configure the GigabitEthernet 0/0 port of each router with the following OSPF interface priorities:
- RA: 200
- RB: 100
- RC: 1 (This is the default priority)
RA(config)# interface gigabitethernet 0/0 RA(config-if)# ip ospf priority 200
b. Set the priority on router RB and RC.
RB(config)# interface gigabitethernet 0/0 RB(config-if)# ip ospf priority 100
RC(config)# interface gigabitethernet 0/0 RC(config-if)# ip ospf priority 1
Step 2: Force an election by resetting the OSPF process on the routers.
Starting with router RA, issue the clear ip ospf process command on each router to reset the OSPF process.
RA# clear ip ospf process
Reset ALL OSPF processes? [no]: yes
12:34:11: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.31.33 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Adjacency forced to reset
12:34:11: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.31.22 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Adjacency forced to reset
12:34:11: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.31.33 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
12:34:11: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.31.22 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
12:34:13: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.31.22 on GigabitEthernet0/0 from LOADING to FULL, Loading Done
12:34:20: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.31.33 on GigabitEthernet0/0 from LOADING to FULL, Loading DoneRB# clear ip ospf process
Reset ALL OSPF processes? [no]: yes
12:35:39: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.31.33 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Adjacency forced to reset
12:35:39: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.31.11 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Adjacency forced to reset
12:35:39: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.31.33 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
12:35:39: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.31.11 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
12:35:40: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.31.33 on GigabitEthernet0/0 from LOADING to FULL, Loading Done
12:35:46: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.31.11 on GigabitEthernet0/0 from LOADING to FULL, Loading DoneRC# clear ip ospf process
Reset ALL OSPF processes? [no]: yes
12:39:18: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.31.11 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Adjacency forced to reset
12:39:18: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.31.22 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Adjacency forced to reset
12:39:18: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.31.11 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
12:39:18: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.31.22 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
12:39:20: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.31.11 on GigabitEthernet0/0 from LOADING to FULL, Loading Done
12:39:20: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.31.22 on GigabitEthernet0/0 from LOADING to FULL, Loading DoneStep 3: Verify DR and BDR elections were successful.
Wait long enough for OSPF to converge and for the DR/BDR election to occur. This should take a few minutes. You can click Fast Forward Time to speed up the process.
According to output from the show ip ospf neighbor command on the routers, which router is now DR and which router is now BDR?
RC# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 192.168.31.22 100 FULL/BDR 00:00:30 192.168.1.2 GigabitEthernet0/0 192.168.31.11 200 FULL/DR 00:00:38 192.168.1.1 GigabitEthernet0/0
RA is now DR and RB is now BDR.
Note: If the routers do not elect the correct DR and BDR after setting the OSPF priorities try restarting Packet Tracer.
Device Configs - Final
ROUTER RA
! ============================================================== !--- 2.3.11 Packet Tracer - Determine the DR and BDR !--- ANSWER SCRIPT FOR ROUTER RA !--- Usage: open the RA CLI and paste this whole file at the RA> prompt, after you finish Part 1. Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless. ! ============================================================== enable configure terminal ! -------------------------------------------------------------- !--- Part 2, Step 1: Configure OSPF priorities on each router. ! -------------------------------------------------------------- !--- RA: OSPF interface priority 200 on G0/0. interface gigabitethernet 0/0 ip ospf priority 200 exit end ! -------------------------------------------------------------- !--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.) ! -------------------------------------------------------------- copy running-config startup-config ! ============================================================== !--- Verification: !--- show ip ospf interface gigabitethernet 0/0 -> Priority 200, State DR after the new election !--- show ip ospf neighbor -> RA (192.168.31.11) is DR and RB (192.168.31.22) is BDR !--- Note: Part 2, Step 2 is interactive, so type it by hand on RA first, then RB, then RC: !--- RA# clear ip ospf process !--- Reset ALL OSPF processes? [no]: yes !--- The new priorities take effect only after this reset; wait or press Fast Forward Time until the !--- neighbors are FULL again before you check the result. ! ==============================================================
ROUTER RB
! ============================================================== !--- 2.3.11 Packet Tracer - Determine the DR and BDR !--- ANSWER SCRIPT FOR ROUTER RB !--- Usage: open the RB CLI and paste this whole file at the RB> prompt, after you finish Part 1. Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless. ! ============================================================== enable configure terminal ! -------------------------------------------------------------- !--- Part 2, Step 1: Configure OSPF priorities on each router. ! -------------------------------------------------------------- !--- RB: OSPF interface priority 100 on G0/0. interface gigabitethernet 0/0 ip ospf priority 100 exit end ! -------------------------------------------------------------- !--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.) ! -------------------------------------------------------------- copy running-config startup-config ! ============================================================== !--- Verification: !--- show ip ospf interface gigabitethernet 0/0 -> Priority 100, State BDR after the new election !--- show ip ospf neighbor -> RA (192.168.31.11) is DR and RB (192.168.31.22) is BDR !--- Note: Part 2, Step 2 is interactive, so type it by hand on RA first, then RB, then RC: !--- RB# clear ip ospf process !--- Reset ALL OSPF processes? [no]: yes !--- The new priorities take effect only after this reset; wait or press Fast Forward Time until the !--- neighbors are FULL again before you check the result. ! ==============================================================
ROUTER RC
! ============================================================== !--- 2.3.11 Packet Tracer - Determine the DR and BDR !--- ANSWER SCRIPT FOR ROUTER RC !--- Usage: open the RC CLI and paste this whole file at the RC> prompt, after you finish Part 1. Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless. ! ============================================================== enable configure terminal ! -------------------------------------------------------------- !--- Part 2, Step 1: Configure OSPF priorities on each router. ! -------------------------------------------------------------- !--- RC: priority 1 (the default). RC starts with priority 2 in this activity, so this command lowers it. interface gigabitethernet 0/0 ip ospf priority 1 exit end ! -------------------------------------------------------------- !--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.) ! -------------------------------------------------------------- copy running-config startup-config ! ============================================================== !--- Verification: !--- show ip ospf interface gigabitethernet 0/0 -> Priority 1, State DROTHER after the new election !--- show ip ospf neighbor -> RA (192.168.31.11) is DR and RB (192.168.31.22) is BDR !--- Note: Part 2, Step 2 is interactive, so type it by hand on RA first, then RB, then RC: !--- RC# clear ip ospf process !--- Reset ALL OSPF processes? [no]: yes !--- The new priorities take effect only after this reset; wait or press Fast Forward Time until the !--- neighbors are FULL again before you check the result. ! ==============================================================




