08-28-2014 11:32 AM - edited 03-07-2019 08:34 PM
Routers on the same ethernet segment - during bootup (if running OSPF) does the Master/Slave part happen after the DR/BDR are elected?
Also - If I brought up a new router into that segment (while the other routers are already on and converged) does the master/slave process happen still between this router and the others? I have read a few articles, including the OSPF section in the routing tcp/ip book, but still a bit confused as to when the master/slave happens in relation to the dr/bdr election.
Thanks
Solved! Go to Solution.
08-28-2014 12:37 PM
Hi,
Whenever router needs to exchange LSA database, it needs to decide Master/Slave relationship. Now in multiaccess network, all nodes exchange database only with DR/BDR and maintains 2-way neighborship with DRothers.
If you add a new router in a multiaccess network where DR/BDR already elected, in 2 way state new router will come to know about DR/BDR and will go for master/slave relationship (Extart state) only with them not with DRother nodes.
OSPF neighbor state machine
1. Down
2. Init
3. 2-way ------> DR/BDR election
4. ExStart ------> Master/Slave relationship
5. Exchnage
6. Loading
7. Full
-- Pls dont forget to rate helpful posts --
Regards,
Akash
08-28-2014 12:37 PM
Hi,
Whenever router needs to exchange LSA database, it needs to decide Master/Slave relationship. Now in multiaccess network, all nodes exchange database only with DR/BDR and maintains 2-way neighborship with DRothers.
If you add a new router in a multiaccess network where DR/BDR already elected, in 2 way state new router will come to know about DR/BDR and will go for master/slave relationship (Extart state) only with them not with DRother nodes.
OSPF neighbor state machine
1. Down
2. Init
3. 2-way ------> DR/BDR election
4. ExStart ------> Master/Slave relationship
5. Exchnage
6. Loading
7. Full
-- Pls dont forget to rate helpful posts --
Regards,
Akash
04-02-2017 04:55 PM
Hi Akash,
Good post, so basically the router with interface having a higher IPv4/v6 address (for that particular broadcast or point-to-point segment) would become the master (or the initiator) and would send Database description packets with initiating sequence numbers?
Thanks
Nage
09-18-2017 06:14 AM
08-28-2014 01:00 PM
08-29-2014 12:10 AM
Hi,
Yes dr/bdr can also become slave. Election is based on ip address and node with higher ip address becomes Master
ExStart.
In this state, the router and its neighbor establish a master/slave relationship and determine the initial DD sequence number in preparation for the exchange of Database Description packets. The neighbor with the highest interface address becomes the master.
Please see debug outputs below. there is ospf neighborship between R1 (9.0.0.1) and R2(9.0.0.2). Have configured "ip ospf priority 0" on R2 so that it can not become DR/BDR. But still since this router is having higher ip address, it became Master and R1 became Slave.
R2_7606B#show ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
9.0.0.1 1 FULL/DR 00:00:34 9.9.12.1 GigabitEthernet1/17
Aug 29 07:00:07.673: OSPF: 2 Way Communication to 9.0.0.1 on GigabitEthernet1/17, state 2WAY
Aug 29 07:00:07.673: OSPF: Backup seen Event before WAIT timer on GigabitEthernet1/17
Aug 29 07:00:07.673: OSPF: DR/BDR election on GigabitEthernet1/17
Aug 29 07:00:07.673: OSPF: Elect BDR 0.0.0.0
Aug 29 07:00:07.673: OSPF: Elect DR 9.0.0.1
Aug 29 07:00:07.673: DR: 9.0.0.1 (Id) BDR: none
Aug 29 07:00:07.673: OSPF: GigabitEthernet1/17 Nbr 9.0.0.1: Prepare dbase exchange
Aug 29 07:00:07.673: OSPF: Send DBD to 9.0.0.1 on GigabitEthernet1/17 seq 0x2C8 opt 0x52 flag 0x7 len 32
Aug 29 07:00:07.673: OSPF: Rcv DBD from 9.0.0.1 on GigabitEthernet1/17 seq 0xD62 opt 0x52 flag 0x7 len 32 mtu 1500 state EXSTART
Aug 29 07:00:07.673: OSPF: First DBD and we are not SLAVE
Aug 29 07:00:07.673: OSPF: Rcv DBD from 9.0.0.1 on GigabitEthernet1/17 seq 0x2C8 opt 0x52 flag 0x2 len 272 mtu 1500 state EXSTART
Aug 29 07:00:07.673: OSPF: NBR Negotiation Done. We are the MASTER
Aug 29 07:00:07.673: OSPF: GigabitEthernet1/17 Nbr 9.0.0.1: Summary list built, size 12
Aug 29 07:00:07.673: OSPF: Send DBD to 9.0.0.1 on GigabitEthernet1/17 seq 0x2C9 opt 0x52 flag 0x1 len 272
Aug 29 07:00:07.701: OSPF: Rcv DBD from 9.0.0.1 on GigabitEthernet1/17 seq 0x2C9 opt 0x52 flag 0x0 len 32 mtu 1500 state EXCHANGE
Aug 29 07:00:07.701: OSPF: Exchange Done with 9.0.0.1 on GigabitEthernet1/17
Aug 29 07:00:07.701: OSPF: Synchronized with 9.0.0.1 on GigabitEthernet1/17, state FULL
Aug 29 07:00:07.701: %OSPF-5-ADJCHG: Process 100, Nbr 9.0.0.1 on GigabitEthernet1/17 from LOADING to FULL, Loading Done
Aug 29 07:00:07.701: OSPF: Register neighbor 9.9.12.1 on interface GigabitEthernet1/17 with BFD
Aug 29 07:00:07.701: OSPF: GigabitEthernet1/17 Nbr 9.0.0.1: Clean-up dbase exchange
Aug 29 07:00:08.173: OSPF: Build router LSA for area 0, router ID 9.0.0.2, seq 0x80000552, process 100
Aug 29 07:00:08.477: OSPF: BFD Up event intf GigabitEthernet1/17 nbr 9.9.12.1
Aug 29 07:01:34.230: OSPF: We are not DR to build Net LSA for interface GigabitEthernet1/17
Aug 29 07:01:34.230: OSPF: Build network LSA for GigabitEthernet1/17, router ID 9.0.0.2
--Pls dont forget to rate helpful posts--
-Akash
09-16-2017 03:56 AM
Just to clarify something re. "the neighbour with the highest IP address becomes the master"...
RFC2328 states
...and the neighbor's Router ID is larger than the router's own. In this case the router is now Slave.
Router ID can be manually set, the highest unshut loopback interface IP address not used in any OSPF process, or the highest unshut non-loopback interface IP address not used in any OSPF process.
Unless this is another of those cases where Cisco choose to ignore the finer points of RFCs, Akash's reply should probably state Router ID rather than IP address.
09-16-2017 11:23 PM - edited 09-16-2017 11:38 PM
Election is based on ip address and node with higher ip address becomes Master.
Not really. Priority comes first. If priorities are not equal highest priority wins, 0 as it is already said can't become DR or BDR.
The neighbor with the highest interface address becomes the master.
and then router ID comes into count (highest interface address is not part of calculation except to elect ospf router-id if router-id is not manually configured (highest loopback and then highest interface IP address))
This is topic from 2014 :(
09-17-2017 01:43 AM - edited 09-17-2017 02:31 AM
Be careful - the original question relates to the negotiation of Master/Slave roles for exchanging LSAs, not the election of a DR.
Router ID is set (in order of preference):
1) manually
2) highest unshut loopback interface IP address not used in any OSPF process
3) highest unshut non-loopback interface IP address not used in any OSPF process
The DR is elected based upon highest priority (0 - 255, 0 being disabled) then, in the case of a tie, the highest Router ID. This election takes place at the end of the 2-way state.
Once two routers have ascertained that they need to exchange LSAs, they must establish who will be the Master and who will be the Slave. This occurs in the ExStart state by an exchange of empty DBDs containing (among other things) Router IDs. The highest Router ID becomes the Master. Hence, contrary to what it's pretty natural to assume, the DR isn't necessarily also the Master.
I know it's an old post, I came across it while trying to confirm these points during revision :-)
09-20-2022 08:11 PM
Hi Akash:
According my latest test, the Master/Salve election is not the way " The neighbor with the highest interface address becomes the master", but "with the highest router-id", same with DR/BDR election.
I have two routers R2 and R4,with local interface ip add 150.5.5.2 and 150.5.5.4, no loopback configured. So their router-id are 150.5.5.2 and 150.5.5.4 natually. In this case with ospf adj debug enabled, I noticed that R2 is BDR ans slave.
Then I set router-id 150.5.5.22 for R2 manually. With clear ip ospf process, R2 becomes DR and master.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide