Router (primary) - switch - router (backup), vrrp virtual gateway running between the two routers, heartbeat messages forwarded through the switch
The customer simulates a scenario in which the primary router vrrp interface is down and the backup router vrrp rises to master smoothly. After the original primary router interface is subsequently restored, it is found that in the first 30s, the vrrp status of the routers on both sides is primary, and the status is normal only after 30s.
1, I check the configuration vrrp configuration is not configured preemption delay, and the configuration of the preemption delay, will not lead to two masters.
2. I suspect that the first 30s, both sides of the router vrrp message interaction there are abnormal, the message only over the switch, 30s time and switch stp switching time basically match.
After confirming that the interface on the switch side interfacing to the router has stp turned on. It takes 30s to switch from discovering to forwarding after the switch interface is up, and the router doesn't receive the packet from the opposite end within 30s.
%Jan 1 09:13:34:086 2021 H3C IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet0/0/0 changed to up.
09:14:04:703 2021 H3C VRRP4/6/VRRP_STATUS_CHANGE: The status of IPv4 virtual router 2 (configured on GigabitEthernet0/0/0) changed from Master to Backup: VRRP packet received.
Switch side:
%Jan 1 01:15:57:931 2013 TestDevice IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet1/0/2 changed to up.
[TestDevice-GigabitEthernet1/0/2]dis stp brief
MST ID Port Role STP State Protection
0 GigabitEthernet1/0/1 DESI FORWARDING NONE
0 GigabitEthernet1/0/2 DESI DISCARDING NONE
%Jan 1 01:16:28:420 2013 TestDevice STP/6/STP_DETECTED_TC: Instance 0's port GigabitEthernet1/0/2 detected a topology change.
dis stp brief
MST ID Port Role STP State Protection
0 GigabitEthernet1/0/1 DESI FORWARDING NONE
0 GigabitEthernet1/0/2 DESI FORWARDING NONE
Solution:
Interfaces connected to router need to be configured:
undo stp enable