The present application discloses a
spanning tree protocol convergence method, device, and medium. The method includes: virtualizing a stack
system into a single
virtual switch, creating virtual ports for all ports in the stack
system on a master device, determining a root bridge device based on the master device's root bridge calculation result and the external device's root bridge calculation result after the
backup device and the slave device respectively forward the first BPDU message of the opposite external device to the master device during root bridge election, obtaining a port role and a port status when the master device performs port role election for a virtual port in a second state based on a second BPDU message, forwarding the port status of a single virtual port to the corresponding
backup device or slave device via the master device, and re-electing a port role for the
network topology via the master device when the
network topology changes. By virtualizing the stack
system into a single switch and transferring the BPDU messages of the slave and
backup devices to the master device for
processing, the convergence speed of the
spanning tree protocol is accelerated.