07-18-2023 01:57 PM - last edited on 07-20-2023 11:15 PM by Translator
Hi,
I have done OSPF lab. In that I have noticed OSPF Designated ID in every Ethernet link is confusing about selection.
The selection Process is based on Priority or Router ID.
"OSPF deems a router more preferable if the priority for the interface is the highest for that segment. If the OSPF priority is the same, the higher RID is more favorable."
I have verified this on link between R2 and R4.Here, Priority is
same(=1).Then,R2's Router ID is 0.0.51.2 and R4's Router ID is 0.0.51.4
So, my guess is it should be R4's
Router ID 0.0.51.4
But , the below output from R2 and R4 showing Designated
Router ID as 0.0.51.2
Can someone explain?
R2#sh ip ospf int G 0/4
GigabitEthernet0/4 is up, line protocol is up
Internet Address 24.24.24.2/24, Area 51, Attached via Network Statement
Process ID 1, Router ID 0.0.51.2, Network Type BROADCAST, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 0.0.51.2, Interface address 24.24.24.2
Backup Designated router (ID) 0.0.51.4, Interface address 24.24.24.4
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:02
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 1/3/3, flood queue length 0
Next 0x0(0)/0x0(0)/0x0(0)
Last flood scan length is 0, maximum is 4
Last flood scan time is 1 msec, maximum is 1 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 0.0.51.4 (Backup Designated Router)
Suppress hello for 0 neighbor(s)
R4#sh ip ospf int G 0/2
GigabitEthernet0/2 is up, line protocol is up
Internet Address 24.24.24.4/24, Area 51, Attached via Network Statement
Process ID 1, Router ID 0.0.51.4, Network Type BROADCAST, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 0.0.51.2, Interface address 24.24.24.2
Backup Designated router (ID) 0.0.51.4, Interface address 24.24.24.4
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:08
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 1/2/2, flood queue length 0
Next 0x0(0)/0x0(0)/0x0(0)
Last flood scan length is 3, maximum is 4
Last flood scan time is 0 msec, maximum is 2 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 0.0.51.2 (Designated Router)
Suppress hello for 0 neighbor(s)
Solved! Go to Solution.
07-18-2023 02:09 PM - edited 07-18-2023 02:10 PM
Yes, its quite possible R2 came up and didn't see any other router on the link and elected itself a DR...then R4 came online and sent its messages but since the DR/BDR process isn't premptive (mostly) then R4 just allowed itslef to be the BDR.
I would try to bring up both routers at the same time as close as you can to see if it makes the correct decision.
-David
07-18-2023 02:03 PM
The only explanation is you modify ospf priority after DR election take place.
So to check
Wr config
Power off router and then power on and check again.
The highest router ID must be elect
07-18-2023 02:09 PM - edited 07-18-2023 02:10 PM
Yes, its quite possible R2 came up and didn't see any other router on the link and elected itself a DR...then R4 came online and sent its messages but since the DR/BDR process isn't premptive (mostly) then R4 just allowed itslef to be the BDR.
I would try to bring up both routers at the same time as close as you can to see if it makes the correct decision.
-David
07-18-2023 02:20 PM - last edited on 07-20-2023 11:16 PM by Translator
It has been changed, after I issue
clear ip ospf process
in R2.
Thanks.
07-19-2023 07:32 AM - last edited on 07-20-2023 11:19 PM by Translator
Hello @Cisconew ,
from the
show ip ospf
interface there is the line related to the timers:
>> Timer intervals configured,
Hello 10, Dead 40, Wait 40, Retransmit 5
the wait timer is the time a router waits for other neighbors before electing himself to DR.
The wait timer defaults to 40 seconds.
So what likely happened is that you enabled OSPF on R2 first and on R4 more then 40 seconds later and as explained by @David Ruess once a DR exists in a segment a new router cannot
pre-empt
By using
clear ospf
process on R2 you made possible for R4 to take part in DR election and to win it.
Hope to help
Giuseppe
07-19-2023 10:37 PM - last edited on 07-20-2023 11:20 PM by Translator
Most of the explanations of DR/BDR elections assume an already running network where in an election the router with the highest priority wins. David provides a helpful explanation that at startup the processing is different. Which router came up first is more important than which router has highest priority. And in the already running network the
clear ip ospf process
command initiates a normal election.
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