A cross-device link aggregation group registration method, device, equipment and medium
Through the automated cross-device link aggregation group registration method, the preset automatic registration instructions and message interaction are used to solve the problem of low registration efficiency of cross-device link aggregation group in the existing technology, automatic registration is realized, and maintenance difficulty is reduced and human investment.
Patent Information
- Application Number
- CN202411149169.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-08-21
AI Technical Summary
The existing cross-device link aggregation group registration method is inefficient and complex, and requires manual configuration. It is suitable for maintenance personnel who are familiar with the switch manual. Different types of switch commands are different, which increases maintenance difficulty.
By issuing the preset automatic registration instruction to the switch, restarting the switch, and interacting with packets when the switch port status is on, using the received device information to configure the session of the cross-device link aggregation group to achieve automated registration.
It improves the efficiency and simplicity of cross-device link aggregation group registration, reduces the requirements for maintenance personnel, reduces the possibility of human error, and supports zero-touch configuration and centralized management.
Smart Images

Figure CN118677767B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer network communication technology, and in particular to a cross-device link aggregation group registration method, device, equipment and medium. Background Art
[0002] MC-LAG (Multichassis Link Aggregation Group) is a mechanism for implementing cross-device link aggregation. It improves the reliability of the link from the single-board level to the device level by performing cross-device link aggregation between two connected switches and user-side devices or servers in the same state. At the same time, since MC-LAG devices can be upgraded separately, the stability of service traffic is guaranteed.
[0003] During the registration process of the cross-device link aggregation group, maintenance personnel are required to manually configure to maintain the network. Therefore, the current registration method of the cross-device link aggregation group is suitable for the case where the maintenance personnel are familiar with the switch manual and execute the configuration commands. Moreover, for different types of switches, the execution commands are also different, which places high demands on the maintenance personnel. Secondly, there are many configuration commands for the cross-device link aggregation group, and the on-site deployment personnel need to constantly check and verify the configuration. Therefore, manually completing the registration of the cross-device link aggregation group is inefficient and complex.
[0004] It can be seen that how to improve the efficiency and simplicity of cross-device link aggregation group registration is a problem that technical personnel in this field need to solve. Summary of the invention
[0005] The purpose of the embodiments of the present invention is to provide a method, apparatus, device and medium for registering a cross-device link aggregation group, which can improve the efficiency and simplicity of registering a cross-device link aggregation group. The specific scheme is as follows:
[0006] In a first aspect, the present application discloses a cross-device link aggregation group registration method, comprising:
[0007] Sending a preset automatic registration instruction of the inter-device link aggregation group to each switch in the inter-device link aggregation group so as to restart each of the switches;
[0008] If there is no configuration information related to the registration of the cross-device link aggregation group in each of the switches, determining the port status of each of the switches, and if the port status of each of the switches is in the open state, controlling the message interaction between each of the switches;
[0009] Control the exchange of device information between the switches based on the received message information, so that each switch uses the device information to configure the target session port of the cross-device link aggregation group and establish the session of the cross-device link aggregation group, thereby completing the registration of the cross-device link aggregation group.
[0010] Optionally, controlling the switches to exchange device information based on received message information includes:
[0011] Monitoring whether each of the switches receives corresponding message information within a preset time period;
[0012] If each of the switches receives the corresponding message information within the preset time period, controlling each of the switches to exchange device information based on the message information;
[0013] If each of the switches does not receive the corresponding message information within the preset time period, the process jumps again to the step of sending the preset automatic registration instruction of the inter-device link aggregation group to each switch in the inter-device link aggregation group.
[0014] Optionally, if each of the switches does not receive the corresponding message information within the preset time period, then jumping back to the step of sending the preset automatic registration instruction of the inter-device link aggregation group to each switch in the inter-device link aggregation group includes:
[0015] If each of the switches does not receive the corresponding message information within the preset time period, determining whether the number of registration attempts of the current cross-device link aggregation group is less than a preset attempt number threshold;
[0016] If the current number of registration attempts for the cross-device link aggregation group is less than the preset attempt number threshold, a message interaction abnormality prompt message is generated to jump again to the step of sending the preset automatic registration instruction of the cross-device link aggregation group to each switch in the cross-device link aggregation group, and update the current number of registration attempts for the cross-device link aggregation group.
[0017] Optionally, controlling the switches to exchange device information based on received message information includes:
[0018] Control each of the switches to select corresponding device information from the system media access control address, version number, and device port based on the received message information, and control each of the switches to exchange the device information.
[0019] Optionally, each of the switches configures a target session port of the inter-device link aggregation group by using the device information and establishes a session of the inter-device link aggregation group, including:
[0020] Each of the switches configures a direct-connected layer 2 link interface using the device information, and adds a first target virtual local area network corresponding to the direct-connected layer 2 link interface to the direct-connected layer 2 link interface;
[0021] Each of the switches uses the device information to identify its own device address, and uses the device address to establish a session of the cross-device link aggregation group, so as to synchronize the media access control address table entries between each of the switches using the session of the cross-device link aggregation group and the direct-connected Layer 2 link interface.
[0022] Optionally, the process in which each of the switches configures the target session port of the inter-device link aggregation group by using the device information and establishes the session of the inter-device link aggregation group further includes:
[0023] Each of the switches determines its own role using the system media access control address in the device information; wherein the role is a master switch or a backup switch;
[0024] Correspondingly, each of the switches configures the target session port of the inter-device link aggregation group using the device information, including:
[0025] Each of the switches uses the device information to configure the multi-active mechanism detection interface, and uses the multi-active mechanism detection interface to detect the status of the cross-device link aggregation group between the main switch and the backup switch to obtain the status detection result, so as to generate configuration information including the status detection result and related to the cross-device link aggregation group registration, and send the configuration information to the database of each of the switches.
[0026] Optionally, after each of the switches configures the target session port of the inter-device link aggregation group using the device information and establishes the session of the inter-device link aggregation group, the method further includes:
[0027] Each of the switches adds a second target virtual local area network corresponding to a non-target session port to the non-target session port, and adds the non-target session port to a member of an inter-device link aggregation group to configure link redundancy backup;
[0028] When the roles of the switches are switched, the link redundancy backup is started.
[0029] Optionally, after sending the configuration information to the database of each switch, the method further includes:
[0030] Determine whether the status detection result indicates that the system process working status meets the preset normal condition;
[0031] If the status detection result indicates that the working status of the system process meets the preset normal condition, a prompt message indicating that the registration of the cross-device link aggregation group is completed is generated;
[0032] If the status detection result indicates that the working status of the system process does not meet the preset normal condition, the process jumps again to the step of sending the preset automatic registration instruction of the inter-device link aggregation group to each switch in the inter-device link aggregation group.
[0033] Optionally, the preset normal condition is that the status detection result indicates that the session consistency of the cross-device link aggregation group between the main switch and the standby switch is consistent; wherein, the session consistency of the cross-device link aggregation group includes the consistency of the configuration information and the consistency of the media access control address table entries between the main switch and the standby switch.
[0034] Optionally, if the configuration information related to the cross-device link aggregation group registration does not exist in each of the switches, determining the port status of each of the switches includes:
[0035] Detecting whether there is configuration information related to cross-device link aggregation group registration in each of the switches;
[0036] If configuration information related to the registration of the inter-device link aggregation group exists in each of the switches, it is determined that the inter-device link aggregation group has currently completed registration;
[0037] If the configuration information related to the registration of the inter-device link aggregation group does not exist in each of the switches, it is determined that the inter-device link aggregation group is not currently registered, and the port status of each of the switches is determined.
[0038] Optionally, the sending of a preset automatic registration instruction of the inter-device link aggregation group to each switch in the inter-device link aggregation group so as to restart each of the switches includes:
[0039] When receiving a preset automatic registration instruction for the cross-device link aggregation group, clearing configuration information related to the registration of the cross-device link aggregation group;
[0040] The preset automatic registration instruction is sent to each switch so as to restart each switch.
[0041] Optionally, the cross-device link aggregation group registration method further includes:
[0042] If the port status of each of the switches is abnormal, it is determined that the current registration process is blocked; wherein the abnormal status includes a port link interruption status and a port link disconnection status;
[0043] Waiting for the port state of each of the switches to be converted from the abnormal state to the open state, so as to perform the step of controlling the message interaction between each of the switches.
[0044] In a second aspect, the present application discloses an electronic device, comprising:
[0045] Memory, used to store computer programs;
[0046] The processor is used to execute the computer program to implement the steps of the aforementioned cross-device link aggregation group registration method disclosed above.
[0047] In a third aspect, the present application discloses a non-volatile storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned cross-device link aggregation group registration method are implemented.
[0048] In a fourth aspect, the present application discloses a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the aforementioned cross-device link aggregation group registration method.
[0049] It can be seen that the present invention sends the preset automatic registration instruction of the cross-device link aggregation group to each switch in the cross-device link aggregation group, so as to restart each switch; if there is no configuration information related to the registration of the cross-device link aggregation group in each switch, the port status of each switch is determined, and if the port status of each switch is in the open state, the message interaction between each switch is controlled; the device information interaction between each switch is controlled based on the received message information, so that each switch uses the device information to configure the target session port of the cross-device link aggregation group and establish the session of the cross-device link aggregation group, thereby completing the registration of the cross-device link aggregation group.
[0050] Beneficial effect: After receiving the preset automatic instructions of the cross-device link aggregation group, the present invention automatically completes the registration of the cross-device link aggregation group, that is, sends the preset automatic instructions to each switch to restart each switch, and controls the message interaction between each switch when the port status of each switch is in the open state, and then controls the interaction of device information between each switch based on the received message information. In this way, each switch uses the device information to configure the target session port of the cross-device link aggregation group and establish a session of the cross-device link aggregation group, thereby automatically completing the registration of the cross-device link aggregation group, thereby improving the efficiency and simplicity of the registration of the cross-device link aggregation group and reducing the requirements for maintenance personnel. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0052] Figure 1 A flow chart of a cross-device link aggregation group registration method provided by an embodiment of the present invention;
[0053] Figure 2 A specific cross-device link aggregation group registration schematic diagram provided by an embodiment of the present invention;
[0054] Figure 3 A flow chart of a specific cross-device link aggregation group registration method provided by an embodiment of the present invention;
[0055] Figure 4 A schematic diagram of the structure of a cross-device link aggregation group registration device provided by an embodiment of the present invention;
[0056] Figure 5 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] MC-LAG is a mechanism for implementing cross-device link aggregation. It improves the reliability of the link from the single-board level to the device level by performing cross-device link aggregation between two connected switches and the user-side device or server in the same state. At the same time, since MC-LAG devices can be upgraded separately, the stability of service traffic is guaranteed.
[0059] During the registration process of the cross-device link aggregation group, maintenance personnel are required to manually configure to maintain the network. Therefore, the current registration method of the cross-device link aggregation group is suitable for the case where the maintenance personnel are familiar with the switch manual and execute the configuration commands. Moreover, for different types of switches, the execution commands are also different, which places high demands on the maintenance personnel. Secondly, there are many configuration commands for the cross-device link aggregation group, and the on-site deployment personnel need to constantly check and verify the configuration. Therefore, manually completing the registration of the cross-device link aggregation group is inefficient and complex.
[0060] The terms "including" and "having" in the specification of the present invention and the above-mentioned drawings, as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.
[0061] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0062] See also Figure 1 As shown, the embodiment of the present application discloses a cross-device link aggregation group registration method, including:
[0063] Step S11: Sending a preset automatic registration instruction of the inter-device link aggregation group to each switch in the inter-device link aggregation group, so as to restart each of the switches.
[0064] In this embodiment, the preset automatic registration instruction of the cross-device link aggregation group is sent to each switch in the cross-device link aggregation group so that each switch can be restarted, including: when receiving the preset automatic registration instruction of the cross-device link aggregation group, clearing the configuration information related to the registration of the cross-device link aggregation group; sending the preset automatic registration instruction to each switch so that each switch can be restarted.
[0065] When the system receives a preset automatic registration instruction for a cross-device link aggregation group sent by a user, the system can automatically complete the registration of the cross-device link aggregation group according to the preset automatic registration instruction, wherein the system can specifically be a zero touch provisioning server (Zero Touch Provisioning Server, i.e., ztp server), that is, when the zero touch provisioning server receives the preset automatic registration instruction for the cross-device link aggregation group, it clears the configuration information related to the registration of the cross-device link aggregation group, and sends the preset automatic registration instruction to each switch so that each switch can be restarted; the zero touch provisioning server completes the registration of the cross-device link aggregation group without cumbersome manual configuration steps, greatly reducing the time and manpower investment required for configuration. Manual configuration is prone to human errors, while zero touch configuration can effectively avoid such errors, ensure the accuracy and consistency of configuration, and can be integrated with an automated operation and maintenance management system to facilitate centralized management and monitoring. Moreover, when a new device joins the network, the link aggregation group registration can be easily completed, facilitating network expansion and upgrade. It is understandable that if the user does not issue the preset automatic registration instruction for the cross-device link aggregation group, but issues the preset manual registration instruction, then the system can also support users to manually register, with multiple registration modes, making the registration of the cross-device link aggregation group more flexible.
[0066] Step S12: If the configuration information related to the registration of the cross-device link aggregation group does not exist in each of the switches, the port status of each of the switches is determined; if the port status of each of the switches is in the open state, the messages between the switches are controlled.
[0067] If there is no configuration information related to the registration of the cross-device link aggregation group in each switch, it means that the cross-device link aggregation group registration is not currently being performed. Therefore, the automatic registration process can be executed, that is, the port status of each switch is determined. If the port status of each switch is open (that is, up), it means that the switch message interaction can be performed at this time, so the system controls the message interaction between each switch, that is, the switch sends message information to other switches, and also receives message information sent by other switches.
[0068] In this embodiment, it also includes: if the port status of each of the switches is an abnormal state, it is determined that the current registration process is blocked; wherein the abnormal state includes a port link interruption state and a port link disconnection state; waiting for the port status of each of the switches to be converted from the abnormal state to the open state, so as to execute the step of controlling the message interaction between each of the switches. If the port status of each switch is an abnormal state, that is, the port status is a port link interruption state, a port link disconnection state or other abnormal state, it means that the registration process is blocked and message interaction cannot be performed. Only by waiting for the port status of each switch to be converted from the abnormal state to the open state can the switch be controlled to perform message interaction.
[0069] Step S13: Control the exchange of device information between the switches based on the received message information, so that each switch uses the device information to configure the target session port of the cross-device link aggregation group and establish the session of the cross-device link aggregation group, thereby completing the registration of the cross-device link aggregation group.
[0070] In this embodiment, the control of the exchange of device information between the switches based on the received message information includes: controlling the switches to select corresponding device information from the system media access control address, version number, and device port based on the received message information, and controlling the exchange of device information between the switches. The system controls the switches to exchange device information based on the received message information, wherein the device information may include any one or more interactive information of the system media access control address (system-mac, i.e., system-Media Access Control Address), version number, and device port, and controls the exchange of device information between the switches; further, the system also monitors whether the exchange of device information is completed, and if not, it is necessary to continue to execute the exchange of device information, and if completed, it starts the subsequent related configuration and session establishment.
[0071] In this embodiment, each of the switches uses the device information to configure the target session port of the cross-device link aggregation group and establish a session of the cross-device link aggregation group, including: each of the switches uses the device information to configure the direct-connected Layer 2 link interface, and adds the first target virtual LAN corresponding to the direct-connected Layer 2 link interface to the direct-connected Layer 2 link interface; each of the switches uses the device information to identify its own device address, and uses the device address to establish a session of the cross-device link aggregation group, so as to synchronize the media access control address table entries between each of the switches using the session of the cross-device link aggregation group and the direct-connected Layer 2 link interface. Each switch configures the direct-connected Layer 2 link (peer-link) interface using the device information, and adds the first target virtual local area network (Virtual Local Area Network, i.e., VLAN) corresponding to the direct-connected Layer 2 link interface to the direct-connected Layer 2 link interface; each switch identifies its own device address (Internet Protocol, i.e., IP) using the device information, and uses the device address to establish a session of an inter-device link aggregation group, so as to synchronize the media access control address table entries between each switch using the session of the inter-device link aggregation group and the direct-connected Layer 2 link interface.
[0072] Furthermore, for the direct-connected Layer 2 link interface, because the direct-connected Layer 2 link interface carries a large amount of data after synchronization information or flooding traffic reaches the direct-connected Layer 2 link interface, the direct-connected Layer 2 link interface will use dynamic link aggregation to automatically expand to dual-link redundant backup to ensure the reliability of the service port.
[0073] In this embodiment, the process in which each of the switches configures the target session port of the cross-device link aggregation group using the device information and establishes the session of the cross-device link aggregation group also includes: each of the switches determines its own role using the system media access control address in the device information; wherein the role is a master switch or a backup switch. Each switch determines its own role using the system media access control address in the device information, that is, each switch determines whether it is a master switch or a backup switch, that is, the master and backup roles are automatically elected between devices.
[0074] In this embodiment, each of the switches configures the target session port of the cross-device link aggregation group using the device information, including: each of the switches configures the multi-active mechanism detection interface using the device information, and uses the multi-active mechanism detection interface to detect the state of the cross-device link aggregation group between the master switch and the standby switch, obtains the state detection result, generates configuration information including the state detection result and related to the registration of the cross-device link aggregation group, and sends the configuration information to the database of each of the switches. Each switch configures the multi-active mechanism detection (MAD) interface using the device information, and uses the multi-active mechanism detection interface to detect the state of the cross-device link aggregation group between the master switch and the standby switch. The multi-active mechanism detection interface is mainly used to detect whether a negotiation abnormality occurs between the master and standby devices, that is, the dual machine role is the master, or the dual machine role is the standby, obtains the state detection result, and then generates the configuration information including the state detection result and related to the registration of the cross-device link aggregation group, and sends the configuration information to the database of each switch.
[0075] In this embodiment, after each of the switches configures the target session port of the cross-device link aggregation group using the device information and establishes the session of the cross-device link aggregation group, it also includes: each of the switches adds the second target virtual LAN corresponding to the non-target session port to the non-target session port, and adds the non-target session port to the cross-device link aggregation group member to configure link redundancy backup; when the role of each of the switches is switched, the link redundancy backup is started. The master and standby devices automatically add the second target virtual LAN corresponding to the non-target session port to the non-target session port for redundant backup between traffic. Furthermore, because the direct-connected Layer 2 link interface of the master and standby devices will synchronize the multi-active mechanism detection table entries of all cross-device link aggregation group member ports during the registration process, in this way, when the master and standby systems change, that is, when the roles are switched, part of the traffic will be flooded to the direct-connected Layer 2 link interface, ensuring that the master and standby traffic can be switched at the millisecond level in the fault scenario.
[0076] In this embodiment, after sending the configuration information to the database of each switch, it also includes: judging whether the status detection result indicates that the system process working state meets the preset normal conditions; if the status detection result indicates that the system process working state meets the preset normal conditions, generating prompt information indicating that the cross-device link aggregation group has completed registration; if the status detection result indicates that the system process working state does not meet the preset normal conditions, jumping back to the step of sending the preset automatic registration instruction of the cross-device link aggregation group to each switch in the cross-device link aggregation group. After sending the configuration information to the database of each switch, perform a system self-check, that is, automatically detect whether the registration is completed, for example Figure 2 A specific cross-device link aggregation group registration schematic diagram is shown, which determines whether the status detection result indicates that the system process working status meets the preset normal conditions; if so, the system process working status is marked as active, and a prompt message indicating that the cross-device link aggregation group has completed registration is generated, and the automatic registration process ends; if not, automatic registration is tried again, that is, the process jumps back to the step of sending the preset automatic registration instruction of the cross-device link aggregation group to each switch in the cross-device link aggregation group, so as to ensure that the cross-device link aggregation group completes registration as much as possible.
[0077] In this embodiment, the preset normal condition is that the status detection result characterizes that the session consistency of the cross-device link aggregation group between the main switch and the standby switch is consistent; wherein, the session consistency of the cross-device link aggregation group includes the consistency of the configuration information and the consistency of the media access control address table entries between the main switch and the standby switch. During the system self-check process, the status of the cross-device link aggregation group will be checked to ensure the session consistency of the cross-device link aggregation group between the main and standby systems, wherein the session consistency of the cross-device link aggregation group includes the consistency of the configuration information between the main switch and the standby switch and the synchronization consistency of the media access control address table entries between the main switch and the standby switch. Secondly, the member ports of the cross-device link aggregation group can also be checked to ensure that the configurations such as port isolation are sent to the member ports to ensure the effectiveness of internal functions.
[0078] It can be seen that the present invention sends the preset automatic registration instruction of the cross-device link aggregation group to each switch in the cross-device link aggregation group, so as to restart each switch; if there is no configuration information related to the registration of the cross-device link aggregation group in each switch, the port status of each switch is determined, and if the port status of each switch is in the open state, the message interaction between each switch is controlled; the device information interaction between each switch is controlled based on the received message information, so that each switch uses the device information to configure the target session port of the cross-device link aggregation group and establish the session of the cross-device link aggregation group, thereby completing the registration of the cross-device link aggregation group.
[0079] Beneficial effect: After receiving the preset automatic instructions of the cross-device link aggregation group, the present invention automatically completes the registration of the cross-device link aggregation group, that is, sends the preset automatic instructions to each switch to restart each switch, and controls the message interaction between each switch when the port status of each switch is in the open state, and then controls the interaction of device information between each switch based on the received message information. In this way, each switch uses the device information to configure the target session port of the cross-device link aggregation group and establish a session of the cross-device link aggregation group, thereby automatically completing the registration of the cross-device link aggregation group, thereby improving the efficiency and simplicity of the registration of the cross-device link aggregation group and reducing the requirements for maintenance personnel.
[0080] See also Figure 3 As shown, the embodiment of the present application discloses a specific cross-device link aggregation group registration method, including:
[0081] Step S21: Sending a preset automatic registration instruction of the inter-device link aggregation group to each switch in the inter-device link aggregation group, so as to restart each of the switches.
[0082] The system receives a registration instruction for a cross-device link aggregation group issued by a user. If the instruction is a preset automatic registration instruction, the system automatically executes the cross-device link aggregation group registration process. If the registration instruction is a preset manual registration instruction, the system completes the registration according to the manual configuration instructions issued by the user in sequence.
[0083] Step S22: If the configuration information related to the registration of the cross-device link aggregation group does not exist in each of the switches, the port status of each of the switches is determined; if the port status of each of the switches is in the open state, the messages between the switches are controlled.
[0084] In this embodiment, if there is no configuration information related to the registration of the cross-device link aggregation group in each of the switches, the port status of each of the switches is determined, including: detecting whether there is configuration information related to the registration of the cross-device link aggregation group in each of the switches; if there is configuration information related to the registration of the cross-device link aggregation group in each of the switches, it is determined that the cross-device link aggregation group has currently completed registration; if there is no configuration information related to the registration of the cross-device link aggregation group in each of the switches, it is determined that the cross-device link aggregation group is not currently registered, and the port status of each of the switches is determined. After each switch is restarted, each switch may already have configuration information related to the registration of the cross-device link aggregation group, that is, the registration of the cross-device link aggregation group may have been completed. In this case, there is no need to register the cross-device link aggregation group again. Therefore, in order to avoid redundant registration, it is necessary to detect whether there is configuration information related to the registration of the cross-device link aggregation group in each switch before executing the automatic registration process; if there is configuration information related to the registration of the cross-device link aggregation group in each switch, it is determined that the cross-device link aggregation group has currently completed registration; if there is no configuration information related to the registration of the cross-device link aggregation group in each switch, it is determined that the cross-device link aggregation group is not currently registered, and the port status of each switch is determined. In this way, redundant registration of the cross-device link aggregation group is effectively avoided.
[0085] If the port status of each switch is in the open state, the switches are controlled to perform message interaction, wherein the message is an Ethernet layer (the layer of Ethernet in the network protocol stack) negotiation message, and specifically, the message interaction cycle is, for example, once every 10 seconds.
[0086] Step S23: monitoring whether each of the switches receives corresponding message information within a preset time period.
[0087] It is understandable that during the message interaction process, the message sending time cannot be too long to prevent the switch from being unable to receive the message within a reasonable time period due to an abnormality in the transmission link, thereby blocking the process. Therefore, a preset time period is set, and each switch is monitored to see whether it receives the corresponding message information within the preset time period, so that reasonable processing can be made based on the speed of message interaction later.
[0088] Step S24: If each of the switches receives the corresponding message information within the preset time period, the switches are controlled to interact with each other based on the message information, so that each of the switches uses the device information to configure the target session port of the cross-device link aggregation group and establish a session of the cross-device link aggregation group, thereby completing the registration of the cross-device link aggregation group.
[0089] If each switch receives the corresponding message information within the preset time period, it means that the switch message interaction is normal, then the switch is controlled to interact with each other based on the message information, so that each switch can use the device information to configure the target session port of the cross-device link aggregation group and establish a session of the cross-device link aggregation group, and complete the registration of the cross-device link aggregation group. In this stage, the device will automatically calculate the active and standby roles based on the comparison of the media access control address, use the device address to establish a Transmission Control Protocol (TCP) session link, and use the device address to establish a cross-device link aggregation group session based on the Transmission Control Protocol session.
[0090] Step S25: If each of the switches does not receive the corresponding message information within the preset time period, the process jumps back to the step of sending the preset automatic registration instruction of the inter-device link aggregation group to each switch in the inter-device link aggregation group.
[0091] In this embodiment, if each of the switches does not receive the corresponding message information within the preset time period, then the step of re-jumping to the step of sending the preset automatic registration instruction of the cross-device link aggregation group to each switch in the cross-device link aggregation group includes: if each of the switches does not receive the corresponding message information within the preset time period, then determining whether the current number of registration attempts for the cross-device link aggregation group is less than the preset number of attempts threshold; if the current number of registration attempts for the cross-device link aggregation group is less than the preset number of attempts threshold, then generating a message interaction abnormality prompt message to re-jump to the step of sending the preset automatic registration instruction of the cross-device link aggregation group to each switch in the cross-device link aggregation group, and updating the current number of registration attempts for the cross-device link aggregation group.
[0092] If each switch fails to receive the corresponding message information within the preset time period, the registration process can be attempted again. However, before attempting to execute the registration process, it is necessary to determine whether the number of registration attempts of the current cross-device link aggregation group is less than the preset attempt number threshold. That is, if each switch fails to receive the corresponding message information within the preset time period and the number of registration attempts of the current cross-device link aggregation group is less than the preset attempt number threshold, then the registration process can be attempted again, that is, message interaction abnormality prompt information is generated to jump again to the step of sending the preset automatic registration instruction of the cross-device link aggregation group to each switch in the cross-device link aggregation group. Because the system may not be able to automatically complete the registration of the cross-device link aggregation group at one time due to network failures and other reasons, automatic re-registration can be attempted. However, if the registration is not successful within a certain number of attempts, it is no longer suitable to retry at this time. That is, even if the registration is attempted again, the probability of successful registration is very low, so the system stops automatic registration. When the user handles the situation and issues a preset automatic registration instruction, the system will retry automatic registration. In this way, the system will not be blocked in the registration attempt process.
[0093] It can be seen that the present invention automatically completes the registration of the cross-device link aggregation group, specifically including sending preset automatic instructions to each switch to restart each switch, and controlling the message interaction between each switch when the port status of each switch is in the open state, and then controlling the device information interaction between each switch based on the received message information. In this way, each switch uses the device information to configure the target session port of the cross-device link aggregation group and establish a session of the cross-device link aggregation group, thereby automatically completing the registration of the cross-device link aggregation group, thereby improving the efficiency and simplicity of the registration of the cross-device link aggregation group and reducing the requirements for maintenance personnel; wherein, in controlling the received messages between each switch, During the process of exchanging device information, monitor whether each switch receives the corresponding message information within the preset time period. If each switch receives the corresponding message information within the preset time period, control the exchange of device information between each switch based on the message information. If each switch does not receive the corresponding message information within the preset time period and the current registration attempt number of the cross-device link aggregation group is less than the preset attempt number threshold, try to start a new round of automatic registration process. If each switch does not receive the corresponding message information within the preset time period and the current registration attempt number of the cross-device link aggregation group is not less than the preset attempt number threshold, stop starting a new round of automatic registration process, and effectively avoid the system being blocked in the registration attempt process.
[0094] See also Figure 4 As shown, the embodiment of the present application discloses a cross-device link aggregation group registration device, including:
[0095] The switch restart module 11 is used to send a preset automatic registration instruction of the inter-device link aggregation group to each switch in the inter-device link aggregation group, so as to restart each of the switches.
[0096] The message interaction module 12 is used to determine the port status of each switch if there is no configuration information related to the cross-device link aggregation group registration in each switch, and control the message interaction between each switch if the port status of each switch is open.
[0097] The registration completion module 13 is used to control the interaction of device information between each of the switches based on the received message information, so that each of the switches uses the device information to configure the target session port of the cross-device link aggregation group and establish the session of the cross-device link aggregation group, thereby completing the registration of the cross-device link aggregation group.
[0098] It can be seen that the present invention sends the preset automatic registration instruction of the cross-device link aggregation group to each switch in the cross-device link aggregation group, so as to restart each switch; if there is no configuration information related to the registration of the cross-device link aggregation group in each switch, the port status of each switch is determined, and if the port status of each switch is in the open state, the message interaction between each switch is controlled; the device information interaction between each switch is controlled based on the received message information, so that each switch uses the device information to configure the target session port of the cross-device link aggregation group and establish the session of the cross-device link aggregation group, thereby completing the registration of the cross-device link aggregation group.
[0099] Beneficial effect: After receiving the preset automatic instructions of the cross-device link aggregation group, the present invention automatically completes the registration of the cross-device link aggregation group, that is, sends the preset automatic instructions to each switch to restart each switch, and controls the message interaction between each switch when the port status of each switch is in the open state, and then controls the interaction of device information between each switch based on the received message information. In this way, each switch uses the device information to configure the target session port of the cross-device link aggregation group and establish a session of the cross-device link aggregation group, thereby automatically completing the registration of the cross-device link aggregation group, thereby improving the efficiency and simplicity of the registration of the cross-device link aggregation group and reducing the requirements for maintenance personnel.
[0100] Since the embodiments of the device part correspond to the above embodiments, please refer to the description of the embodiments of the method part for the embodiments of the device part, and will not be repeated here.
[0101] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Specifically, it may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21, and the computer program is loaded and executed by the processor 21 to implement the following steps:
[0102] Sending a preset automatic registration instruction of the inter-device link aggregation group to each switch in the inter-device link aggregation group so as to restart each of the switches;
[0103] If there is no configuration information related to the registration of the cross-device link aggregation group in each of the switches, determining the port status of each of the switches, and if the port status of each of the switches is in the open state, controlling the message interaction between each of the switches;
[0104] Control the exchange of device information between the switches based on the received message information, so that each switch uses the device information to configure the target session port of the cross-device link aggregation group and establish the session of the cross-device link aggregation group, thereby completing the registration of the cross-device link aggregation group.
[0105] In some specific implementations, the processor can implement the following steps by executing the computer program stored in the memory:
[0106] Monitoring whether each of the switches receives corresponding message information within a preset time period;
[0107] If each of the switches receives the corresponding message information within the preset time period, controlling each of the switches to exchange device information based on the message information;
[0108] If each of the switches does not receive the corresponding message information within the preset time period, the process jumps again to the step of sending the preset automatic registration instruction of the inter-device link aggregation group to each switch in the inter-device link aggregation group.
[0109] In some specific implementations, the processor can implement the following steps by executing the computer program stored in the memory:
[0110] If each of the switches does not receive the corresponding message information within the preset time period, determining whether the number of registration attempts of the current cross-device link aggregation group is less than a preset attempt number threshold;
[0111] If the current number of registration attempts for the cross-device link aggregation group is less than the preset attempt number threshold, a message interaction abnormality prompt message is generated to jump again to the step of sending the preset automatic registration instruction of the cross-device link aggregation group to each switch in the cross-device link aggregation group, and update the current number of registration attempts for the cross-device link aggregation group.
[0112] In some specific implementations, the processor can implement the following steps by executing the computer program stored in the memory:
[0113] Control each of the switches to select corresponding device information from the system media access control address, version number, and device port based on the received message information, and control the interaction of the device information between each of the switches.
[0114] In some specific implementations, the processor can implement the following steps by executing the computer program stored in the memory:
[0115] Each of the switches configures a direct-connected layer 2 link interface using the device information, and adds a first target virtual local area network corresponding to the direct-connected layer 2 link interface to the direct-connected layer 2 link interface;
[0116] Each of the switches uses the device information to identify its own device address, and uses the device address to establish a session of the cross-device link aggregation group, so as to synchronize the media access control address table entries between each of the switches using the session of the cross-device link aggregation group and the direct-connected Layer 2 link interface.
[0117] In some specific implementations, the processor can implement the following steps by executing the computer program stored in the memory:
[0118] Each of the switches determines its own role using the system media access control address in the device information; wherein the role is a master switch or a backup switch;
[0119] Correspondingly, each of the switches configures the target session port of the inter-device link aggregation group using the device information, including:
[0120] Each of the switches uses the device information to configure the multi-active mechanism detection interface, and uses the multi-active mechanism detection interface to detect the status of the cross-device link aggregation group between the main switch and the backup switch to obtain the status detection result, so as to generate configuration information including the status detection result and related to the cross-device link aggregation group registration, and send the configuration information to the database of each of the switches.
[0121] In some specific implementations, the processor can implement the following steps by executing the computer program stored in the memory:
[0122] Each of the switches adds a second target virtual local area network corresponding to a non-target session port to the non-target session port, and adds the non-target session port to a member of an inter-device link aggregation group to configure link redundancy backup;
[0123] When the roles of the switches are switched, the link redundancy backup is started.
[0124] In some specific implementations, the processor can implement the following steps by executing the computer program stored in the memory:
[0125] Determine whether the status detection result indicates that the system process working status meets the preset normal condition;
[0126] If the status detection result indicates that the working status of the system process meets the preset normal condition, a prompt message indicating that the registration of the cross-device link aggregation group is completed is generated;
[0127] If the status detection result indicates that the working status of the system process does not meet the preset normal condition, the process jumps again to the step of sending the preset automatic registration instruction of the inter-device link aggregation group to each switch in the inter-device link aggregation group.
[0128] In some specific implementations, the processor can implement the following steps by executing the computer program stored in the memory:
[0129] The preset normal condition is that the status detection result indicates that the session of the cross-device link aggregation group between the main switch and the standby switch is consistent; wherein the session consistency of the cross-device link aggregation group includes the consistency of the configuration information and the consistency of the media access control address table entries between the main switch and the standby switch.
[0130] In some specific implementations, the processor can implement the following steps by executing the computer program stored in the memory:
[0131] Detecting whether there is configuration information related to cross-device link aggregation group registration in each of the switches;
[0132] If configuration information related to the registration of the inter-device link aggregation group exists in each of the switches, it is determined that the inter-device link aggregation group has currently completed registration;
[0133] If the configuration information related to the registration of the inter-device link aggregation group does not exist in each of the switches, it is determined that the inter-device link aggregation group is not currently registered, and the port status of each of the switches is determined.
[0134] In some specific implementations, the processor can implement the following steps by executing the computer program stored in the memory:
[0135] When receiving a preset automatic registration instruction for the cross-device link aggregation group, clearing configuration information related to the registration of the cross-device link aggregation group;
[0136] The preset automatic registration instruction is sent to each switch so as to restart each switch.
[0137] In some specific implementations, the processor may further include the following steps by executing the computer program stored in the memory:
[0138] If the port status of each of the switches is abnormal, it is determined that the current registration process is blocked; wherein the abnormal status includes a port link interruption status and a port link disconnection status;
[0139] Waiting for the port state of each of the switches to be converted from the abnormal state to the open state, so as to perform the step of controlling the message interaction between each of the switches.
[0140] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0141] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0142] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 221, a computer program 222 and data 223, etc. The storage method can be temporary storage or permanent storage.
[0143] Among them, the operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device to realize the operation and processing of the massive data 223 in the memory 22 by the processor 21, which can be Windows, Unix, Linux, etc. In addition to including a computer program that can be used to complete the cross-device link aggregation group registration method performed by the electronic device disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks. In addition to data received by the electronic device and transmitted from an external device, the data 223 can also include data collected by its own input and output interface 25, etc.
[0144] Furthermore, an embodiment of the present application also discloses a non-volatile storage medium, in which a computer program is stored. When the computer program is loaded and executed by a processor, the steps of the cross-device link aggregation group registration method disclosed in any of the aforementioned embodiments are implemented.
[0145] Furthermore, an embodiment of the present application also discloses a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the cross-device link aggregation group registration method disclosed in any of the aforementioned embodiments.
[0146] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0147] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0148] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a compact disc read-only memory (CD-ROM), or any other form of storage medium known in the art.
[0149] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0150] The technical solution provided by the present invention is described in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, the present invention can also be improved and modified in a number of ways, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A cross-device link aggregation group registration method, It is characterized in that include: Sending a preset automatic registration instruction of the inter-device link aggregation group to each switch in the inter-device link aggregation group so as to restart each of the switches; If there is no configuration information related to the registration of the cross-device link aggregation group in each of the switches, determining the port status of each of the switches, and if the port status of each of the switches is in the open state, controlling the message interaction between each of the switches; Controlling the exchanges of device information between the switches based on the received message information, so that the switches configure the target session port of the inter-device link aggregation group using the device information and establish the session of the inter-device link aggregation group, thereby completing the registration of the inter-device link aggregation group; The controlling the switches to exchange device information based on the received message information includes: Control each of the switches to select corresponding device information from the system media access control address, version number, and device port based on the received message information, and control each of the switches to exchange the device information.
2. The cross-device link aggregation group registration method according to claim 1, It is characterized in that The controlling the switches to exchange device information based on the received message information includes: Monitoring whether each of the switches receives corresponding message information within a preset time period; If each of the switches receives the corresponding message information within the preset time period, controlling each of the switches to exchange device information based on the message information; If each of the switches does not receive the corresponding message information within the preset time period, the process jumps again to the step of sending the preset automatic registration instruction of the inter-device link aggregation group to each switch in the inter-device link aggregation group.
3. The cross-device link aggregation group registration method according to claim 2, It is characterized in that If each of the switches does not receive the corresponding message information within the preset time period, then jumping back to the step of sending the preset automatic registration instruction of the inter-device link aggregation group to each switch in the inter-device link aggregation group includes: If each of the switches does not receive the corresponding message information within the preset time period, determining whether the number of registration attempts of the current cross-device link aggregation group is less than a preset attempt number threshold; If the current number of registration attempts for the cross-device link aggregation group is less than the preset attempt number threshold, a message interaction abnormality prompt message is generated to jump again to the step of sending the preset automatic registration instruction of the cross-device link aggregation group to each switch in the cross-device link aggregation group, and update the current number of registration attempts for the cross-device link aggregation group.
4. The cross-device link aggregation group registration method according to claim 1, It is characterized in that Each of the switches configures the target session port of the inter-device link aggregation group by using the device information and establishes a session of the inter-device link aggregation group, including: Each of the switches configures a direct-connected layer 2 link interface using the device information, and adds a first target virtual local area network corresponding to the direct-connected layer 2 link interface to the direct-connected layer 2 link interface; Each of the switches uses the device information to identify its own device address, and uses the device address to establish a session of the cross-device link aggregation group, so as to synchronize the media access control address table entries between each of the switches using the session of the cross-device link aggregation group and the direct-connected Layer 2 link interface.
5. The cross-device link aggregation group registration method according to claim 4, It is characterized in that The process in which each of the switches configures the target session port of the inter-device link aggregation group using the device information and establishes the session of the inter-device link aggregation group also includes: Each of the switches determines its own role using the system media access control address in the device information; wherein the role is a master switch or a backup switch; Correspondingly, each of the switches configures the target session port of the inter-device link aggregation group using the device information, including: Each of the switches uses the device information to configure the multi-active mechanism detection interface, and uses the multi-active mechanism detection interface to detect the status of the cross-device link aggregation group between the main switch and the backup switch to obtain the status detection result, so as to generate configuration information including the status detection result and related to the cross-device link aggregation group registration, and send the configuration information to the database of each of the switches.
6. The cross-device link aggregation group registration method according to claim 5, It is characterized in that After each of the switches configures the target session port of the inter-device link aggregation group using the device information and establishes the session of the inter-device link aggregation group, the method further includes: Each of the switches adds a second target virtual local area network corresponding to a non-target session port to the non-target session port, and adds the non-target session port to a member of an inter-device link aggregation group to configure link redundancy backup; When the roles of the switches are switched, the link redundancy backup is started.
7. The cross-device link aggregation group registration method according to claim 5, It is characterized in that After sending the configuration information to the database of each switch, the method further includes: Determine whether the status detection result indicates that the system process working status meets the preset normal condition; If the status detection result indicates that the working status of the system process meets the preset normal condition, a prompt message indicating that the registration of the cross-device link aggregation group is completed is generated; If the status detection result indicates that the working status of the system process does not meet the preset normal condition, the process jumps again to the step of sending the preset automatic registration instruction of the inter-device link aggregation group to each switch in the inter-device link aggregation group.
8. The cross-device link aggregation group registration method according to claim 7, It is characterized in that The preset normal condition is that the status detection result indicates that the session of the cross-device link aggregation group between the main switch and the standby switch is consistent; wherein the session consistency of the cross-device link aggregation group includes the consistency of the configuration information and the consistency of the media access control address table entries between the main switch and the standby switch.
9. The cross-device link aggregation group registration method according to claim 1, It is characterized in that If the configuration information related to the cross-device link aggregation group registration does not exist in each of the switches, determining the port status of each of the switches includes: Detecting whether there is configuration information related to cross-device link aggregation group registration in each of the switches; If configuration information related to the registration of the inter-device link aggregation group exists in each of the switches, it is determined that the inter-device link aggregation group has currently completed registration; If the configuration information related to the registration of the inter-device link aggregation group does not exist in each of the switches, it is determined that the inter-device link aggregation group is not currently registered, and the port status of each of the switches is determined.
10. The cross-device link aggregation group registration method according to claim 1, It is characterized in that The step of sending a preset automatic registration instruction of the inter-device link aggregation group to each switch in the inter-device link aggregation group so as to restart each switch includes: When receiving a preset automatic registration instruction for the cross-device link aggregation group, clearing configuration information related to the registration of the cross-device link aggregation group; The preset automatic registration instruction is sent to each switch so as to restart each switch.
11. The method for registering a cross-device link aggregation group according to any one of claims 1 to 10, It is characterized in that Also includes: If the port status of each of the switches is abnormal, it is determined that the current registration process is blocked; wherein the abnormal status includes a port link interruption status and a port link disconnection status; Waiting for the port state of each of the switches to be converted from the abnormal state to the open state, so as to perform the step of controlling the message interaction between each of the switches.
12. A computer program product comprising a computer program / instructions, It is characterized in that When the computer program / instruction is executed by a processor, the steps of the cross-device link aggregation group registration method described in any one of claims 1 to 11 are implemented.
13. An electronic device, It is characterized in that include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the cross-device link aggregation group registration method as described in any one of claims 1 to 11.
14. A computer-readable storage medium, It is characterized in that Used to store computer programs; wherein, when the computer program is executed by a processor, the steps of the cross-device link aggregation group registration method as described in any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
Methods for automatically configuring multiple chassis link aggregation group (MC-LAG)
CN109150579A
Managing virtual link aggregation channel
CN113067771A
