Automatic link aggregation method and device, electronic equipment and storage medium

The link aggregation information of the device port is obtained and judged through the LLDP protocol, and the control port performs link aggregation, solving the system resource occupation and configuration accuracy problems during link aggregation, and improving the accuracy and efficiency of link aggregation.

CN119996295AActive Publication Date: 2025-05-13ISOFTSTONE INFORMATION TECHNOLOGY (GROUP) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510156094.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-05-13
Estimated Expiration
2045-02-12

AI Technical Summary

Technical Problem

When link aggregation, system resources are occupied and device port configuration is poor, which can easily lead to service blockage and network paralysis.

Method used

The link aggregation information of the device port is obtained through the LLDP protocol, and it is determined whether the port supports aggregation and whether it has been configured in the aggregation group. If the preset conditions are met, the port will be controlled to perform link aggregation.

Benefits of technology

It improves the accuracy and efficiency of link aggregation, reduces equipment operation and maintenance costs, and avoids business interruptions caused by system resources and configuration errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996295A_ABST
    Figure CN119996295A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic link aggregation method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring link aggregation information of a first equipment port based on an LLDP protocol; if the link aggregation information of the first device port indicates that the device to which the first device port belongs is classified as a main device, judging whether the link aggregation information of the first device port conforms to preset aggregation information or not; if the link aggregation information of the first device port accords with preset aggregation information, obtaining link aggregation information of a second device port based on an LLDP protocol; if the link aggregation information of the second device port accords with the preset aggregation information, the first device port and the second device port are controlled to execute link aggregation, and link aggregation is achieved by controlling the first device port to execute port aggregation and controlling the second device port to execute port aggregation. According to the scheme, system resources are prevented from being occupied when link aggregation is executed, and the efficiency and accuracy of link aggregation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a link automatic aggregation method, device, electronic equipment and storage medium. Background Art

[0002] Link aggregation is to aggregate multiple physical links used for communication between two devices into a single logical link, thereby increasing the network bandwidth of the link and improving network performance, achieving link transmission elasticity and engineering redundancy, so that network traffic can be shared and balanced between ports. At present, link aggregation is usually achieved by automatically discovering and negotiating the ports of aggregated links using the Link Aggregation Control Protocol (LACP), or manually configuring the ports of aggregated links. However, when the LACP protocol is used for configuration, the ports of the device are required to support the LACP protocol, and the occupation of system resources when the LACP protocol is running needs to be tolerated; while the manual configuration method is difficult to ensure the accuracy of wiring and configuration. If the configuration is wrong, the service will not be available, and in serious cases, the network will be paralyzed. Summary of the invention

[0003] The present invention provides a link automatic aggregation method, device, electronic device and storage medium to solve the problems of occupying system resources and poor accuracy of device port configuration during link aggregation.

[0004] According to one aspect of the present invention, a link automatic aggregation method is provided, the method comprising:

[0005] Acquire link aggregation information of a first device port based on the LLDP protocol, where the first device port is an actual physical interface used to connect devices for communication transmission, and the link aggregation information includes: port aggregation performance, port aggregation status, and device classification of the device to which the port belongs, where the port aggregation performance is whether the device port supports being configured to perform port aggregation, the port aggregation status is used to indicate whether the device port has been configured in the aggregation group to which it belongs, the device classification is a master device or a slave device, the aggregation group is a logical port established by multiple device ports belonging to the same device, and port aggregation is to control the device port to be configured in the aggregation group to which the device port belongs;

[0006] If the link aggregation information of the first device port indicates that the device to which the first device port belongs is classified as a master device, determining whether the link aggregation information of the first device port conforms to preset aggregation information, wherein the preset aggregation information indicates that the port aggregation performance in the link aggregation information indicates that the device port supports being configured for port aggregation and the port aggregation state indicates that the device port is not configured in an aggregation group;

[0007] If the link aggregation information of the first device port conforms to the preset aggregation information, the link aggregation information of the second device port is obtained based on the LLDP protocol, the second device port is connected to the first device port and the second device port and the first device port belong to different devices, and the aggregation group to which the second device port belongs can communicate with the aggregation group to which the first device port belongs;

[0008] If the link aggregation information of the second device port conforms to the preset aggregation information, the first device port and the second device port are controlled to perform link aggregation, and the link aggregation is achieved by controlling the first device port to perform port aggregation and controlling the second device port to perform port aggregation.

[0009] According to another aspect of the present invention, there is provided a link automatic aggregation device, the device comprising:

[0010] A first acquisition module is used to acquire link aggregation information of a first device port based on the LLDP protocol. The first device port is an actual physical interface used to connect devices for communication transmission. The link aggregation information includes: port aggregation performance, port aggregation status, and device classification of the device to which the port belongs. The port aggregation performance is whether the device port supports being configured to perform port aggregation. The port aggregation status is used to indicate whether the device port has been configured in the aggregation group to which it belongs. The device is classified as a master device or a slave device. The aggregation group is a logical port established by multiple device ports belonging to the same device. Port aggregation is to control the device port to be configured in the aggregation group to which the device port belongs.

[0011] an aggregation information judgment module, configured to judge whether the link aggregation information of the first device port conforms to preset aggregation information if the link aggregation information of the first device port indicates that the device to which the first device port belongs is classified as a master device, wherein the preset aggregation information indicates that the port aggregation performance in the link aggregation information indicates that the device port supports being configured for port aggregation and the port aggregation state indicates that the device port is not configured in an aggregation group;

[0012] A second acquisition module is used to acquire the link aggregation information of the second device port based on the LLDP protocol if the link aggregation information of the first device port conforms to the preset aggregation information, the second device port is connected to the first device port and the second device port and the first device port belong to different devices, and the aggregation group to which the second device port belongs can communicate with the aggregation group to which the first device port belongs;

[0013] The link aggregation module is used to control the first device port and the second device port to perform link aggregation if the link aggregation information of the second device port meets the preset aggregation information. The link aggregation is achieved by controlling the first device port to perform port aggregation and controlling the second device port to perform port aggregation.

[0014] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:

[0015] at least one processor; and

[0016] a memory communicatively connected to at least one processor; wherein,

[0017] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the at least one processor can execute the link automatic aggregation method of any embodiment of the present invention.

[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the link automatic aggregation method of any embodiment of the present invention when executed.

[0019] The technical solution of the embodiment of the present invention obtains the link aggregation information of the first device port based on the LLDP protocol. The first device port is an actual physical interface used to connect devices for communication transmission. The link aggregation information includes: port aggregation performance, port aggregation status and device classification of the device to which the port belongs. The port aggregation performance is whether the device port supports being configured to perform port aggregation. The port aggregation status is used to indicate whether the device port has been configured in the aggregation group to which it belongs. The device is classified as a master device or a slave device. The aggregation group is a logical port established by multiple device ports belonging to the same device. Port aggregation is to control the device port to be configured in the aggregation group to which the device port belongs. The link aggregation information of the first device port is obtained through the LLDP protocol, which reduces the cost of device operation and maintenance and avoids the occupation of system resources. If the link aggregation information of the first device port indicates that the device classification of the device to which the first device port belongs is a master device, it is determined whether the link aggregation information of the first device port meets the preset aggregation information. The preset aggregation information indicates that the port aggregation performance in the link aggregation information indicates that the device port supports being configured to perform port aggregation. The aggregation and port aggregation status indicates that the device port is not configured in the aggregation group, and it is realized that whether the first device port supports port aggregation is judged through the link aggregation information of the first device port, thereby improving the efficiency of link aggregation; if the link aggregation information of the first device port meets the preset aggregation information, the link aggregation information of the second device port is obtained based on the LLDP protocol, the second device port is connected to the first device port and the second device port and the first device port belong to different devices, and the aggregation group to which the second device port belongs can communicate with the aggregation group to which the first device port belongs, thereby realizing the acquisition of the link aggregation information of the second device port through the LLDP protocol; if the link aggregation information of the second device port meets the preset aggregation information, the first device port and the second device port are controlled to perform link aggregation, and the link aggregation is realized by controlling the first device port to perform port aggregation and controlling the second device port to perform port aggregation, thereby realizing controlling the first device port and the second device port to perform port aggregation, thereby controlling the execution of link aggregation, improving the accuracy of link aggregation, and avoiding service interruption and network paralysis caused by aggregation configuration errors.

[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of 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 creative work.

[0022] Figure 1 A flowchart of a link automatic aggregation method provided by an embodiment of the present invention;

[0023] Figure 2 A schematic diagram of a device port provided by an embodiment of the present invention;

[0024] Figure 3 A schematic diagram of the structure of a link automatic aggregation device provided by an embodiment of the present invention;

[0025] Figure 4 A schematic structural diagram of an electronic device for implementing an automatic link aggregation method provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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 should fall within the scope of protection of the present invention.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] Figure 1 The present invention provides a flowchart of a link automatic aggregation method. The present invention is applicable to the case where link ports connecting different devices are automatically aggregated. The method can be performed by a link automatic aggregation device, which can be implemented in the form of hardware and / or software and can be configured in an electronic device that implements the link automatic aggregation method. Figure 1 As shown, the method includes:

[0029] S101. Obtain link aggregation information of a first device port based on the LLDP protocol. The first device port is an actual physical interface used to connect devices for communication transmission. The link aggregation information includes: port aggregation performance, port aggregation status, and device classification of the device to which the port belongs. The port aggregation performance is whether the device port supports being configured to perform port aggregation. The port aggregation status is used to indicate whether the device port has been configured in the aggregation group to which it belongs. The device is classified as a master device or a slave device. The aggregation group is a logical port established by multiple device ports belonging to the same device. Port aggregation is to control the device port to be configured in the aggregation group to which the device port belongs.

[0030] In the embodiment of the present invention, the Link Layer Discovery Protocol (LLDP) may refer to a network protocol used for mutual identification between devices and automatic discovery of network topology. Figure 2 ,The actual physical interface may refer to the actual physical port on a device in an Ethernet network, which is used for connection or ,communication transmission between different devices, for example Figure 2 The ports A1, A2, A3, B1, B2, and B3 in Figure 1. An aggregation group can refer to a logical port established for multiple physical ports on the same device, such as Figure 2 Aggregation group A includes ports A1, A2 and A3, and aggregation group B includes ports B1, B2 and B3. Port aggregation may refer to bundling multiple physical ports into an aggregation group. Port aggregation performance may refer to whether a device port has the performance to support port aggregation. Port aggregation status may refer to whether a device port is in a state where port aggregation has been performed and is configured in the aggregation group to which it belongs.

[0031] Specifically, the port aggregation performance, port aggregation state and device classification of the device to which the port belongs of the first device port can be obtained through the LLDP protocol, thereby forming the link aggregation information of the first device port. Exemplarily, the LLDP protocol supports the TLV data encoding format, so the link aggregation information of the device port can be represented in the TLV format. For example, the link aggregation information can be represented by 3 bits in the TLV format, that is, bit 0: aggCap, indicating the port aggregation performance, when the device port supports being configured to perform port aggregation, aggCap=1, otherwise aggCap=0; bit 1: aggStat, indicating the port aggregation state, when the device port has been configured in the aggregation group to which it belongs, aggStat=1, otherwise aggStat=0; bit 2: aggAct, indicating the device classification of the device to which the port belongs, when the device classification of the device to which the device port belongs is a master device, aggAct=1, when the device classification of the device to which the device port belongs is a slave device, aggAct=0. Furthermore, the link aggregation information of the device port can be represented as (aggCap, aggStat, aggAct).

[0032] As an optional implementation of an embodiment of the present invention, link aggregation information of the first device port is obtained based on the LLDP protocol, including: if the first device port supports being configured in an aggregation group, then the port aggregation performance in the link aggregation information of the first device port indicates that the device port supports being configured to perform port aggregation; if the first device port can be controlled to communicate through the aggregation group to which the first device port belongs, then the port aggregation status in the link aggregation information of the first device port indicates that the device port has been configured in the aggregation group.

[0033] Specifically, if the first device port is set to support being configured in an aggregation group, the port aggregation performance of the first device port indicates that the first device port supports performing port aggregation, otherwise the port aggregation performance of the first device port indicates that the first device port does not support performing port aggregation. If the aggregation group to which the first device port belongs can control the first device port to perform connection or communication transmission between devices, the port aggregation state of the first device port indicates that the first device port has completed port aggregation and has been configured in the aggregation group to which the first device port belongs, otherwise the port aggregation state of the first device port indicates that the first device port is not configured in the aggregation group to which the first device port belongs.

[0034] S102. If the link aggregation information of the first device port indicates that the device to which the first device port belongs is classified as a master device, determine whether the link aggregation information of the first device port conforms to preset aggregation information, wherein the preset aggregation information indicates that the port aggregation performance in the link aggregation information indicates that the device port supports being configured for port aggregation and the port aggregation status indicates that the device port is not configured in an aggregation group.

[0035] In the embodiment of the present invention, the preset aggregation information may refer to information preset for determining whether the device port can perform port aggregation. The preset aggregation information may be port aggregation performance indicating that the device port has the performance of performing port aggregation and port aggregation status indicating that the device port is in a state where port aggregation is not performed and is configured in the aggregation group to which it belongs.

[0036] Specifically, according to the device classification of the device to which the port belongs in the link aggregation information of the first device port, it can be determined whether the device classification of the device to which the first device port belongs is a master device. Furthermore, if the device classification of the device to which the first device port belongs is a master device, it can be determined whether the link aggregation information of the first device port conforms to the preset aggregation information according to the port aggregation performance and the port aggregation state in the link aggregation information of the first device port. If the device classification of the device to which the first device port belongs is a slave device, link aggregation is not performed.

[0037] S103. If the link aggregation information of the first device port meets the preset aggregation information, the link aggregation information of the second device port is obtained based on the LLDP protocol. The second device port is connected to the first device port and the second device port and the first device port belong to different devices. The aggregation group to which the second device port belongs can communicate with the aggregation group to which the first device port belongs.

[0038] In the embodiment of the present invention, the second device port may refer to an actual physical interface on a different device from the first device port, and the second device port and the first device port may be connected to form a link, and at the same time, the aggregation group to which the second device port belongs and the aggregation group to which the first device port belongs can communicate and transmit. Figure 2 , ports A1 and B1 are connected, ports A2 and B2 are connected, ports A3 and B3 are connected, and aggregation group A and aggregation group B can communicate.

[0039] Specifically, according to the link aggregation information of the first device port, it can be determined whether the link aggregation information of the first device port meets the preset aggregation information. Furthermore, if the link aggregation information of the first device port meets the preset aggregation information, the port aggregation performance, port aggregation status and device classification of the device to which the port belongs of the second device port can be obtained based on the LLDP protocol to form the link aggregation information of the second device port. The method for obtaining the link aggregation information of the second device port is similar to the method for obtaining the link aggregation information of the first device port. If the link aggregation information of the first device port does not meet the preset aggregation information, link aggregation is not performed.

[0040] Exemplarily, when the link aggregation information of the first device port is represented as (1, 0, 1) in the TLV format of the LLDP protocol, it can be considered that the link aggregation information of the first device port complies with the preset aggregation information.

[0041] As an optional method, link aggregation information of the second device port is obtained based on the LLDP protocol, including: if the second device port supports being configured in an aggregation group, then the port aggregation performance in the link aggregation information of the second device port indicates that the second device port supports being configured to perform port aggregation; if the second device port can be controlled to communicate through the aggregation group to which the second device port belongs, then the port aggregation status in the link aggregation information of the second device port indicates that the second device port has been configured in the aggregation group.

[0042] As an optional implementation manner of an embodiment of the present invention, after obtaining the link aggregation information of the second device port based on the LLDP protocol, it also includes: if the device classification of the device to which the port belongs in the link aggregation information of the second device port is a master device, then determining the device classification of the device to which the port belongs in the link aggregation information of the first device port and the second device port according to the physical addresses of the devices to which the first device port and the second device port respectively belong.

[0043] Specifically, according to the device classification of the device to which the port belongs in the link aggregation information of the second device port, it can be determined whether the device classification of the device to which the second device port belongs is a master device. Furthermore, if the device classification of the device to which the second device port belongs is a master device, the device classification of the device to which the port belongs in the link aggregation information of the first device port and the second device port is determined according to the physical addresses of the devices to which the first device port and the second device port respectively belong. If the device classification of the device to which the second device port belongs is a slave device, the device classification of the device to which the port belongs in the link aggregation information of the first device port and the second device port is not modified.

[0044] Exemplarily, if the physical address of the device to which the second device port belongs is smaller than the physical address of the device to which the first device port belongs, the device classification of the device to which the port belongs in the link aggregation information of the second device port is a master device, and the device classification of the device to which the port belongs in the link aggregation information of the first device port is a slave device. If the physical address of the device to which the second device port belongs is not smaller than the physical address of the device to which the first device port belongs, the device classification of the device to which the port belongs in the link aggregation information of the second device port is a slave device, and the device classification of the device to which the port belongs in the link aggregation information of the first device port is a master device.

[0045] S104: If the link aggregation information of the second device port conforms to the preset aggregation information, control the first device port and the second device port to perform link aggregation, wherein the link aggregation is achieved by controlling the first device port to perform port aggregation and controlling the second device port to perform port aggregation.

[0046] Specifically, according to the link aggregation information of the second device port, it can be determined whether the link aggregation information of the second device port conforms to the preset aggregation information. Further, if the link aggregation information of the second device port conforms to the preset aggregation information, the first device port is controlled to perform port aggregation and the second device port is controlled to perform port aggregation, so as to implement link aggregation for the first device port and the second device port. If the link aggregation information of the second device port does not conform to the preset aggregation information, link aggregation is not performed.

[0047] As an optional implementation manner of an embodiment of the present invention, controlling a first device port and a second device port to perform link aggregation includes: if, during the process of performing link aggregation on the first device port and the second device port, the port aggregation performance in the link aggregation information of the first device port or the second device port indicates that the first device port or the second device port does not support being configured to perform port aggregation, then controlling the first device port and the second device port to exit link aggregation.

[0048] Specifically, during the process of link aggregation of the first device port and the second device port, if the first device port or the second device port does not support port aggregation, it means that the link aggregation information of the first device port or the second device port does not conform to the preset aggregation information. Then, the first device port and the second device port are respectively controlled to exit the port aggregation, thereby realizing exit from the link aggregation.

[0049] As an optional implementation of an embodiment of the present invention, controlling the first device port and the second device port to exit link aggregation includes: if the port aggregation performance in the link aggregation information of the second device port indicates that the second device port does not support being configured to perform port aggregation, then controlling the first device port and the second device port to exit link aggregation and waiting for the link aggregation information of the second device port to meet the preset aggregation information before executing link aggregation again.

[0050] Specifically, during the process of link aggregation between the first device port and the second device port, if the second device port does not support port aggregation, the link aggregation information of the second device port does not conform to the preset aggregation information. Then, the first device port and the second device port are controlled to exit link aggregation, and after waiting for the link aggregation information of the second device port to conform to the preset aggregation information, the first device port and the second device port are controlled to perform link aggregation again, so as to avoid determining again whether the link aggregation information of the first device port conforms to the preset aggregation information.

[0051] As an optional implementation of an embodiment of the present invention, controlling the first device port and the second device port to perform link aggregation includes: determining the order in which the first device port and the second device port perform port aggregation according to the device classification of the devices to which the ports belong in the link aggregation information of the first device port and the second device port.

[0052] Specifically, when controlling the first device port and the second device port to perform link aggregation, the order in which the first device port and the second device port perform port aggregation can be determined by the device classification of the devices to which the first device port and the second device port respectively belong. Exemplarily, the device port of the device to which the port belongs, which is classified as a master device, performs port aggregation before the device port of the device to which the port belongs, which is classified as a slave device. Correspondingly, when controlling the first device port and the second device port to exit link aggregation, if the device port of the device to which the port belongs, which is classified as a slave device, does not support the execution of port aggregation, then the device port of the device to which the port belongs, which is classified as a master device, exits port aggregation, and waits for the link aggregation information of the device port of the device to which the port belongs, which is classified as a slave device, to meet the preset aggregation information and performs port aggregation again.

[0053] As an optional implementation of the embodiment of the present invention, the automatic link aggregation method of the embodiment of the present invention further includes: after the first device port and the second device port complete link aggregation, updating link aggregation information of the first device port and the second device port.

[0054] Specifically, when the first device port and the second device port complete link aggregation, the port aggregation status in the link aggregation information of the first device port and the second device port are updated to indicate that the device port has been configured in the corresponding aggregation group. Exemplarily, when the first device port and the second device port complete link aggregation, when the link aggregation information is represented in TLV format, aggStat is updated to 1.

[0055] The technical solution of the embodiment of the present invention obtains the link aggregation information of the first device port based on the LLDP protocol. The first device port is an actual physical interface used to connect devices for communication transmission. The link aggregation information includes: port aggregation performance, port aggregation status and device classification of the device to which the port belongs. The port aggregation performance is whether the device port supports being configured to perform port aggregation. The port aggregation status is used to indicate whether the device port has been configured in the aggregation group to which it belongs. The device is classified as a master device or a slave device. The aggregation group is a logical port established by multiple device ports belonging to the same device. Port aggregation is to control the device port to be configured in the aggregation group to which the device port belongs. The link aggregation information of the first device port is obtained through the LLDP protocol, which reduces the cost of device operation and maintenance and avoids the occupation of system resources. If the link aggregation information of the first device port indicates that the device classification of the device to which the first device port belongs is a master device, it is determined whether the link aggregation information of the first device port meets the preset aggregation information. The preset aggregation information indicates that the port aggregation performance in the link aggregation information indicates that the device port supports being configured to perform port aggregation. The aggregation and port aggregation status indicates that the device port is not configured in the aggregation group, and it is realized that whether the first device port supports port aggregation is judged through the link aggregation information of the first device port, thereby improving the efficiency of link aggregation; if the link aggregation information of the first device port meets the preset aggregation information, the link aggregation information of the second device port is obtained based on the LLDP protocol, the second device port is connected to the first device port and the second device port and the first device port belong to different devices, and the aggregation group to which the second device port belongs can communicate with the aggregation group to which the first device port belongs, thereby realizing the acquisition of the link aggregation information of the second device port through the LLDP protocol; if the link aggregation information of the second device port meets the preset aggregation information, the first device port and the second device port are controlled to perform link aggregation, and the link aggregation is realized by controlling the first device port to perform port aggregation and controlling the second device port to perform port aggregation, thereby realizing controlling the first device port and the second device port to perform port aggregation, thereby controlling the execution of link aggregation, improving the accuracy of link aggregation, and avoiding service interruption and network paralysis caused by aggregation configuration errors.

[0056] Figure 3 The present invention is a schematic diagram of a structure of an automatic link aggregation device provided by an embodiment of the present invention. The present invention is applicable to the case where link ports connecting different devices automatically perform aggregation. The device can be implemented in the form of hardware and / or software and can be configured in an electronic device that implements the automatic link aggregation method. Figure 3 As shown, the device comprises:

[0057] The first acquisition module 201 is used to acquire link aggregation information of a first device port based on the LLDP protocol. The first device port is an actual physical interface used to connect devices for communication transmission. The link aggregation information includes: port aggregation performance, port aggregation status, and device classification of the device to which the port belongs. The port aggregation performance is whether the device port supports being configured to perform port aggregation. The port aggregation status is used to indicate whether the device port has been configured in the aggregation group to which it belongs. The device is classified as a master device or a slave device. The aggregation group is a logical port established by multiple device ports belonging to the same device. Port aggregation is to control the device port to be configured in the aggregation group to which the device port belongs.

[0058] The aggregation information determination module 202 is used to determine whether the link aggregation information of the first device port meets the preset aggregation information if the link aggregation information of the first device port indicates that the device to which the first device port belongs is classified as a master device, wherein the preset aggregation information indicates that the port aggregation performance in the link aggregation information indicates that the device port supports being configured for port aggregation and the port aggregation state indicates that the device port is not configured in an aggregation group;

[0059] The second acquisition module 203 is used to acquire the link aggregation information of the second device port based on the LLDP protocol if the link aggregation information of the first device port meets the preset aggregation information, the second device port is connected to the first device port and the second device port and the first device port belong to different devices, and the aggregation group to which the second device port belongs can communicate with the aggregation group to which the first device port belongs;

[0060] The link aggregation module 204 is used to control the first device port and the second device port to perform link aggregation if the link aggregation information of the second device port meets the preset aggregation information. The link aggregation is achieved by controlling the first device port to perform port aggregation and controlling the second device port to perform port aggregation.

[0061] Based on any of the above optional technical solutions, optionally, the first acquisition module 201 includes: a port aggregation performance acquisition unit and a port aggregation state acquisition unit. The port aggregation performance acquisition unit is used to, if the first device port supports being configured in an aggregation group, then the port aggregation performance in the link aggregation information of the first device port indicates that the device port supports being configured to perform port aggregation; the port aggregation state acquisition unit is used to, if the aggregation group to which the first device port belongs can control the first device port to communicate, then the port aggregation state in the link aggregation information of the first device port indicates that the device port has been configured in the aggregation group.

[0062] Based on any of the above optional technical solutions, the link aggregation module 204 includes: a link aggregation exit module. The link aggregation exit module is used to control the first device port and the second device port to exit the link aggregation if, during the process of link aggregation being performed on the first device port and the second device port, the port aggregation performance in the link aggregation information of the first device port or the second device port indicates that the first device port or the second device port does not support being configured to perform port aggregation.

[0063] Based on any of the above optional technical solutions, the link aggregation exit module is also used to control the first device port and the second device port to exit link aggregation and wait for the link aggregation information of the second device port to meet the preset aggregation information before executing link aggregation again if the port aggregation performance in the link aggregation information of the second device port indicates that the second device port does not support being configured to perform port aggregation.

[0064] Based on any of the above optional technical solutions, the automatic link aggregation device of the embodiment of the present invention further includes: a link aggregation information updating module. The link aggregation information updating module is used to update the link aggregation information of the first device port and the second device port after the first device port and the second device port complete link aggregation.

[0065] On the basis of any of the above optional technical solutions, the link automatic aggregation device of the embodiment of the present invention further includes: a device classification determination module. The device classification determination module is used to determine the device classification of the device to which the port belongs in the link aggregation information of the first device port and the second device port according to the physical addresses of the devices to which the first device port and the second device port belong respectively, after obtaining the link aggregation information of the second device port based on the LLDP protocol, if the device classification of the device to which the port belongs in the link aggregation information of the second device port is a master device.

[0066] The technical solution of the embodiment of the present invention is to obtain the link aggregation information of the first device port based on the LLDP protocol through the first acquisition module 201. The first device port is an actual physical interface for connecting devices for communication transmission. The link aggregation information includes: port aggregation performance, port aggregation status and device classification of the device to which the port belongs. The port aggregation performance is whether the device port supports being configured to perform port aggregation. The port aggregation status is used to indicate whether the device port has been configured in the aggregation group to which it belongs. The device is classified as a master device or a slave device. The aggregation group is a logical port established by multiple device ports belonging to the same device. Port aggregation is to control the device port to be configured in the aggregation group to which the device port belongs. The link aggregation information of the first device port is obtained through the LLDP protocol, which reduces the cost of device operation and maintenance and avoids the occupation of system resources. The aggregation information judgment module 202 judges whether the link aggregation information of the first device port meets the preset aggregation information when the link aggregation information of the first device port indicates that the device classification of the device to which the first device port belongs is the master device. The preset aggregation information indicates that the port aggregation performance in the link aggregation information indicates that the device port supports being configured to perform port aggregation. The aggregation and port aggregation state indicates that the device port is not configured in the aggregation group, and it is realized that whether the first device port supports the execution of port aggregation is judged by the link aggregation information of the first device port, thereby improving the efficiency of link aggregation; when the link aggregation information of the first device port meets the preset aggregation information, the link aggregation information of the second device port is obtained based on the LLDP protocol through the second acquisition module 203, the second device port is connected to the first device port and the second device port and the first device port belong to different devices, and the aggregation group to which the second device port belongs can communicate with the aggregation group to which the first device port belongs, thereby realizing the acquisition of the link aggregation information of the second device port through the LLDP protocol; when the link aggregation information of the second device port meets the preset aggregation information, the link aggregation module 204 controls the first device port and the second device port to perform link aggregation, and the link aggregation is realized by controlling the first device port to perform port aggregation and controlling the second device port to perform port aggregation, thereby realizing controlling the first device port and the second device port to perform port aggregation, thereby controlling the execution of link aggregation, improving the accuracy of link aggregation, and avoiding service interruption and network paralysis caused by aggregation configuration errors.

[0067] The automatic link aggregation device provided in the embodiment of the present invention can execute the automatic link aggregation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0068] Figure 4A schematic diagram of the structure of an electronic device for implementing a link automatic aggregation method provided by an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0069] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0070] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0071] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a link automatic aggregation method.

[0072] In some embodiments, the link automatic aggregation method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the link automatic aggregation method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the link automatic aggregation method in any other appropriate manner (e.g., by means of firmware).

[0073] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0074] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0075] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0076] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0077] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0078] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0079] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0080] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A link automatic aggregation method, characterized in that: The method comprises: Acquire link aggregation information of a first device port based on the LLDP protocol, where the first device port is an actual physical interface for connecting devices for communication transmission, and the link aggregation information includes: port aggregation performance, port aggregation status, and device classification of the device to which the port belongs, where the port aggregation performance is whether the device port supports being configured to perform port aggregation, the port aggregation status is used to indicate whether the device port has been configured in the aggregation group to which it belongs, the device classification is a master device or a slave device, the aggregation group is a logical port established by multiple device ports belonging to the same device, and the port aggregation is to control the device port to be configured in the aggregation group to which the device port belongs; If the link aggregation information of the first device port indicates that the device to which the first device port belongs is classified as a master device, determining whether the link aggregation information of the first device port conforms to preset aggregation information, wherein the preset aggregation information indicates that the port aggregation performance in the link aggregation information indicates that the device port supports being configured for port aggregation and the port aggregation state indicates that the device port is not configured in an aggregation group; If the link aggregation information of the first device port conforms to the preset aggregation information, obtaining the link aggregation information of the second device port based on the LLDP protocol, the second device port is connected to the first device port and the second device port and the first device port belong to different devices, and the aggregation group to which the second device port belongs can communicate with the aggregation group to which the first device port belongs; If the link aggregation information of the second device port conforms to the preset aggregation information, the first device port and the second device port are controlled to perform link aggregation, and the link aggregation is achieved by controlling the first device port to perform port aggregation and controlling the second device port to perform port aggregation.

2. The method according to claim 1, characterized in that: The link aggregation information of the first device port is obtained based on the LLDP protocol, including: If the first device port supports being configured in an aggregation group, the port aggregation capability in the link aggregation information of the first device port indicates that the device port supports being configured to perform port aggregation; If the first device port can be controlled to communicate through the aggregation group to which the first device port belongs, the port aggregation state in the link aggregation information of the first device port indicates that the device port has been configured in the aggregation group.

3. The method according to claim 2, characterized in that Controlling the first device port and the second device port to perform link aggregation includes: If, during the process of link aggregation being performed by the first device port and the second device port, the port aggregation performance in the link aggregation information of the first device port or the second device port indicates that the first device port or the second device port does not support being configured to perform port aggregation, the first device port and the second device port are controlled to exit link aggregation.

4. The method according to claim 3, characterized in that Controlling the first device port and the second device port to exit link aggregation includes: If the port aggregation performance in the link aggregation information of the second device port indicates that the second device port does not support being configured to perform port aggregation, the first device port and the second device port are controlled to exit link aggregation and wait until the link aggregation information of the second device port meets the preset aggregation information before performing link aggregation again.

5. The method according to claim 1, characterized in that The method further comprises: After the first device port and the second device port complete link aggregation, link aggregation information of the first device port and the second device port is updated.

6. The method according to claim 1, characterized in that After acquiring the link aggregation information of the second device port based on the LLDP protocol, the method further includes: If the device classification of the device to which the port belongs in the link aggregation information of the second device port is a master device, the device classification of the device to which the port belongs in the link aggregation information of the first device port and the second device port is determined according to the physical addresses of the devices to which the first device port and the second device port respectively belong.

7. A link automatic aggregation device, characterized in that: The device comprises: A first acquisition module is used to acquire link aggregation information of a first device port based on the LLDP protocol, wherein the first device port is an actual physical interface used to connect devices for communication transmission, and the link aggregation information includes: port aggregation performance, port aggregation status, and device classification of the device to which the port belongs, wherein the port aggregation performance is whether the device port supports being configured to perform port aggregation, and the port aggregation status is used to indicate whether the device port has been configured in the aggregation group to which it belongs, and the device classification is a master device or a slave device, and the aggregation group is a logical port established by multiple device ports belonging to the same device, and the port aggregation is to control the device port to be configured in the aggregation group to which the device port belongs; an aggregation information judgment module, configured to judge whether the link aggregation information of the first device port conforms to preset aggregation information if the link aggregation information of the first device port indicates that the device to which the first device port belongs is classified as a master device, wherein the preset aggregation information indicates that the port aggregation performance in the link aggregation information indicates that the device port supports being configured for port aggregation and the port aggregation state indicates that the device port is not configured in an aggregation group; A second acquisition module, configured to acquire the link aggregation information of a second device port based on the LLDP protocol if the link aggregation information of the first device port conforms to the preset aggregation information, the second device port is connected to the first device port and the second device port and the first device port belong to different devices, and the aggregation group to which the second device port belongs can communicate with the aggregation group to which the first device port belongs; A link aggregation module is used to control the first device port and the second device port to perform link aggregation if the link aggregation information of the second device port conforms to preset aggregation information, wherein the link aggregation is achieved by controlling the first device port to perform port aggregation and controlling the second device port to perform port aggregation.

8. The device according to claim 7, characterized in that The first acquisition module includes: a port aggregation performance acquisition unit, configured to, if the first device port supports being configured in an aggregation group, indicate that the port aggregation performance in the link aggregation information of the first device port indicates that the device port supports being configured to perform port aggregation; The port aggregation state acquiring unit is configured to, if the first device port can be controlled to communicate through the aggregation group to which the first device port belongs, then the port aggregation state in the link aggregation information of the first device port indicates that the device port has been configured in the aggregation group.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the automatic link aggregation method according to any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the link automatic aggregation method according to any one of claims 1 to 6 when executed.

Citation Information

Patent Citations

  • Traffic transmission control method and device

    CN104363181A

  • Data processing method, device, communication system, and network device

    CN109495383A

  • Switch, device and method for constructing aggregated link

    US20160380801A1