This specification provides a method, apparatus, electronic device, and medium for handling stack splits. The method includes: upon detecting a stack split, adjusting the operating mode of a VRRP group from silent mode to
normal mode, and propagating a first VRRP announcement message in the
broadcast domain corresponding to the VRRP group. The VRRP group includes a first network device and a second network device. The first VRRP announcement message includes a first reference value and the real
MAC address of the first network device. The method also includes receiving a second VRRP announcement message sent by the second network device. The second VRRP announcement message includes a second reference value and the real
MAC address of the second network device. If the first reference value is greater than the second reference value, the user processes service packets as the master device. If the first reference value is less than the second reference value, the user silences the service port.