A question about election DR and BDR of ospf network

Prepare to pass CCNA, CCDA, CCIP, CCDP, CCNP, CCIE and specializations.

Moderator: sva

A question about election DR and BDR of ospf network

Postby xuchaocisco on Thu Jul 01, 2010 3:54 pm

Hi,

I am learning Routering TCP/IP volume 1. I cann't understand election procedure of the DR and BDR .

why ospf process first election BDR not DR? And when no router in the subset claims to be the BDR,why the neighbor with the highest priority will become the BDR? if the neighbor with the highest priority become the BDR,how the DR choose ? Choose the neighbor with the higher priority ?
xuchaocisco
 

Re: A question about election DR and BDR of ospf network

Postby Conwyn on Thu Jul 01, 2010 3:58 pm

Hi Xuchao

I think the logic is if a router appears it tries to become BDR first because a DR may exist.
If there is no DR then it becomes the DR

The next router comes up as a BDR discovers the DR and has an election

The third router see the hellos and has an election


Regards Conwyn

Here is one router
Code: Select all
*Mar  1 00:02:36.311: OSPF: DR/BDR election on FastEthernet0/0
*Mar  1 00:02:36.311: OSPF: Elect BDR 10.0.0.1
*Mar  1 00:02:36.311: OSPF: Elect DR 10.0.0.1
*Mar  1 00:02:36.315: OSPF: Elect BDR 0.0.0.0
*Mar  1 00:02:36.315: OSPF: Elect DR 10.0.0.1
*Mar  1 00:02:36.315:        DR: 10.0.0.1 (Id)   BDR: none

So it elects itself as DR with no BR

Then a second router appears
debug on router 1
Code: Select all
*Mar  1 00:11:16.451: OSPF: Rcv DBD from 10.0.0.2 on FastEthernet0/0 seq 0x90A opt 0x52 flag 0x7 len 32  mtu 1500 state INIT
*Mar  1 00:11:16.455: OSPF: 2 Way Communication to 10.0.0.2 on FastEthernet0/0,state 2WAY
*Mar  1 00:11:16.455: OSPF: Neighbor change Event on interface FastEthernet0/0
*Mar  1 00:11:16.455: OSPF: DR/BDR election on FastEthernet0/0
*Mar  1 00:11:16.455: OSPF: Elect BDR 10.0.0.2
*Mar  1 00:11:16.459: OSPF: Elect DR 10.0.0.1
*Mar  1 00:11:16.459:        DR: 10.0.0.1 (Id)   BDR: 10.0.0.2 (Id)
*Mar  1 00:11:16.459: OSPF: Send DBD to 10.0.0.2 on FastEthernet0/0 seq 0x92 opt 0x52 flag 0x7 len 32
*Mar  1 00:11:16.463: OSPF: NBR Negotiation Done. We are the SLAVE

Router 3 comes online
Router 1 debug
Code: Select all
*Mar  1 00:19:06.359: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet0/0 from 10.0.0.1
*Mar  1 00:19:14.703: OSPF: Rcv hello from 10.0.0.3 area 0 from FastEthernet0/010.0.0.3
*Mar  1 00:19:14.707: OSPF: Neighbor change Event on interface FastEthernet0/0
*Mar  1 00:19:14.707: OSPF: DR/BDR election on FastEthernet0/0
*Mar  1 00:19:14.707: OSPF: Elect BDR 10.0.0.2
*Mar  1 00:19:14.707: OSPF: Elect DR 10.0.0.1
*Mar  1 00:19:14.711:        DR: 10.0.0.1 (Id)   BDR: 10.0.0.2 (Id)
*Mar  1 00:19:14.711: OSPF: Neighbor change Event on interface FastEthernet0/0
*Mar  1 00:19:14.711: OSPF: DR/BDR election on FastEthernet0/0
*Mar  1 00:19:14.711: OSPF: Elect BDR 10.0.0.2
*Mar  1 00:19:14.715: OSPF: Elect DR 10.0.0.1
*Mar  1 00:19:14.715:        DR: 10.0.0.1 (Id)   BDR: 10.0.0.2 (Id)
*Mar  1 00:19:14.715: OSPF: End of hello processing
*Mar  1 00:19:15.755: OSPF: Rcv hello from 10.0.0.2 area 0 from FastEthernet0/010.0.0.2
*Mar  1 00:19:15.755: OSPF: End of hello processing

