MLAG protocol rapid negotiation method, system and device in spanning tree environment and medium

By BPDU encapsulation or MAC replacement of protocol packets when the peer-link port of the MLAG device is in a blocked state under the spanning tree protocol, and adding identifiers, the problem of MLAG function failure is solved, and the rapid negotiation of MLAG protocol in the spanning tree environment is realized.

CN119676152AActive Publication Date: 2025-03-21SUZHOU CENTEC COMM CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411841566.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-03-21
Estimated Expiration
2044-12-13

AI Technical Summary

Technical Problem

Under the spanning tree protocol, when the peer-link port of the MLAG device is set to blocked by the spanning tree protocol, the MLAG protocol connection timeout, causing the MLAG function to fail.

Method used

By determining whether the sending peer-link port is in the blocking state of the spanning tree protocol, if it is in the blocking state, the protocol packet to be sent will be encapsulated with the BPDU message header, or the destination MAC will be replaced with a preset BPDU MAC, and an identifier will be added to the message to ensure that the packet can be transmitted normally.

Benefits of technology

It realizes normal packet forwarding under the spanning tree protocol, avoids MLAG protocol connection timeout and functional failure, and improves the system's adaptability and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119676152A_ABST
    Figure CN119676152A_ABST
Patent Text Reader

Abstract

The invention discloses an MLAG protocol rapid negotiation method, system and device in a spanning tree environment and a readable storage medium. The method comprises the following steps: judging whether a peer-link port of a sending end is in a blocking state of a spanning tree protocol or not; if yes, packaging a BPDU message header on the protocol message to be sent, or replacing the target MAC of the protocol message to be sent with the preset BPDU MAC; and adding a message identifier in the processed protocol message to be sent, and sending the processed protocol message to be sent to which the message identifier is added from a peer-link port of a sending end. Compared with the prior art, the MLAG protocol negotiation can be accelerated in the spanning tree scene. The problem that messages such as the MLAG protocol are lost due to the fact that the spanning tree protocol state of the peer-link port on the connected MLAG equipment is not synchronously set to be the Forward forwarding state, namely, the peer-link port is detected to be in the forwarding state, but the associated peer-link port on the opposite side is still in the blocked state is effectively solved. And the system function realization stability is further maintained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of network communications, and in particular relates to a method, system, device and readable storage medium for rapid negotiation of an MLAG protocol in a spanning tree environment. Background Art

[0002] Spanning tree network is a protocol used to avoid loops in the network and ensure that data packets are transmitted normally in the network. In a complex network topology, if there are multiple paths connecting two nodes, data packets may circulate infinitely in the network, causing network congestion or even collapse.

[0003] MLAG is a technology used to enhance network link redundancy and bandwidth utilization. It allows multiple physical switches (usually two) to be connected to the same subnet and treated as a single logical unit. MLAG aggregates links together to form logical links, thus providing fast recovery from failures and the benefits of bandwidth aggregation.

[0004] Spanning tree networks and MLAG technologies are often used together to provide a high-availability, high-performance, and resilient network infrastructure. When the spanning tree protocol is enabled on an MLAG device, the spanning tree protocol blocks all ports first. At this point, the MLAG device negotiates to use the peer-link port interaction protocol message, which is discarded by the spanning tree protocol, causing the MLAG protocol connection to time out and the MLAG function to fail.

[0005] Therefore, in view of the above technical problems, it is necessary to provide a strategy for normally forwarding messages under the spanning tree protocol.

[0006] The information disclosed in this background technology section is only intended to enhance the understanding of the overall background of the invention and should not be regarded as an acknowledgment or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the invention

[0007] The object of the present invention is to provide a method, system, device and readable storage medium for fast negotiation of MLAG protocol in a spanning tree environment, which can provide a method for MLAG equipment to normally send and receive protocol messages after the spanning tree protocol sets the peer-link port to the Block state.

[0008] In order to achieve the above object, a technical solution provided by a specific embodiment of the present invention is as follows:

[0009] In a first aspect, the present invention provides a method for fast negotiation of an MLAG protocol in a spanning tree environment, comprising:

[0010] Determine whether the peer-link port on the sending end is in the blocked state of the spanning tree protocol;

[0011] If yes, then encapsulate the BPDU message header to be sent, or replace the destination MAC of the protocol message to be sent with the preset BPDU MAC;

[0012] A message identifier is added to the processed protocol message to be sent, and the processed protocol message to be sent with the message identifier added is sent from the peer-link port of the sending end.

[0013] In one or more embodiments of the present invention, adding a message identifier to the protocol message to be sent includes:

[0014] writing the message identifier into an unused value in a defined field in the processed protocol message to be sent; or

[0015] Insert a new field for writing the message identifier.

[0016] In one or more embodiments of the present invention, writing the message identifier into an unused value in a defined field in the processed protocol message to be sent includes:

[0017] The message identifier is written into the BPDU_TYPE field of the processed protocol message to be sent.

[0018] In one or more embodiments of the present invention, the method further comprises:

[0019] The message identifier of the protocol message received by the peer-link port of the receiving end and the new field inserted for writing the message identifier are deleted.

[0020] In one or more embodiments of the present invention, the method further comprises:

[0021] If the protocol message received by the peer-link port of the receiving end includes an encapsulated BPDU message header, identifying the protocol message and decapsulating the protocol message;

[0022] The protocol message after stripping off the BPDU message header is sent from the receiving end peer-link port to the MLAG protocol stack.

[0023] In one or more embodiments of the present invention, the method further comprises:

[0024] Maintain a timer on the peer-link port at the sending end;

[0025] When the peer-link port on the sending end changes from the blocking state to the forwarding state, the corresponding timer is refreshed and started;

[0026] The timer stops timing when the preset waiting delay period is reached.

[0027] In one or more embodiments of the present invention, the method further comprises:

[0028] If the current sending end peer-link port is not in a blocked state of the spanning tree protocol, determining whether the current sending end peer-link port is in a waiting delay period;

[0029] If yes, then encapsulate the protocol message to be sent with a BPDU message header, or replace the destination MAC of the protocol message to be sent with the preset BPDU MAC, add a message identifier to the processed protocol message to be sent, and send the processed protocol message to be sent with the message identifier added from the peer-link port of the sending end;

[0030] If not, the protocol message to be sent is sent from the peer-link port of the sending end.

[0031] In a second aspect, the present invention provides a MLAG protocol fast negotiation system in a spanning tree environment, comprising:

[0032] The first module is used to determine whether the peer-link port of the sending end is in a blocked state of the spanning tree protocol;

[0033] The second module is used to encapsulate the BPDU message header to the protocol message to be sent, or replace the destination MAC of the protocol message to be sent with the preset BPDU MAC;

[0034] The third module is used to add a message identifier to the processed protocol message to be sent;

[0035] The fourth module is used to send the processed protocol message to be sent with the message identifier added from the peer-link port of the sending end.

[0036] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the MLAG protocol fast negotiation method in a spanning tree environment by executing the computer instructions.

[0037] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the MLAG protocol fast negotiation method in a spanning tree environment.

[0038] When the port is in blocking state, the received ordinary MLAG message will be discarded. Compared with the prior art, the MLAG protocol fast negotiation method in the spanning tree environment provided by the present invention can enable the function of the MLAG device to operate normally by encapsulating the MLAG protocol and other messages. Furthermore, the present invention also provides another optimization scheme, by replacing the destination MAC address of the message, so that the peer-link port can identify and send the MLAG protocol and other messages to the CPU, and then send the acquired original message to the MLAG protocol stack after processing. The loss of the message is avoided, and the failure of the MLAG function caused by the MLAG protocol connection timeout is avoided, which not only improves the adaptability and stability of the system function implementation, but also speeds up the MLAG protocol negotiation in the spanning tree scenario. Secondly, the present invention sets a waiting delay period, which can effectively prevent the spanning tree protocol state of the peer-link port on the connected MLAG device from being synchronously set to the Forward forwarding state, that is, the peer-link port is detected as the forwarding state, but the associated opposite peer-link port is still in the blocking state, resulting in the problem of message loss. The stability of the system function implementation is further maintained. Finally, the present invention sets a variety of different implementation methods for different scenarios, so as to add message identifiers and prevent messages from being discarded by peer-link ports in a blocked state, thereby improving the flexibility of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0040] Figure 1 is a schematic diagram of an MLAG negotiation scenario in one embodiment of the present invention;

[0041] Figure 2 It is a flowchart of a method for fast negotiation of an MLAG protocol in a spanning tree environment in one embodiment of the present invention;

[0042] Figure 3 It is a structural block diagram of the MLAG protocol fast negotiation system in a spanning tree environment in one embodiment of the present invention;

[0043] Figure 4 is a structural block diagram of an electronic device in one embodiment of the present invention;

[0044] Figure 5 It is a schematic diagram of the process of sending a protocol message by a peer-link port in one embodiment of the present invention;

[0045] Figure 6 It is a schematic diagram of an application flow in which a peer-link port sends a protocol message in a waiting delay period in an embodiment of the present invention;

[0046] Figure 7 The present invention is a flowchart of a peer-link port receiving a BPDU-encapsulated protocol message in one embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0048] Unless explicitly stated otherwise, throughout the specification and claims, the term “comprise” or variations such as “include” or “comprising”, etc., will be understood to include the stated elements or components but not to exclude other elements or components.

[0049] In the prior art solution, there is a method of using the spanning tree network and MLAG technology simultaneously, specifically including: when the peer-link port on the MLAG device is set to the Block state by the spanning tree protocol, the prior art can only wait for the spanning tree protocol interaction to be completed, and the peer-link port of the MLAG device enters the Forward forwarding state, at which time, the message to be forwarded is sent and received normally. After the negotiation times out, the MLAG device enters the MLAG protocol reconnection waiting period. After the MLAG protocol reconnection waiting period is completed, the MLAG protocol interaction is performed again. At this time, the peer-link port on the MLAG device sends and receives protocol messages normally to complete the MLAG negotiation.

[0050] It is understandable that the inability to send and receive messages normally during the waiting process will seriously affect the efficiency of the system operation; if the packets continue to be sent, the sent messages will inevitably be lost because the peer-link port on the MLAG device is set to the Block state by the spanning tree protocol, which will lead to the MLAG protocol connection timeout and MLAG function failure. At the same time, even if the current peer-link port is in the forwarding state, it is still impossible to guarantee that the peer-link port on the other end is not in the blocked state, that is, there is still the possibility of message loss.

[0051] The inventor of the present invention has discovered the main shortcomings of the prior art, and based on the shortcomings of the prior art, has proposed a new technical implementation idea: a timer is maintained at the peer-link port at the sending end, and the timing starts when the port changes from a blocking state to a forwarding state. Within the preset waiting delay period, the port that has been restored to the forwarding state and the peer-link port on the opposite side associated with it are both considered to be in a blocking state, to prevent the loss of messages due to blocking at one end. Furthermore, by detecting the current port state, when it is in a blocking state, the BPDU header is used to encapsulate the protocol message to be forwarded, or the destination MAC address of the message is replaced with the BPDU MAC, so as to ensure that the received MLAG protocol and other messages are not discarded when the peer-link port is blocked, thereby completing the purpose of MLAG protocol interaction and negotiation normally.

[0052] Please refer to Figure 1 , which is a schematic diagram of an application scenario of the MLAG protocol fast negotiation method in a spanning tree environment provided by the present invention under an implementation mode, and the scenario specifically includes: an MLAG master device 101, an MLAG slave device 102 and a user terminal 103.

[0053] It should be noted that communication connections are provided between the MLAG master device 101, the MLAG slave device 102 and the user terminal 103, and the communication network derived from the above communication connection may include various connection types, including but not limited to: wired connection, wireless connection or optical fiber cable connection, etc. At the same time, the communication network may be a local area network, a metropolitan area network, a wide area network or any combination of the three.

[0054] The MLAG master device 101 and the MLAG slave device belong to the same logical unit, and the two perform data protocol transmission through the peer-link port. The user terminal is used to set the custom items necessary for the line of sight of the MLAG protocol fast negotiation method in the spanning tree environment provided by the present invention through the above communication connection, such as the format of the protocol message to be forwarded, the length and position of the newly added identification field, etc.

[0055] It should be noted that the user terminal 103 is installed with a computer software program that matches the MLAG protocol fast negotiation method in the spanning tree environment provided by this method; the user terminal 103 may include but is not limited to a desktop computer (PC), a desktop computer, a smart phone, a handheld computer, a tablet computer, a personal digital assistant (PDA), and other portable electronic devices or wearable electronic devices, and the embodiments of the present invention do not limit the above contents.

[0056] It should also be noted that the MLAG protocol fast negotiation method in the spanning tree environment of the embodiment of the present invention can be applied to the MLAG protocol fast negotiation system in the spanning tree environment of the embodiment of the present invention. The MLAG protocol fast negotiation system in the spanning tree environment can be configured in a terminal. The terminal may include but is not limited to a PC (Personal Computer), a PDA (tablet computer), a smart phone, a smart wearable device, and the like.

[0057] Please refer to Figure 2 FIG. 2 is a flow chart of a method for rapid negotiation of the MLAG protocol in a spanning tree environment in one embodiment of the present invention. The method for rapid negotiation of the MLAG protocol in a spanning tree environment specifically includes the following steps:

[0058] S201: Determine whether the peer-link port of the sending end is in a blocked state of the spanning tree protocol;

[0059] It should be noted that in Ethernet switching networks, redundant links are usually used to perform link backup and improve network reliability. However, the use of redundant links will cause loops on the switching network, causing broadcast storms and MAC address table instability and other fault phenomena. This will lead to poor user communication quality or even communication interruption. In order to solve the loop problem in the switching network, STP (Spanning Tree Protocol) was proposed. Devices running the spanning tree protocol discover loops in the network by exchanging information with each other, and selectively block a certain interface, and finally prune the ring network structure into a loop-free tree network structure, thereby preventing messages from constantly circulating in the ring network, and also avoiding the reduction of processing capacity of the device due to repeated reception of the same message.

[0060] On the other hand, MLAG (Multichassis Link Aggregation Group) provides a cross-device link aggregation technology. MLAG improves the reliability of the link from the single-board level to the device level by aggregating multiple switches in the same state with the user-side device or server. It allows multiple physical switches (usually two) to be connected to the same subnet and treat them as a logical unit, improving the reliability of the link from the single-board level to the device level.

[0061] When M-LAG works normally, the known unicast traffic sent from the user side to the network side is load-balanced by the M-LAG master and backup devices, and the traffic is forwarded together. Conversely, the known unicast traffic sent from the network side to the user side is also load-balanced by the M-LAG master and backup devices, and the traffic is forwarded together. Therefore, the data transmission between the MLAG master and MLAG backup devices based on the peer-link port is crucial to the realization of the MLAG function.

[0062] In enterprise networks and data center environments, spanning tree networks and MLAG technologies are often used simultaneously to provide high availability, high performance, and resilience of network infrastructure. However, under the spanning tree protocol, the peer-link port on one side of the redundant MLAG device will be blocked to prevent a loop from forming at the port. This blocks the data transmission between MLAG devices in the same logical unit in disguised form. In a specific embodiment of the present invention, since the port status is calculated based on the spanning tree protocol, the spanning tree protocol calculation result of the corresponding sending peer-link port can be directly called to determine whether the peer-link port is in a forwarding state or a blocking state.

[0063] S202: If the peer-link port of the sending end is in a blocked state of the spanning tree protocol, encapsulate the protocol message to be sent based on the BPDU message header, or replace the destination MAC of the protocol message to be sent with a preset BPDU MAC;

[0064] Since the port status in the spanning tree network needs to be determined after the convergence of the spanning tree protocol BPDU, and the port blocking status set by the spanning tree protocol is to prevent the transmission of its messages to avoid loops, if the current peer-link port is in the blocking state, only the spanning tree protocol message BPDU is received on the port, and other messages received will be discarded.

[0065] In order to ensure that different protocol messages can be normally sent and received on a peer-link port that is blocked by the spanning tree protocol, the protocol message to be sent can be encapsulated based on the BPDU message header, or the destination MAC of the protocol message to be sent can be replaced with the preset BPDU MAC.

[0066] Furthermore, if the protocol message to be sent is processed by encapsulating the protocol message to be sent based on the BPDU message header, then after the corresponding receiving end peer-link port receives the protocol message, it is necessary to determine whether the protocol message is encapsulated with the BPDU message header; if so, identify the protocol message and decapsulate the protocol message; and send the protocol message after stripping the BPDU message header to the MLAG protocol stack along the receiving end peer-link port. At the same time, if the message identifier is not written into the message header, but a new field is inserted, then the receiving end also needs to delete the inserted new field, restore the original MLAG message format, and then send it to the MLAG protocol stack.

[0067] On the other hand, if the destination MAC of the protocol message to be sent is replaced with the preset BPDU MAC, there is no need to decapsulate the message, but the receiving end needs to delete the inserted message identifier, restore the original MLAG message format, and then send the protocol message based on the sending end peer-link port.

[0068] It should be noted that for MLAG master-slave devices, under the spanning tree protocol, one end of the peer-link port is usually in the forwarding state, and the other end of the peer-link port is in the blocking state. Therefore, when it is detected that the peer-link port of the sending end is in the forwarding state, if the corresponding protocol message is sent directly, it may cause the message to be discarded at the peer-link port of the receiving end. It will also cause the problem of MLAG device negotiation timeout and MLAG function failure. Since the sending side cannot perceive the port status of the receiving side, it is impossible to obtain the port status of both the sender and the receiver at the same time, and then determine the processing strategy for the forwarded protocol message. In the above situation, the embodiment of the present invention proposes a new implementation method as follows.

[0069] In an exemplary embodiment of the present invention, a timer is maintained at the sending end peer-link port; when the state of the sending end peer-link port changes from a blocking state to a forwarding state, the corresponding timer is refreshed and started; and the timer stops timing when the preset waiting delay period is reached.

[0070] If the current sending peer-link port is not in a blocked state of the spanning tree protocol, determine whether the current sending peer-link port is in a waiting delay period; if so, encapsulate the protocol message to be sent with a BPDU message header, or replace the destination MAC of the protocol message to be sent with the preset BPDU MAC, add a message identifier to the processed protocol message to be sent, and send the processed protocol message to be sent with the message identifier added from the sending peer-link port.

[0071] Setting the waiting delay period can effectively avoid the problem that one side of the peer-link port is in the forwarding state, but the other side of the peer-link port is blocked, resulting in message loss. When the peer-link port changes from the blocking state to the forwarding state, the timer is started, and within the preset waiting delay period, the transceiver peer-link port is considered to be in the blocking state at the same time. Among them, the configuration of the specific value of the waiting delay period can be dynamically adjusted based on the actual usage scenario, and the embodiment of the present invention does not limit this.

[0072] It should also be noted that the protocol message to be sent in the present invention may include but is not limited to MLAG protocol message, ARP protocol message, ND protocol message, etc., and the embodiment of the present invention does not limit the type of protocol message.

[0073] S203: adding a message identifier to the processed protocol message to be sent, and sending the processed protocol message to be sent with the message identifier added from the peer-link port of the sending end.

[0074] In an exemplary embodiment, adding a message identifier to the protocol message to be sent includes: writing the message identifier into an unused value in a defined field in the protocol message; or defining a new field for writing the message identifier.

[0075] It should be noted that, for messages processed by replacing the destination MAC with the preset BPDU MAC, it is actually expected that the message to be forwarded is still forwarded in a form similar to an Ethernet message. In one embodiment, the message identifier can be written into its defined protocol field, but the relatively newly added message identifier is easy to cause confusion in the original field content. Therefore, preferably, in this case, a newly added TYPE field can be inserted to write the corresponding message identifier.

[0076] On the other hand, the protocol message after encapsulation includes a MAC field, a Length field, an LLC field, a BPDU_Type field, etc. When adding a message identifier, optionally, in one embodiment, a new TYPE field can be defined for writing the message identifier. It is understandable that in the case of encapsulation, there is a BPDU_TYPE field in the message header, so inserting a new TYPE field will cause redundancy and increase the link transmission pressure. Therefore, preferably, the message identifier is written into the BPDU_TYPE field of the encapsulated BPDU message header, and other unused values ​​except the defined BPDU_TYPE are used.

[0077] In order to further illustrate the MLAG protocol fast negotiation method in a spanning tree environment provided by the present invention, the following is a complete implementation flow of a specific embodiment of the present invention. Figure 5-Figure 7 shown.

[0078] When sending protocol packets, the MLAG device checks the spanning tree protocol calculation status (START) of the peer-link port at that moment, and determines whether to process the protocol packets (END) based on the comparison result, thereby completing the sending of the MLAG protocol when the spanning tree protocol calculation is performed on the peer-link port.

[0079] Specifically, Figure 5As shown, step P1 is that the MLAG protocol stack encapsulates the original protocol message according to the peer-link port configuration.

[0080] Step J1 is to determine whether the current peer-link port is in the Block state of the spanning tree protocol. If the current peer-link port is already in the Block state of the spanning tree protocol, then execute step P2; otherwise, execute step J2. Step J2 is to determine whether the current peer-link port is in the BPDU waiting delay period for the protocol message to be encapsulated if the current peer-link port is in the Forward state of the spanning tree protocol. If the peer-link port is in the BPDU waiting delay period for the protocol message to be encapsulated, then execute step P2; otherwise, execute step P3. Step P2 is to add an encapsulated BPDU message header to the current original protocol message, or replace the destination MAC of the protocol message to be sent with the BPDUMAC representing the same receiving end, and add an identifier indicating that the encapsulated message is a protocol message, and send the processed message through the peer-link port. Step P3 is to send the current original protocol message directly through the peer-link port.

[0081] Further, the process of setting the waiting delay period is as follows Figure 6 As shown. Specifically: Step P1 is that the spanning tree protocol calculates and sets the peer-link port to the Block state. Step P2 is that the spanning tree protocol interacts through BPDU and calculates according to the protocol standard to set the peer-link port to the Forward state. Step P3 is that after the peer-link port migrates to the Forward state of the spanning tree protocol, the MLAG device starts the protocol message to use the BPDU encapsulation waiting delay. This waiting delay prevents the spanning tree protocol state of the peer-link port on the connected MLAG device from not being synchronously set to the Forward state. Step P4 is that when the protocol message uses the BPDU encapsulation waiting delay ends, the waiting delay is terminated.

