This article explains the OSPF DR Election process
Customer Reported the device with lower OSPF Priority is becoming DR .Please refer below for more details
Customer Topology :
L3 Switch 1.............>>L2 Switch ..........>>>L3 Switch 2
I
L3 Switch 3
Switch 1 OSPF Priority is 128 and Router ID is 1.1.1.1Switch 2 OSPF Priority is 128 and Router ID is 2.2.2.2Switch 3 OSPF Priority is 1 and Router ID is 3.3.3.3
The expected Output:SW1 and SW2 should be in DR/BDR Role .SW3 in DROther Role as like below output
labroot@sw1> show ospf neighbor detail
Address Interface State ID Pri Dead
192.168.20.2 ge-0/0/0.0 Full 2.2.2.2 128 34
Area 0.0.0.0, opt 0x52, DR 192.168.20.2, BDR 192.168.20.1
Up 00:04:30, adjacent 00:04:30
192.168.20.3 ge-0/0/0.0 Full 3.3.3.3 1 39
Up 00:04:30, adjacent 00:04:20
labroot@sw2> show ospf neighbor detail
192.168.20.1 ge-0/0/1.0 Full 1.1.1.1 128 33
Up 00:05:03, adjacent 00:05:03
192.168.20.3 ge-0/0/1.0 Full 3.3.3.3 1 33
Up 00:06:32, adjacent 00:05:53
labroot@sw3> show ospf neighbor detail
192.168.20.1 xe-0/0/0.0 Full 1.1.1.1 128 39
Up 00:05:15, adjacent 00:05:05
192.168.20.2 xe-0/0/0.0 Full 2.2.2.2 128 31
Up 00:06:44, adjacent 00:06:05
Customer OutputInstead of SW1 and SW2 the switch3 with lower priority (Priority 1) has become DR as below
192.168.20.3 ge-0/0/0.0 Full 3.3.3.3 1 34
Area 0.0.0.0, opt 0x52, DR 192.168.20.3, BDR 192.168.20.2
Up 00:06:09, adjacent 00:06:00
192.168.20.2 ge-0/0/0.0 Full 2.2.2.2 128 35
Up 00:06:09, adjacent 00:06:09
192.168.20.1 ge-0/0/1.0 Full 1.1.1.1 128 30
Up 00:06:02, adjacent 00:06:02
192.168.20.3 ge-0/0/1.0 Full 3.3.3.3 1 30
Up 00:07:26, adjacent 00:07:26
192.168.20.1 xe-0/0/0.0 Full 1.1.1.1 128 35
Up 00:01:58, adjacent 00:01:49
192.168.20.2 xe-0/0/0.0 Full 2.2.2.2 128 36
Up 00:03:21, adjacent 00:03:21
The above seen customer behaviour is expected ,If it is required to make higher priority switch to become DR/BDR, clear the OSPF neighbor sessions as below
clear (ospf | ospf3) neighbor
After clearing Customer OSPF neighbor sessions, SW1 and SW2 took DR/BDR Role and SW3 with lower priority become DROther
192.168.20.2 xe-0/0/0.0 Full 2.2.2.2 128 34
Up 00:00:06, adjacent 00:00:02
Link state retransmission list: 1 entries
192.168.20.1 xe-0/0/0.0 Full 1.1.1.1 128 34
Up 00:00:06, adjacent 00:00:06 Link state retransmission list: 1 entries