You are on page 1of 6

OSPF Lab3 – DR/BDR Election in OSPF (ATech)

Topology Diagram

ATech Reference Topology atech_R2 OSPF Area0

R2
2.2.2.2/32 Fa0/0
.2
DR BDR

atech_R1 atech_R3
.1 SW1 .3
R1 Fa0/0 Fa0/0 R3
Lo: 1.1.1.1/32 123.123.123.0 /24 3.3.3.3/32

Task
Task: Configure OSPF in Area0 (on R1, R2 and R3). Modify the OSPF Priorities so that R2 is elected as DR, R1 is
elected as BDR and R3 never becomes DR/BDR.

Related Info:
‐ OSPF Process ID: 1
‐ OSPF Areas: Area0
‐ All Loopback IP’s, Interface IP’s are mentioned in this topology Diagram
‐ PC IP/Gateway, Router Interface IP’s and Loopback IP’s are already configured (so that you can focus on the
OSPF and DR/BDR configuration and analysis)
‐ No configuration is required on SW1 as it is simple Layer2 Switch

The DR and BDR election process takes place as soon as the first router has
its interface enabled on the multiaccess network. This can happen as the
routers are powered-on or when the OSPF network command for that
interface is configured. We can manually change these DR/BDR roles by
changing the OSPF Interface Priority.
The Router with Highest OSPF Priority towards Multi-access segment (SW1 in
this example) becomes the Designated Router (DR). The Router with 2nd
Highest OSPF Priority becomes the Backup Designated Router (BDR). All
other Routers stay in the DROther state which means neither a DR not a
BDR.

facebook.com/ATechIT1 Youtube.com/c/ATechIT Linkedin.com/company/ATechIT/ Aurumme.com/ATech Your Feedback, Comments are Welcomed: waqas@aurumme.com
Solution

Step1: Enable OSPF Protocol on all Routers. Assign Process ID 1 to this new OSPF instance.
atech_R1(config)#router ospf 1
atech_R2(config)#router ospf 1
atech_R3(config)#router ospf 1

Step2: Enable OSPF on Router Interfaces connected to each other via SW1:
atech_R1(config-router)#network 123.123.123.0 0.0.0.255 area 0
atech_R2(config-router)#network 123.123.123.0 0.0.0.255 area 0
atech_R3(config-router)#network 123.123.123.0 0.0.0.255 area 0

Step3: Check the current DR/BDR roles after above configuration:

Currently, R1 is DR by default. We have to make R2 as DR as per Task requirement above.

Step4: Let’s increase the OSPF Priority of R2 towards the Multi-access segment (towards SW1) so that It
becomes the DR (Router with Highest OSPF cost is always selected as DR).

atech_R2(config)#interface fa0/0
atech_R2(config-if)#ip ospf priority 10
atech_R2(config-if)#end *Imp Points
atech_R2#clear ip ospf process If a new router enters into the OSPF network or we change the
OSPF Priority after the DR and BDR have already been elected, it
will not become the DR or BDR even if it has a higher OSPF
interface priority or router ID than the current DR or BDR. So,
we have to use the command to manually reset the OSPF i.e.
#clear ip ospf process

facebook.com/ATechIT1 Youtube.com/c/ATechIT Linkedin.com/company/ATechIT/ Aurumme.com/ATech Your Feedback, Comments are Welcomed: waqas@aurumme.com
Let’s check the role of R2 again after above changes:

Let’s modify OSPF Priority on R1 and R3 as well (towards SW1) to achieve the 2nd & 3rd requirement of Task
i.e. R1 is elected as BDR and R3 never becomes DR/BDR.

atech_R1(config)#interface fa0/0
atech_R1(config-if)#ip ospf priority 5 !......(2nd highest Priority to make it BDR)
atech_R1(config-if)#end

atech_R1#clear ip ospf process

atech_R3(config)#interface fa0/0
atech_R3(config-if)#ip ospf priority 0 !......(Zero Priority, so that it never becomes DR/BDR)
atech_R3(config-if)#end