[0082] When the peer-link port receives a BPDU-encapsulated protocol message, such as Figure 7As shown. Specifically, step P1 is that the MLAG device receives the BPDU message and parses the receiving port and message protocol field of the BPDU message. Step J1 is to determine whether the receiving port of the BPDU message to be processed is a peer-link port. If the receiving port of the BPDU currently being processed is a peer-link port, execute step J2; otherwise, END, and process the BPDU according to the spanning tree protocol. Step J2 is to determine the identification information of the BPDU message currently being processed to determine whether it is of the MLAG type. If the BPDU message currently being processed is of the MLAG type, execute step P2; otherwise, END, and process the BPDU according to the spanning tree protocol. Step P2 is that the MLAG device decapsulates the BPDU currently being processed, strips the BPDU message header to obtain the protocol message, or directly obtains the protocol message with the destination MAC replaced. Step P3 is that the MLAG device sends the protocol message to the MLAG protocol stack for processing.

[0083] Please refer to Figure 3 As shown, based on the same inventive concept as the aforementioned MLAG protocol fast negotiation method in a spanning tree environment, an embodiment of the present invention provides an MLAG protocol fast negotiation system 300 in a spanning tree environment, which includes: a first module 301, a second module 302, a third module 303 and a fourth module 304.

[0084] Specifically, the first module 301 is used to determine whether the peer-link port of the sending end is in a blocked state of the spanning tree protocol; the second module 302 is used to encapsulate the BPDU message header to the protocol message to be sent, or replace the destination MAC of the protocol message to be sent with the preset BPDU MAC; the third module 303 is used to add a message identifier to the processed protocol message to be sent; the fourth module 304 is used to send the processed protocol message to be sent with the message identifier added from the sending end peer-link port.

[0085] It should be noted that the third module 303 is also used to write the message identifier into an unused value in a defined field in the processed protocol message to be sent; or to insert a new field for writing the message identifier.

[0086] It should also be noted that the MLAG negotiation system 300 provided by the present invention also includes a timing module, which is used to maintain a timer at the peer-link port at the sending end; when the peer-link port at the sending end changes from a blocking state to a forwarding state, the corresponding timer is refreshed and started; and the timer stops timing when the timer reaches a preset waiting delay period.

[0087] If the current sending end peer-link port is not in a blocked state of the spanning tree protocol, determine whether the current sending end peer-link port is in a waiting delay period; if so, add a BPDU message header to the protocol message to be sent, or replace the destination MAC of the protocol message to be sent with the preset BPDU MAC, add a message identifier to the processed protocol message to be sent, and send the processed protocol message to be sent with the message identifier added from the sending end peer-link port;

[0088] If not, the protocol message to be sent is sent along the peer-link port of the sending end.

[0089] Please refer to Figure 4 As shown, an embodiment of the present invention further provides an electronic device 400, which includes at least one processor 401, a memory 402 (for example, a non-volatile memory), a memory 403, and a communication interface 404, and the at least one processor 401, the memory 402, the memory 403, and the communication interface 404 are connected together via a bus 405. At least one processor 401 is used to call at least one program instruction stored or encoded in the memory 402, so that the at least one processor 401 performs various operations and functions of the MLAG protocol fast negotiation method in a spanning tree environment described in various embodiments of this specification.

[0090] In an embodiment of the present specification, the electronic device 400 may include, but is not limited to, a personal computer, a server computer, a workstation, a desktop computer, a laptop computer, a notebook computer, a mobile electronic device, a smart phone, a tablet computer, a cellular phone, a personal digital assistant (PDA), a handheld device, a messaging device, a wearable electronic device, a consumer electronic device, and the like.

[0091] An embodiment of the present invention also provides a computer-readable medium, which carries computer execution instructions. When the computer execution instructions are executed by a processor, they can be used to implement various operations and functions of the MLAG protocol fast negotiation method in a spanning tree environment described in various embodiments of this specification.

[0092] The computer-readable medium in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.

[0093] In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0094] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0095] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatuses, systems, and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0096] The foregoing description of specific exemplary embodiments of the present invention is for the purpose of illustration and demonstration. These descriptions are not intended to limit the present invention to the precise form disclosed, and it is clear that many changes and variations can be made based on the above teachings. The purpose of selecting and describing the exemplary embodiments is to explain the specific principles of the present invention and its practical application, so that those skilled in the art can realize and utilize various different exemplary embodiments of the present invention and various different selections and changes. The scope of the present invention is intended to be limited by the claims and their equivalents.

