CN113938421B - Force-up function-based anti-loop mechanism implementation method, equipment and medium - Google Patents

Force-up function-based anti-loop mechanism implementation method, equipment and medium Download PDF

Info

Publication number
CN113938421B
CN113938421B CN202111371633.XA CN202111371633A CN113938421B CN 113938421 B CN113938421 B CN 113938421B CN 202111371633 A CN202111371633 A CN 202111371633A CN 113938421 B CN113938421 B CN 113938421B
Authority
CN
China
Prior art keywords
port
force
opposite
state attribute
equipment
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
CN202111371633.XA
Other languages
Chinese (zh)
Other versions
CN113938421A (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.)
Inspur Cisco Networking Technology Co Ltd
Original Assignee
Inspur Cisco Networking Technology 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 Inspur Cisco Networking Technology Co Ltd filed Critical Inspur Cisco Networking Technology Co Ltd
Priority to CN202111371633.XA priority Critical patent/CN113938421B/en
Publication of CN113938421A publication Critical patent/CN113938421A/en
Application granted granted Critical
Publication of CN113938421B publication Critical patent/CN113938421B/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/18Loop-free operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • H04L45/245Link aggregation, e.g. trunking
    • 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
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the specification discloses a method, equipment and a medium for realizing a ring prevention mechanism based on Force-up function, wherein the method is applied to an MLAG networking environment and comprises the following steps: configuring a Force-up function for both current equipment and opposite equipment in an MLAG networking environment; respectively generating a first Force State attribute and a second Force State attribute according to port information of current equipment and opposite-end equipment, and when the first Force State attribute changes, sending the changed first Force State attribute to the opposite-end equipment so that the opposite-end equipment can update opposite-end port information in the second Force State attribute to local port information in the changed first Force State attribute to generate a third Force State attribute and send the third Force State attribute to the current equipment; judging whether the MLAG networking forms a network loop or not; if the MLAG networking forms a network loop, adjusting the port blocking State of any one of the current device or the opposite device according to the port blocking states of the local port and the opposite port in the third Force State attribute so as to realize a loop prevention mechanism.

Description

Force-up function-based anti-loop mechanism implementation method, equipment and medium
Technical Field
The present disclosure relates to the field of network communication technologies, and in particular, to a method, a device, and a medium for implementing a Force-up function-based anti-loop mechanism.
Background
A cross device Link Aggregation Group (M-LAG) is a mechanism to implement cross device Link Aggregation. The M-LAG function virtualizes two devices into one device in a cross-device link aggregation mode, so that redundant backup of the network node is achieved. Two devices configured with the M-LAG function respectively add ports into the same M-ALG group, and add ports of access devices at opposite ends of the aggregated link into the same aggregated group, thereby realizing cross-device link aggregation. If one equipment fails, the data flow is quickly switched to another intact equipment by utilizing the characteristic of the link switching of the aggregation group, so that the stability of a network environment is ensured.
When the aggregation negotiation is temporarily invalid, the Force-up function ensures normal transmission of data flow by temporarily converting the aggregation port of the aggregation member into a physical port. After the Force-up function takes effect, the aggregation ports of the M-LAG group members are converted into physical ports, and at the moment, a network loop can be formed in a networking environment, so that a network storm further occurs.
Disclosure of Invention
One or more embodiments of the present specification provide a method, an apparatus, and a medium for implementing a ring prevention mechanism based on a Force-up function, so as to solve the following technical problems: after the Force-up function is in effect, the aggregation port of the M-LAG group member is converted into a physical port, and at the moment, a network loop is formed in a networking environment.
One or more embodiments of the present disclosure adopt the following technical solutions:
one or more embodiments of the present specification provide a method for implementing a ring prevention mechanism based on a Force-up function, which is applied to an MLAG networking environment, and the method includes: configuring a Force-up function for both current equipment and opposite-end equipment in the MLAG networking environment, wherein the current equipment and the opposite-end equipment are connected through a Peer-link; respectively generating a first Force State attribute and a second Force State attribute according to port information of the current device and the opposite terminal device, wherein the port information comprises an enabling State of the port, a Force-up function effective State of the port and a blocking State of the port, the first Force State attribute comprises local port information of the current device and opposite terminal port information of the current device, and the second Force State attribute comprises local port information of the opposite terminal device and opposite terminal port information of the opposite terminal device; when the first Force State attribute changes, the changed first Force State attribute is sent to the opposite-end equipment, so that the opposite-end equipment can update opposite-end port information in the second Force State attribute to local port information in the changed first Force State attribute to generate a third Force State attribute and send the third Force State attribute to the current equipment; judging whether the MLAG networking forms a network loop or not according to port enabling states corresponding to a local port and an opposite port in the third Force State attribute and Force-up function effective states corresponding to the local port and the opposite port; and if the MLAG networking forms a network loop, adjusting the port blocking State of any one of the current equipment or the opposite-end equipment according to the port blocking states of a local port and an opposite-end port in a third Force State attribute so as to realize a loop prevention mechanism.
Further, the changing of the first Force State attribute specifically includes: and if any one or more of the port State of the current equipment local port, the Force-up function effective State of the current equipment local port and the port blocking State of the current equipment local port is changed, judging that the first Force State attribute is changed.
Further, after configuring a Force-up function for both the current device and the peer device in the MLAG networking environment, the method further includes: judging the Force-up function effective state of the current equipment and the opposite terminal equipment according to whether the current equipment and the opposite terminal equipment receive the LACP message within the preset time; if the local port of the current equipment does not receive the LACP message sent by the appointed equipment within the preset time, the Force-up function of the local port of the current equipment takes effect; if the local port of the opposite terminal device does not receive the LACP message sent by the appointed device within the preset time, the Force-up function of the local port of the opposite terminal device takes effect.
Furthermore, the MLAG networking environment further comprises a designated device, and the designated device is accessed to the MLAG networking environment; before the determining that the Force-up functions of the current device and the opposite terminal device are in an effective state according to whether the current device and the opposite terminal device receive the LACP message within the preset time, the method further includes: the current equipment in the MLAG networking environment receives an LACP message sent by the designated equipment through a first preset port; the opposite terminal equipment in the MLAG networking environment receives an LACP message sent by the designated equipment through a second preset port; and the appointed equipment is connected with the current equipment through the first preset port and is connected with the opposite-end equipment through the second preset port.
Further, the determining, according to the port enabling states corresponding to the local port and the peer port in the third Force State attribute and the Force-up function effective State corresponding to the local port and the peer port, whether the MLAG networking forms a network loop specifically includes: and when the effective states of the Force-up functions corresponding to the local port and the opposite port in the third Force State attribute are both effective states, and the enabled states of the ports corresponding to the local port and the opposite port are enabled states, determining that the MLAG networking forms a network loop.
Further, the adjusting, according to the port blocking states of the local port and the peer port in the third Force State attribute, the port blocking State of any one of the current device and the peer device includes: when the local port in the third Force State attribute is in a blocking State, setting the opposite port to be in a non-blocking State; and when the opposite end port in the third Force State attribute is in a blocking State, setting the local port to be in a non-blocking State.
Further, the generating a first Force State attribute and a second Force State attribute according to the port information of the current device and the peer device respectively specifically includes: when the current device and the opposite-end device are accessed to an MLAG networking environment, the opposite-end device sends local port information of the opposite-end device to the current device through a Peer-link port, and the current device generates a first Force State attribute according to the local port information of the current device and the local port information of the opposite-end device; and the current equipment sends the local port information of the current equipment to the opposite equipment through a Peer-link port, and the opposite equipment generates a second Force State attribute according to the local port information of the opposite equipment and the local port information sent by the current equipment.
Further, configuring a Force-up function for both the current device and the peer device in the MLAG networking environment specifically includes: and configuring a Force-up function for the aggregation member port of the current device and the aggregation member port of the opposite device in the networking environment.
One or more embodiments of the present specification provide an anti-loop mechanism implementing device based on Force-up function, including:
at least one processor; and (c) a second step of,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the steps of:
configuring a Force-up function for both current equipment and opposite-end equipment in an MLAG networking environment, wherein the current equipment and the opposite-end equipment are connected through a Peer-link; respectively generating a first Force State attribute and a second Force State attribute according to port information of the current device and the opposite terminal device, wherein the port information comprises an enabling State of the port, a Force-up function effective State of the port and a blocking State of the port, the first Force State attribute comprises local port information of the current device and opposite terminal port information of the current device, and the second Force State attribute comprises local port information of the opposite terminal device and opposite terminal port information of the opposite terminal device; when the first Force State attribute changes, the changed first Force State attribute is sent to the opposite terminal device, so that the opposite terminal device updates the opposite terminal port information in the second Force State attribute to the local port information in the changed first Force State attribute to generate a third Force State attribute, and sends the third Force State attribute to the current device; judging whether the MLAG networking forms a network loop or not according to port enabling states corresponding to a local port and an opposite port in the third Force State attribute and Force-up function effective states corresponding to the local port and the opposite port; and if the MLAG networking forms a network loop, adjusting the port blocking State of any one of the current equipment or the opposite-end equipment according to the port blocking states of a local port and an opposite-end port in a third Force State attribute so as to realize a loop prevention mechanism.
One or more embodiments of the present specification provide a non-transitory computer storage medium storing computer-executable instructions configured to: configuring a Force-up function for both current equipment and opposite-end equipment in an MLAG networking environment, wherein the current equipment and the opposite-end equipment are connected through a Peer-link; respectively generating a first Force State attribute and a second Force State attribute according to port information of the current device and the opposite device, wherein the port information comprises an enabling State of the port, a Force-up function effective State of the port and a blocking State of the port, the first Force State attribute comprises local port information of the current device and opposite port information of the current device, and the second Force State attribute comprises local port information of the opposite device and opposite port information of the opposite device; when the first Force State attribute changes, the changed first Force State attribute is sent to the opposite-end equipment, so that the opposite-end equipment can update opposite-end port information in the second Force State attribute to local port information in the changed first Force State attribute to generate a third Force State attribute and send the third Force State attribute to the current equipment; judging whether the MLAG networking forms a network loop or not according to port enabling states corresponding to a local port and an opposite port in the third Force State attribute and Force-up function effective states corresponding to the local port and the opposite port; and if the MLAG networking forms a network loop, adjusting the port blocking State of any one of the current equipment or the opposite-end equipment according to the port blocking states of a local port and an opposite-end port in a third Force State attribute so as to realize a loop prevention mechanism.
The embodiment of the specification adopts at least one technical scheme which can achieve the following beneficial effects: when the current device and the opposite-end device simultaneously apply the MLAG function and the Force-up function, the Force State attribute is updated through the devices at the two ends, whether a network loop is formed or not is judged according to port information in the Force State attribute, and when the network loop is formed, the port blocking State of any one device is set according to the port information, so that the formation of the network loop is effectively prevented, the network storm is avoided, and the stability of the network is ensured; meanwhile, normal receiving and transmitting of flow data are guaranteed while a network loop is avoided.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present specification, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort. In the drawings:
fig. 1 is a schematic diagram of an MLAG networking environment provided in an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a Force-up function flow provided in an embodiment of the present specification;
fig. 3 is a schematic diagram of a network loop provided in an embodiment of the present disclosure;
FIG. 4 is a schematic flow chart of a method for implementing a ring prevention mechanism based on a Force-up function according to an embodiment of the present disclosure;
fig. 5 is a schematic view of an implementation scenario of a Force-up function-based anti-loop mechanism provided in an embodiment of the present specification;
fig. 6 is a schematic flowchart illustrating a process of setting a port blocking status according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a device for implementing a ring prevention mechanism based on a Force-up function according to an embodiment of the present specification.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present specification without any creative effort shall fall within the protection scope of the present specification.
A cross device Link Aggregation Group (M-LAG) is a mechanism to implement cross device Link Aggregation. The M-LAG function virtualizes two devices into one device by means of cross-device link aggregation, so as to achieve redundancy backup of a network node, and the basic idea is to let two access switches perform link aggregation negotiation with an accessed device in the same state, and the accessed device looks as if a link aggregation relationship is established with one device. As shown in fig. 1, a basic scenario of application of the M-LAG function is that a connection is established between a device a and a device B through a Peer-link, and is used for synchronizing and transmitting data between the device a and the device B. Two devices configured with the M-LAG function respectively add ports into the same M-ALG group, thereby realizing the link aggregation of the cross devices. In general, member ports of an access device aggregation group are connected with different devices and cannot be aggregated, and an M-LAG synchronizes device data through Peer-link links, so that LACP negotiation data of the two devices are kept consistent, thereby realizing cross-device link aggregation. The Peer-link and the M-LAG group member port are isolated, and data traffic received from the Peer-link cannot be forwarded from the port in the M-LAG group. If one device fails, the data flow can be switched to another intact device quickly by using the characteristic of the link switching of the aggregation group, so that the stability of a network environment is ensured.
It should be noted that the Force-up function is configured on the port of the aggregation group member, and is intended to ensure normal transmission of data traffic in some special scenarios. Specifically, the Force-up function ensures normal transmission of data traffic when aggregation negotiation is temporarily disabled by temporarily converting an aggregation member port into a physical port. As shown in fig. 2, after the aggregation member port of the aggregation member does not receive the LACP message after timeout, the Force-up function will take effect, convert the aggregation member port into a physical port, and process the data traffic according to the mode of the common physical port; if the LACP message is received, the effective common physical port is restored to the aggregation member port. That is, after the port of the aggregation group member is configured with the function, if the port does not receive the LACP message after a certain time, the port is changed into a physical port, and data traffic is processed normally, and the port is not restored to the port of the aggregation group member until the port receives the LACP message again.
In an M-LAG application scene, if all aggregation member ports in an M-LAG Group are configured with the Force-up function, the loss of aggregation configuration of a downlink device triggers the Force-up function of the M-LAG Group member ports to take effect. The enabled port forwards data traffic according to the common physical port, and the isolation function of the M-LAG cannot be enabled to be enabled, as shown in fig. 3, as can be seen from the networking topology of fig. 3, at this time, a loop exists in the network, which may cause network anomaly.
The embodiment of the specification provides a method for implementing a ring prevention mechanism based on a Force-up function, which is applied to a processor and can also be any equipment with a processing function. In an embodiment of the present specification, members of the same MLAG group may monitor each other for whether the Force-up of other members is valid or not and for up/down states of links, and if it is detected that the Force-up functions of all member ports are valid and after the data link up is up, set some of the member ports as a blocking state, and the ports set as the blocking state will not process and forward the data packet, thereby achieving the effect of breaking the network loop. And when the network environment is detected to exit the scene, recovering the blocked port. A method for implementing a ring prevention mechanism based on a Force-up function according to an embodiment of the present disclosure is described below with reference to fig. 4, fig. 5, and fig. 6.
Fig. 4 is a schematic flow chart of an implementation method of a ring prevention mechanism based on a Force-up function according to an embodiment of the present specification, and as shown in fig. 4, the method mainly includes the following steps:
step S101, configuring Force-up functions for both current equipment and opposite equipment in an MLAG networking environment.
In an embodiment of the present description, an MLAG networking is established for a current device and an opposite device, and the current device and the opposite device are connected through a Peer-link, which is used for synchronizing and transmitting data between the current device and the opposite device. As shown in fig. 5, the device a and the device B are connected by a Peer-link, that is, the current device may be the device a, and the opposite device may be the device B. The current device and the opposite device which are configured with the MLAG function respectively add ports into the same MALG group to realize cross-device link aggregation. In addition, the MLAG networking environment further includes a designated device, such as device C in fig. 5, where device C accesses the MLAG networking environment. In practical application, a designated device sends an LACP message to a current device through a first preset port, and sends the LACP message to an opposite device through a second preset port; the appointed equipment is connected with the current equipment through a first preset port and is connected with opposite-end equipment through a second preset port. As shown in fig. 5, a Force-up function is configured for the aggregation member port of the current device and the aggregation member port of the peer device, that is, the Force-up function is configured for the aggregation member ports of the device a and the device B. It should be noted that, if multiple devices access the device a, the multiple devices and the device a are connected through multiple aggregation member ports respectively, and a Force-up function is configured for each of the multiple aggregation member ports.
In an embodiment of this specification, a Force-up function is written in aggregation member ports of peer equipment and current equipment in advance, so that both the current equipment and the peer equipment are configured with the Force-up function. It should be noted that configuring the Force-up function means that the current device and the opposite device have the function, but whether the function is in effect needs to be determined according to the received LACP message.
In an embodiment of this specification, if a downstream device is abnormal in an aggregation networking environment formed by a current device and an opposite-end device, and the current device and the opposite-end device do not receive an LACP message within a preset time, a Force-up function becomes effective, and a corresponding aggregation member port is converted into a common port, so as to implement normal network transceiving.
Specifically, if the local port of the current device does not receive the LACP message sent by the specified device within the preset time, the Force-up function of the local port of the current device takes effect; if the local port of the opposite terminal device does not receive the LACP message sent by the appointed device within the preset time, the Force-up function of the local port of the opposite terminal device takes effect. It should be noted that the aggregation member port of the current device is a local aggregation member port of the current device, and the local port of the peer device is a local aggregation member port of the peer device.
Step S102, respectively generating a first Force State attribute and a second Force State attribute according to the port information of the current device and the opposite device.
In an embodiment of this specification, after configuring MLAG group and Force-up functions for both a current device and an opposite device, a first Force State attribute and a second Force State attribute are respectively generated according to port information of the current device and the opposite device. The port information comprises an enabling state of the port, a Force-up function effective state of the port and a blocking state of the port, wherein the enabling state of the port
It should be noted that, when the current device and the Peer device establish an MLAG networking environment, the Peer device sends the port information of the Peer device to the current device through the Peer-link port, and meanwhile, the current device sends the port information of the current device to the Peer device through the Peer-link port, so as to implement information interaction.
In an embodiment of the present description, a current device generates a first Force State attribute according to local port information of the current device and local port information of an opposite device; and the opposite terminal equipment generates a second Force State attribute according to the local port information of the opposite terminal equipment and the local port information sent by the current equipment.
In an embodiment of the present specification, the first Force State attribute includes local port information and opposite port information, where the local port information includes: local _ link _ state, local _ force _ state, and local _ port _ state; the opposite end port information includes: remote _ link _ state, remote _ force _ state, and remote _ port _ state.
The local _ link _ state is used for indicating the enabling state of the local port, namely whether the link of the local port is up or not, the local _ Force _ state is used for indicating whether the Force-up function of the local port is effective or not, and the local _ port _ state is used for indicating whether the local port is set to the blocking state or not.
The remote _ link _ state in the peer port information is used to indicate the enabling state of the peer device port of the same MLAG Group, that is, whether the link of the peer device port is up, the remote _ Force _ state is used to indicate whether the Force-up function of the peer device port of the same MLAG Group is in effect, and the remote _ port _ state is used to indicate whether the peer device port of the same MLAG Group is already set to the blocking state.
Step S103, when the first Force State attribute changes, the changed first Force State attribute is sent to the opposite terminal device, so that the opposite terminal device can update the opposite terminal port information in the second Force State attribute to the local port information in the changed first Force State attribute, so as to generate a third Force State attribute, and the third Force State attribute is sent to the current device.
In an embodiment of the present specification, information is exchanged between ports of the same MLAG Group of the current device and the Peer device through Peer-link ports, and the Force State of the local device is sent to the Peer device, so as to achieve an effect of mutually monitoring whether Force-up of other members is effective or not and the up/down State of a link among members of the same MLAG Group.
In an embodiment of this specification, if the link State up/down of the local port changes, the Force-up function of the local port becomes effective or is restored, and the blocking State of the local port changes, the current device needs to send the updated Force State to the peer device, so as to update the Force State information in the current device and the peer device.
In an embodiment of the present specification, if a first Force State attribute of a current device changes, the changed first Force State attribute is sent to an opposite-end device through a Peer-link port. After receiving the first Force State attribute, the opposite-end equipment judges whether local information in the first Force State attribute is consistent with remote information in a second Force State attribute of the opposite-end equipment, if the local information is inconsistent with the remote information, the remote information in the second Force State attribute is updated to the local information in the first Force State attribute, and an updated third Force State attribute is generated; and the opposite terminal equipment sends the updated third Force State attribute to the current equipment.
In an embodiment of the present specification, if a second Force State attribute of the Peer device changes, the changed second Force State attribute is sent to the current device through the Peer-link port. After the current equipment receives the second Force State attribute, judging whether local information in the second Force State attribute is consistent with remote information in a first Force State attribute of the current equipment, if the local information in the second Force State attribute is inconsistent with the remote information in the first Force State attribute, updating the remote information in the first Force State attribute into the local information in the second Force State attribute, and generating an updated third Force State attribute; and the current equipment sends the updated third Force State attribute to the opposite-end equipment.
And step S104, judging whether the MLAG networking forms a network loop or not according to the port enabling State corresponding to the local port and the opposite port in the third Force State attribute and the Force-up function effective State corresponding to the local port and the opposite port.
In an embodiment of the present specification, whether an MLAG networking forms a network loop is determined according to port enabling states corresponding to a local port and an opposite-end port and a Force-up function effective State corresponding to the local port and the opposite-end port by means of a Force State attribute interaction between ports of a current device and an opposite-end device.
In an embodiment of the present specification, when the local _ link _ state of the local port and the remote _ link _ state of the peer port are in an up state, that is, a data link between the device a and the device C and a data link between the device B and the device C are all paths, and the local _ Force _ state and the remote _ Force _ state are in an active state, that is, the Force-up function of the device a and the Force-up function of the device B are both in an active state, the MLAG networking forms a network loop.
Step S105, if the MLAG networking forms a network loop, adjusting the port blocking State of any one of the current device or the opposite device according to the port blocking states of the local port and the opposite port in the third Force State attribute so as to realize a loop prevention mechanism.
In an embodiment of this specification, if the MLAG networking forms a network loop, the port blocking State of any one of the current device and the peer device is adjusted according to the port blocking states of the local port and the peer port in the third Force State attribute, so as to implement the anti-loop mechanism. Specifically, as shown in fig. 6, the change of the port blocking State is triggered by the update of the Force State attribute, and whether the port information of the Force State attribute satisfies the blocking scenario is determined. If the blocking scene is not satisfied, the port state needs to be restored to the forwarding state, if the blocking scene is satisfied, the port state of the opposite end needs to be judged again, if the remote _ port _ state in the port information of the opposite end is the blocking state, it indicates that the port of the opposite end is blocked, the local port needs to be restored to the forwarding state, and if the port of the opposite end keeps the forwarding state, the port of the local end needs to be set to the blocking state. Therefore, the generation of a loop can be avoided, and the normal forwarding of the flow data can be ensured. It should be noted that the blocking scenario may be considered as a forming scenario of a network loop.
In an embodiment of the present description, when a current device and an opposite device simultaneously apply an MLAG function and a Force-up function, a Force State attribute is updated by the devices at both ends, and whether a network loop is formed is determined according to port information in the Force State attribute, and when the network loop is formed, a port blocking State of any one device is set according to the port information, so that the formation of the network loop is effectively prevented, a network storm is avoided, and the stability of a network is ensured; meanwhile, normal receiving and transmitting of flow data are guaranteed while a network loop is avoided.
An embodiment of the present specification further provides a device for implementing a ring prevention mechanism based on a Force-up function, as shown in fig. 7, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the steps of:
configuring a Force-up function for both current equipment and opposite-end equipment in an MLAG networking environment, wherein the current equipment and the opposite-end equipment are connected through a Peer-link; respectively generating a first Force State attribute and a second Force State attribute according to port information of the current device and the opposite terminal device, wherein the port information comprises an enabling State of the port, a Force-up function effective State of the port and a blocking State of the port, the first Force State attribute comprises local port information of the current device and opposite terminal port information of the current device, and the second Force State attribute comprises local port information of the opposite terminal device and opposite terminal port information of the opposite terminal device; when the first Force State attribute changes, the changed first Force State attribute is sent to the opposite-end equipment, so that the opposite-end equipment can update opposite-end port information in the second Force State attribute to local port information in the changed first Force State attribute to generate a third Force State attribute and send the third Force State attribute to the current equipment; judging whether the MLAG networking forms a network loop or not according to port enabling states corresponding to a local port and an opposite port in the third Force State attribute and Force-up function effective states corresponding to the local port and the opposite port; and if the MLAG networking forms a network loop, adjusting the port blocking State of any one of the current equipment or the opposite-end equipment according to the port blocking states of a local port and an opposite-end port in a third Force State attribute so as to realize a loop prevention mechanism.
Embodiments of the present specification also provide a non-volatile computer storage medium storing computer-executable instructions configured to: configuring a Force-up function for both current equipment and opposite-end equipment in an MLAG networking environment, wherein the current equipment and the opposite-end equipment are connected through a Peer-link;
respectively generating a first Force State attribute and a second Force State attribute according to the port information of the current device and the opposite device, wherein the port information comprises the starting State of a port, the Force-up function effective State of the port and the blocking State of the port, the first Force State attribute comprises the local port information of the current device and the opposite port information of the current device, and the second Force State attribute comprises the local port information of the opposite device and the opposite port information of the opposite device; when the first Force State attribute changes, the changed first Force State attribute is sent to the opposite-end equipment, so that the opposite-end equipment can update opposite-end port information in the second Force State attribute to local port information in the changed first Force State attribute to generate a third Force State attribute and send the third Force State attribute to the current equipment; judging whether the MLAG networking forms a network loop or not according to port enabling states corresponding to the local port and the opposite port in the third Force State attribute and Force-up function effective states corresponding to the local port and the opposite port; if the MLAG networking forms a network loop, adjusting the port blocking State of any one of the current device or the opposite device according to the port blocking states of the local port and the opposite port in the third Force State attribute so as to realize a loop prevention mechanism.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the device, and the nonvolatile computer storage medium, since they are substantially similar to the embodiments of the method, the description is simple, and for the relevant points, reference may be made to the partial description of the embodiments of the method.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The above description is merely one or more embodiments of the present disclosure and is not intended to limit the present disclosure. Various modifications and alterations to one or more embodiments of the present description will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of one or more embodiments of the present specification should be included in the scope of the claims of the present specification.

Claims (10)

1. A method for realizing a ring prevention mechanism based on Force-up function is characterized in that the method is applied to an MLAG networking environment, and the method comprises the following steps:
configuring a Force-up function for both current equipment and opposite-end equipment in the MLAG networking environment, wherein the current equipment and the opposite-end equipment are connected through a Peer-link, and the Force-up function is used for ensuring normal transmission of data flow when aggregation negotiation is temporarily failed in a mode of temporarily converting an aggregation member port into a physical port;
respectively generating a first Force State attribute and a second Force State attribute according to port information of the current device and the opposite device, wherein the port information comprises an enabling State of the port, a Force-up function effective State of the port and a blocking State of the port, the first Force State attribute comprises local port information of the current device and opposite port information of the current device, and the second Force State attribute comprises local port information of the opposite device and opposite port information of the opposite device;
when the first Force State attribute changes, sending the changed first Force State attribute to opposite-end equipment, so that the opposite-end equipment updates opposite-end port information in the second Force State attribute to local port information in the changed first Force State attribute to generate a third Force State attribute and sends the third Force State attribute to the current equipment;
judging whether the MLAG networking forms a network loop or not according to port enabling states corresponding to a local port and an opposite port in the third Force State attribute and Force-up function effective states corresponding to the local port and the opposite port;
and if the MLAG networking forms a network loop, adjusting the port blocking State of any one of the current equipment or the opposite-end equipment according to the port blocking states of a local port and an opposite-end port in a third Force State attribute so as to realize a loop prevention mechanism.
2. The method for implementing a ring prevention mechanism based on Force-up function according to claim 1, wherein the change of the first Force State attribute specifically includes:
and if any one or more of the port State of the current equipment local port, the Force-up function effective State of the current equipment local port and the port blocking State of the current equipment local port is changed, judging that the first Force State attribute is changed.
3. The method according to claim 1, wherein after configuring a Force-up function for both a current device and an opposite device in the MLAG networking environment, the method further comprises:
judging the Force-up function effective state of the current equipment and the opposite terminal equipment according to whether the current equipment and the opposite terminal equipment receive the LACP messages within the preset time;
if the local port of the current equipment does not receive the LACP message sent by the appointed equipment within the preset time, the Force-up function of the local port of the current equipment takes effect;
if the local port of the opposite terminal device does not receive the LACP message sent by the appointed device within the preset time, the Force-up function of the local port of the opposite terminal device takes effect.
4. The method for implementing a ring prevention mechanism based on Force-up function of claim 3, wherein the MLAG networking environment further comprises a designated device, and the designated device is accessed to the MLAG networking environment;
before the determining whether the Force-up functions of the current device and the opposite-end device are in an effective state according to whether the current device and the opposite-end device receive the LACP messages within a preset time, the method further includes:
the current equipment in the MLAG networking environment receives an LACP message sent by the appointed equipment through a first preset port;
the opposite terminal equipment in the MLAG networking environment receives an LACP message sent by a designated equipment through a second preset port;
and the appointed equipment is connected with the current equipment through the first preset port and is connected with the opposite-end equipment through the second preset port.
5. The method according to claim 1, wherein the determining whether the MLAG networking forms a network loop according to a port enabling State corresponding to the local port and the peer port in the third Force State attribute and a Force-up function valid State corresponding to the local port and the peer port specifically includes:
and when the effective states of the Force-up functions corresponding to the local port and the opposite port in the third Force State attribute are both effective states, and the enabled states of the ports corresponding to the local port and the opposite port are enabled states, determining that the MLAG networking forms a network loop.
6. The method of claim 5, wherein the adjusting the port blocking State of any one of the current device or the peer device according to the port blocking states of the local port and the peer port in the third Force State attribute specifically includes:
when the local port in the third Force State attribute is in a blocking State, setting the opposite port to be in a non-blocking State;
and when the opposite end port in the third Force State attribute is in a blocking State, setting the local port to be in a non-blocking State.
7. The method according to claim 1, wherein the generating a first Force State attribute and a second Force State attribute according to the port information of the current device and the peer device respectively comprises:
when the current device and the opposite-end device are accessed to an MLAG networking environment, the opposite-end device sends local port information of the opposite-end device to the current device through a Peer-link port, and the current device generates a first Force State attribute according to the local port information of the current device and the local port information of the opposite-end device;
the current device sends the local port information of the current device to the opposite device through a Peer-link port, and the opposite device generates a second Force State attribute according to the local port information of the opposite device and the local port information sent by the current device.
8. The method according to claim 1, wherein the configuring of the Force-up function for both the current device and the peer device in the MLAG networking environment comprises:
and configuring a Force-up function for the aggregation member port of the current device and the aggregation member port of the opposite device in the networking environment.
9. A device for realizing a ring prevention mechanism based on Force-up function is characterized by comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
10. A non-transitory computer storage medium storing computer-executable instructions configured to:
configuring a Force-up function for both current equipment and opposite-end equipment in an MLAG networking environment, wherein the current equipment and the opposite-end equipment are connected through a Peer-link, and the Force-up function is used for ensuring normal transmission of data flow when aggregation negotiation is temporarily failed in a mode of temporarily converting an aggregation member port into a physical port;
respectively generating a first Force State attribute and a second Force State attribute according to port information of the current device and the opposite device, wherein the port information comprises an enabling State of the port, a Force-up function effective State of the port and a blocking State of the port, the first Force State attribute comprises local port information of the current device and opposite port information of the current device, and the second Force State attribute comprises local port information of the opposite device and opposite port information of the opposite device;
when the first Force State attribute changes, the changed first Force State attribute is sent to the opposite-end equipment, so that the opposite-end equipment can update opposite-end port information in the second Force State attribute to local port information in the changed first Force State attribute to generate a third Force State attribute and send the third Force State attribute to the current equipment;
judging whether the MLAG networking forms a network loop or not according to port enabling states corresponding to a local port and an opposite port in the third Force State attribute and Force-up function effective states corresponding to the local port and the opposite port;
if the MLAG networking forms a network loop, adjusting the port blocking State of any one of the current device or the opposite terminal device according to the port blocking states of a local port and an opposite terminal port in a third Force State attribute so as to realize a loop prevention mechanism.
CN202111371633.XA 2021-11-18 2021-11-18 Force-up function-based anti-loop mechanism implementation method, equipment and medium Active CN113938421B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111371633.XA CN113938421B (en) 2021-11-18 2021-11-18 Force-up function-based anti-loop mechanism implementation method, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111371633.XA CN113938421B (en) 2021-11-18 2021-11-18 Force-up function-based anti-loop mechanism implementation method, equipment and medium

Publications (2)

Publication Number Publication Date
CN113938421A CN113938421A (en) 2022-01-14
CN113938421B true CN113938421B (en) 2023-02-28

Family

ID=79287094

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111371633.XA Active CN113938421B (en) 2021-11-18 2021-11-18 Force-up function-based anti-loop mechanism implementation method, equipment and medium

Country Status (1)

Country Link
CN (1) CN113938421B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117376243A (en) * 2022-06-29 2024-01-09 中兴通讯股份有限公司 Network element switching method, device, cross-equipment link aggregation group and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007084696A2 (en) * 2006-01-20 2007-07-26 Cisco Technology, Inc. System and method for preventing loops in the presence of control plane failures
CN101917298A (en) * 2010-09-02 2010-12-15 杭州华三通信技术有限公司 VLAN-based loop monitoring method and equipment
WO2012077126A1 (en) * 2010-12-09 2012-06-14 Tejas Networks Limited A method and system for loop avoidance in a communication network
CN103607293A (en) * 2013-10-30 2014-02-26 杭州华三通信技术有限公司 Flow protection method and equipment thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106254255A (en) * 2016-10-13 2016-12-21 上海赛特斯信息科技股份有限公司 Bgp route advertisement method for limiting speed and BGP route communication means

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007084696A2 (en) * 2006-01-20 2007-07-26 Cisco Technology, Inc. System and method for preventing loops in the presence of control plane failures
CN101917298A (en) * 2010-09-02 2010-12-15 杭州华三通信技术有限公司 VLAN-based loop monitoring method and equipment
WO2012077126A1 (en) * 2010-12-09 2012-06-14 Tejas Networks Limited A method and system for loop avoidance in a communication network
CN103607293A (en) * 2013-10-30 2014-02-26 杭州华三通信技术有限公司 Flow protection method and equipment thereof

Also Published As

Publication number Publication date
CN113938421A (en) 2022-01-14

Similar Documents

Publication Publication Date Title
EP2720418B1 (en) Lacp link switching and data transmission method and device
EP1189384B1 (en) Method and apparatus for topology database re-synchronization in communications networks having topology state routing protocols
US7920576B2 (en) Packet ring network system, packet forwarding method and node
CN109525445B (en) Link switching method, link redundancy backup network and computer readable storage medium
EP2352253B1 (en) Method and apparatus for protecting link aggregation group of ethernet ring
CN101741673B (en) Address refreshing method of Ethernet ring
CN103200109B (en) A kind of ospf neighbor relationship management method and equipment
EP3029883B1 (en) Network protection method and apparatus, next-ring node, and system
JP2013519268A (en) Data transfer method, data transfer apparatus, and data transfer system
CN106452909B (en) A kind of route issuing method and Router Reflector equipment
WO2020052687A1 (en) Network element anti-looping method and apparatus, device, and readable storage medium
CN112995041B (en) Network communication method, device, electronic equipment and storage medium
WO2015070383A1 (en) Link aggregation method, apparatus, and system
WO2010102490A1 (en) Address update method for ports of switching node, and switching node in ethernet ring network
CN111130893A (en) Message transmission method and device
CN113938421B (en) Force-up function-based anti-loop mechanism implementation method, equipment and medium
JP5491623B2 (en) Address refresh method and system
CN112995002B (en) Switch ring network design method, switch and storage medium
CN109194592B (en) Method and system for solving island problem in multi-link network
US20090100193A1 (en) Synchronization of state information to reduce APS switchover time
EP2472796A1 (en) Method and system for blocking protocol messages at a sub-ring control channel without virtual channel
KR100968939B1 (en) Method and apparatus for protection switching of ring network
EP3573298B1 (en) Multi-node device and method for micro server built-in switch uplink port backup
CN108833247B (en) Method and device for re-switching after link failure recovery
JP2011223172A (en) Ring-type network system, communication apparatus and failure detection method

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