cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1524
Views
12
Helpful
14
Replies

Reselection of DR (OSPF)

miryu26783254
Level 1
Level 1

It is often said that to reselect DR and BDR, clear the ospf process.

What if you just want to reselect the DR to some specific router?

Is changing the prospective DR router priority to the highest, say 200 and

setting the old DR router's priority to 0 enough?

I presume the router with priority 0 is forbidden to be selected

1 Accepted Solution

Accepted Solutions

That is a very old discussion and certainly it is appropriate to start a new one. Thanks for the reference to the old discussion. There are several things in this discussion that I would like to respond to:

- you ask "Is changing the prospective DR router priority to the highest, say 200 and setting the old DR router's priority to 0 enough?" Probably it is not enough. When you change the existing DR priority to zero then that router withdraws as DR and the current BDR immediately (and automatically) becomes the new DR. So unless the prospective DR is already the BDR then you will need  changes in 2 routers to get your prospective candidate elected DR.

- you say "I presume the router with priority 0 is forbidden to be selected". That is correct.

- you ask "Is it okay to conclude that even if I set the DR's priority to 0, it will not initiate the re-election?" Technically that is not correct and your follow up is correct "And that even if it did, it would set the BDR as the next DR?". So if your prospective DR is not currently BDR it will require 2 election cycles for it to become DR.

- you say " Is it possible that the behaviour of OSPF differs from one device to another? I wonder if what Rick said is always true or not." If we are dealing with Cisco devices then I am pretty confident that the behavior would not differ between devices. If this is dealing with all IP routing devices then there might be some possibility of different behavior. It has been a long time since I read the details of the RFC but I believe that for at least the vast majority of ip routing devices it will take 2 elections to get your prospective candidate elected as DR.

HTH

Rick

View solution in original post

14 Replies 14

miryu26783254
Level 1
Level 1

Possible duplicate of https://community.cisco.com/t5/routing/ospf-priority-in-run-time/td-p/745202

, which is fairly an old conversation. It might be ok to start a new one.

As I know the re-elect need only to clear process in Dr router (old)

This forced other router to re-elect now one.

That is a very old discussion and certainly it is appropriate to start a new one. Thanks for the reference to the old discussion. There are several things in this discussion that I would like to respond to:

- you ask "Is changing the prospective DR router priority to the highest, say 200 and setting the old DR router's priority to 0 enough?" Probably it is not enough. When you change the existing DR priority to zero then that router withdraws as DR and the current BDR immediately (and automatically) becomes the new DR. So unless the prospective DR is already the BDR then you will need  changes in 2 routers to get your prospective candidate elected DR.

- you say "I presume the router with priority 0 is forbidden to be selected". That is correct.

- you ask "Is it okay to conclude that even if I set the DR's priority to 0, it will not initiate the re-election?" Technically that is not correct and your follow up is correct "And that even if it did, it would set the BDR as the next DR?". So if your prospective DR is not currently BDR it will require 2 election cycles for it to become DR.

- you say " Is it possible that the behaviour of OSPF differs from one device to another? I wonder if what Rick said is always true or not." If we are dealing with Cisco devices then I am pretty confident that the behavior would not differ between devices. If this is dealing with all IP routing devices then there might be some possibility of different behavior. It has been a long time since I read the details of the RFC but I believe that for at least the vast majority of ip routing devices it will take 2 elections to get your prospective candidate elected as DR.

HTH

Rick

Joseph W. Doherty
Hall of Fame
Hall of Fame

Clearing the OSPF process should cause a DR/BDR election but first it's, I think, a ham handed way to do this as it impacts the whole OSPF environment.  Perhaps, as DR/BDR is per interface, bumping the one interface alone with be more appropriate.

Second, as I also recall, an existing DR or BDR is not changed during an election unless the DR or BDR, itself, is being bumped/changed.

I.e. migrating DR and/or BDR to specific devices might be a little more complex than it first appears.

In your other posting, its reference has Rick describing setting priority to zero on a DR or BDR will cause that device to immediately withdraw from being either.

Thanks. Is it possible that the behaviour of OSPF differs from one device to another? I wonder if what Rick said is always true or not.

Depends whether, and how, RFC addresses that situation, and whether, and how, vendor implement OSPF.  RFCs do evolve too.

The behavior Rick described, isn't something I've ever tested, but Rick is usually accurate, but, reread above sentence.

Martin L
VIP
VIP

Yes, the router with priority 0 is forbidden to participate in selection. 2 Other main components of elections are DR existence (or luck of it)  and Wait Timer (often forgotten timer).  OSPF DR/BDR Election process is different and depends on whether DR currently exists or not. For brand new routers OSPF election process starts looking at Router's highest priority (255 over ) while 0 is not to be considered and skipping such router.  Then, If there is a tie on priority values, OSPF chooses the router with highest RID. Then, BDR is chosen based on next-best priority - or in case of a tie, next-best (highest) RID.

As I mentioned above, OSPF election Process differs when DR already exists.  If a DR (and BDR) already have been elected, there is no election until either one fails! That is either the DR or BDR fails. Now we have another critical difference.  If the DR fails, the BDR becomes the DR as a sort of promotion. This is regardless of new and possibly higher priority router has joined.  New election is held to choose a new BDR. If the BDR fails, a new election is held for BDR, and the DR remains stable and the same.

Regards, ML
**Please Rate All Helpful Responses **

Is it okay to conclude that even if I set the DR's priority to 0, it will not initiate the re-election? And that even if it did, it would set the BDR as the next DR?

BTW what Martin further explained is my recollected expectation.

Assuming setting DR to priority to 0 does cause DR to drop being DR, existing BDR (as we [Martin and I] expect) would become DR and "best" candidate "other" router would become BDR.

Basically, the DR/BDR elections don't preempt (like HSRP without preempt option - if that helps any).  Likely this is done this way to better preserve OSPF stability.  Even the idea of having a BDR would be to preclude/minimize the OSPF interruption if you had to wait on a new DR election result.

if u set the DR's priority to 0 after elections has happened at least once, it will not initiate the re-election. you must do

 clear ip ospf process

and then yes to see changes.

Note also Wait timer is important as well as non-preempt behavior of OSPF.  When OSPF interface comes up, there is default wait timer in effect till its expiration (default 10 or 40 seconds).  nothing will happen till wait timer ends.

note: for those using PT for CCNA exam, there were some issues with DR/BDR elections in PT some time ago; not sure if that is fixed.

Regards, ML
**Please Rate All Helpful Responses **

"you must do

clear ip ospf process

and then yes to see changes."

Hmm, again the point is made you must clear the IP OSPF process.  Is this true, i.e. the only way?

Because as a DR/BDR is tied to a shared segment, which usually means one interface from a router, if I shut that interface, and or explicitly pull or change that's interface's OSPF information, would not that drop that router as a DR or BDR for that shared segment?  (BTW, I'm also assuming many of these would require a non-directly physically connected OSPF neighbor to detect the DR/BDR neighbor has gone "dead", although changing some of the network attributes might [?] result in DR/BDR drop on/with the next OSPF hello.)

In the past, I have had core and/or distribution routers with many OSPF links, really don't want to drop all of them to "reset" one particular DR/BDR usage.  (Then again, for reasons I'll not discuss here, generally almost never use DR/BDR topologies.)

@Joseph W. Doherty makes a very interesting point about clearing the

ospf process

not being the only way to change DR/BDR. 

This has been an interesting discussion about a very subtle point. I am glad that you now consider it solved.

HTH

Rick

first I config R1 as DR and R2 as BDR 
YOU CAN SEE elect in debug 
then I change the priority of R2 to be higher than R1 
still R3 see R1 as DR until I

clear ip ospf process 

IN R1 and the R3 do re-elect and select R2 as new Dr and R1 as new BDR 

Screenshot (478).pngScreenshot (482).png

Hello
By default after the election of the DR/BDR has taken place, even with a new router coming online with a better priority, OSPF will not preempt to that router becoming the DR or BDR.

In the event of the loss of the DR the elected BDR will take the role of DR and then the new router will be able to participate for the BDR role, With the loss of the just BDR, the new rtr will be able to participate for that BDR role

The non-preemption rule is not a set rule either, in certain circumstances (say on a lan segment being temporary partitioned - indirect link failure) it will be ignored as such when this link failure is restored the ospf rtrs re-enter the DR/BDR election.


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul
Review Cisco Networking products for a $25 gift card