Loop failure handling method and switch
First Claim
1. A loop failure handling method, applied to a switch, wherein the method comprises:
- receiving a first packet comprising a source media access control (MAC) address, wherein the source MAC address is a MAC address of a device generating the first packet;
obtaining a first flapping count corresponding to the source MAC address, wherein the first flapping count indicates a quantity of times that the source MAC address flaps between different ports of the switch;
determining, based on the first flapping count, whether a loop failure occurs in a network in which the switch is located;
obtaining a flapping port set corresponding to the source MAC address when the loop failure occurs in the network in which the switch is located, wherein the flapping port set comprises a plurality of ports of the switch to which the source MAC address flaps sequentially;
determining a primary port in the plurality of ports, wherein the primary port is a port that must be suppressed; and
enabling a flooding suppression function on the primary port, wherein the flooding suppression function suppresses forwarding of a received flooding packet by the primary port.
1 Assignment
0 Petitions
Accused Products
Abstract
A switch receives a first packet, where the first packet includes a source media access control MAC address. The switch obtains a first flapping count corresponding to the source MAC address. The switch determines, based on the first flapping count, whether a loop failure occurs in a network in which the switch is located. When the loop failure occurs in the network in which the switch is located, the switch obtains a flapping port set corresponding to the source MAC address. The switch determines a primary port in the plurality of ports, where the primary port is a port that must be suppressed. The switch enables a flooding suppression function on the primary port, where the flooding suppression function is used to suppress forwarding of a received flooding packet by the primary port.
10 Citations
20 Claims
-
1. A loop failure handling method, applied to a switch, wherein the method comprises:
-
receiving a first packet comprising a source media access control (MAC) address, wherein the source MAC address is a MAC address of a device generating the first packet; obtaining a first flapping count corresponding to the source MAC address, wherein the first flapping count indicates a quantity of times that the source MAC address flaps between different ports of the switch; determining, based on the first flapping count, whether a loop failure occurs in a network in which the switch is located; obtaining a flapping port set corresponding to the source MAC address when the loop failure occurs in the network in which the switch is located, wherein the flapping port set comprises a plurality of ports of the switch to which the source MAC address flaps sequentially; determining a primary port in the plurality of ports, wherein the primary port is a port that must be suppressed; and enabling a flooding suppression function on the primary port, wherein the flooding suppression function suppresses forwarding of a received flooding packet by the primary port. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A switch, comprising:
-
a plurality of ports; a first memory is configured to store program code; and a processor coupled to the first memory and the plurality of ports, wherein the processor is configured to invoke the program code to perform; receiving a first packet comprising a source media access control (MAC) address, wherein the source MAC address is a MAC address of a device that generates the first packet; obtaining a first flapping count corresponding to the source MAC address, wherein the first flapping count indicates a quantity of times that the source MAC address flaps between different ports of the switch; determining, based on the first flapping count, whether a loop failure occurs in a network in which the switch is located; obtaining a flapping port set corresponding to the source MAC address when the loop failure occurs in the network in which the switch is located, wherein the flapping port set comprises a plurality of ports of the switch to which the source MAC address flaps sequentially; determining a primary port in the plurality of ports, wherein the primary port is a port that must be suppressed; and enabling a flooding suppression function on the primary port, wherein the flooding suppression function suppresses forwarding of a received flooding packet by the primary port. - View Dependent Claims (13, 14, 15, 16, 17, 18)
-
-
19. A network system comprising a plurality of switches, wherein each switch comprises:
-
a plurality of ports; a first memory configured to store program code; and a processor coupled to the first memory and the plurality of ports, wherein the processor is configured to invoke the program code to perform; receiving a first packet comprising a source media access control (MAC) address, wherein the source MAC address is a MAC address of a device that generates the first packet; obtaining a first flapping count corresponding to the source MAC address, wherein the first flapping count indicates a quantity of times that the source MAC address flaps between different ports of the switch; determining, based on the first flapping count, whether a loop failure occurs in a network in which the switch is located; obtaining a flapping port set corresponding to the source MAC address when the loop failure occurs in the network in which the switch is located, wherein the flapping port set comprises a plurality of ports of the switch to which the source MAC address flaps sequentially; determining a primary port in the plurality of ports, wherein the primary port is a port that must be suppressed; and enabling a flooding suppression function on the primary port, wherein the flooding suppression function suppresses forwarding of a received flooding packet by the primary port. - View Dependent Claims (20)
-
Specification