OSPF DR/BDR Election explained

I think Packet Tracer doesn’t support “clear ip ospf process”. Bit strange since it’s an important command. You might want to try GNS3 if you want to try this command.

Hi Rene

Would like to know that if DR fails then how much time BDR will take to become DR and DR OTHERS to select the BDR among themselves.

And if again our DR becomes active then again it will take the role of DR or it will have to wait for next DR/BDR process selection.

OSPF uses hello packets and a dead interval, when the dead interval timer expires OSPF knows something is wrong and drops the neighbor adjacency. This is when it will switch to the BDR.

The DR/BDR election is “non-preemptive” which means that after selecting a DR / BDR these routers will keep their role. Once the BDR becomes the DR, it will remain the DR.

Hi Rene,
How come Nancy (192.168.12.1) has become DR for the Donna (192.168.2.2) .?
Donna has got Highest IP for left multi-access segment .
Can you please explain?

Thanks and Regards,
Srini

Hi Srini,

In the example above I increased the priority on Nancy to 200. The priority is checked before the IP address for the DR/BDR election.

Rene

Hi Rene,
I am not using any switches between routers and all my routers are directly connected with FastEthernet like the topology below

R1 – R2 – R3 – R4
|
R5
I assume the above topology is point-to-point but surprisingly all the routers participating in
DR/BDR election .

Can you please explain ?
show command output for example

R1#show ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
10.12.0.2 1 FULL/DR 00:00:38 10.12.0.2 FastEthernet0/0

R2#show ip ospf nei

Neighbor ID Pri State Dead Time Address Interface
10.35.0.3 1 FULL/DR 00:00:34 10.23.0.3 FastEthernet0/1
10.12.0.1 1 FULL/BDR 00:00:38 10.12.0.1 FastEthernet0/0

Thanks,
Srini

Hi Srini,

This is because OSPF sees FastEthernet interfaces as “multi-access” and will do a DR/BDR election for these.

If you use “show ip ospf interface Fa0/0” then you’ll see that the default OSPF network type is broadcast.

Rene

1 Like

Hi Rene,
Thanks!

Regards,
Srini

cool lesson.
i just noticed, even when the physical interface is administratively down, as long as it has an ip address, it’s still selected as the router id.

int f0/0 = 10.0.0.1 up up
int f0/1 = 192.168.1.1 admin down down

192.168.1.1 is still selected as the router id.

Hmm that’s interesting. On what router did you try? if you do a “clear ip ospf process” does it still use it?

If I do this on a router that’s running 12.4T then it won’t use an IP address of an interface that is down.

im using 7200 ios15. i also tried the clear ip ospf process and rebooting the router. still the same, maybe its bugged.

“This is when it will switch to the BDR.”

Do you mean that is when a BDR will switch to DR ?

But in C7200 I can see that even Gigabit Ethernet interfaces as “Multi access” when they are connected directly (R1 — R2).

R1#show ip ospf interface GigabitEthernet 2/0
GigabitEthernet2/0 is up, line protocol is up 
  Internet Address 192.168.12.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 1

interface GigabitEthernet2/0
 ip address 192.168.12.1 255.255.255.0
 negotiation auto
end

So does it implies OSPF by default considers ethernet interface as “multi access” until and unless specifically told to be point-to-point ?

Hi Ajith,

That’s right, Ethernet interfaces are considered multi-access interfaces. OSPF doesn’t know if you connect your cable to a switch or directly to another router. If you use it as point-to-point then you’ll have to tell OSPF this.

Rene

Hi Ajith,

Yes that’s what I mean, when the DR fails and the BDR takes over.

Rene

very understandable explanation. It is so helpfull. Many thanks

Ali

Really helpful and easy to follow guides, good job!

Hi Rene,

Could you please explain the need for using 2 multicast addresses ,224.0.0.5 and 6 for setting up neighbor adjacency and packet exchange in multi-access environments

Regards

Ashok

19 posts were merged into an existing topic: OSPF DR/BDR Election explained

Hi Rene,

Hope your well. I need clarification to understand. from you example you show below output

Donna#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.168.123.1 200 FULL/DR 00:00:30 192.168.123.1 FastEthernet0/0
192.168.123.2 1 FULL/DROTHER 00:00:31 192.168.123.2 FastEthernet0/0

But on my gns3 enviroment i am getting below output for the same. I want to understand on the state of yours
(Full/DROTHER)and mine (Full/BDR). Why has became different? is mine correct or not. Thank You.

DONNA#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.123.1   200   FULL/DR         00:00:34    192.168.123.1   Ethernet0/0
192.168.123.2     1   FULL/BDR        00:00:35    192.168.123.2   Ethernet0/0