CN112688867A - Method, device, equipment and medium for operating spanning tree protocol in MLAG environment - Google Patents

Method, device, equipment and medium for operating spanning tree protocol in MLAG environment Download PDF

Info

Publication number
CN112688867A
CN112688867A CN202011531509.0A CN202011531509A CN112688867A CN 112688867 A CN112688867 A CN 112688867A CN 202011531509 A CN202011531509 A CN 202011531509A CN 112688867 A CN112688867 A CN 112688867A
Authority
CN
China
Prior art keywords
port
spanning tree
mlag
peerlink
tree protocol
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.)
Granted
Application number
CN202011531509.0A
Other languages
Chinese (zh)
Other versions
CN112688867B (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 CN202011531509.0A priority Critical patent/CN112688867B/en
Publication of CN112688867A publication Critical patent/CN112688867A/en
Application granted granted Critical
Publication of CN112688867B publication Critical patent/CN112688867B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Abstract

The embodiment of the specification discloses a method, a device, equipment and a medium for operating a spanning tree protocol in an MLAG environment, wherein the method comprises the following steps: in the MLAG environment, the MLAG device runs a relevant spanning tree protocol at a software layer; according to the election condition of the related spanning tree protocol state machine, starting or closing an anti-blocking function of a peerlink port by MLAG equipment to avoid the peerlink port from being blocked and enable the MLAG equipment to normally run the related spanning tree protocol in a software layer, wherein the peerlink port establishes a link interface of an MLAG environment for the MLAG equipment. Because the peerlink link cannot connect the packet through the MLAG and finally cannot establish the MLAG connection when the peerlink port is selected as the blocking port, the embodiment of the present specification prevents the peerlink port from being blocked by starting or closing the anti-blocking function of the peerlink port, and thus, the peerlink port can be effectively prevented from being selected as the blocking port.

Description

Method, device, equipment and medium for operating spanning tree protocol in MLAG environment
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method, an apparatus, a device, and a medium for operating a spanning tree protocol in an MLAG environment.
Background
Fig. 1 is a schematic diagram of an MLAG environment, where a switch a and a switch B establish the MLAG environment through Peerlink links, an MLAG member port 2 of the MLAG environment performs cross-device link aggregation together with a port 1 and a port 2 of a Server device, and establishes a link aggregation group AGG1, and an uplink port 1 of the switch a and an uplink port 3 of the switch B access a general ethernet network in a non-MLAG member port form and run an STP spanning tree protocol. Since switches A, B, C and D run spanning tree protocol, Peerlink port may be elected as blocking port, resulting in failure of the entire MLAG environment due to Peerlink port blocking.
There is a need for an efficient way to avoid the Peerlink port electing as a blocked port.
Disclosure of Invention
One or more embodiments of the present specification provide a method, an apparatus, a device, and a medium for running a spanning tree protocol in an MLAG environment, so as to solve the following technical problems: there is a need for an efficient way to avoid the Peerlink port electing as a blocked port.
One or more embodiments of the present disclosure adopt the following technical solutions:
one or more embodiments of the present specification provide a method of operating a spanning tree protocol in a MLAG environment,
in the MLAG environment, the MLAG device runs a relevant spanning tree protocol at a software layer;
according to the election condition of the related spanning tree protocol state machine, starting or closing an anti-blocking function of a peerlink port by MLAG equipment to avoid the peerlink port from being blocked and enable the MLAG equipment to normally run the related spanning tree protocol in a software layer, wherein the peerlink port establishes a link interface of an MLAG environment for the MLAG equipment.
One or more embodiments of the present specification further provide an apparatus for operating a spanning tree protocol in an MLAG environment, the apparatus including:
the protocol running unit is used for running a related spanning tree protocol in a software layer by the MLAG device in the MLAG environment;
and the adjusting unit is used for starting or closing an anti-blocking function of a peerlink port by the MLAG equipment according to the election condition of the related spanning tree protocol state machine so as to avoid the peerlink port from being blocked and enable the MLAG equipment to normally operate the related spanning tree protocol in a software layer, wherein the peerlink port establishes a link interface of an MLAG environment for the MLAG equipment.
One or more embodiments of the present specification further provide an apparatus for operating a spanning tree protocol in an MLAG environment, 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 enable the at least one processor to:
in the MLAG environment, the MLAG device runs a relevant spanning tree protocol at a software layer;
according to the election condition of the related spanning tree protocol state machine, starting or closing an anti-blocking function of a peerlink port by MLAG equipment to avoid the peerlink port from being blocked and enable the MLAG equipment to normally run the related spanning tree protocol in a software layer, wherein the peerlink port establishes a link interface of an MLAG environment for the MLAG equipment.
One or more embodiments of the present specification also provide a non-transitory computer storage medium storing computer-executable instructions configured to:
in the MLAG environment, the MLAG device runs a relevant spanning tree protocol at a software layer;
according to the election condition of the related spanning tree protocol state machine, starting or closing an anti-blocking function of a peerlink port by MLAG equipment to avoid the peerlink port from being blocked and enable the MLAG equipment to normally run the related spanning tree protocol in a software layer, wherein the peerlink port establishes a link interface of an MLAG environment for the MLAG equipment.
The embodiment of the specification adopts at least one technical scheme which can achieve the following beneficial effects:
because the Peerlink link cannot connect the packet through the MLAG and finally cannot establish the MLAG connection when the Peerlink port is selected as the blocking port, the embodiment of the present specification prevents the Peerlink port from being blocked by starting or closing the anti-blocking function of the Peerlink port, and thus, the Peerlink port can be effectively prevented from being selected as the blocking port.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the specification, and other drawings can be obtained by those skilled in the art without creative efforts. In the drawings:
FIG. 1 is a schematic illustration of an MLAG environment provided in one or more embodiments of the present description;
FIG. 2 is a schematic diagram of split-stp provided in one or more embodiments of the present disclosure;
FIG. 3 is a flowchart illustrating a method for operating a spanning tree protocol in an MLAG environment according to one or more embodiments of the present disclosure;
fig. 4 is a schematic structural diagram of an apparatus for operating a spanning tree protocol in an MLAG environment according to one or more embodiments of the present disclosure;
fig. 5 is a schematic structural diagram of an apparatus for operating a spanning tree protocol in an MLAG environment according to one or more embodiments of the present disclosure.
Detailed Description
The embodiment of the specification provides a method, a device, equipment and a medium for operating a spanning tree protocol in an MLAG environment.
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.
Embodiments of the present description relate to the following terms:
the MLAG (Multi-Chassis LAG) technology is a cross-device link aggregation technology, and is more stable and reliable than a conventional box-type device, and has a lower cost than a rack device. In the MLAG environment, the primary device and the standby device each take out a port to perform cross-device link aggregation with the Server device, and the two ports are the same port as viewed by other devices.
The Spanning Tree Protocol (STP) is a Protocol for eliminating loops in a local area network, and includes a general Spanning Tree Protocol, RSTP (rapid Spanning Tree Protocol), and MSTP (Multiple Spanning Tree Protocol), and due to the increasing scale of the local area network, STP has become one of the most important local area network protocols at present, so in an environment with MLAG, the operation of the STP Protocol family is still not left.
Common Spanning Tree (CST) is an IEEE 802.1D solution for VLAN and Spanning Tree. The whole scheme is that when spanning tree convergence, the existence of VLAN in the network is not considered, and only a single spanning tree is generated and maintained in the network. Since this version of the spanning tree protocol has only one instance, it consumes less CPU and memory than other versions. However, since there is only one instance, there is only one root bridge and only one tree structure. Traffic for all VLANs will travel the same path. This may result in sub-optimal flow. Moreover, when the topology changes due to the inherent 802.1D timing mechanism, the convergence time of the network is also slow.
In addition, to ensure the accuracy of multiple spanning tree computation, the VLAN and instance mappings for the bridge must be identical. However, in large networks it cannot be guaranteed that all bridges are configured with the same VLAN mapping, and an MST domain has been proposed to solve this problem. A large network is divided into multiple MST domains, and bridges with the same VLAN mapping (i.e., same instance) and other attributes are placed in the same domain. Whether the devices are in the same MST domain is judged through the MST configuration identification.
An Internal Spanning Tree (IST) is an example of a spanning tree in the MST region. Within each MST region, the MST maintains a plurality of spanning tree instances. All other MST instance numbers can only be between 1 and 4094, and the IST can also be considered as an appearance of each MST region. By default, all VLANs are assigned to the IST instance.
Root bridge (root bridge) refers to a bridge that exchanges topology information with a designated bridge in a spanning tree implementation to notify all other bridges in the network when a topology change is required. Root bridge selection basis: the bridge ID consists of a bridge priority (modifiable) and a MAC address (not modifiable by the user).
The technical problems existing in the prior art are as follows: the switch running spanning tree protocol may select Peerlink port as blocking link, resulting in failure of the whole MLAG environment due to Peerlink blocking.
For the technical problem in the prior art, a scene of MLAG dual-homing access to an ethernet network may be processed by using a forced root bridge technology, and a basic idea is that, referring to fig. 1, a Peerlink port closes an STP function, a port 1 in a switch device a and a port 3 in a switch device B are regarded as two different ports on the same switch device, and two switches are forcibly configured as a root bridge, so that it is ensured that an MLAG master device and a MLAG slave device are in a root bridge status in a two-layer network, and if a device forming the MLAG is a switch device which is accessed in a downlink direction, a root protection function must be configured. And synchronizing the bridge priority, the instance priority and the bridge MAC of the main equipment to the standby equipment through Peerlink, so that the main equipment and the standby equipment keep the same bridge ID.
The above solution has however many limitations and drawbacks: firstly, a root bridge of a spanning tree must be fixed on MLAG equipment of an Ethernet, topological networking is limited, flexibility is lacked, and networking environments with specific requirements on the root bridge cannot be met. Secondly, the uplink ports deployed on the main device and the standby device are actually different ports on the same device (root bridge), so the uplink ports respectively deployed on the main device and the standby device must be configured as different ports, which also wastes port resources of the device seriously, and for some complex and huge topology environments, the situation that the port resources are not enough may occur.
In view of the foregoing disadvantages, an object of the embodiments of the present disclosure is to provide a method for operating a spanning tree protocol in an MLAG environment, and a core idea is to design a technique for separating a port driver layer spanning tree protocol state and a software layer spanning tree state information, so as to prevent a peerlink port from being blocked (which may be referred to as a split-stp technique or an anti-blocking function for short), effectively solve the defects of the prior art, and implement a spanning tree protocol family in an MLAG environment with minimum workload.
The split-stp technique of the examples of this specification is described below:
referring to FIG. 2, a schematic diagram of split-stp is shown. The Split-stp function is only effective to the peerlink port, and the only condition for starting the function is that the peerlink port of the MLAG device is elected as a blocking port by a protocol state machine at a spanning tree protocol software layer, the state is a blocking/discarding state, and the blocking port state needs to be switched to a forwarding state (forwarding); the only condition for closing the function is that the peerlink port is elected as a non-blocking port by a protocol state machine in a spanning tree protocol software layer, and the state is a forwarding state. Since each device has one and only one root port per instance, traffic passing through the root port can be switched entirely to the blocking port. Only the peerlink port can influence the establishment of MLAG connection, and the root port is not the peerlink port, so that the influence is avoided.
It should be noted that, a root port is a port closest to a non-root bridge to a root bridge, there is only one root port in each spanning tree instance, the root port is in a forwarding state (forwarding), a traffic packet can pass through, a blocking port is in a blocking state, and the traffic packet cannot pass through, and if a peerlink port is selected as the blocking port, a peerlink link cannot pass through an MLAG connection packet, and finally, an MLAG connection cannot be established and the resulting failure occurs. In the whole service process, it must be ensured that the peerlink port can never be in a blocking state, if the spanning tree protocol selects the peerlink port as the blocking port, the peerlink port needs to be migrated, the port state of the peerlink port and the root port are interchanged, that is, the bottom driving state of the root port is set as the blocking state, and the bottom driving state of the peerlink port is set as the forwarding state.
In view of this, the split-STP functional principle is that the spanning tree protocol states of the blocking port and the root port selected by the device are exchanged in the spanning tree protocol convergence process, while the spanning tree protocol state of the software layer is maintained unchanged, that is, in the spanning tree protocol software layer, the blocking port state maintains the blocking state, and the root port state maintains the forwarding state, so that the election mechanism of the spanning tree protocol state machine is not damaged, while in the driving layer of the STP, the spanning tree protocol state of the blocking port and the spanning tree protocol state of the root port are exchanged, that is, the blocking port is in the forwarding state in the driving layer, and the root port is in the blocking state in the driving layer, so that the peerlink port is not blocked, and the network loop is prevented. Once the peerlink port is selected to be in a non-blocking port role due to the fact that the network vibrates again, the peerlink port immediately closes the split-stp function, and the states of the spanning tree protocols of the driving layers of all the ports are restored to the original state, so that the states of the spanning tree protocols of the driving layers are consistent with the states of the software layers. According to the technology, the main equipment and the standby equipment are used as independent equipment to participate in spanning tree calculation, so that a peerlink port is ingeniously prevented from being blocked, waste of port resources is avoided, and the problem that an MLAG (Multi-level object Access gateway) runs a spanning tree protocol is really solved with the minimum workload.
Fig. 3 is a flowchart illustrating a method for operating a spanning tree protocol in a MLAG environment according to one or more embodiments of the present disclosure, where the flowchart may be executed by a computing device in the field of communications or an execution unit in the MLAG environment that operates a spanning tree protocol system, and some input parameters or intermediate results in the flowchart allow manual intervention and adjustment to help improve accuracy.
The process in fig. 1 may include the following steps:
s101, in an MLAG environment, the MLAG device runs a relevant spanning tree protocol in a software layer.
S102, according to the election condition of the related spanning tree protocol state machine, the MLAG device starts or closes an anti-blocking function of a peerlink port to avoid the peerlink port from being blocked, and the MLAG device is enabled to normally operate the related spanning tree protocol in a software layer.
The state machine is a control center that is configured by a state register and a combinational logic circuit, can perform state transition in accordance with a preset state in response to a control signal, and performs a specific operation by coordinating operations of the relevant signals. And the peerlink port establishes a link interface of an MLAG environment for the MLAG equipment.
Further, the related spanning tree protocol may be a spanning tree protocol (i.e., a common spanning tree protocol).
In one or more embodiments of the present specification, the starting or closing an anti-blocking function of a peerlink port according to an election condition of the related spanning tree protocol state machine may specifically include:
if the redundant blocking port generated by the spanning tree protocol state machine election is the peerlink port of the MLAG main equipment, or the redundant blocking port generated by the spanning tree protocol state machine election is the peerlink port of the MLAG standby equipment; and starting the anti-blocking function of the peerlink port, performing spanning tree protocol state interchange on the peerlink port and the root port in a driving layer of a common spanning tree through the anti-blocking function, and keeping the spanning tree protocol state of a software layer unchanged, wherein the redundant blocking port is a blocking port selected from a spanning tree protocol mode.
Further, performing spanning tree protocol state interchange on the peerlink port and the root port in a driving layer of a common spanning tree through the anti-blocking function may specifically include:
and setting the driving layer spanning tree protocol state of the redundant blocking port in the public spanning tree as a forwarding state, and setting the driving layer spanning tree protocol state of the root port in the public spanning tree as a blocking state.
Further, the related spanning tree protocol may also be a rapid spanning tree protocol.
In one or more embodiments of the present specification, the starting or closing an anti-blocking function of a peerlink port according to an election condition of the related spanning tree protocol state machine may specifically include:
if the alternate port generated by the selection of the spanning tree protocol state machine is the peerlink port of the MLAG main equipment, or the alternate port generated by the selection of the spanning tree protocol state machine is the peerlink port of the MLAG standby equipment; starting the anti-blocking function of the peerlink port, and performing spanning tree protocol state interchange on the peerlink port and the root port in a driving layer of a public spanning tree through the anti-blocking function, wherein the spanning tree protocol state of a software layer is maintained unchanged, wherein the alternative port is a blocking port selected from a rapid spanning tree protocol mode.
Further, the related spanning tree protocol may also be a multiple spanning tree protocol.
In one or more embodiments of the present specification, the starting or closing an anti-blocking function of a peerlink port according to an election condition of the related spanning tree protocol state machine may specifically include:
if the alternate port elected and produced by the spanning tree protocol state machine in the public spanning tree is the peerlink port of the MLAG main equipment, or the alternate port elected and produced by the spanning tree protocol state machine in the public spanning tree is the peerlink port of the MLAG standby equipment; starting the anti-blocking function of the peerlink port, and performing spanning tree protocol state interchange on a driving layer of the peerlink port and a root port in a public spanning tree through the anti-blocking function, wherein the spanning tree protocol state of a software layer is kept unchanged;
if the alternate port which is elected and generated by the spanning tree protocol state machine in the internal spanning tree is the peerlink port of the MLAG main equipment, or the alternate port which is elected and generated by the spanning tree protocol state machine in the internal spanning tree is the peerlink port of the MLAG standby equipment; starting the anti-blocking function of the peerlink port, and performing spanning tree protocol state interchange on the peerlink port and a root port through the anti-blocking function on a driving layer in an internal spanning tree, wherein the spanning tree protocol state of a software layer is maintained unchanged, wherein the alternate port is a blocking port selected from a multiple spanning tree protocol mode.
Further, performing spanning tree protocol state interchange on the peerlink port and the root port in a driving layer of a common spanning tree through the anti-blocking function may specifically include:
and setting the driving layer spanning tree protocol state of the alternate port in the public spanning tree as a forwarding state, and setting the driving layer spanning tree protocol state of the root port in the public spanning tree as a blocking state.
Further, performing spanning tree protocol state interchange on the peerlink port and the root port through the anti-blocking function in the driving layer of the internal spanning tree may specifically include:
and setting the driving layer spanning tree protocol state of the alternate port in the internal spanning tree as a forwarding state, and setting the driving layer spanning tree protocol state of the root port in the internal spanning tree as a blocking state.
In one or more embodiments of the present specification, according to the election condition of the related spanning tree protocol state machine, the MLAG device starts or closes an anti-blocking function of a peerlink port, which specifically includes:
if the peerlink port of the MLAG main equipment is selected as a non-blocking port in a software layer, or the peerlink port of the MLAG standby equipment is selected as a non-blocking port in a software layer; and closing the anti-blocking function of the peerlink port, and restoring the spanning tree protocol state of the peerlink port and the root port in the driving layer to the spanning tree protocol state of the software layer so as to keep the spanning tree protocol states of the driving layer and the software layer consistent.
Further, in one or more embodiments of the present disclosure, the method for operating the spanning tree protocol in the MLAG environment may further include the following steps:
s1: the MLAG device runs a simple spanning tree protocol on a software layer of the spanning tree protocol, if a redundant blocking port (a blocking port selected in an STP mode is called as a redundant blocking port) generated by selecting a spanning tree protocol state machine is a peerlink port of the MLAG main device, the main device enters a step S4; if the redundant blocking port generated by the spanning tree protocol state machine election is the peerlink port of the MLAG standby device, the standby device proceeds to step S4.
S2: the MLAG device runs a rapid spanning tree protocol on a software layer of the spanning tree protocol, if an alternate port (a blocking port selected from an RSTP mode or an MSTP mode is called the alternate port) generated by selecting a state machine of the spanning tree protocol is a peerlink port of the MLAG master device, the MLAG master device enters a step S4; if the alternate port generated by the spanning tree protocol state machine election is the peerlink port of the MLAG standby device, the standby device proceeds to step S4.
S3: the MLAG device runs a multiple spanning tree protocol on a spanning tree protocol software layer, and if an alternate port selected and generated by a protocol state machine in instance 0 (public spanning tree) is a peerlink port of the MLAG master device, the master device proceeds to step S4; if the alternate port elected to be produced in the other created non-0 instance (internal spanning tree) is the peerlink port of the MLAG master, the master proceeds to step S5. Similarly, if the elected alternate port is the peerlink port of the MLAG standby device, its behavior is consistent with that of the master device.
S4, starting split-STP function of the peerlink port, interchanging the driving layer spanning tree protocol states of the peerlink port and the root port in the instance 0, and maintaining the spanning tree protocol state of the spanning tree protocol software layer unchanged, that is, setting the driving layer spanning tree protocol state of the blocking port in the instance 0 to be forwarding state, and issuing SDK hardware, and setting the driving layer spanning tree protocol state of the root port in the instance 0 to be blocking (blocking state in STP mode) or discarding (disabling state in RSTP/MSTP mode) and issuing SDK hardware.
It should be noted that, issuing SDK hardware is to set the blocking state of the driver layer in the hardware and write the blocking state into the port, and the blocking state of the driver layer is only a driver layer software record and will actually take effect only when writing into the hardware.
S5, starting the split-STP function of the peerlink port in the non-0 instance, interchanging the states of the peerlink port and the root port in the driving layer spanning tree protocol of the non-0 instance, and keeping the state of the STP in the protocol software layer of the non-0 instance unchanged. Setting the STP state of the driving layer of the blocking port in the non-0 example as a forwarding state and issuing SDK hardware, setting the spanning tree protocol state of the driving layer of the root port in the non-0 example as blocking or discarding and issuing the SDK hardware.
S6, if the peerlink port of the main device is selected as a non-blocking port (single instance in STP mode or RSTP mode or multiple instances in MSTP mode) in the protocol software layer, the split-STP function of the peerlink port in the instance is closed, the states of the driver layers of all the ports in the instance are restored to the state of the protocol software layer, SDK hardware is issued, and the states of the driver layers and the ports of the software layer in the instance are kept consistent. If the standby equipment needs to close the split-stp function, the behavior of the standby equipment is consistent with that of the main equipment.
It should be noted that, compared with the mandatory requirement that the root bridge must be designated as the MLAG device, the embodiments of the present specification may arbitrarily designate the root bridge according to the networking requirement, thereby greatly enhancing the flexibility and the application range of the topology networking.
Meanwhile, compared with the case that the main device and the standby device participate in spanning tree operation as the same device, the requirement that the uplink ports deployed on the two devices are different, namely, the ports cannot be the same, so that at least half of the device port resources cannot participate in spanning tree operation.
Meanwhile, compared with some additional configurations such as mandatory root bridge, root protection, bridge ID and the like, the embodiments of the present specification do not need to add any configuration, and do not need to add any additional workload of a protocol software layer, and can solve the problem of running the spanning tree protocol by the MLAG with the minimum workload.
It should be noted that, in this embodiment of the present specification, if the peerlink port of the MLAG device is elected as a blocking port, the split-stp function is started, the state of the blocking port driver layer is set as a forwarding state, the state of the software layer is maintained, the state of the root port driver layer is set as a blocking state, and the state of the protocol software layer is maintained; and if the peerlink port of the MLAG equipment is elected as a non-blocking port, closing the split-stp function, and setting the states of all port driver layers to be in a software layer state so as to keep the states of the driver layers and a protocol software layer consistent.
Fig. 4 is a schematic structural diagram of an apparatus for operating a spanning tree protocol in an MLAG environment according to one or more embodiments of the present disclosure, where the apparatus includes: a protocol execution unit 1 and a regulation unit 2.
The protocol running unit 1 is used for the MLAG device to run the related spanning tree protocol in the software layer in the MLAG environment;
the adjusting unit 2 is configured to, according to an election condition of the state machine of the relevant spanning tree protocol, start or close an anti-blocking function of a peerlink port by the MLAG device, so as to avoid the peerlink port from being blocked, and enable the MLAG device to normally operate the relevant spanning tree protocol in a software layer, where the peerlink port establishes a link interface of an MLAG environment for the MLAG device.
Fig. 5 is a schematic structural diagram of an apparatus for operating a spanning tree protocol in an MLAG environment according to one or more embodiments of the present disclosure, where the apparatus includes:
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:
in the MLAG environment, the MLAG device runs a relevant spanning tree protocol at a software layer;
according to the election condition of the related spanning tree protocol state machine, starting or closing an anti-blocking function of a peerlink port by MLAG equipment to avoid the peerlink port from being blocked and enable the MLAG equipment to normally run the related spanning tree protocol in a software layer, wherein the peerlink port establishes a link interface of an MLAG environment for the MLAG equipment.
One or more embodiments of the present specification also provide a non-transitory computer storage medium storing computer-executable instructions configured to:
in the MLAG environment, the MLAG device runs a relevant spanning tree protocol at a software layer;
according to the election condition of the related spanning tree protocol state machine, starting or closing an anti-blocking function of a peerlink port by MLAG equipment to avoid the peerlink port from being blocked and enable the MLAG equipment to normally run the related spanning tree protocol in a software layer, wherein the peerlink port establishes a link interface of an MLAG environment for the MLAG equipment.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, the present specification embodiments may be provided as a method, system, or computer program product. Accordingly, embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
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 operating a spanning tree protocol in an MLAG environment, the method comprising:
in the MLAG environment, the MLAG device runs a relevant spanning tree protocol at a software layer;
according to the election condition of the related spanning tree protocol state machine, starting or closing an anti-blocking function of a peerlink port by MLAG equipment to avoid the peerlink port from being blocked and enable the MLAG equipment to normally run the related spanning tree protocol in a software layer, wherein the peerlink port establishes a link interface of an MLAG environment for the MLAG equipment.
2. The method of claim 1, wherein the related spanning tree protocol is a spanning tree protocol;
the starting or closing the anti-blocking function of the peerlink port according to the election condition of the related spanning tree protocol state machine specifically comprises the following steps:
if the redundant blocking port generated by the spanning tree protocol state machine election is the peerlink port of the MLAG main equipment, or the redundant blocking port generated by the spanning tree protocol state machine election is the peerlink port of the MLAG standby equipment;
and starting the anti-blocking function of the peerlink port, performing spanning tree protocol state interchange on the peerlink port and the root port in a driving layer of a common spanning tree through the anti-blocking function, and keeping the spanning tree protocol state of a software layer unchanged, wherein the redundant blocking port is a blocking port selected from a spanning tree protocol mode.
3. The method according to claim 2, wherein the spanning tree protocol state interchange of the peerlink port and the root port in the driving layer of the common spanning tree by the anti-blocking function specifically comprises:
and setting the driving layer spanning tree protocol state of the redundant blocking port in the public spanning tree as a forwarding state, and setting the driving layer spanning tree protocol state of the root port in the public spanning tree as a blocking state.
4. The method of operating a spanning tree protocol in an MLAG environment of claim 1, wherein the associated spanning tree protocol is a fast spanning tree protocol;
the starting or closing the anti-blocking function of the peerlink port according to the election condition of the related spanning tree protocol state machine specifically comprises the following steps:
if the alternate port generated by the selection of the spanning tree protocol state machine is the peerlink port of the MLAG main equipment, or the alternate port generated by the selection of the spanning tree protocol state machine is the peerlink port of the MLAG standby equipment;
starting the anti-blocking function of the peerlink port, and performing spanning tree protocol state interchange on the peerlink port and the root port in a driving layer of a public spanning tree through the anti-blocking function, wherein the spanning tree protocol state of a software layer is maintained unchanged, wherein the alternative port is a blocking port selected from a rapid spanning tree protocol mode.
5. The method of claim 1, wherein the related spanning tree protocol is a multiple spanning tree protocol;
the starting or closing the anti-blocking function of the peerlink port according to the election condition of the related spanning tree protocol state machine specifically comprises the following steps:
if the alternate port elected and produced by the spanning tree protocol state machine in the public spanning tree is the peerlink port of the MLAG main equipment, or the alternate port elected and produced by the spanning tree protocol state machine in the public spanning tree is the peerlink port of the MLAG standby equipment;
starting the anti-blocking function of the peerlink port, and performing spanning tree protocol state interchange on a driving layer of the peerlink port and a root port in a public spanning tree through the anti-blocking function, wherein the spanning tree protocol state of a software layer is kept unchanged;
if the alternate port which is elected and generated by the spanning tree protocol state machine in the internal spanning tree is the peerlink port of the MLAG main equipment, or the alternate port which is elected and generated by the spanning tree protocol state machine in the internal spanning tree is the peerlink port of the MLAG standby equipment;
starting the anti-blocking function of the peerlink port, and performing spanning tree protocol state interchange on the peerlink port and a root port through the anti-blocking function on a driving layer in an internal spanning tree, wherein the spanning tree protocol state of a software layer is maintained unchanged, wherein the alternate port is a blocking port selected from a multiple spanning tree protocol mode.
6. The method according to claim 4 or 5, wherein the spanning tree protocol state interchange of the peerlink port and the root port in the driving layer of the common spanning tree is performed through the anti-blocking function, and specifically comprises:
and setting the driving layer spanning tree protocol state of the alternate port in the public spanning tree as a forwarding state, and setting the driving layer spanning tree protocol state of the root port in the public spanning tree as a blocking state.
7. The method according to claim 1, wherein the MLAG device starts or closes an anti-blocking function of a peerlink port according to the election condition of the relevant spanning tree protocol state machine, and specifically comprises:
if the peerlink port of the MLAG main equipment is selected as a non-blocking port in a software layer, or the peerlink port of the MLAG standby equipment is selected as a non-blocking port in a software layer;
and closing the anti-blocking function of the peerlink port, and restoring the spanning tree protocol state of the peerlink port and the root port in the driving layer to the spanning tree protocol state of the software layer so as to keep the spanning tree protocol states of the driving layer and the software layer consistent.
8. An apparatus for operating spanning tree protocol in MLAG environment, the apparatus comprising:
the protocol running unit is used for running a related spanning tree protocol in a software layer by the MLAG device in the MLAG environment;
and the adjusting unit is used for starting or closing an anti-blocking function of a peerlink port by the MLAG equipment according to the election condition of the related spanning tree protocol state machine so as to avoid the peerlink port from being blocked and enable the MLAG equipment to normally operate the related spanning tree protocol in a software layer, wherein the peerlink port establishes a link interface of an MLAG environment for the MLAG equipment.
9. An apparatus for operating a spanning tree protocol in an MLAG environment, 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:
in the MLAG environment, the MLAG device runs a relevant spanning tree protocol at a software layer;
according to the election condition of the related spanning tree protocol state machine, starting or closing an anti-blocking function of a peerlink port by MLAG equipment to avoid the peerlink port from being blocked and enable the MLAG equipment to normally run the related spanning tree protocol in a software layer, wherein the peerlink port establishes a link interface of an MLAG environment for the MLAG equipment.
10. A non-transitory computer storage medium storing computer-executable instructions, the computer-executable instructions configured to:
in an MLAG environment, an MLAG device runs a relevant spanning tree protocol at a software layer;
according to the election condition of the related spanning tree protocol state machine, starting or closing an anti-blocking function of a peerlink port by MLAG equipment to avoid the peerlink port from being blocked and enable the MLAG equipment to normally run the related spanning tree protocol in a software layer, wherein the peerlink port establishes a link interface of an MLAG environment for the MLAG equipment.
CN202011531509.0A 2020-12-22 2020-12-22 Method, device, equipment and medium for operating spanning tree protocol in MLAG environment Active CN112688867B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011531509.0A CN112688867B (en) 2020-12-22 2020-12-22 Method, device, equipment and medium for operating spanning tree protocol in MLAG environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011531509.0A CN112688867B (en) 2020-12-22 2020-12-22 Method, device, equipment and medium for operating spanning tree protocol in MLAG environment

Publications (2)

Publication Number Publication Date
CN112688867A true CN112688867A (en) 2021-04-20
CN112688867B CN112688867B (en) 2022-07-12

Family

ID=75450715

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011531509.0A Active CN112688867B (en) 2020-12-22 2020-12-22 Method, device, equipment and medium for operating spanning tree protocol in MLAG environment

Country Status (1)

Country Link
CN (1) CN112688867B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113395261A (en) * 2021-05-19 2021-09-14 浪潮思科网络科技有限公司 Method, equipment and medium for spanning tree protocol fast convergence in MLAG environment
CN115412424A (en) * 2022-08-17 2022-11-29 浪潮思科网络科技有限公司 Method and device for detecting double main devices in MLAG environment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101110820A (en) * 2007-09-04 2008-01-23 杭州华三通信技术有限公司 Method and switchboard for processing spanning tree protocol message
CN101699799A (en) * 2009-11-13 2010-04-28 福建星网锐捷网络有限公司 Method and network equipment for preventing network loop and spanning tree protocol network system
CN106656554A (en) * 2016-10-14 2017-05-10 盛科网络(苏州)有限公司 Method and device for implementing LACP in MLAG environment
CN107154864A (en) * 2016-03-04 2017-09-12 北京华为数字技术有限公司 Spanning-Tree Protocol STP computational methods and device
CN108512751A (en) * 2017-02-28 2018-09-07 华为技术有限公司 A kind of port status processing method and the network equipment
US20180302315A1 (en) * 2017-04-18 2018-10-18 Arista Networks, Inc. Method and system for processing spanning tree protocol (stp) state in a multichassis link aggregation (mlag) domain
CN111464436A (en) * 2020-04-03 2020-07-28 中电科航空电子有限公司 Method for solving single-port loop of RSTP (remote station transfer protocol)

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101110820A (en) * 2007-09-04 2008-01-23 杭州华三通信技术有限公司 Method and switchboard for processing spanning tree protocol message
CN101699799A (en) * 2009-11-13 2010-04-28 福建星网锐捷网络有限公司 Method and network equipment for preventing network loop and spanning tree protocol network system
CN107154864A (en) * 2016-03-04 2017-09-12 北京华为数字技术有限公司 Spanning-Tree Protocol STP computational methods and device
CN106656554A (en) * 2016-10-14 2017-05-10 盛科网络(苏州)有限公司 Method and device for implementing LACP in MLAG environment
CN108512751A (en) * 2017-02-28 2018-09-07 华为技术有限公司 A kind of port status processing method and the network equipment
US20180302315A1 (en) * 2017-04-18 2018-10-18 Arista Networks, Inc. Method and system for processing spanning tree protocol (stp) state in a multichassis link aggregation (mlag) domain
CN111464436A (en) * 2020-04-03 2020-07-28 中电科航空电子有限公司 Method for solving single-port loop of RSTP (remote station transfer protocol)

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
石瑞华: "MLAG技术在数据中心双归属中的原理及应用", 《电子技术与软件工程》 *
石瑞华: "MLAG技术在数据中心双归属中的原理及应用", 《电子技术与软件工程》, 28 October 2019 (2019-10-28) *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113395261A (en) * 2021-05-19 2021-09-14 浪潮思科网络科技有限公司 Method, equipment and medium for spanning tree protocol fast convergence in MLAG environment
CN113395261B (en) * 2021-05-19 2022-03-22 浪潮思科网络科技有限公司 Method, equipment and medium for spanning tree protocol fast convergence in MLAG environment
CN115412424A (en) * 2022-08-17 2022-11-29 浪潮思科网络科技有限公司 Method and device for detecting double main devices in MLAG environment
CN115412424B (en) * 2022-08-17 2024-03-26 浪潮思科网络科技有限公司 Double-master device detection method and device in MLAG environment

Also Published As

Publication number Publication date
CN112688867B (en) 2022-07-12

Similar Documents

Publication Publication Date Title
CN112688867B (en) Method, device, equipment and medium for operating spanning tree protocol in MLAG environment
US10003649B2 (en) Systems and methods to improve read/write performance in object storage applications
CN111800329B (en) Message forwarding method, device and medium based on SDN and OVN
US7647594B2 (en) Processor system, task control method on computer system, computer program
CN111682927B (en) Message synchronization method, device, equipment and medium based on MLAG environment
CN112470431B (en) Synthesis of models of networks using automatic boolean learning
CN112565047B (en) Method, device, equipment and medium for constructing network by using VPP in docker
CN111684439B (en) Network assurance of database version compatibility
CN112306673B (en) SDN system for cooperation of cloud computing and edge computing
CN112422422B (en) Network redundancy method, device and equipment
WO2020199709A1 (en) Method and system for refershing cascaded cache, and device
CN112104499B (en) Container network model construction method, device, equipment and medium
JP2022507436A (en) Data center traffic sharing methods, equipment, devices and storage media
US10915516B2 (en) Efficient trickle updates in large databases using persistent memory
US20220417112A1 (en) Network operation method, apparatus, and device and storage medium
CN111740875A (en) Service data forwarding method, device, equipment and medium
US9306768B2 (en) System and method for propagating virtualization awareness in a network environment
WO2023160503A1 (en) Software and hardware interaction method and apparatus for accessing logic ip
CN112003708A (en) Monitoring method, device, equipment and medium for access equipment
CN115203226A (en) Distributed meter lock operation method, device and equipment
CN112822114B (en) Routing control method, system and medium based on behavior tree
CN117033005B (en) Deadlock-free routing method and device, storage medium and electronic equipment
JP6509474B2 (en) Gateway apparatus, priority changing method and priority changing program
CN116248584A (en) Method, equipment and medium for processing EVPN route under double SPINE MLAG environment
CN116233255B (en) Scheduling policy chain generation and scheduling method and related equipment

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