CN108512751B - Port state processing method and network equipment - Google Patents

Port state processing method and network equipment Download PDF

Info

Publication number
CN108512751B
CN108512751B CN201710114106.8A CN201710114106A CN108512751B CN 108512751 B CN108512751 B CN 108512751B CN 201710114106 A CN201710114106 A CN 201710114106A CN 108512751 B CN108512751 B CN 108512751B
Authority
CN
China
Prior art keywords
root bridge
stp
root
bridge device
port
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710114106.8A
Other languages
Chinese (zh)
Other versions
CN108512751A (en
Inventor
田亚文
林忠芳
吴光锐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201710114106.8A priority Critical patent/CN108512751B/en
Publication of CN108512751A publication Critical patent/CN108512751A/en
Application granted granted Critical
Publication of CN108512751B publication Critical patent/CN108512751B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/48Routing tree calculation

Abstract

The embodiment of the application discloses a port state processing method and network equipment, which are used for effectively reducing data packet loss. The method in the embodiment of the application comprises the following steps: the non-root bridge equipment determines a root port of the non-root bridge equipment in the STP network; the non-root bridge equipment determines the physical state of a link where the root port is located; when the physical state of the link where the root port is located is changed from failure (down) to recovery (up), the non-root bridge device sends an STP message to the first root bridge device, so that after the first root bridge device receives the STP message, the STP state of the port corresponding to the link on the first root bridge device is set to be a forwarding (forward) state according to the STP message.

Description

Port state processing method and network equipment
Technical Field
The present application relates to the field of communications, and in particular, to a port state processing method and a network device.
Background
An inter-device link aggregation group (abbreviated as M-LAG) is a mechanism for implementing inter-device link aggregation, and can implement link aggregation among multiple network devices, so as to play a role in load sharing and a role in backup protection.
The Spanning Tree Protocol (STP), a Protocol used for eliminating loops in a lan. The network devices running the protocol exchange information with each other to discover loops in the network and appropriately block some ports in the network devices to achieve the purpose of eliminating the loops. For the STP network, only one root bridge device is in the whole network and is a logic center of the whole STP network, after the STP network converges, the root bridge device generates and sends an STP message to the outside according to a certain time interval, and other non-root bridge devices only process the STP message and record the change of network topology, thereby ensuring the stability of network topology.
In the prior art, when an inter-device link aggregation group is networked using an STP protocol, when a link where a root bridge device is located fails and recovers, a state of a member port of the inter-device link aggregation group corresponding to the link on the root bridge device is in a blocked (block) state, and the member port corresponding to the link needs to be released only when it is determined through detection that the member port is an edge port (a port role in an STP network). As shown in fig. 1, the network is a virtual Spanning Tree protocol (abbreviated as V-STP) network. The root bridge device SW1 and the root bridge device SW2 are virtualized to form an STP root bridge device, the non-root bridge devices SW3 and SW4 are respectively connected to SW1 and SW2 through two physical links, wherein the two physical links of SW3 connecting SW1 and SW2 form a cross-device link aggregation group m-lag1, the two physical links of SW4 connecting SW1 and SW2 form a cross-device link aggregation group m-lag2, wherein m-lag 1-1 and m-lag1-2 are member ports of m-lag1, and m-lag 2-1 and m-lag 2-2 are member ports of m-lag 2. The two physical ports belonging to m-lag1 on the non-root bridge device SW3 constitute one logical port, and the two physical ports belonging to m-lag2 on the non-root bridge device SW4 constitute the other logical port. Assuming that a link between SW3 and m-lag 1-1 is in a fault, when SW1 detects that the link fault is recovered, a member port m-lag 1-1 of m-lag1 is in a block state, SW1 sends an STP message through the member port m-lag 1-1, and no response is received after a set time, SW1 determines that the port m-lag 1-1 is an edge port, SW1 releases m-lag 1-1, so that m-lag 1-1 can forward the message.
However, the above detection process usually takes several seconds, and during the above detection, the data sent by the non-root bridge device to the root bridge device through the failed link is blocked on the port corresponding to the link in the root bridge device, so that the data loss is excessive.
Disclosure of Invention
The embodiment of the application provides a port state processing method and network equipment, which are used for effectively avoiding that data sent to root bridge equipment by non-root bridge equipment through a link is blocked on a port corresponding to the link in the root bridge equipment when the link is recovered due to failure, so that the loss of a data packet is effectively reduced.
In order to solve the above problem, an embodiment of the present application provides the following technical solutions:
in a first aspect, an embodiment of the present application provides a port state processing method, where the method is applied in an STP network including a non-root bridge device and a first root bridge device, and the method includes: the method comprises the steps that a non-root bridge device determines a root port of the non-root bridge device in an STP network and determines the physical state of a link where the root port is located, when the physical state of the link where the root port is located is changed from failure (down) to recovery (up), the non-root bridge device sends an STP message to a first root bridge device connected with the link, and after the first root bridge device receives the STP message, the first root bridge device sets the STP state of a port corresponding to the link on the first root bridge device to be in a forwarding (forward) state according to the received STP message. Therefore, in the embodiment of the application, when the non-root bridge device senses that the link where the root port is located has failed to recover, the non-root bridge device actively sends the STP message, so that the root bridge device where the failed link is located releases the port corresponding to the failed link after receiving the STP message, that is, the port is released only when the port is determined to be the edge port without waiting for detection, thereby effectively avoiding that data sent to the root bridge device by the non-root bridge device through the failed recovered link is blocked on the port corresponding to the link in the root bridge device when the link fails to recover, and effectively reducing the loss of data packets.
In a possible design, the non-root bridge device sends the STP message to the first root bridge device, which means that the non-root bridge device sends at least one STP message to the first root bridge device within a preset time length through the root port. In practical application, the preset duration may be configured according to actual conditions, so long as the first root bridge device releases the blocking state of the port corresponding to the failure recovery link on the first root bridge device as soon as possible. Illustratively, the predetermined duration is less than the time required for the non-root bridge device to pass the edge port detection. Meanwhile, in the embodiment of the application, the non-root bridge device sends at least one, namely one or more STP messages to the first root bridge device, so that the first root bridge device can be effectively ensured to receive the STP messages sent by the non-root bridge device, and the implementation of the scheme is effectively improved.
In one possible design, the non-root bridge device sends at least one STP packet to the first root bridge device through the root port within a preset time period, including: and the non-root bridge equipment transmits at least two STP messages to the root bridge equipment through the root port within a preset time length according to a preset transmission interval. In the embodiment of the application, when the non-root bridge device sends a plurality of STP messages to the first root bridge device within the preset time, the STP messages can be sent at reasonable sending intervals, so that the non-root bridge device can be prevented from sending the STP messages to the first root bridge device at a certain time point in a centralized manner, and the sending burden of the non-root bridge device is reduced.
In one possible design, the root port is a logical port composed of a plurality of physical ports, where the plurality of physical ports connect a plurality of root bridge devices through a plurality of links of a cross-device link aggregation group, respectively. Before the non-root bridge device sends the STP message to the first root bridge device, the method further includes: and the non-root bridge equipment determines one of the links as a target transmission link according to a Hash (HASH) algorithm, and transmits the STP message to the first bridge equipment through the determined target transmission link. In this embodiment, before the non-root bridge device sends an STP packet to the first bridge device, the non-root bridge device first determines one of the links as a target sending link according to the hash algorithm, and then sends the STP packet to the first bridge device through the target sending link. It may be advantageous to load balance the links across the device link aggregation group.
In one possible design, the STP network further includes a second root bridge device, where the first root bridge device and the second root bridge device are paired root bridge devices, the target transmission link includes any link between a root port and a member port of a cross-device link aggregation group on the second root bridge device, and the non-root bridge device transmits the STP packet to the first root bridge device through the target transmission link, including: and the non-root bridge equipment transmits the STP message to the second root bridge equipment through the target transmission link, so that the STP message is synchronized to the first root bridge equipment after the STP message received by the second root bridge equipment. In this embodiment, when the non-root bridge device determines that the target transmission link is a link between the second root bridge device and the root port according to the hash algorithm, the non-root bridge device may send the STP packet to the second root bridge device, and then, by using a synchronization mechanism between the first root bridge device and the second root bridge device, the second root bridge device synchronizes the STP packet received from the non-root bridge device to the first root bridge device.
In one possible design, the non-root bridge device determines the target transmission link according to a hash algorithm, including: the non-root bridge device determines a destination Media Access Control (MAC) address and a source MAC address of the STP message, and then obtains the target transmission link according to the determined destination MAC address and the source MAC address and a Hash algorithm. In the embodiment of the application, the non-root bridge device determines the target transmission link through a hash algorithm, specifically, performs hash calculation according to the destination MAC address and the source MAC address of the STP packet to be transmitted, so as to improve the implementability of the scheme.
In one possible design, the target transmit link includes a link between a root port and a member port of a cross-device link aggregation group on a first root bridge device. That is, the target transmission link determined by the non-root bridge device according to the hash algorithm may be any link between the root port and the member port of the first root bridge device.
In a possible design, when a non-root bridge device determines a root port of a non-root bridge device in an STP network, the non-root bridge device first determines path costs from each port of the non-root bridge device to a first root bridge device in the STP network, and the non-root bridge device selects a port with the smallest path cost from the path costs from each port to the first root bridge device as the root port of the non-root bridge device.
In a second aspect, an embodiment of the present application provides a port state processing method, which is applied to an STP network including a non-root bridge device and a root bridge device, and the method includes: the method comprises the steps that root bridge equipment receives an STP message sent by non-root bridge equipment, wherein the STP message is the STP message sent by the non-root bridge equipment when the physical state of a link where a root port is located is determined to be changed from fault (down) to recovery (up), and the root bridge equipment is the root bridge equipment connected with the link; after the root bridge device receives the STP message sent by the non-root bridge device, the root bridge device sets the STP state of a port corresponding to the link on the root bridge device to be a forwarding (forward) state according to the received STP message. Therefore, in the embodiment of the application, when the non-root bridge device senses that the link where the root port is located has failed to recover, the non-root bridge device actively sends the STP message, so that the root bridge device where the failed link is located releases the port corresponding to the failed link after receiving the STP message, that is, the port is released only when the port is determined to be the edge port without waiting for detection, thereby effectively avoiding that data sent to the root bridge device by the non-root bridge device through the failed recovered link is blocked on the port corresponding to the link in the root bridge device when the link fails to recover, and effectively reducing the loss of data packets.
In a possible design, the setting, by the root bridge device, an STP state of a port corresponding to the link on the root bridge device to a forward state according to the STP message specifically includes: the root bridge device carries out STP protocol calculation according to the STP message, determines that the bridge priority of the first root bridge device is higher than that of the non-root bridge device, thereby determining that the port is an edge port, and sets the STP state of the port to a forward state after determining that the port is the edge port.
In a third aspect, an embodiment of the present application further provides a network device, which is applied in an STP network, where the STP network includes the network device and a first root bridge device, the network device is a non-root bridge device, and the non-root bridge device includes: the processing module is used for determining a root port of non-root bridge equipment in the STP network; the method comprises the steps of determining the physical state of a link where a root port is located; and the sending module is used for sending the STP message to the first root bridge device when the physical state of the link where the root port is located is changed from the fault down to the recovery up, so that after the first root bridge device receives the STP message, the STP state of the port corresponding to the link on the first root bridge device is set to be a forwarding (forward) state according to the STP message.
In a third aspect of the present application, a component module of the non-root bridge device may further perform steps described in the foregoing first aspect and various possible implementations, for details, see the foregoing description of the first aspect and various possible implementations, and details are not described herein again.
In a fourth aspect, an embodiment of the present application further provides a network device, which is applied in an STP network, where the network device is a root bridge device in the STP network, and the STP network includes the root bridge device and a non-root bridge device, and includes: the system comprises a receiving module, a transmitting module and a processing module, wherein the receiving module is used for receiving an STP message sent by non-root bridge equipment when determining that the physical state of a link where a root port of the non-root bridge equipment is located is changed from fault (down) to (up), and the root bridge equipment is the root bridge equipment connected with the link; and the processing module is used for setting the STP state of a port corresponding to the link on the root bridge equipment into a forwarding (forward) state according to the STP message after the receiving module receives the STP message.
In a fourth aspect of the present application, the constituent modules of the root bridge device may further perform the steps described in the foregoing second aspect and various possible implementations, for details, see the foregoing description of the second aspect and various possible implementations, and are not further described here in detail.
In a fifth aspect, an embodiment of the present application further provides a network device, where the network device has a function of implementing a behavior of a non-root bridge device in the foregoing method, and the function may be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-described functions. In a possible design, the structure of the non-root bridge device includes a communication port, where the communication port is configured to support forwarding of data between the non-root bridge device and the root bridge device, and send or receive information, instructions, or messages related to the above method, which are sent by the root bridge device, to the root bridge device. The non-root bridge device may further comprise a memory and a processor, the processor being configured to support the non-root bridge device to perform the respective functions of the above-described method; the memory is used for storing necessary programs and contents of instructions, forwarded messages and the like of the non-root bridge equipment.
In a sixth aspect, an embodiment of the present application further provides another network device, where the network device has a function of implementing a behavior of a root bridge device in the above method design. The above functions may be implemented by hardware, or may be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-described functions. The modules may be software and/or hardware.
In one possible design, the structure of the root bridge device includes a communication port, and the communication port is configured to support forwarding of information between the root bridge device and the non-root bridge device, and to send or receive information, instructions, or messages related to the above method, which is sent by the non-root bridge device, to the non-root bridge device. The root bridge device may further include a memory and a processor, the processor is configured to support the root bridge device to perform the corresponding functions of the above method, and the memory is configured to store necessary programs and contents, instructions, forwarded messages, and the like of the root bridge device.
In a seventh aspect, the present application provides a computer-readable storage medium having stored therein instructions, which when executed on a computer, cause the computer to perform the method of the above-described aspects.
It can be seen from the foregoing technical solutions that the embodiments of the present application provide a port state processing method, which is applied to an STP network including a non-root bridge device and a root bridge device. In the method, a non-root bridge device determines a root port of the non-root bridge device in a current STP network, monitors a physical state of a link where the root port is located, and when the non-root bridge device monitors that the physical state of the link where the root port is located is changed from a fault (down) to a recovery (up), the non-root bridge device sends an STP message to the root bridge device, so that after the root bridge device receives the STP message, the STP state of a port corresponding to the link on the root bridge device is set to be a forwarding (forward) state according to the received STP message, wherein the first root bridge device is the root bridge device connected with the link where the root port is located. Therefore, in the embodiment of the application, when the non-root bridge device senses that the link where the root port is located has failed to recover, the non-root bridge device releases the port corresponding to the failed link in a mode of actively sending the STP message after receiving the STP message, that is, the non-root bridge device releases the port without waiting for the detection to determine that the port is the edge port, so that data sent to the root bridge device by the non-root bridge device through the link can be effectively prevented from being blocked on the port corresponding to the link in the root bridge device when the link fails to recover, and the loss of data packets can be effectively reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments will be briefly introduced below.
FIG. 1 is a schematic diagram of a system architecture for a cross device link aggregation group;
fig. 2 is a schematic diagram of a system architecture to which a port state processing method according to an embodiment of the present application is applied;
fig. 3 is a schematic flowchart of a port status processing method according to an embodiment of the present application;
fig. 4 is a schematic view of an application scenario of a port state processing method according to an embodiment of the present application;
fig. 5 is a schematic diagram of another application scenario of a port state processing method according to an embodiment of the present application;
FIG. 6 is a diagram illustrating another application scenario of a port state processing method according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a network device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of another network device according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of another network device according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of another network device according to an embodiment of the present application.
Detailed Description
The application provides a port state processing method and is applied to an STP network comprising non-root bridge equipment and root bridge equipment, so that data sent to the root bridge equipment by the non-root bridge equipment through a link can be effectively reduced when the link is recovered from a fault, and the data is blocked on a port corresponding to the link in the root bridge equipment, thereby effectively reducing data packet loss.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. It is to be understood that the described embodiments are merely exemplary of some, and not all, of the present application. All other embodiments that can be derived from the embodiments given herein by a person of ordinary skill in the art are intended to be within the scope of the present disclosure.
It should be noted that the terms "first," "second," "third," "fourth," and the like (if any) in the description and claims of this application and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," and any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The following describes examples of the present application.
First, a system framework applied to the port state processing method provided in the embodiment of the present application is explained, the embodiment of the present application may be applied to an ethernet network configured with an STP protocol, for example, the embodiment of the present application may be applied to a cross-device link aggregation group using an STP protocol. For ease of understanding, the following description will be made of the STP network applied in the embodiments of the present application.
The primary member port roles defined in STP networks include: a designated port and a root port. The designated port is a member port of a network device for forwarding Bridge Protocol Data Unit (BPDU) to the connected network segments, and each network segment has only one designated port. In general, each member port of the root bridge device is a designated port. In the non-root bridge equipment, the data or the message is sent to the member port with the optimal path of the root bridge equipment, at most only one root port is arranged on the non-root bridge equipment running the STP protocol, and the root port does not send the STP message to the root bridge equipment.
Fig. 2 is a schematic diagram of a system architecture applied to a port state processing method according to an embodiment of the present application, where the system architecture includes a root bridge device, a non-root bridge device, and a server, where the root bridge device and the non-root bridge device may be network devices such as a switch, and are not limited herein. In this embodiment of the present application, a non-root bridge device determines a root port of the non-root bridge device in an STP network, and monitors a physical state of a link where the root port is located, and when the physical state of the link where the root port of the non-root bridge device is located changes from a failure (down) to a restoration (up), the non-root bridge device sends an STP message to the root bridge device connected to the link where the root port is located, so that after the root bridge device receives the STP message, the root bridge device sets the STP state of a port corresponding to the failure restoration link to a forwarding (forwarded) state according to the STP message. The following provides a detailed description of examples of the present application.
As shown in fig. 3, an embodiment of the present application provides a port state processing method, which is applied to an STP network including a non-root bridge device and a first root bridge device, and includes:
101. and the non-root bridge equipment determines a root port of the non-root bridge equipment in the STP network.
In an embodiment of the present application, a non-root bridge device forming an STP network may determine a root port of the non-root bridge device in the STP network. It should be noted that when the current STP network converges, the root bridge device and the non-root bridge device in the current STP network are in a stable state, that is, the STP network selects which network device in the STP network is the root bridge device and which network device is the root bridge device according to the STP protocol. The non-root bridge device described in the embodiment of the present application refers to any one non-root bridge device in the STP network.
In some embodiments of the present application, determining, by a non-root bridge device, a root port on the non-root bridge device in an STP network includes:
the non-root bridge device determines the path cost from each port of the non-root bridge device to the first root bridge device in the STP network;
and the non-root bridge equipment selects a port with the minimum path cost from the path costs from each port of the non-root bridge equipment to the first root bridge equipment as a root port of the non-root bridge equipment, wherein the first root bridge equipment is the root bridge equipment in the current STP network.
As can be seen from the above description, in the STP network, the determination process of the root port on the non-root bridge device is to select a port with an optimal path to the first root bridge device among different ports on all non-root bridge devices, and determine the port with the optimal path to the root bridge device according to the minimum path cost from the port on the non-root bridge device to the root bridge device.
102. And the non-root bridge equipment determines the physical state of the link where the root port is located.
And when the non-root bridge equipment determines the root port, monitoring the physical state of the link where the root port is located in real time.
In an STP network, a non-root bridge device may monitor the physical state of links connecting a root port with a root bridge device in the STP network.
103. And when the physical state of the link where the root port is located is changed from a fault (down) to a fault (up), the non-root bridge equipment sends an STP message to first root bridge equipment, wherein the first root bridge equipment is the root bridge equipment connected with the link.
In this embodiment of the present application, when a non-root bridge device determines that a physical state of a link where a root port is located is changed from a fault (down) to (up), the non-root bridge device sends an STP message to a first root bridge device connected to the link.
It can be understood that the physical state of the link where the root port is located is in a down state, which means that the link where the root port is located cannot transmit data or messages, and is in a failure state, and specifically, the failure state may be caused by various reasons.
For example, a port corresponding to a link where a root port is located on the first root bridge device fails; or a link between the first root bridge device and the root port is damaged, and the like, so that data cannot be normally transmitted; or a root port on the non-root bridge device fails, or a combination of any of the above 3 cases may cause a physical state of a link where the root port is located to fail.
In some examples of the present application, the sending, by the non-root bridge device, an STP packet to the first root bridge device includes:
and the non-root bridge equipment sends at least one STP message to the first root bridge equipment within a preset time length through the root port.
Illustratively, when the physical state of the link where the root port is located is changed from a failure (down) to a restoration (up), the non-root bridge device sends one or more STP messages to the first root bridge device within 1s through the root port, it should be noted that, in practical applications, the preset time duration may be configured according to practical situations, as long as the first root bridge device releases the blocking (block) state of the port corresponding to the failure restoration link on the first root bridge device as soon as possible. Illustratively, the preset duration is less than the time required for the root bridge device to perform the edge port detection.
As can be seen from the foregoing description, when a link failure is recovered, when a port corresponding to the link on the first bridge device is in a blocking state, the port needs to be opened after a detection time of an edge port as long as several seconds, and therefore, in this application example, when the physical state of the link where the root port is located is changed from a failure (down) to (up), the non-root bridge device sends an STP packet to the first bridge device within a preset time duration, so that the first bridge device can receive the STP packet as soon as possible, thereby releasing the port connected to the failure recovery link on the first bridge device, and converting the STP state of the port into a forwarding (forward) state.
Based on the foregoing embodiment, in some examples of the present application, the sending, by the non-root bridge device through the root port, at least one STP packet to the first root bridge device within a preset time includes:
and the non-root bridge equipment transmits at least two STP messages to the root bridge equipment through the root port within a preset time according to a preset transmission interval.
Illustratively, when the physical state of the link where the root port is located changes from failure (down) to recovery (up), the non-root bridge device continuously transmits 3 STP messages through the root port, and the transmission interval of each STP message is 50 milliseconds. That is, in the embodiment of the present application, a transmission interval when the non-root bridge device transmits a plurality of STP messages through the root port within a preset time period is further defined, so that a transmission load when the non-root bridge device transmits STP messages can be reduced.
In some embodiments of the present application, when the root port is a logical port formed by a plurality of physical ports, the plurality of physical ports are respectively connected to a plurality of root bridge devices through a plurality of links, and the plurality of links form a cross-device link aggregation group m-lag, before the non-root bridge device sends an STP packet to the first root bridge device, the method further includes:
the non-root bridge equipment determines a target sending link according to a Hash algorithm, wherein the target sending link is a link corresponding to one physical port in the plurality of physical ports;
the non-root bridge device sends the STP message to the first root bridge device, and the method comprises the following steps:
and the non-root bridge equipment transmits the STP message to the first root bridge equipment through the target transmission link.
When a plurality of links corresponding to the plurality of physical ports form an m-lag, the target sending link includes a link between the root port and a member port of the m-lag on the first root bridge device.
In some examples of the application, when the STP network performs networking for an m-lag in a cross-device link aggregation group, the STP network further includes a second root bridge device, the first root bridge device and the second root bridge device are paired root bridge devices, the target transmission link may also be a link between the root port and a member port of the m-lag on the second root bridge device, and the non-root bridge device transmits the STP packet to the first root bridge device through the target transmission link, specifically, the non-root bridge device transmits the STP packet to the second root bridge device through the target transmission link, so that the STP packet is synchronized to the first root bridge device after the STP packet is received by the second root bridge device.
It should be noted that, in the cross-device link aggregation group, after the paired root bridge devices can successfully pair with each other, the synchronization mechanism between the root bridge devices realizes information synchronization, so that the second root bridge device can synchronize the STP message received from the non-root bridge device to the first root bridge device.
In some embodiments of the present application, the determining, by the non-root bridge device, a target transmission link according to a hash algorithm includes:
the non-root bridge equipment determines a destination MAC address and a source MAC address of the STP message;
and the non-root bridge equipment determines the target transmission link through the Hash algorithm according to the destination MAC address and the source MAC address of the STP message.
Taking an STP network as an example of networking a cross-device link aggregation group, when the cross-device link aggregation group adopts an STP protocol, a first root bridge device and a second root bridge device are paired root bridge devices, the first root bridge device and the second root bridge device are virtualized to form an STP root bridge device, and information such as a state between the two root bridge devices is synchronized between the first root bridge device and the second root bridge device according to a preset synchronization mechanism. In the cross-device link aggregation group, when the non-root bridge device sends an STP packet to an upstream device, the routing is performed through a HASH (HASH) algorithm, and finally the STP packet is sent through an aggregation link port, that is, a root port, so the following two sending situations occur:
the first situation is that when the non-root bridge device monitors that the physical state of the link where the root port is located is changed from failure (down) to recovery (up), the non-root bridge device determines the link between the non-root bridge device and the first root bridge device as a target transmission link after selecting a route according to a hash algorithm, and then directly transmits the STP message to the first root bridge device through the target transmission link.
The second situation is that when the non-root bridge device monitors that the physical state of the link where the root port is located is changed from failure (down) to recovery (up), the non-root bridge device determines the link between the non-root bridge device and the second bridge device as a target transmission link after routing according to a hash algorithm, then transmits the STP message to the second bridge device through the target transmission link, and the second bridge device synchronizes the STP message received from the non-root bridge device to the first bridge device according to a synchronization mechanism provided by a cross-device link aggregation group.
104. The first root bridge device receives the STP message sent by the non-root bridge device.
The first root bridge device may receive an STP message sent by the non-root bridge device to the first root bridge device when the non-root bridge device monitors that the physical state of the link where the root port is located is changed from failure (down) to recovery (up).
105. And after receiving the STP message, the first root bridge device sets the STP state of a port corresponding to the link on the first root bridge device to be a forwarding (forward) state according to the STP message.
In some examples of the present application, the first root bridge device performs STP protocol calculation according to the STP packet, and determines that a bridge priority of the first root bridge device is higher than a bridge priority of the non-root bridge device, thereby determining that a port corresponding to the link is an assigned port; and when the port is determined to be the designated port, setting the STP state of the port to be a forwarding (forward) state.
For convenience of understanding, the following description will be made with reference to a scenario drawing, taking a cross-device link aggregation group using an STP protocol as a networking scenario, where the scenario drawing is as follows:
referring to fig. 4, a schematic view of an application scenario of a port state processing method according to an embodiment of the present application is shown, in which the application scenario includes a root bridge device, a non-root bridge device and a server, two physical links of the non-root bridge device SW3, which are connected with the root bridge device SW1 and the root bridge device SW2, form a cross-device link aggregation group m-lag1, two physical links of the non-root bridge device SW4, which are connected with the root bridge device SW1 and the root bridge device SW2, form a cross-device link aggregation group m-lag2, the m-lag 1-1 and the m-lag1-2 ports are member ports of the m-lag1, the m-lag 2-1 and the m-lag 2-2 ports are member ports of the m-lag2, two physical ports of the non-root bridge device SW3, which belong to the m-lag1, form one logical port, and two physical ports of the non-root bridge device SW4, which belong to the m-lag2, form another logical port. When the link between the member port m-lag 1-1 of the root bridge device SW1 and the root port of the non-root bridge device SW3 recovers after a failure, the m-lag 1-1 port is in a blocked (block) state. As shown in fig. 5, when the non-root bridge device SW3 senses that a link between the m-lag 1-1 port of the root bridge device SW1 and the root port of the non-root bridge device SW3 is failed, the non-root bridge device SW3 sends an STP message to the upstream root bridge device, and since the non-root bridge device SW3 sends the STP message to the upstream root bridge device in the cross-device link aggregation group according to a hash algorithm, there are two sending cases.
One case is where the non-root bridge device SW3 sends an STP message to the root bridge device SW1 over a physical link with the root bridge device SW 1. The other is that the non-root bridge device SW3 sends the STP message to the root bridge device SW2 through the physical link between the non-root bridge device SW3 and the root bridge device SW2, and finally the root bridge device SW2 synchronizes the STP message sent by the non-root bridge device SW3 to the root bridge device SW1 according to the synchronization mechanism provided by the cross-device link aggregation group. Referring to fig. 6, after receiving the STP message, the root bridge device SW1 calculates the m-lag 1-1 port as the designated port according to the STP protocol performed on the STP message, thereby setting the STP state of the m-lag 1-1 port as a forwarding (forward) state. Under the cross-device link aggregation networking, for the typical fault recovery scene, the fault recovery performance can be improved, the port state recovery time can be reduced, the data packet loss can be effectively reduced, and the link fault recovery performance under the scene can be optimized.
In summary, in the embodiment of the present application, when the non-root bridge device senses that the link where the root port is located has failed and recovers, the non-root bridge device releases the port corresponding to the failed link after receiving the STP message by actively sending the STP message, so that data sent to the root bridge device through the failed recovery link during the detection time of the edge port when the link fails and recovers can be effectively reduced and blocked on the port corresponding to the failed recovery link in the root bridge device, thereby effectively reducing the loss of data packets.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are exemplary embodiments and that the acts and modules referred to are not necessarily required by the application.
In order to better implement the solution described in the above embodiments of the present application, the following also provides the relevant means for implementing the above solution.
Referring to fig. 7, a schematic structural diagram of a network device provided in an embodiment of the present application is shown, where the network device may be used as a non-root bridge device when used in an STP network, where the STP network includes the non-root bridge device and a first root bridge device, and the non-root bridge device may include: a processing module 101 and a sending module 102, wherein,
a processing module 101, configured to determine a root port of a non-root bridge device in the STP network;
the processing module 101 is further configured to determine a physical state of a link where the root port is located;
a sending module 102, configured to send an STP packet to the first root bridge device when the physical state of the link where the root port is located changes from a failure (down) to a restoration (up), so that after the first root bridge device receives the STP packet, the first root bridge device sets, according to the STP packet, an STP state of a port on the first root bridge device corresponding to the link to a forwarding (forward) state, where the first root bridge device is a root bridge device connected to the link.
In some examples of the present application, the sending module 102 is configured to send an STP packet to the first root bridge device, and includes:
the sending module 102 is configured to send at least one STP packet to the first root bridge device within a preset time duration through the root port.
In some embodiments of the present application, the sending module 102 is configured to send at least one STP packet to the first root bridge device within a preset time duration, where the sending module is configured to:
the sending module 102 is configured to send, through the root port, at least two STP messages to the root bridge device according to a preset sending interval within the preset time duration.
In some embodiments of the present application, the root port is a logical port formed by a plurality of physical ports, the plurality of physical ports are respectively connected to a plurality of root bridge devices through a plurality of links, the plurality of links form a cross-device link aggregation group, and the processing module 101 is further configured to:
determining a target sending link through a Hash algorithm, wherein the target sending link is one of the links;
the sending module 102 is configured to send an STP packet to the first root bridge device, and includes:
the sending module 102 is configured to send the STP packet to the first root bridge device through the target sending link determined by the processing module 101.
In some embodiments of the present application, the target transmit link comprises a link between the root port and a member port of the cross-device link aggregation group on the first root bridge device.
In some embodiments of the present application, the STP network further includes a second root bridge device, the first root bridge device and the second root bridge device are paired root bridge devices, the target transmission link includes a link between the root port and a member port of the cross-device link aggregation group on the second root bridge device, and the sending module 102 is configured to send an STP packet to the first root bridge device, and includes:
the sending module 102 is configured to send the STP packet to the second root bridge device through the target sending link, so that the STP packet is synchronized to the first root bridge device after the STP packet is received by the second root bridge device.
In some embodiments of the present application, the processing module 101 is configured to determine a target transmission link according to a hash algorithm, and includes:
the processing module 101 is configured to determine a destination physical address MAC and a source MAC address of the STP packet, and obtain the target transmission link through the hash algorithm according to the destination MAC address and the source MAC address of the STP packet.
In some embodiments of the present application, the processing module 101 is configured to determine a root port of the non-root bridge device, and includes:
the processing module 101 is configured to determine path costs from each port of the non-root bridge device to the first root bridge device in the STP network, and select a port with the smallest path cost from the path costs from each port of the non-root bridge device to the first root bridge device as a root port of the non-root bridge device.
With reference to fig. 8, another network device structure schematic diagram provided in the embodiment of the present application is described below, where the network device may be used as a root bridge device when applied to an STP network, where the STP network includes the root bridge device and a non-root bridge device, and the root bridge device may include: a receiving module 201 and a processing module 202, wherein,
a receiving module 201, configured to receive an STP message sent by the non-root bridge device, where the STP message is sent by the non-root bridge device when it is determined that a physical state of a link where a root port of the non-root bridge device is located changes from a fault (down) to a recovery (up), and the root bridge device is a root bridge device connected to the link;
and the processing module 202 is configured to set, after the receiving module 101 receives the STP packet, an STP state of a port corresponding to the link on the root bridge device to a forwarding (forwarded) state according to the STP packet.
In some embodiments of the present application, the processing module 202 is configured to set an STP state of a port corresponding to the link on the root bridge device to a forwarding (forward) state, including:
the processing module 202 is configured to perform STP protocol calculation according to the STP packet, and determine that a bridge priority of the root bridge device is higher than a bridge priority of the non-root bridge device, thereby determining that the port is an assigned port; and setting the STP state of the port to be a forwarding (forward) state.
It should be noted that, for the information interaction, execution process, and other contents between the modules/units of the apparatus, since the same concept is based on the method embodiment in the embodiment of the present application, the technical effect brought by the method embodiment is the same as that of the method embodiment of the present application, and specific contents may refer to the description in the foregoing method embodiment of the present application, and are not described herein again.
The embodiment of the present application further provides a computer storage medium, where the computer storage medium stores a program, and the program, when executed by a computer, can implement some or all of the steps described in the above method embodiments.
Referring to fig. 9, a schematic structural diagram of another network device provided in an embodiment of the present application, where the network device may be used as a non-root bridge device when used in an STP network, and the network device includes:
a communication port 301, a processor 302 and a memory 303 (wherein, the number of the processors 302 in the network device may be one or more, and one processor is taken as an example in fig. 9). In some embodiments of the present application, the communication port 301, the processor 302 and the memory 303 may be connected by a bus or other means, which is not limited herein, and fig. 9 illustrates an example of connection by a bus.
Memory 303 may include both read-only memory and random access memory and provides instructions and data to processor 302. A portion of the memory 303 may also include a non-volatile random access memory (NVRAM). The memory 303 stores an operating system and operating instructions, executable modules or data structures, or a subset or an expanded set thereof, wherein the operating instructions may include various operating instructions for performing various operations. The operating system may include various system programs for implementing various basic services and for handling hardware-based tasks.
Processor 302 controls the operation of the network device, and processor 302 may also be referred to as a Central Processing Unit (CPU). In a particular application, the various components of the network device are coupled together by a bus system that may include a power bus, a control bus, a status signal bus, etc., in addition to a data bus. For clarity of illustration, the various buses are referred to in the figures as a bus system.
The method disclosed in the embodiments of the present application may be applied to the processor 302, or implemented by the processor 302. The processor 302 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 302. The processor 302 may be a general-purpose processor, a Digital Signal Processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 303, and the processor 302 reads the information in the memory 303 and completes the steps of the method in combination with the hardware thereof.
The communication port 301 may be used to receive or transmit information and generate signals or messages related to the related settings and function control of the network device, so as to perform initialization, message forwarding, and other processing of the non-root bridge device.
In this embodiment, the processor 302 is configured to execute the port state processing method executed by the non-root bridge device side when the network device is used as a non-root bridge device.
Referring to fig. 10, a schematic structural diagram of another network device provided in an embodiment of the present application is described next, where the network device may be used as a root bridge device when used in an STP network, and the network device includes:
a communication port 401, a processor 402 and a memory 403 (wherein, the number of the processors 402 in the network device may be one or more, and one processor is taken as an example in fig. 10). In some embodiments of the present application, the communication port 401, the processor 402 and the memory 403 may be connected by a bus or in other manners, which is not limited herein, and fig. 10 illustrates an example of connection by a bus. Memory 403 may include both read-only memory and random-access memory, and provides instructions and data to processor 402. A portion of the memory 403 may also include NVRAM. The memory 403 stores an operating system and operating instructions, executable modules or data structures, or a subset or an expanded set thereof, wherein the operating instructions may include various operating instructions for performing various operations. The operating system may include various system programs for implementing various basic services and for handling hardware-based tasks.
Processor 402 controls the operation of the network device, and processor 402 may also be referred to as a CPU. In a particular application, the various components of the network device are coupled together by a bus system that may include a power bus, a control bus, a status signal bus, etc., in addition to a data bus. For clarity of illustration, the various buses are referred to in the figures as a bus system.
The method disclosed in the embodiments of the present application may be applied to the processor 402 or implemented by the processor 402. The processor 402 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 402. The processor 402 described above may be a general purpose processor, a DSP, an ASIC, an FPGA or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 403, and the processor 402 reads the information in the memory 403 and performs the steps of the method in combination with the hardware.
In this embodiment, the processor 402 is configured to execute the port state processing method executed by the root bridge device side when the network device is used as the root bridge device.
It should be noted that the above-described embodiments of the apparatus are merely schematic, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the embodiments of the apparatus provided in the present application, the connection relationship between the modules indicates that there is a communication connection therebetween, and may be implemented as one or more communication buses or signal lines.
In the several embodiments provided in this application, it should be understood that the disclosed system, module and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (16)

1. A port state processing method is applied to a Spanning Tree Protocol (STP) network, the STP network comprises non-root bridge equipment and first root bridge equipment, and the method is characterized by comprising the following steps:
the non-root bridge device determines a root port of the non-root bridge device in the STP network;
the non-root bridge equipment determines the physical state of a link where the root port is located;
when the physical state of the link where the root port is located is changed from failure down to restoration up, the non-root bridge device sends an STP message to the first root bridge device, so that after the first root bridge device receives the STP message, the STP state of the port corresponding to the link on the first root bridge device is set to be a forwarding state according to the STP message, and the first root bridge device is a root bridge device connected with the link;
the root port is a logical port formed by a plurality of physical ports, the plurality of physical ports are respectively connected with a plurality of root bridge devices through a plurality of links, the plurality of links form a cross-device link aggregation group, and before the non-root bridge device sends an STP message to the first root bridge device, the method further comprises:
the non-root bridge equipment determines a target sending link according to a Hash algorithm, wherein the target sending link is one of the links;
the non-root bridge device sends the STP message to the first root bridge device, and the method comprises the following steps:
and the non-root bridge equipment transmits the STP message to the first root bridge equipment through the target transmission link.
2. The method of claim 1, wherein the non-root bridge device sending an STP message to the first root bridge device comprises:
and the non-root bridge equipment sends at least one STP message to the first root bridge equipment within a preset time length through the root port.
3. The method according to claim 2, wherein said non-root bridge device sending at least one said STP message to said first root bridge device via said root port within a preset time period comprises:
and the non-root bridge equipment transmits at least two STP messages to the root bridge equipment through the root port within the preset time according to a preset transmission interval.
4. The method of claim 1, wherein the target transmit link comprises a link between the root port and a member port of the cross-device link aggregation group on the first root bridge device.
5. The method of claim 1, wherein the STP network further comprises a second root bridge device, the first root bridge device and the second root bridge device are paired root bridge devices with each other, the target transmission link comprises a link between the root port and a member port of the cross device link aggregation group on the second root bridge device, and the non-root bridge device transmits STP packets to the first root bridge device via the target transmission link, comprising:
and the non-root bridge equipment transmits the STP message to the second root bridge equipment through the target transmission link, so that the second root bridge equipment synchronizes the STP message to the first root bridge equipment after receiving the STP message.
6. The method of claim 1, wherein the non-root bridge device determines the target transmission link according to a hashing algorithm, comprising:
the non-root bridge equipment determines a destination Media Access Control (MAC) address and a source MAC address of the STP message;
and the non-root bridge equipment obtains the target transmission link through the Hash algorithm according to the destination MAC address and the source MAC address of the STP message.
7. A port state processing method is applied to a Spanning Tree Protocol (STP) network, the STP network comprises non-root bridge equipment and root bridge equipment, and the method is characterized by comprising the following steps:
the root bridge equipment receives an STP message sent by the non-root bridge equipment, wherein the STP message is sent when the non-root bridge equipment determines that the physical state of a link where a root port of the non-root bridge equipment is located is changed from failure down to restoration up, and the root bridge equipment is connected with the link;
the root bridge device sets the STP state of a port corresponding to the link on the root bridge device as a forwarding state according to the STP message;
the root port is a logical port formed by a plurality of physical ports, the physical ports are respectively connected with a plurality of root bridge devices through a plurality of links, and the links form a cross-device link aggregation group;
the receiving, by the root bridge device, the STP packet sent by the non-root bridge device includes:
and the root bridge equipment receives the STP message sent by the non-root bridge equipment through a target sending link, wherein the target sending link is one of the links.
8. The method according to claim 7, wherein the root bridge device sets, according to the STP packet, an STP state of a port corresponding to the link on the root bridge device to a forward state, including:
the root bridge equipment carries out STP protocol calculation according to the STP message, and determines that the bridge priority of the root bridge equipment is higher than that of the non-root bridge equipment, so that the port is determined to be a designated port;
and when the port is determined to be the designated port, setting the STP state of the port to be a forward state.
9. A network device applied to a spanning tree protocol, STP, network, the STP network comprising the network device and a first root bridge device, the network device being a non-root bridge device, comprising:
a processing module, configured to determine a root port of the non-root bridge device in the STP network;
the processing module is further configured to determine a physical state of a link in which the root port is located;
a sending module, configured to send an STP message to the first root bridge device when a physical state of a link where the root port is located is changed from a failure down to a restoration up, so that after the first root bridge device receives the STP message, the first root bridge device sets an STP state of a port on the first root bridge device corresponding to the link to a forwarding forward state according to the STP message, where the first root bridge device is a root bridge device connected to the link;
the root port is a logical port formed by a plurality of physical ports, the plurality of physical ports are respectively connected with a plurality of root bridge devices through a plurality of links, the plurality of links form a cross-device link aggregation group, and the processing module is further configured to:
determining a target sending link according to a Hash algorithm, wherein the target sending link is one of the links;
the sending module is configured to send an STP packet to the first root bridge device, and includes:
the sending module is configured to send the STP packet to the first root bridge device through the target sending link determined by the processing module.
10. The network device of claim 9, wherein the sending module is configured to send an STP message to the first root bridge device, and comprises:
the sending module is configured to send at least one STP packet to the first root bridge device within a preset time duration through the root port.
11. The network device of claim 10, wherein the sending module is configured to send at least one STP packet to the first root bridge device within a preset time period, and the sending module is configured to:
and the transmitting module is used for transmitting at least two STP messages to the root bridge equipment within the preset time according to a preset transmitting interval through the root port.
12. The network device of claim 9, wherein the target transmit link comprises a link between the root port and a member port of the cross-device link aggregation group on the first root bridge device.
13. The network device of claim 9, wherein the STP network further comprises a second root bridge device, the first root bridge device and the second root bridge device are paired root bridge devices with each other, the target transmission link comprises a link between the root port and a member port of the cross device link aggregation group on the second root bridge device, and the sending module is configured to send an STP message to the first root bridge device and comprises:
the sending module is configured to send the STP packet to the second root bridge device through the target sending link, so that the STP packet is synchronized to the first root bridge device after the STP packet is received by the second root bridge device.
14. The network device of claim 9, wherein the processing module is configured to determine the target transmission link according to the hashing algorithm, and comprises:
the processing module is used for determining a destination physical address MAC and a source MAC address of the STP message, and obtaining the target transmission link through the Hash algorithm according to the destination MAC address and the source MAC address of the STP message.
15. A network device applied to a spanning tree protocol, STP, network, wherein the network device is a root bridge device in the STP network, and the STP network comprises the root bridge device and a non-root bridge device, comprising:
a receiving module, configured to receive an STP message sent by the non-root bridge device, where the STP message is sent by the non-root bridge device when it is determined that a physical state of a link where a root port of the non-root bridge device is located changes from a failure down to a restoration up, and the root bridge device is a root bridge device connected to the link;
the processing module is used for setting the STP state of a port corresponding to the link on the root bridge equipment to be a forwarding state according to the STP message after the receiving module receives the STP message;
the root port is a logical port formed by a plurality of physical ports, the physical ports are respectively connected with a plurality of root bridge devices through a plurality of links, and the links form a cross-device link aggregation group;
the receiving module is configured to receive the STP packet sent by the non-root bridge device, and includes:
and the receiving module receives the STP message sent by the non-root bridge device through a target sending link, wherein the target sending link is one of the links.
16. The network device of claim 15, wherein the processing module is configured to set the STP state of the port corresponding to the link on the root bridge device to a forward state, and includes:
the processing module is used for performing STP protocol calculation according to the STP message, and determining that the bridge priority of the root bridge equipment is higher than that of the non-root bridge equipment, so as to determine that the port is a designated port; and when the port is determined to be the designated port, setting the STP state of the port to be a forward state.
CN201710114106.8A 2017-02-28 2017-02-28 Port state processing method and network equipment Active CN108512751B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710114106.8A CN108512751B (en) 2017-02-28 2017-02-28 Port state processing method and network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710114106.8A CN108512751B (en) 2017-02-28 2017-02-28 Port state processing method and network equipment

Publications (2)

Publication Number Publication Date
CN108512751A CN108512751A (en) 2018-09-07
CN108512751B true CN108512751B (en) 2021-02-23

Family

ID=63373215

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710114106.8A Active CN108512751B (en) 2017-02-28 2017-02-28 Port state processing method and network equipment

Country Status (1)

Country Link
CN (1) CN108512751B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109462515A (en) * 2018-09-11 2019-03-12 锐捷网络股份有限公司 Loop circuit processing method, the network equipment, MLAG networking and storage medium
CN109495322B (en) * 2018-12-25 2022-03-29 华为技术有限公司 Network fault positioning method, related equipment and computer storage medium
CN110719219B (en) * 2019-09-04 2021-09-14 厦门网宿有限公司 Port state configuration method and network equipment
CN110995502B (en) * 2019-12-18 2022-06-21 迈普通信技术股份有限公司 Network configuration management method, device, switching equipment and readable storage medium
CN111786899A (en) * 2020-07-15 2020-10-16 深圳市有方科技股份有限公司 Internet of things communication method and related equipment
CN112217669B (en) * 2020-09-29 2022-09-27 北京东土军悦科技有限公司 Service data transmission method, device, terminal equipment and storage medium
CN112688867B (en) * 2020-12-22 2022-07-12 浪潮思科网络科技有限公司 Method, device, equipment and medium for operating spanning tree protocol in MLAG environment
CN116016385A (en) * 2021-10-21 2023-04-25 华为技术有限公司 State synchronization method, device and equipment
CN115865772A (en) * 2022-11-25 2023-03-28 迈普通信技术股份有限公司 Flow back-switching method and device, electronic equipment, M-LAG system and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1859288A (en) * 2005-12-01 2006-11-08 华为技术有限公司 Method for multicast data uninterrupted repeat
CN101436975A (en) * 2007-11-13 2009-05-20 华为技术有限公司 Method, apparatus and system for implementing rapid convergence in looped network
CN102075374A (en) * 2009-11-25 2011-05-25 天津中兴软件有限责任公司 Method and system for reconstructing single-ring network topology
CN102148677A (en) * 2010-02-10 2011-08-10 杭州华三通信技术有限公司 Method for updating address resolution protocol table entries and core switch
CN102255758A (en) * 2011-08-11 2011-11-23 神州数码网络(北京)有限公司 Method for increasing convergence rate of RSTP (Rapid Spanning Tree Protocol)

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1859288A (en) * 2005-12-01 2006-11-08 华为技术有限公司 Method for multicast data uninterrupted repeat
CN101436975A (en) * 2007-11-13 2009-05-20 华为技术有限公司 Method, apparatus and system for implementing rapid convergence in looped network
CN102075374A (en) * 2009-11-25 2011-05-25 天津中兴软件有限责任公司 Method and system for reconstructing single-ring network topology
CN102148677A (en) * 2010-02-10 2011-08-10 杭州华三通信技术有限公司 Method for updating address resolution protocol table entries and core switch
CN102255758A (en) * 2011-08-11 2011-11-23 神州数码网络(北京)有限公司 Method for increasing convergence rate of RSTP (Rapid Spanning Tree Protocol)

Also Published As

Publication number Publication date
CN108512751A (en) 2018-09-07

Similar Documents

Publication Publication Date Title
CN108512751B (en) Port state processing method and network equipment
JP4822997B2 (en) Communication apparatus and communication method
US7639605B2 (en) System and method for detecting and recovering from virtual switch link failures
US9602348B2 (en) Methods and apparatus for detecting and handling split brain issues in a link aggregation group
US8411690B2 (en) Preventing data traffic connectivity between endpoints of a network segment
CN111865779B (en) Route synchronization method and cross-device link aggregation group
US8654630B2 (en) Techniques for link redundancy in layer 2 networks
US10560550B1 (en) Automatic configuration of a replacement network device in a high-availability cluster
EP3213441B1 (en) Redundancy for port extender chains
US20140369230A1 (en) Virtual Chassis Topology Management
CN107154864B (en) Spanning tree protocol STP calculation method and device
US10326690B2 (en) Operating a network node configured as part of a link aggregation system
EP3316555A1 (en) Mac address synchronization method, device and system
US8625407B2 (en) Highly available virtual packet network device
CN109691031B (en) Service message transmission method and node equipment
CN112737956A (en) Message sending method and first network equipment
US9065678B2 (en) System and method for pinning virtual machine adapters to physical adapters in a network environment
CN108989204B (en) Link state determination method and device
CN106533771B (en) Network equipment and control information transmission method
CN110535792A (en) Multinode device and its redundant communication means
JP2011223172A (en) Ring-type network system, communication apparatus and failure detection method
US10644989B2 (en) Method for running a computer network
WO2022135217A1 (en) Load sharing method and system, root node device, and leaf node device
WO2023065750A1 (en) State synchronization method and apparatus, and device
WO2016045276A1 (en) Packet forwarding method and device, sdn and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant