Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

OSPF Question

Currently studying for the BSCI exam. Looking at different resources seem to say different things.

I understand the 7 ospf states the process goes through, but the question I ask is at what point does the DR and BDR get elected? The way I uderstand it it happens at the TWO-WAY state but other say it happens at the EX-START state?

Many thanks for any replys

4 REPLIES

Re: OSPF Question

Hi James,

The DR and BDR election start immediately after 2 way state or you can say with 2 way state.

Two-way: There is bi-directional communication with a neighbor. The router has seen itself in the Hello packets coming from a neighbor. At the end of this stage the DR and BDR election would have been done. At the end of the 2way stage, routers will decide whether to proceed in building an adjacency or not. The decision is based on whether one of the routers is a DR or BDR or the link is a point-to-point or a virtual link.

But not at ex-start state. In ex-start state only master-slave relationship is done where they negotiate on initial sequence number.

Have a look at this link

http://www.cisco.com/warp/customer/104/1.html#t20

HTH, if yes please rate the post.

Ankur

Re: OSPF Question

Hello,

DR and BDR selection are solely done with Hello packets. Ex-Start means, that DB Description packets are exchanged, which do not contain any reference to DR or BDR. Assume you have an OSPF router R1 connected to a hub and connect a second router R2. The packet sequence would be something like this (from an actual packet trace, omitting Acks):

Hello(R1) DR:R1 BDR:0.0.0.0

Hello(R1) DR:R1 BDR:0.0.0.0

Hello(R2) DR:0.0.0.0 BDR:0.0.0.0

Hello(R1) DR:R1 BDR:0.0.0.0 Active Neighbor:R2

DB-Desc(R2)

DB-Desc(R1)

LS-Req(R1)

LS-Req(R2)

LS-Update(R2)

LS-Update(R1)

Hello(R2) DR:R1 BDR:R2 Active Neighbor: R1

LS-Update(R1)

...

As you can see the DB-Exchange and DR/BDR election happen in parallel on a timescale, yet only Hello packets are involved with DR/BDR election.

Hope this helps! Please rate all posts.

regards, Martin

Purple

Re: OSPF Question

Hi,

As Martin indicated, the act of forming neighbors/adjacencies and determining DR/BDR is done in parallet. It helps to understand that there are 2 state machines at play here. The first one is the interface state machine and it is this which dictates when the DR/BDR election takes place. The second is the neighbor state machine, of which a separate instance is run for every neighbor.

I've attached a file with appropriate extracts from RFC2328 which illustrate the state machine.

The most important event regarding elections is the NeighborChange event.

Quoting from RFC2328, this event happens as a result of:

There has been a change in the set of bidirectional

neighbors associated with the interface. The (Backup) Designated Router needs to be recalculated. The following neighbor changes lead to the NeighborChange event.

o Bidirectional communication has been established to a neighbor. In other words, the state of the neighbor has transitioned to 2-Way or higher.

o There is no longer bidirectional communication with a neighbor. In other words, the state of the neighbor has transitioned to Init or lower.

o One of the bidirectional neighbors is newly declaring itself as either Designated Router or Backup Designated Router. This is detected through examination of that neighbor's Hello Packets.

o One of the bidirectional neighbors is no longer

declaring itself as Designated Router, or is no longer declaring itself as Backup Designated Router. This is again detected through examination of that neighbor's Hello Packets.

o The advertised Router Priority for a bidirectional neighbor has changed. This is again detected through examination of that neighbor's Hello Packets.

The critical thing to note here is that only neighbors in a state of TwoWay or greater are considered eligible for DR/BDR election.

Hope that helps,

Paresh

Community Member

Re: OSPF Question

Thanks everyone great help

James

224
Views
15
Helpful
4
Replies
CreatePlease to create content