atech_R3#clear ip ospf process

facebook.com/ATechIT1 Youtube.com/c/ATechIT Linkedin.com/company/ATechIT/ Aurumme.com/ATech Your Feedback, Comments are Welcomed: waqas@aurumme.com
Verification
Verification1
Let’s check the roles of R1 and R3 again after above changes:

It shows that our configuration is successful.


Now, R2 is elected as DR, R1 is elected as BDR and R3 will never become DR/BDR.

Verification2
We can also verify the same from local OSPF interface on every Router as in below:
atech_R1#show ip ospf interface fa0/0
FastEthernet0/0 is up, line protocol is up
Internet address is 123.123.123.1/24, Area 0
Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State BDR, Priority 5
Designated Router (ID) 2.2.2.2, Interface address 123.123.123.2
Backup Designated Router (ID) 1.1.1.1, Interface address 123.123.123.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

atech_R2#show ip ospf interface fa0/0


FastEthernet0/0 is up, line protocol is up
Internet address is 123.123.123.2/24, Area 0
Process ID 1, Router ID 2.2.2.2, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 10
Designated Router (ID) 2.2.2.2, Interface address 123.123.123.2
Backup Designated Router (ID) 1.1.1.1, Interface address 123.123.123.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

atech_R3#show ip ospf interface fa0/0


FastEthernet0/0 is up, line protocol is up
Internet address is 123.123.123.3/24, Area 0
Process ID 1, Router ID 3.3.3.3, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DROTHER, Priority 0
Designated Router (ID) 2.2.2.2, Interface address 123.123.123.2
Backup Designated Router (ID) 1.1.1.1, Interface address 123.123.123.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

facebook.com/ATechIT1 Youtube.com/c/ATechIT Linkedin.com/company/ATechIT/ Aurumme.com/ATech Your Feedback, Comments are Welcomed: waqas@aurumme.com
Other relevant OSPF Verification/Show Commands:
R1# show ip ospf interface (check the current OSPF interface detail and DR/BDR status)
R1#show ip ospf neighbor (check the OSPF neighbor’s detail)
R1#show ip ospf (check the current OSPF Detail and Router ID)
R1#show ip ospf interface (check the current OSPF interfaces on a Router)

Complete Solution
Below is complete solution containing all commands from scratch if you want to simulate yourself in
Packet Tracer or GNS3:

Complete Solution
Atech_R1 Atech_R2
interface Loopback0 interface Loopback0
ip address 1.1.1.1 255.255.255.255 ip address 2.2.2.2 255.255.255.255
! !
interface FastEthernet0/0 interface FastEthernet0/0
ip address 123.123.123.1 255.255.255.0 ip address 123.123.123.2 255.255.255.0
ip ospf priority 5 ip ospf priority 10
no shutdown no shutdown
! !
router ospf 1 router ospf 1
network 123.123.123.0 0.0.0.255 area 0 network 123.123.123.0 0.0.0.255 area 0

Atech_R3
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 123.123.123.3 255.255.255.0
ip ospf priority 0
no shutdown
!
router ospf 1
network 123.123.123.0 0.0.0.255 area 0

facebook.com/ATechIT1 Youtube.com/c/ATechIT Linkedin.com/company/ATechIT/ Aurumme.com/ATech Your Feedback, Comments are Welcomed: waqas@aurumme.com
Relevant Files

Packet Tracer and GNS3 Files:


https://www.facebook.com/groups/ATechIT/252640651960793/
https://www.facebook.com/groups/ATechIT/252640545294137/

03. Lab - DR & BDR 03. Lab - DR & BDR


Election - ATech ( Waqas
Election
Karim- ATech
) - Packet
( Waqas
TracerKarim
File (

facebook.com/ATechIT1 Youtube.com/c/ATechIT Linkedin.com/company/ATechIT/ Aurumme.com/ATech Your Feedback, Comments are Welcomed: waqas@aurumme.com

You might also like