摘要 |
<p>The present invention discloses a Medium Access Control (MAC) address protection method and switch, the method comprising: obtaining, by a switch in a layer 2 ring network, network topology information of the layer 2 ring network, the network topology information of the layer 2 ring network includes a protection MAC address of a protected device, an identifier of a switch corresponding to the protection MAC address, and an identifier of each switch in the layer 2 ring network, wherein the protection MAC address is the MAC address of the protected device; and determining, by the switch in the layer 2 ring network, a local outgoing interface of the protection MAC address of the protected device according to the network topology information, establishing and storing an outgoing interface of an MAC entry corresponding to the protection MAC address according to the local outgoing interface of the protection MAC address. The embodiments of the present invention take the MAC address of the protected device as the protection MAC address, and synchronously updates the outgoing interface of the MAC entry corresponding to the protection MAC address when the topology of the layer 2 ring network is changed, thereby ensuring the protected device to correctly send and receive messages to meet the topology change of the layer 2 ring network.</p> |