A method, device and medium for checking configuration consistency of an MLAG system
By performing configuration information consistency checks between devices in the MLAG system, encapsulating interaction messages, and adjusting states, the reliability issues caused by configuration inconsistencies in the MLAG system are resolved, ensuring the normal operation of the system.
Patent Information
- Application Number
- CN202410983726.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2044-07-22
AI Technical Summary
In MLAG systems, it is difficult to guarantee the consistency of configuration between the two ends of the MLAG, resulting in low system reliability and potentially causing forwarding anomalies or network loop problems.
Consistency checks are performed on the configuration information between link switching devices, interactive messages are encapsulated for information transmission, and alarms or logs are issued when inconsistencies occur, and port status is adjusted to ensure consistency.
The configuration consistency check of the MLAG system was implemented to ensure normal system operation, improve reliability, and prevent network anomalies.
Smart Images

Figure CN118921279B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a method, device and medium for checking configuration consistency of MLAG system. BACKGROUND
[0002] Multi-chassis Link Aggregation Group (MLAG) is a mechanism for realizing link aggregation between devices, which can combine ports on two switch devices into a link aggregation group to form an Active-Active system, thereby improving network link reliability from a single board level to a device level.
[0003] The MLAG mechanism virtually combines two switches into one at the logical level, which realizes unification in the control plane. However, this also leads to the problem that once there is inconsistency in part of the related configurations between the two devices, for example, the vlan attribute configurations of the member ports at both ends of the MLAG are inconsistent, it may cause MLAG forwarding exception or network loop and other problems. At the same time, since the devices at both ends of the MLAG need to be configured and upgraded separately, it is difficult to ensure the configuration consistency of the devices at both ends of the MLAG, thereby reducing the reliability of the MLAG system. SUMMARY
[0004] In order to solve the above problems, the present application provides a method for checking configuration consistency of MLAG system, which is applied to a MLAG system, the system includes a first device and a second device, the method includes: determining a link between the first device and the second device, sending first configuration information of the first device to the second device through the link, and sending second configuration information of the second device to the first device through the link; determining local information of the first device, comparing the local information with the received second configuration information for consistency; if the local information and the second configuration information are inconsistent, determining log information, alarming according to the log information, and closing the port of the second device; if the local information and the second configuration information are consistent, determining log information, recording according to the log information, to complete the configuration of the system.
[0005] In one example, the first configuration information of the first device is sent to the second device through the link, specifically including: determining local information of the first device, encapsulating the local information to obtain an interactive message; sending the interactive message to the second device through the link, and decapsulating the interactive message by the second device to obtain the first configuration information.
[0006] In one example, the method further comprises: determining new configuration information of the second device, determining an update message according to the new configuration information, and sending the update message to the first device through the link to enable the first device to update the received second configuration information.
[0007] In one example, the method further comprises: comparing the local information with the updated second configuration information according to the updated second configuration information to update the configuration of the system.
[0008] In one example, the method further comprises: determining global configuration information of the system and port configuration information of the first device, and determining local information of the first device according to the global configuration information and the port configuration information of the first device.
[0009] In one example, the global configuration information comprises: link port information, enabling condition of spanning tree function, mode of spanning tree, and multi-spanning tree domain related configuration information.
[0010] In one example, the port configuration information comprises: aggregation group mode, link type of device port, and device port PVID.
[0011] In one example, the log information is used for alarm, specifically comprising: determining alarm information according to the log information, wherein the alarm information comprises but is not limited to configuration item, local information, configuration information received by the corresponding device, and time stamp; determining a pre-set alarm device, and sending the alarm information to the alarm device.
[0012] In another aspect, the application also provides a device for checking MLAG system configuration consistency, applied to an MLAG system, the system comprising a first device and a second device, comprising: at least one processor; and a memory in communication connection with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the device for checking MLAG system configuration consistency to perform: determining a link between the first device and the second device, sending first configuration information of the first device to the second device through the link, and sending second configuration information of the second device to the first device through the link; determining local information of the first device, and comparing the local information with the received second configuration information for consistency; if the local information is inconsistent with the second configuration information, determining log information, alarming according to the log information, and closing a port of the second device; if the local information is consistent with the second configuration information, determining log information, and recording according to the log information to complete configuration of the system.
[0013] In another aspect, the application also provides a non-volatile computer storage medium storing computer executable instructions, applied to an MLAG system, the system comprising a first device and a second device, and the computer executable instructions are configured to: determine a link between the first device and the second device, send first configuration information of the first device to the second device through the link, and send second configuration information of the second device to the first device through the link; determine local information of the first device, and compare the local information with the received second configuration information for consistency; if the local information is inconsistent with the second configuration information, determine log information, alarm according to the log information, and close a port of the second device; if the local information is consistent with the second configuration information, determine log information, and record according to the log information to complete configuration of the system.
[0014] By applying the MLAG configuration consistency checking function, the application can compare and check the designated related function configurations on the two ends of the MLAG device, so as to timely make targeted adjustments according to the checking results, so as to ensure normal operation of the MLAG system and further maintain its reliability. BRIEF DESCRIPTION OF DRAWINGS
[0015] The accompanying drawings, which are included to provide a further understanding of the application and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:
[0016] Figure 1 This is a flowchart illustrating a method for checking the consistency of MLAG system configuration in an embodiment of this application.
[0017] Figure 2 This is a schematic diagram of the MLAG network topology in an embodiment of this application;
[0018] Figure 3 This is a schematic diagram of a MLAG system configuration consistency checking device in an embodiment of this application. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.
[0021] like Figure 2 As shown, the MLAG mechanism connects two switching devices via a peer-link link, making them logically function as a single device. The MLAG member ports on both devices form a link aggregation port, allowing ports on both ends to participate in network traffic forwarding. Due to MLAG's unidirectional isolation mechanism—unicast traffic arriving at the MLAG device from the access device or network side is preferentially forwarded locally—the peer-link link is generally not used for forwarding network traffic. However, when traffic is broadcast to the other end's MLAG device via the peer-link link, unidirectional traffic isolation is established between the peer-link link and the MLAG member ports. Traffic entering from the peer-link port will not be forwarded out through the MLAG member ports. Therefore, under normal circumstances, MLAG will not form network loops.
[0022] like Figure 1 As shown, in order to solve the above problems, this application provides a method for checking the configuration consistency of an MLAG system, the method including:
[0023] S101. Determine the link between the first device and the second device, and send the first configuration information of the first device to the second device through the link, and send the second configuration information of the second device to the first device through the link.
[0024] The core of the MLAG system configuration consistency checking function is to check the consistency of the specified configurations of the two ends of the MLAG, and to make effective responses based on the checking results. When the MLAG system is successfully established, the local device (hereinafter referred to as the first device) encapsulates the local global configuration and the MLAG member port configuration in the MLAG interaction message, and sends it to the peer device (hereinafter referred to as the second device) through the peer-link link. When the peer device receives the message, it will be unpacked, and the corresponding configuration information in the message will be compared with the configuration information stored locally by the second device. In the MLAG system, either of the two switch devices can be designated as the local device, i.e. the first device, according to actual needs.
[0025] In one embodiment, the local information of the first device is determined, the local information is encapsulated to obtain an interaction message, the interaction message is sent to the second device through a link, and the interaction message is unpacked by the second device to obtain the first configuration information.
[0026] In one embodiment, the global configuration information of the system is determined, and the port configuration information of the first device is determined; the local information of the first device is determined according to the global configuration information and the port configuration information of the first device.
[0027] In one embodiment, the global configuration of the MLAG is part of the global configuration of the switch device itself, mainly including: the PVID of the peer-link port, i.e. the native VLAN of the port; the enabling condition of the spanning tree (STP) function; the mode of the spanning tree, including STP, RSTP and MSTP; the multi-spanning tree (MST) domain related configuration, including the domain name of the MST domain, the revision level of the MSTP, and the mapping relationship between the MST Instance and the VLAN. The global configuration is a key configuration that affects the establishment and traffic forwarding of the MLAG system, and to a certain extent, it will greatly affect the effective operation of the MLAG system. When performing configuration consistency checking, these configurations will be encapsulated in the MLAG message. The outer layer of the message is the message header of each network protocol layer, and the Data part is the encapsulated global configuration information, wherein the Sub Type is the corresponding type of the global configuration checking message, and when the device receives the message, the corresponding unpacking process can be performed through the type, so as to obtain the global configuration information of the peer device, corresponding to the above configurations.
[0028] In one embodiment, the MLAG member port configuration is configured as a member port configuration of the MLAG group, mainly including: mode of the aggregation group, including static and dynamic mode; link type of the port, including access, trunk and hybrid mode; PVID of the port. As with the global configuration, the above configuration of the MLAG member port is also a key configuration that needs to be consistent in the MLAG system. The Sub Type in the MLAG member port configuration check message is the type corresponding to the member port configuration check, and the other data is the above member port configuration information.
[0029] S102, determine the local information of the first device, and compare the local information with the received second configuration information for consistency.
[0030] The corresponding configuration information of the local device is exchanged with the device at the other end of the MLAG and compared to obtain a check result. If there is an inconsistency in the check result, log information of the inconsistent configuration is recorded and an alarm is generated, and at the same time, the MLAG member port of the first Slave device, i.e., the second device, in the MLAG system is err-disabled, so that it cannot perform traffic forwarding, thereby preventing further network loop and other abnormalities. If the check result of the configuration is consistent, only the corresponding log information is recorded.
[0031] S103, if the local information and the second configuration information are inconsistent, determine log information, alarm according to the log information, and close the port of the second device.
[0032] S104, if the local information and the second configuration information are consistent, determine log information, record according to the log information, to complete the configuration of the system.
[0033] In one embodiment, if the local device makes changes to the corresponding configuration, i.e., there is a new configuration to be issued, the configuration information is also sent to the opposite end through a message to perform a new consistency check. Determine the new configuration information of the second device, determine the update message according to the new configuration information, and send the update message to the first device through the link to make the first device update the received second configuration information. According to the updated second configuration information, compare the local information with the updated second configuration information for consistency to update the configuration of the system.
[0034] In one embodiment, the alarm information is determined according to the log information, and the alarm information includes but is not limited to configuration item, local information, received configuration information of the corresponding device, and timestamp; a pre-set alarm device is determined, which can be a terminal of a network administrator, a monitoring system, a mail server or other devices or systems that can receive and process alarm information. The alarm information is sent to the alarm device.
[0035] As Figure 3 shown, the embodiment of the present application also provides a checking device for MLAG system configuration consistency, comprising:
[0036] at least one processor; and,
[0037] a memory in communication connection with the at least one processor; wherein,
[0038] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the checking device for MLAG system configuration consistency to perform:
[0039] determining a link between the first device and the second device, sending first configuration information of the first device to the second device through the link, and sending second configuration information of the second device to the first device through the link;
[0040] determining local information of the first device, and comparing the local information with the received second configuration information for consistency;
[0041] if the local information is inconsistent with the second configuration information, determining log information, alarming according to the log information, and closing a port of the second device;
[0042] if the local information is consistent with the second configuration information, determining log information, recording according to the log information, to complete the configuration of the system.
[0043] The embodiment of the present application also provides a non-volatile computer storage medium, which stores computer executable instructions, and the computer executable instructions are set to:
[0044] determining a link between the first device and the second device, sending first configuration information of the first device to the second device through the link, and sending second configuration information of the second device to the first device through the link;
[0045] determining local information of the first device, and comparing the local information with the received second configuration information for consistency;
[0046] if the local information is inconsistent with the second configuration information, determining log information, alarming according to the log information, and closing a port of the second device;
[0047] if the local information is consistent with the second configuration information, determining log information, recording according to the log information, to complete the configuration of the system.
[0048] In the 1990s, it was quite obvious to distinguish whether an improvement in a technology was in hardware (e.g., improvement in circuit structures of diodes, transistors, switches, etc.) or in software (improvement in method flow). However, as technology has evolved, many improvements in method flow today can be considered as direct improvements in hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structures by programming the improved method flow into hardware circuits. Therefore, it cannot be said that an improvement in a method flow cannot be implemented by hardware entity modules. For example, a programmable logic device (PLD) (e.g., a field programmable gate array (FPGA)) is an integrated circuit whose logic function is determined by user programming of the device. A digital system is "integrated" on a PLD by the designer programming it, rather than by asking a chip manufacturer to design and fabricate a custom integrated circuit chip. Moreover, instead of manually fabricating integrated circuit chips, this programming is now mostly implemented by "logic compiler" software, which is similar to software compilers used in program development, and the original code before compilation is also written in a specific programming language, which is called a hardware description language (HDL), and there are many types of HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., and the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should be aware that, as long as the method flow is logically programmed in the above-mentioned hardware description languages and programmed into an integrated circuit, a hardware circuit that implements the logical method flow can be easily obtained.
[0049] The controller can be implemented in any suitable way, for example, the controller can take the form of a microprocessor or processor and a computer readable medium storing computer readable program code, such as 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 can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that, in addition to implementing the controller in pure computer readable program code, it is also possible to implement the same functionality in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers and embedded microcontrollers by logically programming the method steps. Such a controller can therefore be considered a hardware component, and the means included therein for implementing the various functions can also be considered structures within the hardware component. Alternatively, or even additionally, the means for implementing the various functions can be considered both software modules implementing the method and structures within the hardware component.
[0050] The systems, apparatuses, modules or units illustrated by the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, 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.
[0051] For the convenience of description, the above apparatuses are described in various units respectively according to their functions. Of course, the functions of the units can be implemented in one or more software and / or hardware in the implementation of the present specification.
[0052] Each of the embodiments in the present application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each embodiment mainly describes the differences from other embodiments. Especially, the device and medium embodiments are basically similar to the method embodiments, and thus the description is relatively simple, and the relevant parts can be referred to the part of the method embodiment.
[0053] The device and medium provided by the embodiments of the present application are one-to-one corresponding, and therefore, the device and medium also have similar beneficial technical effects to the corresponding method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the device and medium will not be described here again.
[0054] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. In addition, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.
[0055] The present application is described with reference to flowcharts and / or block diagrams of the method, device (system), and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus generate a means for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 means for carrying out the functions specified in the flowcharts and / or block diagrams.
[0056] These computer program instructions can also be stored in a computer-readable memory that can direct the computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction means, which implements the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 means for carrying out the functions specified in the flowcharts and / or block diagrams.
[0057] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable data processing apparatus to produce a computer-implemented process, so that the instructions executed on the computer or other programmable data processing apparatus provide a means for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 means for carrying out the functions specified in the flowcharts and / or block diagrams.
[0058] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memories.
[0059] Memory can include non-persistent memory, Random Access Memory (RAM), and / or non-volatile memory, such as Read Only Memory (ROM) or flash memory, in computer readable media. Memory is an example of computer readable media.
[0060] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules 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 disc (DVD), or other optical storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.
[0061] It should also be noted that the terms "comprising", "containing", or any other variant 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 in the list, but can also include other elements not expressly listed or inherent to such process, method, article or apparatus. Without further limitation, an element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.
[0062] The above merely provides an example of the present application and is not intended to limit the present application. The present application can have various modifications and changes for those skilled in the art. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the scope of claims of the present application.
Claims
1. A method for checking configuration consistency of an MLAG system, the method comprising: The method is applied to an MLAG system including a first device and a second device, and comprises the following steps: determining a link between the first device and the second device, sending first configuration information of the first device to the second device through the link, and sending second configuration information of the second device to the first device through the link; determining local information of the first device, and performing consistency comparison between the local information and the received second configuration information; if the local information is inconsistent with the second configuration information, determining log information, performing alarm according to the log information, and closing a port of the second device; if the local information is consistent with the second configuration information, determining log information, performing record according to the log information, and completing configuration of the system; determining new configuration information of the second device, determining an update packet according to the new configuration information, sending the update packet to the first device through the link, so that the first device updates the received second configuration information; determining global configuration information of the system, and determining port configuration information of the first device; determining local information of the first device according to the global configuration information and the port configuration information of the first device; the global configuration information comprises link port information, enabling condition of spanning tree function, mode of spanning tree, and multi-spanning tree domain related configuration information; the port configuration information comprises aggregation group mode, link type of device port, and PVID of device port.
2. The method of claim 1, wherein, The method further comprises the following steps: determining local information of the first device, and encapsulating the local information to obtain an interaction packet; sending the interaction packet to the second device through the link, and decapsulating the interaction packet by the second device to obtain the first configuration information.
3. The method of claim 1, wherein, The method further comprises the following steps: performing consistency comparison between the local information and the updated second configuration information according to the updated second configuration information, so as to update the configuration of the system.
4. The method of claim 1, wherein, The method further comprises the following steps: determining alarm information according to the log information, wherein the alarm information comprises but is not limited to configuration item, local information, configuration information received by a corresponding device, and time stamp; determining a pre-set alarm device, and sending the alarm information to the alarm device.
5. An inspection device of MLAG system configuration consistency, characterized in that, The method is applied to an MLAG system including a first device and a second device, and comprises the following steps: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the MLAG system configuration consistency checking device to perform the following steps: determining a link between the first device and the second device, sending first configuration information of the first device to the second device through the link, and sending second configuration information of the second device to the first device through the link; determining local information of the first device, and comparing the local information with the received second configuration information for consistency; if the local information is inconsistent with the second configuration information, determining log information, alarming according to the log information, and closing a port of the second device; if the local information is consistent with the second configuration information, determining log information, and recording according to the log information to complete configuration of the system; determining new configuration information of the second device, determining an update packet according to the new configuration information, and sending the update packet to the first device through the link to enable the first device to update the received second configuration information; determining global configuration information of the system, and determining port configuration information of the first device; determining local information of the first device according to the global configuration information and the port configuration information of the first device; the global configuration information comprises link port information, enabling condition of a spanning tree function, mode of the spanning tree, and multi-spanning tree domain related configuration information; the port configuration information comprises aggregation group mode, link type of a device port, and PVID of the device port.
6. A non-transitory computer storage medium storing computer-executable instructions that, when executed, cause a computer to perform: application to an MLAG system, the system comprising a first device and a second device, and the computer executable instructions are configured to: determine a link between the first device and the second device, send first configuration information of the first device to the second device through the link, and send second configuration information of the second device to the first device through the link; determine local information of the first device, and compare the local information with the received second configuration information for consistency; if the local information is inconsistent with the second configuration information, determine log information, alarm according to the log information, and close a port of the second device; if the local information is consistent with the second configuration information, determine log information, and record according to the log information to complete configuration of the system; determine new configuration information of the second device, determine an update packet according to the new configuration information, and send the update packet to the first device through the link to enable the first device to update the received second configuration information; determine global configuration information of the system, and determine port configuration information of the first device; determine local information of the first device according to the global configuration information and the port configuration information of the first device; the global configuration information comprises link port information, enabling condition of a spanning tree function, mode of the spanning tree, and multi-spanning tree domain related configuration information; the port configuration information comprises aggregation group mode, link type of a device port, and PVID of the device port.
Citation Information
Patent Citations
DHCP-based MLAG dynamic double-master detection method, apparatus and device, and medium
CN115208854A
Methods, systems, and computer readable media for improved multi-switch link aggregation group (MLAG) convergence
US8730963B1