Router 3 debug
Code: Select all
*Mar  1 00:01:00.195: OSPF: Rcv hello from 10.0.0.2 area 0 from FastEthernet0/010.0.0.2
*Mar  1 00:01:00.195: OSPF: 2 Way Communication to 10.0.0.2 on FastEthernet0/0,state 2WAY
*Mar  1 00:01:00.199: OSPF: Backup seen Event before WAIT timer on FastEthernet0/0
*Mar  1 00:01:00.199: OSPF: DR/BDR election on FastEthernet0/0
*Mar  1 00:01:00.199: OSPF: Elect BDR 10.0.0.2
*Mar  1 00:01:00.203: OSPF: Elect DR 10.0.0.1
*Mar  1 00:01:00.203:        DR: 10.0.0.1 (Id)   BDR: 10.0.0.2 (Id)
*Mar  1 00:01:00.203: OSPF: Send DBD to 10.0.0.1 on FastEthernet0/0 seq 0xB2 opt0x52 flag 0x7 len 32
*Mar  1 00:01:00.207: OSPF: Send DBD to 10.0.0.2 on FastEthernet0/0 seq 0xAE8 opt 0x52 flag 0x7 len 32
*Mar  1 00:01:00.207: OSPF: Send immediate hello to nbr 10.0.0.2, src address 10.0.0.2, on FastEthernet0/0
*Mar  1 00:01:00.211: OSPF: Send hello to 10.0.0.2 area 0 on FastEthernet0/0 from 10.0.0.3
*Mar  1 00:01:00.211: OSPF: End of hello processing
*Mar  1 00:01:00.243: OSPF: Rcv DBD from 10.0.0.1 on FastEthernet0/0 seq 0x2537opt 0x52 flag 0x7 len 32  mtu 1500 state EXSTART
*Mar  1 00:01:00.247: OSPF: First DBD and we are not SLAVE
*Mar  1 00:01:00.251: OSPF: Rcv DBD from 10.0.0.1 on FastEthernet0/0 seq 0xB2 opt 0x52 flag 0x2 len 92  mtu 1500 state EXSTART
*Mar  1 00:01:00.251: OSPF: NBR Negotiation Done. We are the MASTER
*Mar  1 00:01:00.251: OSPF: Send DBD to 10.0.0.1 on FastEthernet0/0 seq 0xB3 opt0x52 flag 0x3 len 52
*Mar  1 00:01:00.259: OSPF: Rcv DBD from 10.0.0.2 on FastEthernet0/0 seq 0xEF2 opt 0x52 flag 0x7 len 32  mtu 1500 state EXSTART
*Mar  1 00:01:00.259: OSPF: First DBD and we are not SLAVE
*Mar  1 00:01:00.263: OSPF: Rcv DBD from 10.0.0.2 on FastEthernet0/0 seq 0xAE8 opt 0x52 flag 0x2 len 92  mtu 1500 state EXSTART
*Mar  1 00:01:00.267: OSPF: NBR Negotiation Done. We are the MASTER
*Mar  1 00:01:00.267: OSPF: Send DBD to 10.0.0.2 on FastEthernet0/0 seq 0xAE9 opt 0x52 flag 0x3 len 52
*Mar  1 00:01:00.387: OSPF: Rcv DBD from 10.0.0.1 on FastEthernet0/0 seq 0xB3 opt 0x52 flag 0x0 len 32  mtu 1500 state EXCHANGE
*Mar  1 00:01:00.391: OSPF: Send DBD to 10.0.0.1 on FastEthernet0/0 seq 0xB4 opt0x52 flag 0x1 len 32
*Mar  1 00:01:00.391: OSPF: Send LS REQ to 10.0.0.1 length 36 LSA count 3
*Mar  1 00:01:00.395: OSPF: Rcv DBD from 10.0.0.2 on FastEthernet0/0 seq 0xAE9 opt 0x52 flag 0x0 len 32  mtu 1500 state EXCHANGE
*Mar  1 00:01:00.395: OSPF: Send DBD to 10.0.0.2 on FastEthernet0/0 seq 0xAEA opt 0x52 flag 0x1 len 32
*Mar  1 00:01:00.399: OSPF: Send LS REQ to 10.0.0.2 length 36 LSA count 3
*Mar  1 00:01:00.559: OSPF: Rcv LS REQ from 10.0.0.2 on FastEthernet0/0 length 36 LSA count 1
*Mar  1 00:01:00.559: OSPF: Send UPD to 10.0.0.2 on FastEthernet0/0 length 40 LSA count 1
*Mar  1 00:01:00.563: OSPF: Rcv LS REQ from 10.0.0.1 on FastEthernet0/0 length 36 LSA count 1
*Mar  1 00:01:00.563: OSPF: Send UPD to 10.0.0.1 on FastEthernet0/0 length 40 LSA count 1
*Mar  1 00:01:00.563: OSPF: Rcv DBD from 10.0.0.2 on FastEthernet0/0 seq 0xAEA opt 0x52 flag 0x0 len 32  mtu 1500 state EXCHANGE
*Mar  1 00:01:00.567: OSPF: Exchange Done with 10.0.0.2 on FastEthernet0/0
*Mar  1 00:01:00.567: OSPF: Rcv DBD from 10.0.0.1 on FastEthernet0/0 seq 0xB4 opt 0x52 flag 0x0 len 32  mtu 1500 state EXCHANGE
*Mar  1 00:01:00.571: OSPF: Exchange Done with 10.0.0.1 on FastEthernet0/0
*Mar  1 00:01:00.579: OSPF: Rcv LS UPD from 10.0.0.2 on FastEthernet0/0 length 132 LSA count 3
*Mar  1 00:01:00.583: OSPF: Synchronized with 10.0.0.1 on FastEthernet0/0, stateFULL
*Mar  1 00:01:00.587: %OSPF-5-ADJCHG: Process 1, Nbr 10.0.0.1 on FastEthernet0/0from LOADING to FULL, Loading Done
*Mar  1 00:01:00.587: OSPF: Synchronized with 10.0.0.2 on FastEthernet0/0, stateFULL
*Mar  1 00:01:00.591: %OSPF-5-ADJCHG: Process 1, Nbr 10.0.0.2 on FastEthernet0/0from LOADING to FULL, Loading Done
*Mar  1 00:01:00.591: OSPF: Rcv LS UPD from 10.0.0.1 on FastEthernet0/0 length 132 LSA count 3
*Mar  1 00:01:00.707: %SYS-5-CONFIG_I: Configured from console by console
*Mar  1 00:01:00.711: OSPF: Rcv LS UPD from 10.0.0.1 on FastEthernet0/0 length 64 LSA count 1
*Mar  1 00:01:00.719: OSPF: Rcv LS UPD from 10.0.0.1 on FastEthernet0/0 length 64 LSA count 1
*Mar  1 00:01:05.707: OSPF: Build router LSA for area 0, router ID 10.0.0.3, seq0x80000002
*Mar  1 00:01:05.899: OSPF: Rcv LS UPD from 10.0.0.1 on FastEthernet0/0 length 64 LSA count 1
*Mar  1 00:01:05.907: OSPF: Rcv hello from 10.0.0.1 area 0 from FastEthernet0/010.0.0.1
*Mar  1 00:01:05.907: OSPF: End of hello processing

