anand.dahiya Wed, 07/25/2007 - 08:00
User Badges:

well i read taht bdr is elected first but the reason for that was not given and i m very much interested in mechanics

ankbhasi Wed, 07/25/2007 - 08:40
User Badges:
  • Cisco Employee,

Hi Anand,

My thinking goes that if reverse was the behavior then more logic is required for election process to run.

Currently logic in election is elect BDR first and if there is no DR promote it as BDR and if DR goes down BDR is again promoted to DR and new BDR is elected and if BDR goes down new BDR can be elected so if you see always one election process is run to elect BDR.

Now lets say DR is elected first then the election logic need to be run 2 times one for DR and second for BDR specific while in current arcchitecture only once election logic is done to elect BDR and promoted to DR and new BDR is elected again so election login is just one, for BDR only.

So if DR is elected first and it goes down it has to run seperate logic for DR election and if BDR goes down because you cannot run DR election logic you have to run seperate election logic for BDR.

I hope I am able to explain my views. Again these are my thaughts and no inputs from development.



anand.dahiya Wed, 07/25/2007 - 09:03
User Badges:

Hi dear

i was just going through rfc 2328 that is of ospf and i found that

In order to make the transition to a new Designated Router

smoother, there is a Backup Designated Router for each broadcast

and NBMA network.

well might be this is the best reason

mchoo2005 Wed, 07/25/2007 - 16:44
User Badges:

Also think of it this way... If the DR is elected first, imagine the havoc it'd cause on a network that already has a DR.

Amit Singh Thu, 07/26/2007 - 02:18
User Badges:
  • Cisco Employee,

I agree with Ankur on this..This is correct.... Rather than electing a DR, then repeating the election for the BDR, it's simpler to present logic for BDR election, only, and just promote the BDR to DR whenever we lose the DR. It makes the code simpler--and one thing you'll find about OSPF is that there's a lot of stuff in there just to make the code, rather than the protocol, simpler.

HTH,Please rate if it does.

-amit singh

GillieLucent Wed, 08/01/2007 - 02:25
User Badges:

Hi all,

For BDR election, it looks for routers that have declared themselves as BDR. If no routers have declared themselves BDR, it considers the router having highest Router Priority/ RouterID.

But for DR election, it only looks for router that have declared themselves as DR.

If DR election happens first, consider when a router comes up, it looks for routers that have declared themselves as DR, intially there won't be any router. So, election fails.

If BDR election happens first, when the router comes up, it looks for routers that have declared themselves as BDR , initially there won't be any router. So, then it looks for router with highest Router priority/RouterID.

Hopes this helps.



Richard Burts Wed, 08/01/2007 - 07:55
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

From my perspective there are several reasons why there is election of BDR and no election process directly for DR. As some others have commented it makes the code more simple if there is a single election process and I believe that this is true.

But I believe that there is an even more important reason to have a single election process and to promote the DR rather than having an election for DR. To understand this I believe it is helpful to review some concepts of OSPF: forming a full adjacency is the way that all routers on the segment are fully in sync with each other. On a multiaccess segment (the only place where there is DR and BDR) routers do not form full adjacency with all routers on the segment and form full adjacency with only the DR and the BDR. In the way that OSPF works, if the DR stops functioning the BDR immediately takes over and the network remains stable because all the routers on the segment still have a full adjacency with a router on that segment (and therefore are all still in sync with each other). If OSPF worked differently and if there were a direct election for DR then the routers would have to take some time to perform the election and then all routers on the segment would need to form a full adjacency with the new DR. Until the routers have formed a full adjacency they will not forward packets on this segment because they do not know if they are in sync and if they have an accurate map of the topology. This would be disruptive to the network on that segment. We avoid that delay and that disruption by having a BDR who has formed the full adjacencies in the background and not impacted processing on the segment while full adjacencies are formed. So having an election only for BDR and not a separate election for DR makes the protocol converge much more quickly in addition to the simplification of the code required to perform it.



GillieLucent Wed, 08/01/2007 - 08:34
User Badges:


I wonder how the election of DR/BDR is a single process .

Generally, first the election of BDR happens, then the election of DR happens. Each election looks for different routers.

Can you explain me more on this ?




This Discussion