05-25-2023 12:09 PM
Hi,
I have been doing packet captures and debugs (debug ip ospf adj and lsa-generation) on a 3-router OSPF lab in CML and noticed that DR/BDR elections are taking place several times during the formation of the new adjacency between the (existing) DR and BDR, and the new DROTHER that comes up.
The first election is after 2-WAY is established, which makes sense as per the interface state machine.
But then approximately 10 seconds after the adjacency goes to Full, another two elections take place on both the DR and BDR and I can't figure out why. The DROTHER only has a single election take place immediately after 2-WAY is established, and that is it - which is what I would expect of all three routers.
I have re-run the lab several times, and the result is always the same (logs are below).
*May 25 12:58:30.568: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on GigabitEthernet0/0 from LOADING to FULL, Loading Done
<omitted>
*May 25 12:58:39.348: OSPF-1 ADJ Gi0/0: Neighbor change event
*May 25 12:58:39.348: OSPF-1 ADJ Gi0/0: DR/BDR election
*May 25 12:58:39.348: OSPF-1 ADJ Gi0/0: Elect BDR 1.1.1.1
*May 25 12:58:39.348: OSPF-1 ADJ Gi0/0: Elect DR 2.2.2.2
*May 25 12:58:39.349: OSPF-1 ADJ Gi0/0: DR: 2.2.2.2 (Id)
*May 25 12:58:39.349: OSPF-1 ADJ Gi0/0: BDR: 1.1.1.1 (Id)
*May 25 12:58:39.349: OSPF-1 LSGEN: Scheduling rtr LSA for area 0, build flag 0x41 (from 0x30484D5)
*May 25 12:58:39.349: OSPF-1 ADJ Gi0/0: Neighbor change event
*May 25 12:58:39.349: OSPF-1 ADJ Gi0/0: DR/BDR election
*May 25 12:58:39.349: OSPF-1 ADJ Gi0/0: Elect BDR 1.1.1.1
*May 25 12:58:39.349: OSPF-1 ADJ Gi0/0: Elect DR 2.2.2.2
*May 25 12:58:39.350: OSPF-1 ADJ Gi0/0: DR: 2.2.2.2 (Id)
*May 25 12:58:39.350: OSPF-1 ADJ Gi0/0: BDR: 1.1.1.1 (Id)
*May 25 12:58:39.350: OSPF-1 LSGEN: Scheduling rtr LSA for area 0, build flag 0x41 (from 0x30484D5)
The only reason I can see that this might occur - based on RFC2328, 9.2 Events causing interface state change - is when:
NeighborChange
o Bidirectional communication has been established to a neighbor. In other words, the state of the neighbor has transitioned to 2-Way or higher.
But that already occurred once.
Any help explaining this behavior would be appreciated.
Thanks,
Sam
05-26-2023 07:17 AM - edited 05-26-2023 08:10 AM
that I'm seeing additional elections on R1 (BDR) and R2 (DR)<<- you see elect after full in both or in only one ? make double check this point
05-29-2023 09:20 AM
Hi,
On both, I checked and can reproduce with the same result whenever I wish.
Thanks.
Sam
02-22-2024 05:53 PM
Hi, Sam
Did you find any clue for this? I've the same question.
Thanks
- Teck Sing
02-25-2024 06:36 AM
friend can you more elaborate your Q, and since I answer to this post before but I think we not end to find solution, so I hope this time solve this issue
and also hope @Sam-CCNP also reply
so all together we find solution for this topic
waiting reply
thanks
MHM
02-27-2024 06:59 AM
Dear MHM
Here's my topology. The RIDs of R1, R2 and R3 are 192.168.1.1,192.168.2.2 and 192.168.3.3 respectively. They are sharing the segment 10.123.1.x/24. I make the e0/0 of R1, R2 and R3 up at the same time and debug OSPF adj and hello packet like below, also captured packet via Wireshark.
R1's screenshot in first 40s.
From this screenshot I noticed the first hello packet is sent to 224.0.0.5 and the interface entered to 40s-"WAITING" state as soon as the interface came up. The same as R2 and R3. No question for this part.
But reading the lines toggled in green square, I think that is R1 heard R2's first hello in 224.0.0.5 and tried to setup adjacency with R2 immediately, so sent immediate hello to R2 via unicast. Here my first questions pop up. 1. Why was another hello sent out at the same time along with immediate hello? 2. Obviously, R1 sent immediate hello to R2 and R3, but only R3 received this unicast hello. In Wireshark, I only saw this kind of unicast packet from R1 to R3 unidirectional. R1 and R2 have to wait the hello interval to go into 2WAY state, why?
Next, come into DR/BDR election. My understanding is every router elect DR/BDR individually and then exchange information. First of all, router will elect BDR from all 2WAY routers (including itself and assume all DR fields are 0.0.0.0). Now none of routers declare itself DR or BDR, so R3 with highest RID is chosen from all 2WAY routers to be the newly BDR. And then assign the DR to be the same as the newly elected BDR. On R3, because R3 itself is now newly the DR, re-election should be executed for BDR. This time, R3 is no longer eligible for BDR election, so R2 is chosen to be BDR. But on other non-DR/BDR routers, BDR re-election is not repeated.
In the next hello interval, all routers will exchange information again. Till now, my second question is coming, R1 and R2 received hello packet from R3, because this hello carries different BDR, so DR/BDR election will occur on R1 and R2 again. Here my question is why the election is executed twice?
Thanks a lot!
- Teck Sing
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