R2#
Code: Select all
*Mar  1 00:01:09.619: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet0/0 from 10.0.0.3
*Mar  1 00:01:10.159: OSPF: Rcv hello from 10.0.0.2 area 0 from FastEthernet0/010.0.0.2
*Mar  1 00:01:10.163: OSPF: End of hello processing
*Mar  1 00:01:10.515: OSPF: Rcv hello from 10.0.0.1 area 0 from FastEthernet0/010.0.0.1
*Mar  1 00:01:10.515: OSPF: End of hello processingno debug all
All possible debugging has been turned off
R2#
*Mar  1 00:01:16.151: OSPF: Rcv hello from 10.0.0.1 area 0 from FastEthernet0/010.0.0.1
*Mar  1 00:01:16.155: OSPF: End of hello processing
Conwyn
 

Re: A question about election DR and BDR of ospf network

Postby xuchaocisco on Thu Jul 01, 2010 3:59 pm

Hi,Conwyn

It is used the command debug ip ospf event which information you tell me ,I have try it again yesterday and know other knowledge .But there are ospf events over the interfaces runing ospf.In fact ,I want to know detailed steps of how ospf interface to elect DR and BDR if them receive neighbors' hello packets.
xuchaocisco
 

Re: A question about election DR and BDR of ospf network

Postby Stanley B on Thu Jul 01, 2010 4:00 pm

Hello,

I thought that might help you...got it from Safari.com - Browsing available for all. OSPF Network Design Solutions, Second Edition Cisco Press Book - Chapter 2. Introduction to OSPF > OSPF Operational Environment - Pg. 84

http://my.safaribooksonline.com/9781587 ... A4NDYvODQ=

https://learningnetwork.cisco.com/servl ... rocess.bmp

Also check out:

http://www.cisco.com/en/US/tech/tk365/t ... .shtml#t21


Best wishes,
-Stan
Stanley B
 

Re: A question about election DR and BDR of ospf network

Postby abdel_n on Thu Jul 01, 2010 4:01 pm

Hi Xuchao,

Here is the story of the "OSPF in the multiaccess network" I hope you will like it

As a link-state protocol OSPF establish neighbor relationships (full) with its neighbors to exchange updates.
In a multiaccess networks like Ethernet or NBMA (FR/ATM), each connected routers will establish a neighbor relationship (full) with all other routers, to exchange updates.
So just imagine 10 routers (not considered a big network) connected through Ethernet, will establish n*(n-1)/2=10*(9)/2= 45 "full" neighbor relationships, and their associated "update flooding".

To avoid this situation, a DR (Designated router) will take charge of collecting all updates from each participants (full relationship) and advertise it to others, while the remanding participants will establish only a 2-way relationships with each other without exchanging updates ("I recognize you as a neighbor, but I'm exchanging updates ONLY with the DR"). ==> ONLY (n-1)=9 "full" relationships + update flooding's.

Because DR is a crucial role, it will be a good idea to back it up, hence the BDR (Backup Designated router)
DR election criteria:
- Highest priority
- otherwise highest Router ID
BDR will be the second best participant.

Routers with priority=0 are excluded from the election (will never be DR/BDR).


Hope this answer your questions.
abdel_n
 

Re: A question about election DR and BDR of ospf network

Postby Stanley B on Thu Jul 01, 2010 4:04 pm

I think the information above answers it, but leme, try and answer each question closer....
I can't understand election procedure of the DR and BDR - please see chart

why ospf process first elects BDR not DR? - by design

And when no router in the subset claims to be the BDR,why the neighbor with the highest priority will become the BDR? - because the priority value is added to the router id and the algorithm selects the highest number for BDR.

if the neighbor with the highest priority becomes the BDR, how the DR choose? - see last step in chart. before final bdr "blessing" the algorythm checks if someone else came up with a dr, if not it makes the bdr a dr, then repeats the process again attempting to elect bdr.

Choose the neighbor with the higher priority ? - see answer on previous question. actually bdr may end up having higher priority than the elected dr, in case if dr was chosen, then another router with higher priority booted up same time as existing routers initiated a second election process for bdr.


-Stan
Stanley B
 

Re: A question about election DR and BDR of ospf network

Postby xuchaocisco on Thu Jul 01, 2010 4:04 pm

Hi,Stanley

Thanks for your help!
xuchaocisco
 


Return to Cisco Career Certifications

Who is online

Users browsing this forum: No registered users and 7 guests

cron