cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2994
Views
10
Helpful
4
Replies

Query Regarding DR/BDR Election is OSPF

s-ralli
Level 1
Level 1

Hi all,

As far as I understand..DR/BDR Election takes place using hello protocol and is based on the interface priority ..and in case of a tie ..the higher Router-id wins and becomes DR. In case DR goes down..the BDR takes over as DR and another router is elected as BDR again.

Now ...what happens if the old DR comes back ?

Some Docs say that it does not affect and no DR/BDR change takes place.

However , the debug ip ospf events has a message which says ...

remember old DR ..and further goes on to say that if the old DR comes back...it becomes the DR again and the CURRENT DR becomes DROTHER.

so if we have three routers with priorities 1, 2 & 3. 3 becomes DR, 2 becomes BDR and 1 becomes DROTHER.

Now 3 goes down..so 2 becomes DR and 1 will be BDR. Again 3 comes back ..so will it become DR ?

Also, what is the mechanism by which the BDR detects that DR is dead ? I think Dead-interval. so does it mean that for 40 secs , the network does not know that the DR is gone ?

4 Replies 4

marikakis
Level 7
Level 7

What really matters is the current state and who was DR in the past.

Lets say we start with 3 routers with clean configuration and no OSPF.

The routers are named R1, R2, R3 with priorities 1, 2 and 3 respectively.

R3 becomes DR, R2 becomes BDR and R1 becomes DROTHER,

if R3 starts running ospf on the link before R2, R1 and

if R2 starts running ospf on the link before 1.

(If R1 starts running ospf before all the others it will be the DR.)

Lets suppose that we are in a state where election has settled down.

R3 is DR, R2 is BDR and R1 is DROTHER.

If DR goes down, BDR is promoted to DR and DROTHER becomes BDR.

If old DR comes back, it becomes the DR and old BDR/new DR becomes DROTHER.

(There is no "remember BDR".)

I think you have to reload the routers to make them "forget" the old DR.

Now, lets suppose that we are again in the state where election has settled down.

R3 is DR, R2 is BDR and R1 is DROTHER.

If we change the priority of DROTHER to 4, election shouldn't occur,

unless we are running in the case of a bug with some IOS versions.

The conclusion from the above (as I see it) is that it is difficult to achieve

a router of your choice to become the DR or BDR when you want it.

You would have to remember a lot of details.

Or start reloading your routers to help them "forget"!

Regarding the dead interval, you are right.

If OSPF routers on a segment do not hear hellos from a neighbor for

the duration of the dead interval, they declare the neighbor dead.

That happens for every neighbor, not just the DR or BDR.

And yes, it takes time to detect neighbor failure.

The timers are usually optimized to achieve quite fast detection of neighbor failure,

while avoiding frequent neighbor change events in cases where a hello is missed,

but the neighbor doesn't really have a problem.

M.

Thanks Marikakis,

The point I want to make is :-

As you said, when R3 ( The Router who was DR ) goes down , R2 ( The BDR ) is promoted to DR and R1 (DROTHER) becomes BDR. Also, it is stated at many places that DR-BDR Election is NOT Pre-emptive. So, When R3 comes back online, why should it become DR ?

And if it does become DR , that means ..this is an exception and R2 & R1 do remember that R3 was the DR earlier and they should allow it to resume its Role of DR.

As far as OSPF Docs go..there is no mention of this issue anywhere.

If DR-BDR Election is NOT Pre-emptive .. R3 should not become DR again and should continue as DROTHER till both R2 & R1 go down.

Thanks

The ospf DR election is indeed non-preemptive.

Here's an example:

R3 and R2 are DR and BDR respectively:

r1#sh ip ospf nei

Neighbor ID Pri State Dead Time Address Interface

2.2.2.2 1 FULL/BDR 00:00:31 192.168.123.2 Ethernet0/0

3.3.3.3 1 FULL/DR 00:00:30 192.168.123.3 Ethernet0/0

I shutdown the interface on R3:

r3#config t

Enter configuration commands, one per line. End with CNTL/Z.

r3(config)#int e0/0

r3(config-if)#sh

R2 becomes the DR as expected:

r1#sh ip ospf nei

Neighbor ID Pri State Dead Time Address Interface

2.2.2.2 1 FULL/DR 00:00:39 192.168.123.2 Ethernet0/0

r1#

I bring R3 back:

r3(config-if)#no sh

R2 is still the DR, R1 the BDR. Note that R3 is DROTHER in spite of its RID that is higher than the two other routers:

r1#sh ip ospf nei

Neighbor ID Pri State Dead Time Address Interface

2.2.2.2 1 FULL/DR 00:00:36 192.168.123.2 Ethernet0/0

3.3.3.3 1 FULL/DROTHER 00:00:39 192.168.123.3 Ethernet0/0

r1#

Hope this helps,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

I had never heard of this "remember old DR" stuff, until I recently read it

in the Cisco Networking Academy Lab Companion for Routing.

You are right, this "remember old DR" is not mentioned in the standard.

So, we either have a "feature" specific to some IOS versions,

or those fellows that wrote the above book "cooked" the debug messages ;-)

M.