[0097] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.

[0098] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.

Claims

1. A method for fast negotiation of MLAG protocol in a spanning tree environment, characterized in that: include: Determine whether the peer-link port on the sending end is in the blocked state of the spanning tree protocol; If yes, then encapsulate the BPDU header to the protocol message to be sent, or replace the destination MAC of the protocol message to be sent with the preset BPDU MAC; A message identifier is added to the processed protocol message to be sent, and the processed protocol message to be sent with the message identifier added is sent from the peer-link port of the sending end.

2. The MLAG protocol fast negotiation method in a spanning tree environment according to claim 1, characterized in that: Adding a message identifier to the protocol message to be sent includes: writing the message identifier into an unused value in a defined field in the processed protocol message to be sent; or Insert a new field for writing the message identifier.

3. The MLAG protocol fast negotiation method in a spanning tree environment according to claim 2, characterized in that: Writing the message identifier into an unused value in a defined field in the processed protocol message to be sent includes: The message identifier is written into the BPDU_TYPE field of the processed protocol message to be sent.

4. The MLAG protocol fast negotiation method in a spanning tree environment according to claim 2, characterized in that: The method further comprises: The message identifier of the protocol message received by the peer-link port of the receiving end and the new field inserted for writing the message identifier are deleted.

5. The MLAG protocol fast negotiation method in a spanning tree environment according to claim 1, characterized in that: The method further comprises: If the protocol message received by the peer-link port of the receiving end includes an encapsulated BPDU message header, identifying the protocol message and decapsulating the protocol message; The protocol message after stripping off the BPDU message header is sent from the receiving end peer-link port to the MLAG protocol stack.

6. The MLAG protocol fast negotiation method in a spanning tree environment according to claim 1, characterized in that: The method further comprises: Maintain a timer on the peer-link port at the sending end; When the peer-link port on the sending end changes from the blocking state to the forwarding state, the corresponding timer is refreshed and started; The timer stops timing when the preset waiting delay period is reached.

7. The MLAG protocol fast negotiation method in a spanning tree environment according to claim 6, characterized in that: The method further comprises: If the current sending end peer-link port is not in a blocked state of the spanning tree protocol, determining whether the current sending end peer-link port is in a waiting delay period; If yes, then encapsulate the protocol message to be sent with a BPDU message header, or replace the destination MAC of the protocol message to be sent with the preset BPDU MAC, add a message identifier to the processed protocol message to be sent, and send the processed protocol message to be sent with the message identifier added from the peer-link port of the sending end; If not, the protocol message to be sent is sent from the peer-link port of the sending end.

8. A MLAG protocol fast negotiation system in a spanning tree environment, characterized in that: include: The first module is used to determine whether the peer-link port of the sending end is in a blocked state of the spanning tree protocol; The second module is used to encapsulate the BPDU message header to the protocol message to be sent, or replace the destination MAC of the protocol message to be sent with a preset BPDU MAC; The third module is used to add a message identifier to the processed protocol message to be sent; The fourth module is used to send the processed protocol message to be sent with the message identifier added from the peer-link port of the sending end.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the MLAG protocol fast negotiation method in a spanning tree environment according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the MLAG protocol fast negotiation method in a spanning tree environment according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and network equipment for preventing network loop and spanning tree protocol network system

    CN101699799A

  • Method for detecting self-loop in half-duplex working mode of Ethernet interface

    CN102201944A

  • Method and system of performing heterogeneous hybrid networking through Ethernet ring protocol and spanning tree protocol

    CN104219115A

  • Message transmitting method and device

    CN104270297A

  • Spanning tree protocol rapid convergence method and device in MLAG environment, and medium

    CN113395261A