cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2829
Views
5
Helpful
5
Replies

OSPF - Multiaccess Broadcast Network - DR/BDR election - achieving consistency election result

SJ K
Level 5
Level 5

Hi all,

 

I understand the criteria in selecting a DR/BDR in a multi-access network (e.g. ethernet).

1) Priority

2) Router ID

and that the election took place using hello packets send out via the interfaces participating in an ospf area.

=============================================================================================

 

What I don't understand is,
e.g. let say there are 4 routers connected to a switch and all the 4 routers interfaces are configure to be in ospf area 0.

How does the 4 routers/ospf come to a conclusion that a DR and BDR is being elected already and how does it will be ensured that all of them are pointing to the same DR/BDR ?

 

Assuming the routers'RID as below

R1 - 1.1.1.1

R2 - 2.2.2.2

R3 - 3.3.3.3

R4 - 4.4.4.4

 

Lets assume the timeline below as well as per my understanding (including the questions)

T1) R2 received R1 hello, and concluded itself as the DR since it has a higher RID. 
   q1) Will it send something back to R1 to tell him that "hey i am the DR now".   or it will send it in its next Hello broadcast ?

T2) R2 then received R3 hello, and concluded that R3 should be the DR .  I believe R2 concluded R3 is the DR and include this info on its next hello message out  -- q2) right ?

T3) Then R1 also receive R3 hello and realize R3 should be the DR instead of R2, also, it then received the updated hello from R2 again (on T2) that R3 is the DR. So in R1, R2 and R3 now -> R3 is the DR.

T4) Then R1, R2, R3, received R4 hello and realize that R4 should be the DR. They make the necessary update and send out updated hello to each other.

--- do let me know if my understanding on the above is wrong

q3) What are the routers' interface state during DR/BDR election ? (ExStart ?)

 

q4) Assuming the DR/BDR are confirmed,  and the next state will be Exstart and Exchange to exchange LSDB information with the adjacent routers.

But the question is

-> how does a router know when that the DR/BDR are finalized already and it should proceed with the exchange ?

-> how does the routers collectively know that the DR/BDR are finalized already

In my above illustration above at T1 -> what if R1 confirmed that R2 is the DR and begin to exchange information with R2 before receiving the hello from R3 at T2 ?

 

q5) I tried to introduce a new router R5 with a higher priority and routerID into the broadcast network after the DR/BDR are confirmed / elected among the 4 routers, the new router R5 did not become the DR.  

This shows that there is some window period or ending criteria for DR/BDR election; After the election is completed, no new DR/BDR will be elected unless explicit triggered ( clear ip ospf process / reload etc)

But what is the window period or criteria ?

 

Please advise

Regards,
Noob

 

5 Replies 5

InayathUlla Sharieff
Cisco Employee
Cisco Employee

Noob,

OSPF election process happens in the Init phase during wich OSPF Hello protocol (multicast) is in charge of the DR/BDR elections for a network segment combining  various factors in the following order:
 
1- Choose the highest OSPF priority (default is 1, note that if you configure priority of 0 that router wont enter the election process - used on FR networks.)
2- Choose the highest router-id
3- Choose the highest loopback interface
4- Choose the highest configured physical interface (must be up/up)
 
Mind that there is no preemption meaning that when a DR goes ofline, the BDR takes his place and when it comes back online it wont be the DR again, for it to be considered for another election process in a network segment, all DR/BDR must go offline so that one router can become the DR again for that segment.

NOTE: DR/BDR election is per multi-access segment…not per area!).

I would like to highlight you the RFC 2328 which helps you to understand this concept. Always in the broadcast network the BDR is elected first followed by DR.
"The reason behind the election algorithm's complexity is the desire for an orderly transition from Backup Designated Router to Designated Router, when the current Designated Router fails. This orderly transition is ensured through the introduction of hysteresis: no new Backup Designated Router can be chosen until the old Backup accepts its new Designated Router responsibilities."

 

HTH

Regards

Inayath

Hi Inayath,

 

Thanks for the reply and the reference to the RFC document.

 

Can you let me know when/how does the routers actually come to a conclusion that an election has ended ? and changes (e.g. adding a new router with higher router-id, priority-id) will not result in new DR/BDR election) ?

 

Regards,
Noob

The basic neighbor discovery process (Hello), flooding (224.0.0.6), DR election (priority, RID).

What happens is that the DR's get messages (when Hello received from other "set") that a packet will be "ignored due to unknown neighbor".  It detects that other DR is listed in the hello packets and within 40 MILLIseconds, a DR election took place.

 

HTH

Regards

Inayath

Hi Inayath,

 

Am not really sure what you meant.

 

The basic neighbor discovery process (Hello), flooding (224.0.0.6), DR election (priority, RID).

Before a DR is elected, in the neighbor discovery process, i thought it should be flooding 224.0.0.5 instead ?

 

What happens is that the DR's get messages (when Hello received from other "set") that a packet will be "ignored due to unknown neighbor".

What do you mean by from other "set" ?   Can you elaborate abit further on  "ignore due to unknown neighbor" portion ?

 

It detects that other DR is listed in the hello packets and within 40 MILLIseconds, a DR election took place.

Do you mean if a DR detected another DR listed in the hello packet of another router, a DR election will take place ?
But again, if a DR/BDR is already elected,  i thought even if a new router is added in, the DR/BDR will remain unchanged ?

 

Regards,
Noob

asdvads vwe
Level 1
Level 1

It depends also when the routers came to live. If all of them came to live the same time, then the election of DR and BDR would happen as normal: 

- Who's got the highest Priority (If all priority the same, default 1, try next)

- Who's got the highest router ID

- Who's got the highest Loopback IP Address

- Who's got the highest IP Address on any Interface that is UP.

If for example the routers came to live at different times, then that would depend. 

For example, we got 4 Routers connected to a Switch, R1, R2, R3 and R4. 

R1= Priority 100, loopback 1.1.1.1

R2 = Priority 1, loopback 2.2.2.2

R3 = Priority 1, loopback 3.3.3.3

R4 = Priority 1, loopback 4.4.4.4

Let's assume that R2 came online first and it started to send Hello's claiming that he is the DR, as there was no response, because the other routers were offline, R2 declared himself to be the DR. 

And it doesn't matter when the rest of the routers come online and if they have highest Priority or highest IP Loopback interface, the R2 will remain DR and then who came online first after R2, will become BDR.

Best wishes, 

Stefan

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: