Spanning tree protocol synchronization method, device, equipment and storage medium based on MLAG protocol
Through automatic configuration and real-time monitoring, synchronize the STP state of the physical switch in the MLAG environment, solving the problems of complex STP configuration, high state synchronization delay, low fault handling efficiency and insufficient scalability, and achieving more efficient state synchronization and network reliability.
Patent Information
- Application Number
- CN202411921000.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-12-25
AI Technical Summary
In the MLAG environment, STP configuration is complex, state synchronization delay is high, fault processing efficiency is low, and scalability is insufficient, resulting in the network being temporarily unavailable and increasing operation and maintenance costs.
Automatically configure physical switch parameters, monitor the link in real time and synchronize the STP status of the physical switch, and obtain the spanning tree protocol status by timing the MLAG link failure, determine the update status information and control the physical switch to synchronously update the spanning tree protocol status.
It improves the degree of STP configuration automation, state synchronization efficiency, network reliability and scalability, and solves the problems of complex STP configuration, high state synchronization delay, low fault processing efficiency and insufficient scalability in the MLAG environment.
Smart Images

Figure CN119383068B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network communication technology, and in particular to a spanning tree protocol synchronization method, device, equipment and storage medium based on the MLAG protocol. Background Art
[0002] In large-scale data centers and enterprise networks, STP (Spanning Tree Protocol) is used to prevent loops. However, in an MLAG (Multi-Machine Link Aggregation) environment, the STP parameters of multiple switches need to be manually configured, and configuration inconsistencies are prone to occur during device upgrades or network adjustments. When the STP status of a switch changes, it cannot be quickly synchronized to other switches in the cluster, which may cause the network to be temporarily unavailable. In the event of a network failure, existing solutions often cannot detect and respond quickly, resulting in a longer recovery time. When a new switch joins the MLAG cluster, complex manual configuration is required, increasing operation and maintenance costs. Summary of the invention
[0003] The main purpose of this application is to provide a spanning tree protocol synchronization method, device, equipment and storage medium based on the MLAG protocol, aiming to solve the technical problem of how to improve the configuration automation level of STP, the efficiency of state synchronization, the reliability and scalability of the network.
[0004] To achieve the above object, the present application proposes a spanning tree protocol synchronization method based on the MLAG protocol, the method comprising:
[0005] receiving a link joining request from a physical switch and automatically configuring system parameters, wherein the system parameters include a MAC address of the physical switch and network parameters of an MLAG controller;
[0006] Based on the system parameters, periodically obtain the spanning tree protocol status of the physical switch and detect whether the MLAG link is faulty;
[0007] When the spanning tree protocol state changes and / or the MLAG link fails, determining to update state information;
[0008] According to the update status information, the physical switch that meets the preset standard is controlled to synchronously update the spanning tree protocol status.
[0009] In one embodiment, when the spanning tree protocol state changes and / or the MLAG link fails, the step of determining to update the state information includes:
[0010] When the state of the spanning tree protocol changes, obtaining update state information according to the update content;
[0011] When the MLAG link fails, a spanning tree protocol topology is calculated, and update status information is obtained according to the spanning tree protocol topology.
[0012] In one embodiment, when the spanning tree protocol state changes, the step of obtaining update state information according to update content includes:
[0013] When the state of the spanning tree protocol changes, controlling the physical switch to update and obtain update content;
[0014] The update content is analyzed to obtain update status information.
[0015] In one embodiment, when the MLAG link fails, the step of calculating the spanning tree protocol topology and obtaining the update status information according to the spanning tree protocol topology includes:
[0016] When a fault occurs in the MLAG link, acquiring fault information, and generating a fault report according to the fault information;
[0017] Calculating a spanning tree protocol topology according to the fault report;
[0018] Update status information is obtained according to the spanning tree protocol topology.
[0019] In one embodiment, the step of periodically acquiring the spanning tree protocol status of the physical switch based on the system parameters and detecting whether the MLAG link is faulty includes:
[0020] Based on the system parameters, obtaining the spanning tree protocol status of the physical switch at preset intervals and detecting the MLAG link status;
[0021] When the MLAG link state does not meet a preset requirement, it is determined that a failure occurs in the MLAG link.
[0022] In one embodiment, after the step of controlling the physical switch that meets the preset standard to synchronously update the spanning tree protocol state according to the update state information, the following steps are included:
[0023] When a fault occurs in the MLAG link, obtaining a fault report;
[0024] The update status information, the spanning tree protocol topology and / or the fault report are displayed through a human-computer interaction interface, and the human-computer interaction interface is used to manually configure spanning tree protocol parameters, view historical status and traffic records, and troubleshoot.
[0025] In one embodiment, the step of receiving a link joining request from a physical switch and automatically configuring system parameters includes:
[0026] When a link joining request of a physical switch is detected, receiving the link joining request;
[0027] Controlling the physical switch to join the MLAG link;
[0028] When it is detected that the physical switch joins the MLAG link, system parameters are automatically configured.
[0029] In addition, to achieve the above purpose, the present application also proposes a spanning tree protocol synchronization device based on the MLAG protocol, the device comprising:
[0030] A configuration module, configured to receive a link joining request from a physical switch and automatically configure system parameters, wherein the system parameters include a MAC address of the physical switch and network parameters of an MLAG controller;
[0031] A detection module, configured to periodically obtain the spanning tree protocol status of the physical switch based on the system parameters and detect whether the MLAG link is faulty;
[0032] An analysis module, configured to determine update status information when the spanning tree protocol status changes and / or the MLAG link fails;
[0033] The synchronization module is used to control the physical switch that meets the preset standard to synchronously update the spanning tree protocol state according to the update state information.
[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes a spanning tree protocol synchronization device based on the MLAG protocol, the device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the spanning tree protocol synchronization method based on the MLAG protocol as described above.
[0035] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the spanning tree protocol synchronization method based on the MLAG protocol as described above are implemented.
[0036] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the spanning tree protocol synchronization method based on the MLAG protocol as described above are implemented.
[0037] One or more technical solutions proposed in this application have at least the following technical effects:
[0038] By automatically configuring physical switch parameters, monitoring links in real time and synchronizing the STP status of physical switches, the technical problems of complex STP configuration, high status synchronization delay, low fault handling efficiency and insufficient scalability in the MLAG environment are solved. Compared with the existing technology, the configuration automation level of STP, the efficiency of status synchronization, and the reliability and scalability of the network are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0041] Figure 1 A flowchart of a first embodiment of a spanning tree protocol synchronization method based on the MLAG protocol of the present application is provided;
[0042] Figure 2 A flow chart of Embodiment 2 of the spanning tree protocol synchronization method based on the MLAG protocol of the present application;
[0043] Figure 3 A flow chart of Embodiment 3 of the spanning tree protocol synchronization method based on the MLAG protocol of the present application;
[0044] Figure 4 A flowchart diagram of a fourth embodiment of a spanning tree protocol synchronization method based on the MLAG protocol of the present application is provided;
[0045] Figure 5 A flowchart of Embodiment 5 of the spanning tree protocol synchronization method based on the MLAG protocol of the present application is provided;
[0046] Figure 6 A schematic diagram of module connections of a spanning tree protocol synchronization method based on the MLAG protocol provided in this application;
[0047] Figure 7 This is a schematic diagram of the module structure of a spanning tree protocol synchronization device based on the MLAG protocol according to an embodiment of the present application;
[0048] Figure 8 This is a schematic diagram of the device structure of the hardware operating environment involved in the spanning tree protocol synchronization method based on the MLAG protocol in an embodiment of the present application.
[0049] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0050] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0051] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0052] The main solution of the embodiment of the present application is: receiving a link joining request of a physical switch and automatically configuring system parameters, wherein the system parameters include the MAC address of the physical switch and the network parameters of the MLAG controller; based on the system parameters, periodically obtaining the spanning tree protocol status of the physical switch and detecting whether the MLAG link is faulty; when the spanning tree protocol status changes and / or the MLAG link fails, determining update status information; and according to the updated status information, controlling the physical switch that meets the preset standard to synchronously update the spanning tree protocol status.
[0053] In this embodiment, for the convenience of description, the following description is made by taking the internal executor of the spanning tree protocol synchronization system as the execution subject.
[0054] In the MLAG environment of the prior art, the implementation of STP has technical problems such as complex configuration, high state synchronization delay, low fault handling efficiency and insufficient scalability.
[0055] The present application provides a solution that uses automatic configuration of physical switch parameters, real-time monitoring of links and synchronization of STP states of physical switches, thereby improving the degree of STP configuration automation, the efficiency of state synchronization, and the reliability and scalability of the network.
[0056] It can be seen from the above embodiments that the present application solves the technical problems of complex STP configuration, high state synchronization delay, low fault handling efficiency and insufficient scalability in the MLAG environment by automatically configuring the physical switch parameters, monitoring the link in real time and synchronizing the STP status of the physical switch, thereby improving the configuration automation level of STP, the efficiency of state synchronization, and the reliability and scalability of the network.
[0057] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, etc. The following takes the internal executor of the spanning tree protocol synchronization system as an example to illustrate this embodiment and the following embodiments.
[0058] Based on this, the embodiment of the present application provides a spanning tree protocol synchronization method based on the MLAG protocol, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the spanning tree protocol synchronization method based on the MLAG protocol of the present application.
[0059] In this embodiment, the spanning tree protocol synchronization method based on the MLAG protocol includes steps S10 to S40:
[0060] Step S10: receiving a link joining request of a physical switch and automatically configuring system parameters, wherein the system parameters include a MAC address of the physical switch and network parameters of an MLAG controller.
[0061] It should be noted that a physical switch is a network device that is mainly used to connect multiple devices in a computer network, such as computers, servers, printers, etc. It can decide how to forward data frames based on the MAC address of the device, so as to achieve accurate data transmission between different devices. From a hardware perspective, it has multiple ports through which data enters and exits the switch. When the data enters the switch, it processes and forwards the data so that the data can reach the correct destination. In actual network environments, such as corporate office networks and campus networks, physical switches build the infrastructure of internal network communications and are key devices to ensure the interconnection of many network devices. It is like an intelligent traffic commander, directing the data "vehicles" in the network so that they can smoothly drive from one device to another; the MAC address of a physical switch is a unique identifier burned into the switch network interface card (NIC). Just like each of us has a unique ID number, the MAC address is used to distinguish different devices in the network. The MAC address of a physical switch is a 48-bit (6-byte) binary number, usually expressed in hexadecimal, such as 00 - 1A - 2B -3C - 4D - 5E. The first 24 bits of the MAC address represent the manufacturer identification code, which is assigned to the device manufacturer by the Institute of Electrical and Electronics Engineers (IEEE), which is like the family name of the device. The last 24 bits are a serial number assigned by the manufacturer, which is like the name of the device. In network communications, the MAC address of the physical switch itself will also participate in the data frame exchange process. When the switch communicates with other devices, or other devices need to interact with the switch at the management level, this MAC address will be used. For example, in some network protocols, such as the Spanning Tree Protocol (STP), switches will build a loop-free network topology by exchanging information containing MAC addresses to prevent loops in the network from causing broadcast storms and other problems. At the same time, in some advanced network management operations, such as remote management of switches, the switch's MAC address can be used to accurately locate and identify the switch.
[0062] In addition, it should be noted that the MLAG (Multi-Chassis Link Aggregation Group) controller is a device that plays a key role in environments such as data center networks. It is mainly used to manage the entire MLAG domain, including coordinating STP state synchronization, handling fault detection and recovery, generating STP topology information, starting the fault recovery mechanism when a fault occurs, recalculating the link path, and notifying and updating each switch in a timely manner. The MLAG controller is connected to multiple physical switches through control links (such as gRPC or REST API), collecting status information and issuing updates. In a complex network architecture, two or more physical switches can be virtualized into a logical switch through MLAG technology to achieve redundant backup and load balancing of links. The MLAG controller is the brain of this process, coordinating operations between various physical switches. It will uniformly configure the link aggregation groups connected to different physical switches to ensure that data can be transmitted efficiently and stably between these links. For example, in a data center with extremely high requirements for network reliability, the server is connected to two physical switches through multiple links. The MLAG controller can ensure that when one of the switches fails, the link between the server and the other switch can take over seamlessly, thereby ensuring uninterrupted data transmission. At the same time, it can also dynamically allocate data transmission tasks according to the bandwidth and traffic of the link, avoiding the situation where some links are overloaded while other links are idle, effectively improving the utilization of network resources. In addition, the MLAG controller can also work with other management systems in the network, such as cooperating with the software-defined network (SDN) controller to achieve more intelligent network management and traffic control.
[0063] Step S20: Based on the system parameters, periodically obtain the spanning tree protocol status of the physical switch and detect whether the MLAG link is faulty.
[0064] It should be noted that the spanning tree protocol state of the physical switch, also known as the STP (Spanning Tree Protocol) state, mainly has the following types. The first is the blocking state. In this state, the port will receive BPDU (Bridge Protocol Data Unit), but will not forward data frames or learn MAC addresses. This is like a role that silently observes from the side, mainly to prevent network loops. It just listens to information in the network to determine whether it is qualified to enter a more active state. Then there is the listening state. In this state, the port still does not forward data frames, but will start to learn MAC addresses and participate in the calculation process of the spanning tree. At this time, it is like a participant in the preparation stage, actively receiving and analyzing information, judging the network topology, so as to correctly forward data later. Next is the learning state. At this time, the port still does not forward data, but it will continue to learn MAC addresses and update its own MAC address table. This process enables the port to better understand the situation of the devices connected to itself and make better preparations for the upcoming forwarding data stage. The last state is the forwarding state, which is the most active state. The port will forward data frames normally and learn MAC addresses. After a series of calculations and judgments, when the switch determines that a port will not cause a network loop, it will set it to the forwarding state to allow data to flow smoothly in the network.
[0065] In addition, it should be noted that the MLAG (Multi-Chassis Link Aggregation Group) link is a link form used in network technology to enhance network reliability and performance. The MLAG link is mainly used between multiple physical switches. It combines multiple switches so that they behave logically as one switch. From the perspective of the connected device, it is like connecting to a single switch with more ports and higher bandwidth. For example, a server can be connected to two physical switches through multiple links, which constitute the MLAG link. In terms of data transmission, the MLAG link can achieve link aggregation. This means that the bandwidth of multiple physical links can be combined, just like bringing together multiple streams into a large river, greatly increasing the total bandwidth of the link, and being able to meet application scenarios with high bandwidth requirements, such as large-scale data transmission in data centers. At the same time, the MLAG link provides redundant backup functions. When one of the links or a switch fails, other links can quickly take over the work to ensure that data transmission is not interrupted. This redundancy mechanism greatly improves the reliability of the network, which is crucial for network environments that require high availability, such as financial trading networks and cloud computing data centers. Moreover, during operation, the MLAG link coordinates the operations between the two switches through complex control protocols and algorithms to ensure that they can process and forward data synchronously, making the operation of the entire network more stable and efficient.
[0066] Based on the set system parameters, that is, the MAC address of the physical switch and the network parameters of the MLAG link, the physical switch and the MLAG link are both in normal working state, and the physical switch status monitoring and MLAG link fault detection can be performed in this state. When periodically obtaining the spanning tree protocol status of the physical switch and detecting whether the MLAG link is faulty, the interval time each time can be 1 minute, 5 minutes, 10 minutes, etc., and the interval time can be adaptively adjusted according to the specific situation.
[0067] There are several ways to determine whether an MLAG link has failed. First, start with the indicator lights on the network devices. Most physical switches are equipped with port indicators. Under normal circumstances, the indicator lights will light up steadily or flash in a specific color (such as green) when the link is working. If a port indicator light in the MLAG link is off or displays an abnormal color (such as red), this may be a visual sign of a link failure. However, the indicator light is only a preliminary hint, because it may also be abnormal due to hardware failure, poor contact, etc., and the link itself may not have any problems. Second, check the link status through the switch's command line interface (CLI). The commands for checking the link status may vary on switches of different brands and models. Generally, you can use "show interfaces" or similar commands to view detailed information about the port. If an MLAG link fails, the corresponding port may be displayed as "down" in the command output results, and some related error information will also be displayed, such as "link - down" or an increase in the port error count. This information can help network administrators accurately determine whether there is a problem with the link. In addition, the network management system (NMS) can also play an important role. Many enterprise-level network management systems can automatically monitor the status of network devices and links. These systems periodically poll the switch to obtain link status information. When an MLAG link fails, the NMS receives an alarm from the switch and displays the location and details of the link failure intuitively on the management interface. Some NMSs can also classify and grade faults to help administrators locate and handle problems more efficiently. Another way is to detect through network testing tools. For example, you can use tools such as Ping or Traceroute. If a Ping request is sent from one device to another in a network environment connected to an MLAG link, a large amount of packet loss or inability to connect occurs, and the possibility of other device failures is ruled out, then there may be a problem with the MLAG link. Similarly, Traceroute can help determine the location of the interruption in the data transmission path, and then infer whether it is caused by a MLAG link failure.
[0068] Step S30: When the spanning tree protocol state changes and / or the MLAG link fails, it is determined to update the state information.
[0069] It should be noted that the updated status information is status information obtained after the physical switch updates the STP status after the STP status of the physical switch changes.
[0070] The change of the spanning tree protocol state can be determined by the state of the port of the physical switch. For example, if a port changes from "blocking state" to "forwarding state", the spanning tree protocol state has changed.
[0071] Step S40: According to the update status information, control the physical switch that meets the preset standard to synchronously update the spanning tree protocol status.
[0072] It should be noted that the physical switches that meet the preset standard refer to all other physical switches whose states are affected by a physical switch when the state of the physical switch is updated or a link fails.
[0073] After obtaining the updated status information, the updated status information is sent to the status synchronization modules of all affected physical switches, and the status synchronization modules update the STP status of these switches to ensure that the STP status of all switches is consistent.
[0074] This embodiment provides a spanning tree protocol synchronization method based on the MLAG protocol. By automatically configuring physical switch parameters, monitoring links in real time and synchronizing the STP status of physical switches, the technical problems of complex STP configuration, high status synchronization delay, low fault handling efficiency and insufficient scalability in the MLAG environment are solved, thereby improving the configuration automation level of STP, the efficiency of status synchronization, and the reliability and scalability of the network.
[0075] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 , step S30 includes steps S31-S32:
[0076] Step S31, when the spanning tree protocol state changes, obtaining update state information according to the update content.
[0077] When the STP state of the physical switch changes, for example, when the state of a port changes from "blocking state" to "forwarding state", the physical switch is updated and the updated state content is obtained.
[0078] In a feasible implementation manner, step S31 includes steps S311-S312:
[0079] Step S311, when the spanning tree protocol state changes, control the physical switch to update and obtain update content.
[0080] When the Spanning Tree Protocol (STP) state changes, the physical switch performs a complex series of operations to update its own state. First, the moment the switch detects the STP state change, it re-evaluates the port role. If a port was previously in a blocking state, and due to changes in the network topology, it may now become a forwarding port, the switch will begin to recalculate factors such as path cost. Path cost is a value calculated based on factors such as link bandwidth, which is used to measure the distance from the port to the root switch. For example, a high-speed link may have a smaller path cost than a low-speed link. The switch relearns MAC addresses during the update process. When the STP state changes, a new device may be connected to a port that was originally in a non-forwarding state, or the MAC address of a previously connected device changes. At this time, the switch relearns this information by receiving the source MAC address of the data frame and updates the MAC address table. This process is similar to redrawing a map and marking the newly appeared "site" (device) on it. At the same time, the switch also updates the timer of the port state. There are many timers in STP, such as the forwarding delay timer and the maximum aging timer. The forwarding delay timer is used to control the time interval for the port to switch from the listening state to the learning state and then to the forwarding state. When the STP state changes, these timers may need to be reset to adapt to the new network topology and data flow. The updated content can be viewed through the switch's command line interface (CLI). Using commands such as "show spanning - tree", you can see the update of the port role, such as which port has changed from blocking to forwarding. You can also view the update of the MAC address table to understand the newly learned MAC addresses and the corresponding ports. In addition, by viewing the output of the timer-related parameters, you can also determine whether the timer has been reset. This updated information is critical for network administrators. It can help administrators understand the latest changes in the network topology and determine whether the switch is working properly.
[0081] Step S312: Analyze the update content to obtain update status information.
[0082] From the perspective of port roles, if a port changes from a blocking state to a forwarding state, it means that in the new network topology, the link where the port is located becomes an effective path for data transmission. This may be due to a link failure that previously caused a loop risk, or a new network connection that makes the path from this port to the root switch better. For example, after an enterprise network topology is adjusted, a port of a switch changes from blocking to forwarding. This may be due to a new high-speed link being connected, which enables data forwarded through this port to reach the destination device more efficiently. On the contrary, if a port changes from forwarding to blocking, it means that in the new network structure, this port may cause a loop, and data forwarding needs to be stopped to maintain the loop-free state of the network. At the same time, the newly learned MAC address indicates that a new device is connected to the corresponding port of the switch, or the network interface card of the previously connected device has been replaced. By viewing the update records of the MAC address table, we can track the access and movement of devices in the network. For example, in an office area network, when a new employee's computer is connected to the switch port, after the switch updates the MAC address table, the network administrator can find the new MAC address and its corresponding port from the updated MAC address table, thereby determining the access location of the new device. The updated STP state and MAC address are used as part of the updated state information and can be used to synchronize the states of other physical switches.
[0083] By analyzing the updated content, new status information of the physical switch can be obtained.
[0084] Step S32: When the MLAG link fails, a spanning tree protocol topology is calculated, and update status information is obtained according to the spanning tree protocol topology.
[0085] It should be noted that the spanning tree protocol (STP) topology is a loop-free logical structure built in the network. In a network environment containing multiple switches, STP determines the network topology by exchanging bridge protocol data units (BPDUs) between switches. BPDU contains key information such as the switch priority, MAC address, and port cost. The switches in the network build a tree topology with the root switch as the center. The root switch is elected through election, and the switch priority and MAC address are important bases for election. The smaller the priority value, the more likely it is to be elected as the root switch. If the priorities are the same, the switch with the smallest MAC address will become the root switch. For example, in a simple network consisting of three switches, after the root switch is elected through STP, the other switches will connect to the root switch through their own ports, which are called root ports. Each network segment will also have a designated port for forwarding data to the root switch. Non-designated ports will be blocked to prevent loops. This tree topology allows data to flow in an orderly manner in the network, just like water flowing in a branched river, without flooding caused by backflow (problems such as broadcast storms caused by network loops). The STP topology also has dynamic adaptability. When a link failure occurs in the network or a new switch is connected, the switches will re-exchange BPDUs and recalculate the spanning tree topology. For example, when a link connecting two switches is disconnected, the affected switches may reselect the root port or change the designated port to ensure that the network still maintains a loop-free tree topology and ensures normal network communication.
[0086] In a feasible implementation manner, step S32 includes steps S321 to S323:
[0087] Step S321: When a fault occurs in the MLAG link, fault information is obtained, and a fault report is generated according to the fault information.
[0088] When an MLAG link fails, observe the port indicator lights on the physical switch involved in the MLAG. If they are off, flashing abnormal colors, or displaying a specific fault indication pattern, these can be used as preliminary clues to the fault. Next, log in to the relevant physical switch and use commands such as "show interfaces" to view the port status and MLAG-related information. If the port corresponding to the MLAG link is displayed as "down" with an error message prompt, the nature of the fault can be determined. The network management system will also receive alarm information from the switch when a fault occurs, including details such as the time of the fault, the devices and links involved, and the type of fault. In addition, network testing tools such as Ping or Traceroute can be used. If a large number of packets are lost or connectivity is unavailable and other device failures are excluded, there may be a problem with the MLAG link. When generating a fault report, the title should be clearly stated as "MLAG Link Failure Report", and the overview should briefly describe the time of the fault, the network area involved, and the preliminary impact assessment. The report should list the model, serial number, software version and other equipment information of the physical switch involved in the fault, describe the connection status of the faulty link, and provide detailed information about the fault, including the status of the device indicator light, the error information output by the CLI, the content of the NMS alarm, and the results of the network test tool. At the same time, the impact of the fault on network connectivity and performance should be evaluated, the possible cause of the fault should be speculated, and the recovery measures taken should be recorded and future prevention suggestions should be made. Finally, relevant screenshots, CLI output results, NMS alarm records, etc. can be attached in the appendix as supplementary evidence.
[0089] Step S322: Calculate a spanning tree protocol topology according to the fault report.
[0090] When calculating the STP topology based on the MLAG link fault report, you must first carefully analyze the key information related to the network connection involved in the fault report. For example, clarify the location and ports of the physical switches involved in the fault, as well as their original connection relationships in the network. If the fault report indicates that a link in the MLAG link is faulty, and this link was originally an important part of building the network connection, then for the STP topology, the status of the relevant switch ports will change accordingly. The path originally connected to the root switch through the MLAG link may be blocked, and the switch needs to re-elect the root port, designated port, etc., to rebuild a loop-free tree topology. Check the fault report for the affected devices and the switch ports connected to them, and combine the known basic network topology to analyze which ports that were originally in the forwarding state may now need to be blocked to avoid loops, and which ports may change from blocking to forwarding to take on new forwarding tasks. For example, if a switch previously forwarded data to the root switch through a port in an MLAG link, after a link failure, it may look for other available ports, determine a new root port by comparing factors such as port overhead, and then adjust the port role allocation of the entire switch to rebuild a tree topology that meets STP requirements, ensuring that network data can flow normally under the new loop-free structure. At the same time, based on information such as changes in network performance and packet loss mentioned in the fault report, changes in data flow after the STP topology change and potential problems that may exist can also be inferred. For example, packet loss may mean that some ports are in the transition stage after the topology adjustment and have not yet stabilized, or that the bandwidth of the new forwarding path is limited. These can help to further improve the calculation and understanding of the STP topology, thereby clearly outlining the new topology of the network based on STP after the failure occurs.
[0091] Step S323: obtaining update status information according to the spanning tree protocol topology.
[0092] From the perspective of STP status, if in the newly constructed STP topology, a port that was originally in a blocking state has its path to the root switch optimized due to adjustments in the network topology, such as a link failure or the access of a new link, then this port may be transformed into a root port or a designated port, and then enter transition states such as listening and learning, and finally become a forwarding state, starting to forward data frames normally. In this process, each step of the port state transition is an important update of status information. On the contrary, if a port that was originally in a forwarding state has a loop risk due to topology changes, it will be readjusted to a blocking state, and the corresponding state switching record is also a key update content. At the same time, the status of various timers in STP will also be updated. For example, after the topology structure changes, the timing of the forwarding delay timer will be adjusted according to the new port state transition requirements. For example, when more ports need to transition from the listening state to the learning state and then to the forwarding state, the forwarding delay timer will control these transition processes according to the newly set duration to adapt to the new rhythm of network data flow. The same is true for the maximum aging timer, which determines the aging time of entries in the MAC address table. It may be reset after the topology changes to ensure that the MAC address table can be updated in a timely manner and accurately reflect the connection status of devices in the network. For MAC addresses, after the new STP topology is formed, the switch begins to relearn the status of devices connected to each port by receiving the source MAC address of the data frame. If a new device is connected to a port in the forwarding state, the switch will record the MAC address of the new device in the MAC address table and associate it with the corresponding port. This is the newly added MAC address information. Conversely, if a device is disconnected from the port, the corresponding MAC address table entry will be deleted after the maximum aging timer expires. This is also the update status information related to the MAC address. In addition, when the port role changes, such as from forwarding to blocking, the MAC addresses originally learned through the port are temporarily retained in the table, but over time, if no relevant data frames pass, these MAC addresses will also be gradually updated according to the aging mechanism to ensure that the MAC address table matches the current STP topology and device connection status.
[0093] By recalculating the STP topology, the status information of the MLAG link failure can be obtained.
[0094] This embodiment provides a spanning tree protocol synchronization method based on the MLAG protocol. When the spanning tree protocol state changes, updated state information is obtained according to the updated content. When the MLAG link fails, the spanning tree protocol topology is calculated, and updated state information is obtained according to the spanning tree protocol topology, thereby improving the efficiency of STP state synchronization and the reliability of the network.
[0095] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3 , step S20 includes steps S21-S22:
[0096] Step S21: Based on the system parameters, the spanning tree protocol status of the physical switch is obtained at preset intervals, and the MLAG link status is detected.
[0097] It should be noted that the preset time is the interval time for monitoring the status of the physical switch, which may be 1 minute, 5 minutes, 10 minutes, etc. This embodiment does not limit the specific setting of the preset time.
[0098] To obtain the STP status of the physical switch, there are many ways to implement scheduled monitoring. The status synchronization module can be used to configure periodic polling of the switch to obtain STP-related information, such as port roles (root port, designated port, non-designated port), port status (forwarding, learning, blocking), and the topology of the spanning tree. For example, every half an hour, the network management software sends a specific query command to the switch, and the switch responds and returns the current STP status information. In this way, the network administrator can understand the operation of the spanning tree in real time and promptly discover potential loop risks or abnormal port status. At the same time, the detection of the MLAG link status can be achieved through the command line interface (CLI) of the switch or the network management software. For the CLI, a script can be written to log in to the switch regularly and execute specific commands to check the status of the MLAG link. For example, run the script once an hour and use the "show mlag status" command to view the connection status of the MLAG peer link, the status of the aggregation group, and whether there is a fault alarm. If a fault is found in the MLAG link, such as a peer link disconnection or a port in the aggregation group failure, the script can immediately trigger an alarm to notify the network administrator to handle it. From the perspective of the network management system, some advanced network management software can integrate STP and MLAG status monitoring functions, providing an intuitive interface to display the STP topology and MLAG link status of the switch. Network administrators can set different monitoring frequencies and alarm thresholds so that they can respond quickly when problems arise. For example, when the bandwidth utilization of the MLAG link exceeds a certain threshold or the STP topology changes significantly, the network management system will issue an alarm to remind the administrator to pay attention and take appropriate measures.
[0099] It should be noted that the status synchronization module is used to regularly monitor and record the STP status of the physical switch, pass the current STP status information of the switch (such as port status, bridge role, etc.) to the MLAG controller through the control protocol, receive status updates from the MLAG controller, and adjust its own STP configuration according to its content.
[0100] Step S22: When the MLAG link status does not meet the preset requirement, it is determined that the MLAG link fails.
[0101] It should be noted that the preset requirement is the state when the MLAG link works normally, that is, the normal standard, which may include the connectivity and packet loss rate of the link.
[0102] The connectivity of the link is an important aspect. Under normal circumstances, the MLAG link should maintain stable connectivity. If the port corresponding to the link is detected as "down" through the network management tool or the switch command line interface, and it is continuously unable to connect, it obviously does not meet the requirement of good connectivity. It is very likely that there is a problem of physical connection interruption in the link, such as the fiber is damaged, the network cable interface is loose, etc., which leads to the link failure. The bandwidth utilization of the link is also within the preset requirements. Generally, a reasonable bandwidth usage range is set. If the monitoring finds that the bandwidth utilization of the MLAG link is far beyond the normal upper limit, for example, the preset requirement is that the bandwidth utilization does not exceed 80%, but in actual monitoring, it is above 95% for a long time. This may indicate that there is abnormal traffic in the link or that some links are faulty, resulting in excessive load on the remaining normal links, and thus not meeting the preset bandwidth-related standards, indicating that the MLAG link as a whole has problems. The packet loss rate of a normally operating MLAG link should be maintained at a very low level, which can be almost negligible. If the packet loss rate suddenly rises sharply and exceeds the preset allowable packet loss range, it means that there is a problem with data transmission on the link. It may be due to the decline in the quality of the link itself, the failure of the switch port, or the configuration error. It also does not meet the preset requirements for packet loss rate, which means that the MLAG link has failed. In addition, from the perspective of the switch, if the port status information of the MLAG link is checked, if there is an incorrect port role assignment, the port error count continues to increase, etc., this does not meet the preset requirement that the port should have a stable state when the MLAG link is working normally. For example, if a port that should be in the forwarding state shows an abnormal role, or the port keeps recording counts such as frame check errors, it indicates that there is a hidden danger of failure in the link and it is likely that a failure has occurred. It can also be judged by comparing the state synchronization between the switches at both ends of the MLAG link. A normal MLAG link requires that the switches at both ends can synchronize the configuration and status of the link aggregation group and other related configurations well. If the status of the two ends is inconsistent, such as one end showing that the link is normal and the other end showing abnormality, or the two ends have different parameter configurations for the link aggregation group, which do not meet the preset synchronization standards, it can also be determined that the MLAG link has failed. The specific cause needs to be further investigated and repaired in time to ensure the normal operation of the network.
[0103] This embodiment provides a spanning tree protocol synchronization method based on the MLAG protocol. Based on the system parameters, the spanning tree protocol status of the physical switch is obtained at preset intervals, and the MLAG link status is detected. When the MLAG link status does not meet the preset requirements, it is determined that the MLAG link fails, thereby improving the efficiency and real-time performance of STP status synchronization.
[0104] Based on the first embodiment of the present application, in the fourth embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above description, and will not be described in detail later. Figure 4 , after step S40, steps S01 to S02 are included:
[0105] Step S01: when a fault occurs in the MLAG link, a fault report is obtained.
[0106] When a fault occurs on the MLAG link, the fault report generated in the above steps is obtained to display the fault information so that the staff can know the source of the fault.
[0107] Step S02, displaying the update status information, the spanning tree protocol topology and / or the fault report through a human-computer interaction interface, wherein the human-computer interaction interface is used to manually configure spanning tree protocol parameters, view historical status and traffic records, and troubleshoot.
[0108] It should be noted that the human-computer interaction interface is the medium for information exchange between users and computer systems. Among them, the command line interface is a traditional interaction method. For example, in a computer operating system, such as the terminal under the Linux system, users interact with the system by entering specific commands, such as the "ls" command to view the list of files in the directory, the "cd" command to switch directories, etc. In network device management, administrators can also enter "show interfaces" in the command line interface to view the port status. This method requires users to be familiar with the command syntax and has a certain learning cost, but it can provide accurate and efficient operations for professionals, and can also achieve batch automation operations by writing scripts. The graphical user interface is currently a widely used interactive interface. It uses graphic elements such as windows, menus, buttons, icons, etc. to represent operations and information. Taking the operating system as an example, in the Windows operating system, users can start programs by clicking icons, select operations in menus, and drag windows to adjust layouts. The graphical user interface is intuitive and easy to understand, which reduces the user's usage threshold and is suitable for a wide range of user groups. In addition, with the development of technology, new human-computer interaction methods such as touch interface and voice interaction interface have emerged. Touch interface is widely used on devices such as smart phones and tablets. Users can operate by directly touching the screen, such as sliding, clicking, zooming, etc., which is very convenient; voice interaction interface allows users to interact with the system through voice commands. For example, with intelligent voice assistants, users can obtain information or perform operations by asking questions and issuing commands through voice, which greatly improves the naturalness and convenience of interaction.
[0109] The human-computer interaction interface, also known as the management interface, can provide an intuitive web interface for administrators to use, display the current network topology, STP status and fault reports, and allow administrators to manually configure STP parameters, view historical status and traffic records, perform troubleshooting, and other operations.
[0110] This embodiment provides a spanning tree protocol synchronization method based on the MLAG protocol. When a fault occurs in the MLAG link, a fault report is obtained; the update status information, the spanning tree protocol topology and / or the fault report are displayed through a human-computer interaction interface. The human-computer interaction interface is used to manually configure spanning tree protocol parameters, view historical status and traffic records, and troubleshoot faults, thereby realizing real-time feedback of STP synchronization.
[0111] Based on the first embodiment of the present application, in the fifth embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 5 , step S10 includes steps S11 to S13:
[0112] Step S11: when a link joining request of a physical switch is detected, the link joining request is received.
[0113] Receiving a link join request means that the system begins to recognize and process the signal from the physical switch. At this stage, the system will perform a preliminary verification of the request to check whether the source of the request is legitimate. For example, by verifying the switch's identity, IP address, or specific authentication information, it ensures that only authorized switches can issue link join requests. Once the request is confirmed to be legitimate, the system will further evaluate the parameters and characteristics of the link. This may include information such as the link's bandwidth, transmission rate, and duplex mode. By understanding these parameters, the system can better plan and allocate network resources to ensure that the newly added link can work well with the existing network environment. At the same time, the system will also check the network topology to determine whether the addition of the new link will affect the stability of the overall network. If the addition of the new link may cause a network loop or other potential problems, the system needs to take appropriate measures to adjust it. For example, it may be necessary to recalculate the topology of the spanning tree protocol (STP) and adjust the port status to prevent loops.
[0114] Step S12: Control the physical switch to join the MLAG link.
[0115] To control the physical switches to join the MLAG link, first confirm that the participating physical switches meet the corresponding hardware and software requirements, and have ports and sufficient resources that support the MLAG function in hardware. In terms of software, the operating system version must support the MLAG protocol and correctly install and configure the relevant functional modules. At the same time, plan the location of the MLAG link and the status of the connected devices in the network topology. Then configure the basic parameters, set unique identifiers such as device names and management IP addresses for the switches to facilitate distinguishing management, configure the same MLAG domain name on the switches to join the MLAG link for mutual identification and collaborative work, and set consistent port speed, duplex mode and other parameters for the ports used to build the MLAG link. Then establish a peer connection, configure each other's peer IP addresses on the two switches to achieve mutual communication and exchange MLAG-related information. Then configure the link aggregation group, create and add the corresponding ports to the two switches respectively, and ensure that the configuration is synchronized. Finally, use the relevant commands on the switch command line interface to view the MLAG link status information for verification and testing to ensure that the configuration is correct and to ensure that the physical switch can smoothly join the MLAG link and run stably.
[0116] Step S13: automatically configure system parameters when detecting that the physical switch joins the MLAG link.
[0117] When the physical switch is detected to join the MLAG link, the system automatically configures and initializes the new link. This may include configuring the switch's STP parameters, assigning IP addresses, setting VLAN (virtual local area network) parameters, configuring QoS (quality of service) policies, etc. These configuration steps ensure that the new link can transmit data according to the predetermined network policy to meet the needs of different applications and users.
[0118] This embodiment provides a spanning tree protocol synchronization method based on the MLAG protocol. When a link joining request of a physical switch is detected, the link joining request is received; the physical switch is controlled to join the MLAG link; and when it is detected that the physical switch joins the MLAG link, system parameters are automatically configured, thereby improving the configuration automation and scalability of STP.
[0119] For example, to help understand the implementation of the spanning tree protocol synchronization method based on the MLAG protocol of the present application, please refer to Figure 6 , Figure 6 A schematic diagram of module connection of a spanning tree protocol synchronization method based on the MLAG protocol is provided, specifically:
[0120] The physical switches are connected to each other through physical links and communicate with the controller through the MLAG protocol; the MLAG controller is connected to multiple physical switches through control links (such as gRPC or REST API), collects status information and sends updates; the status synchronization module is directly connected to the hardware interface of the physical switch and the MLAG controller to ensure two-way data flow; the management interface is connected to the MLAG controller through a web interface, providing an intuitive operation interface.
[0121] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the spanning tree protocol synchronization method based on the MLAG protocol of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0122] This application also provides a spanning tree protocol synchronization device based on the MLAG protocol, please refer to Figure 7 , the device comprises:
[0123] The configuration module 10 is used to receive a link joining request of a physical switch and automatically configure system parameters, wherein the system parameters include a MAC address of the physical switch and network parameters of an MLAG controller.
[0124] The detection module 20 is used to periodically obtain the spanning tree protocol status of the physical switch based on the system parameters and detect whether the MLAG link is faulty.
[0125] The analysis module 30 is configured to determine to update the status information when the spanning tree protocol status changes and / or the MLAG link fails.
[0126] The synchronization module 40 is used to control the physical switch that meets the preset standard to synchronously update the spanning tree protocol state according to the update state information.
[0127] In one embodiment, the analysis module 30 is further configured to obtain updated status information according to updated content when the spanning tree protocol status changes; and to calculate the spanning tree protocol topology and obtain updated status information according to the spanning tree protocol topology when a failure occurs in the MLAG link.
[0128] In one embodiment, the analysis module 30 is further configured to control the physical switch to update and obtain update content when the spanning tree protocol state changes; and analyze the update content to obtain update state information.
[0129] In one embodiment, the analysis module 30 is further used to obtain fault information when the MLAG link fails, generate a fault report according to the fault information; calculate a spanning tree protocol topology according to the fault report; and obtain update status information according to the spanning tree protocol topology.
[0130] In one embodiment, the detection module 20 is further used to obtain the spanning tree protocol status of the physical switch at preset intervals based on the system parameters, and detect the MLAG link status; when the MLAG link status does not meet preset requirements, it is determined that the MLAG link fails.
[0131] In one embodiment, the synchronization module 40 is also used to obtain a fault report when the MLAG link fails; display the update status information, the spanning tree protocol topology and / or the fault report through a human-computer interaction interface, and the human-computer interaction interface is used to manually configure spanning tree protocol parameters, view historical status and traffic records, and troubleshoot.
[0132] In one embodiment, the configuration module 10 is further used to receive the link joining request when a link joining request of the physical switch is detected; control the physical switch to join the MLAG link; and automatically configure system parameters when it is detected that the physical switch joins the MLAG link.
[0133] The spanning tree protocol synchronization device based on the MLAG protocol provided in the present application adopts the spanning tree protocol synchronization method based on the MLAG protocol in the above-mentioned embodiment, which can solve the technical problem of how to improve the configuration automation level of STP, the efficiency of state synchronization, the reliability and scalability of the network. Compared with the prior art, the beneficial effects of the spanning tree protocol synchronization device based on the MLAG protocol provided in the present application are the same as the beneficial effects of the spanning tree protocol synchronization method based on the MLAG protocol provided in the above-mentioned embodiment, and the other technical features in the spanning tree protocol synchronization device based on the MLAG protocol are the same as the features disclosed in the above-mentioned embodiment method, which will not be repeated here.
[0134] The present application provides a spanning tree protocol synchronization device based on the MLAG protocol, and the spanning tree protocol synchronization device based on the MLAG protocol includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the spanning tree protocol synchronization method based on the MLAG protocol in the above-mentioned embodiment one.
[0135] Reference below Figure 8, which shows a schematic diagram of the structure of a spanning tree protocol synchronization device based on the MLAG protocol suitable for implementing the embodiment of the present application. The spanning tree protocol synchronization device based on the MLAG protocol in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The spanning tree protocol synchronization device based on the MLAG protocol shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0136] like Figure 8 As shown, the spanning tree protocol synchronization device based on the MLAG protocol may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the spanning tree protocol synchronization device based on the MLAG protocol are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the spanning tree protocol synchronization device based on the MLAG protocol to communicate wirelessly or wired with other devices to exchange data. Although the figure shows a spanning tree protocol synchronization device based on the MLAG protocol with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have instead.
[0137] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0138] The spanning tree protocol synchronization device based on the MLAG protocol provided by the present application adopts the spanning tree protocol synchronization method based on the MLAG protocol in the above-mentioned embodiment, which can solve the technical problem of how to improve the configuration automation level of STP, the efficiency of state synchronization, the reliability and scalability of the network. Compared with the prior art, the beneficial effects of the spanning tree protocol synchronization device based on the MLAG protocol provided by the present application are the same as the beneficial effects of the spanning tree protocol synchronization method based on the MLAG protocol provided in the above-mentioned embodiment, and the other technical features in the spanning tree protocol synchronization device based on the MLAG protocol are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0139] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0140] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0141] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the spanning tree protocol synchronization method based on the MLAG protocol in the above-mentioned embodiment.
[0142] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0143] The computer-readable storage medium may be included in a spanning tree protocol synchronization device based on the MLAG protocol; or may exist independently without being assembled into a spanning tree protocol synchronization device based on the MLAG protocol.
[0144] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by a spanning tree protocol synchronization device based on the MLAG protocol, the spanning tree protocol synchronization device based on the MLAG protocol: receives a link joining request from a physical switch and automatically configures system parameters, wherein the system parameters include the MAC address of the physical switch and the network parameters of the MLAG controller; based on the system parameters, periodically obtains the spanning tree protocol status of the physical switch and detects whether the MLAG link is faulty; when the spanning tree protocol status changes and / or the MLAG link fails, determines update status information; and according to the update status information, controls the physical switch that meets the preset standard to synchronously update the spanning tree protocol status.
[0145] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0146] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0147] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0148] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned spanning tree protocol synchronization method based on the MLAG protocol, and can solve the technical problems of how to improve the configuration automation level of STP, the efficiency of state synchronization, the reliability and scalability of the network. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the spanning tree protocol synchronization method based on the MLAG protocol provided by the above-mentioned embodiment, and will not be repeated here.
[0149] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned spanning tree protocol synchronization method based on the MLAG protocol when executed by a processor.
[0150] The computer program product provided by the present application can solve the technical problem of how to improve the configuration automation level of STP, the efficiency of state synchronization, the reliability and scalability of the network. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the spanning tree protocol synchronization method based on the MLAG protocol provided in the above embodiment, which will not be repeated here.
[0151] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A spanning tree protocol synchronization method based on the MLAG protocol, characterized in that: The method comprises: receiving a link joining request from a physical switch and automatically configuring system parameters, wherein the system parameters include a MAC address of the physical switch and network parameters of an MLAG controller; Based on the system parameters, periodically obtain the spanning tree protocol status of the physical switch and detect whether the MLAG link is faulty; When the state of the spanning tree protocol changes, controlling the physical switch to update and obtain update content; Analyzing the update content to obtain update status information; When a fault occurs in the MLAG link, acquiring fault information, and generating a fault report according to the fault information; Calculating a spanning tree protocol topology according to the fault report; Obtaining the update status information according to the spanning tree protocol topology; According to the update status information, the physical switch that meets the preset standard is controlled to synchronously update the spanning tree protocol status.
2. The method according to claim 1, characterized in that The step of periodically acquiring the spanning tree protocol status of the physical switch based on the system parameters and detecting whether the MLAG link is faulty includes: Based on the system parameters, obtaining the spanning tree protocol status of the physical switch at preset intervals and detecting the MLAG link status; When the MLAG link state does not meet a preset requirement, it is determined that a failure occurs in the MLAG link.
3. The method according to claim 1, characterized in that After the step of controlling the physical switch that meets the preset standard to synchronously update the spanning tree protocol state according to the update state information, the following steps are included: When a fault occurs in the MLAG link, obtaining a fault report; The update status information, the spanning tree protocol topology and / or the fault report are displayed through a human-computer interaction interface, and the human-computer interaction interface is used to manually configure spanning tree protocol parameters, view historical status and traffic records, and troubleshoot.
4. The method according to any one of claims 1 to 3, characterized in that The step of receiving a link joining request from a physical switch and automatically configuring system parameters comprises: When a link joining request of a physical switch is detected, receiving the link joining request; Controlling the physical switch to join the MLAG link; When it is detected that the physical switch joins the MLAG link, system parameters are automatically configured.
5. A spanning tree protocol synchronization device based on the MLAG protocol, characterized in that: The device comprises: A configuration module, configured to receive a link joining request from a physical switch and automatically configure system parameters, wherein the system parameters include a MAC address of the physical switch and network parameters of an MLAG controller; A detection module, configured to periodically obtain the spanning tree protocol status of the physical switch and detect whether an MLAG link is faulty based on the system parameters; An analysis module, used for controlling the physical switch to update and obtain update content when the state of the spanning tree protocol changes; Analyzing the update content to obtain update status information; When a fault occurs in the MLAG link, acquiring fault information, and generating a fault report according to the fault information; Calculating a spanning tree protocol topology according to the fault report; Obtaining the update status information according to the spanning tree protocol topology; The synchronization module is used to control the physical switch that meets the preset standard to synchronously update the spanning tree protocol state according to the update state information.
6. A spanning tree protocol synchronization device based on the MLAG protocol, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the MLAG-based spanning tree protocol synchronization method according to any one of claims 1 to 4.
7. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the spanning tree protocol synchronization method based on the MLAG protocol as described in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Method for setting protocol state of chain circuit terminal port and supervising method thereof
CN101252459A
Fast convergence spanning tree protocol control method and device in MLAG environment and medium
CN116684348A