An asymmetric link aggregation device, an aggregation management method, and a link aggregation method
Through asymmetric link aggregation devices and methods, link status is dynamically adjusted and dynamic joining and exiting of nodes is solved, and the problem of inflexible use of LACP protocol in the distributed system in the prior art is solved, the system is simplified and flexible deployment is realized, and system compatibility and scalability is improved.
Patent Information
- Application Number
- CN202211496696.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-25
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-11-25
AI Technical Summary
In the prior art, the standard LACP link aggregation protocol is not flexible enough in distributed systems, resulting in high complexity and difficulty in realizing asymmetric link aggregation management across multiple nodes, affecting code development and system compatibility.
Asymmetric link aggregation devices and methods are adopted to periodically send detection status LACPDUs through the switching mechanism, dynamically adjust the activity and inactive status of the link, support dynamic joining and exiting of nodes, simplify system design, and negotiate with nodes through standard LACP protocol to achieve flexible deployment across multiple nodes.
It realizes the simplification and flexible deployment of the system, improves system compatibility and scalability, supports load sharing and business diversion, and solves the problems of high complexity and inflexible use of existing methods.
Smart Images

Figure CN115865819B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data security technologies, and in particular, to an asymmetric link aggregation device, an aggregation management method, and a link aggregation method. Background Art
[0002] With the booming development of businesses such as mobile office, online shopping, and Internet finance, more and more services are carried on the network, and the demand for distributed systems is proposed to solve the single-machine performance bottleneck problem.
[0003] In a distributed system, when a switch connects multiple nodes, in order to avoid loops and achieve traffic load balancing, the concept of link aggregation is introduced. Since the standard LACP (Link Aggregation Control Protocol) is limited by the requirement that the aggregation ports need to come from the same device, it is not flexible enough to use and the implementation is relatively complex. Incorporating it into the current node application program will bring burdens to code research and development, compatibility, and maintenance. Summary of the Invention
[0004] The purpose of the embodiments of this application is to provide an asymmetric link aggregation device, an aggregation management method, and a link aggregation method, which realize cross-multiple-node asymmetric link aggregation management, simplify the system, can dynamically adjust the active and inactive states of the link, realize flexible deployment, and solve the problems of high complexity and inflexible use of existing methods.
[0005] The embodiments of this application provide an asymmetric link aggregation device, and the device includes:
[0006] A switching mechanism, which is set as the active end, is connected to the node through a port in a link aggregation manner, and periodically sends a detection status LACPDU to the node;
[0007] Multiple nodes, which are set as the passive end, and the number of the nodes is set to the maximum number of nodes that can be accommodated. The nodes reply to the LACPDU to the switching mechanism and start a negotiation process. The nodes are set as active ports and have the function of receiving and sending service messages.
[0008] In the above implementation process, the device realizes cross-multiple-node asymmetric link aggregation management, uses asymmetric LACP, improves system compatibility, facilitates code maintenance, simplifies the system, can dynamically adjust the active and inactive states of the link, supports dynamic addition and withdrawal of nodes, improves the scalability of the distributed system, realizes flexible deployment, and solves the problems of high complexity and inflexible use of existing methods.
[0009] The embodiment of the present application further provides an asymmetric link aggregation management method, which is applied to a switching mechanism. The method includes:
[0010] Periodically send detection status LACPDUs to each port;
[0011] After receiving the detection status LACPDU sent by the node, send a synchronization status LACPDU, and determine that the local end is the active end based on the synchronization status LACPDU;
[0012] Determine the active ports based on the preset maximum number of nodes;
[0013] Send service processing status LACPDUs to the node through the active ports to complete negotiation and enter the normal working state;
[0014] After entering the normal working state, periodically send the current status LACPDUs to the active ports.
[0015] In the above implementation process, the nodes with the maximum number of nodes are determined as active ports, maximizing the load sharing of traffic and service diversion.
[0016] Further, the method further includes:
[0017] If the LACPDU packet sent by the node is not received within the timeout period, continuously send three detection status LACPDUs;
[0018] If the node still does not respond, configure the local end to periodically send detection status LACPDUs, and set the active port corresponding to the node to an inactive port.
[0019] In the above implementation process, the active and inactive states of the link are dynamically adjusted, supporting the dynamic addition and withdrawal of nodes, and realizing flexible deployment.
[0020] Further, the method further includes:
[0021] When a new node joins, detect whether to process the connection status with the new node;
[0022] If in the connected state, send a detection status LACPDU to the new node to enter the negotiation process.
[0023] In the above implementation process, when a new node joins, the new node is adjusted to the active state through negotiation, enabling it to have the function of receiving and sending service data, and realizing service diversion.
[0024] Further, the method further includes:
[0025] If a link failure of the node is detected, set the active port corresponding to the node to an inactive port.
[0026] In the above implementation process, the port corresponding to the exit node is set as an inactive port to block the port, and no service traffic is distributed to this node, so as to realize the dynamic adjustment of the active and inactive states of the link.
[0027] The embodiment of the present application further provides a link aggregation method, which is applied to a node. The method includes:
[0028] Receiving a detection status LACPDU sent by a switching fabric;
[0029] Parsing the detection status LACPDU to obtain the current state of the switching fabric and the port operation KEY value;
[0030] Encapsulating the port operation KEY value and the system ID agreed upon by each node into the local detection status LACPDU and sending it to the switching fabric;
[0031] Receiving a synchronization status LACPDU sent by the switching fabric, updating the status and then replying with the synchronization status LACPDU;
[0032] Receiving a service processing status LACPDU sent by the switching fabric to enable the service packet sending and receiving function of the corresponding port.
[0033] In the above implementation process, the node side only sends packets and does not perform peer status detection, which simplifies the design of the node side.
[0034] Further, the method further includes:
[0035] If the node does not receive the LACPDU packet from the switching fabric after a timeout, stop sending the LACPDU packet to the switching fabric until the LACPDU packet sent by the switching fabric is received again, and update the status of the local port corresponding to the node according to the port status of the switching fabric.
[0036] In the above implementation process, the node side judges whether it times out without receiving the LACPDU packet and does not perform peer status detection work, which simplifies the design of the node side.
[0037] Further, the method further includes:
[0038] If the node is unable to perform service processing, close the service packet sending and receiving function of the port corresponding to the node and exit the current aggregation group.
[0039] In the above implementation process, the node can actively exit due to its own problems, preventing the switching fabric from distributing service traffic to this node again.
[0040] Further, closing the service message sending and receiving function of the corresponding port of the node and exiting the current aggregation group includes:
[0041] Stop sending LACPDU messages to the switching mechanism. After two timeouts, the switching mechanism sets the active port corresponding to the node to an inactive port.
[0042] Alternatively, rewrite the aggregation group ID in the local detection status LACPDU sent to the switching mechanism. The aggregation group ID includes a port operation KEY value and a system ID agreed upon by each node.
[0043] In the above implementation process, two active exit methods are given, enabling the switching mechanism to block the connection link of the node through timeout detection or changes in the aggregation group ID.
[0044] The embodiment of the present application also provides an electronic device. The electronic device includes a memory and a processor. The memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the asymmetric link aggregation management method described in any one of the above.
[0045] The embodiment of the present application also provides a readable storage medium. Computer program instructions are stored in the readable storage medium. When the computer program instructions are read and run by a processor, the asymmetric link aggregation management method described in any one of the above is executed. Description of the Drawings
[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0047] Figure 1 It is a schematic structural diagram of an asymmetric link aggregation device provided by an embodiment of the present application;
[0048] Figure 2 It is a flowchart of the asymmetric link aggregation management method provided by an embodiment of the present application;
[0049] Figure 3 It is a flowchart of exception handling on the switching mechanism side provided by an embodiment of the present application;
[0050] Figure 4 It is a flowchart of new node processing provided by an embodiment of the present application;
[0051] Figure 5 It is a flowchart of the link aggregation method provided by an embodiment of the present application;
[0052] Figure 6 This is a schematic diagram of the LACP packet receiving and sending state machine implemented on the node side provided by the embodiments of this application. Detailed implementation manners
[0053] Next, the technical solutions in the embodiments of this application will be described with reference to the accompanying drawings in the embodiments of this application.
[0054] It should be noted that: similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.
[0055] Embodiment 1
[0056] Please refer to Figure 1 , Figure 1 This is a schematic diagram of the structure of an asymmetric link aggregation device provided by the embodiments of this application. The device includes:
[0057] A switching fabric, which is set as the active end, is connected to the node through a port in a link aggregation manner, and periodically sends detection status LACPDUs to the node;
[0058] Multiple nodes, which are set as the passive end, and the number of the nodes is set to the maximum number of nodes that can be accommodated. The nodes reply LACPDUs to the switching fabric and start the negotiation process. The nodes are set as active ports and have the function of receiving and sending service packets.
[0059] Among them, the port where the switching fabric is connected to the node is called the internal port of the switching fabric. Multiple internal ports of the switching fabric perform link aggregation to form a link aggregation group and operate in trunk mode.
[0060] The port where each node is connected to the switching fabric is called the internal port of the node. All internal ports of the nodes need to be configured with the same rate and duplex attribute.
[0061] Ports that can be dynamically aggregated together need to meet the following requirements: the same rate and duplex attribute, the same basic configuration, connected to the same device, and having the same port operation KEY value, which is generated by the system according to the configuration of the port.
[0062] The link aggregation group is pre-set as follows:
[0063] Intervene in the determination of the active end and the passive end by setting the system ID (system priority + system MAC address): the side with a smaller system priority value has a higher priority and is selected as the active end, and the side with a lower priority is the passive end. LACP determines the active interfaces at both ends based on the active interfaces on the active end. In this application, the priority of the switching fabric side is set higher than that of the node side.
[0064] Determine the upper limit of the number of nodes running in parallel by setting the upper limit threshold of the number of active ports. In order to enable all nodes that join the system and have business processing capabilities to participate in business processing in a load-sharing manner, in the present invention, the upper limit threshold of the active ports is set to the maximum number of nodes that the system can accommodate.
[0065] Set the port status on the switching fabric side to the active mode and the node side to the passive mode. This setting represents the way the aggregation group where the link is located participates in the LACP negotiation: in the active mode, LACPDU packets will be actively sent to the other party, and in the passive mode, negotiation packets will not be actively sent unless negotiation packets are received and then it will participate in the negotiation.
[0066] In addition, since existing switches or switching chips basically support the standard LACP protocol, in order to reduce the R & D cost, the standard LACP protocol still runs on the switching fabric of this application without modification.
[0067] In a distributed system, the switching fabric runs the standard LACP protocol to dynamically adjust the active and inactive states of the links. In order to more flexibly support the hot plugging of each node, the switching fabric uses the standard dynamic LACP protocol.
[0068] After the switching fabric is started, it will periodically send detection status LACPDUs (Link Aggregation Control Protocol Data Units). When the node configuration and status do not reach the level where it can participate in the processing of service packets, it does not reply to the detection status LACPDUs, and the ports on the switching fabric that have not been successfully negotiated do not enable the function of receiving and sending service packets, that is, at this time, the switching fabric will not distribute service packets to this node. When the node has the business processing ability, it starts to reply to the LACPDUs to the switch and starts the negotiation process. After successful negotiation, the switching fabric selects this port as the active port and enables the function of receiving and sending service packets on the port. At this time, the switching fabric will distribute service packets to this node, and the node will perform subsequent business processing.
[0069] The LACP (Link Aggregation Control Protocol) is a protocol that realizes dynamic aggregation and de-aggregation of links. The LACP protocol exchanges information with the peer through LACPDUs. The LACPDU packets are slow protocols, and the number of protocol packets sent per second on average does not exceed 5.
[0070] During the LACP negotiation process, the switching fabric and the nodes will exchange LACPDUs in three states:
[0071] Detection status packet: Send local information (detection status LACPDU) to the peer.
[0072] Synchronization status packet: After receiving the peer information, inform the peer of the local current state, that is, send a synchronization status LACPDU to the peer.
[0073] Service processing status packet: Send an LACPDU packet with the function of normally enabling the sending and receiving of service packets, that is, send a service processing status LACPDU.
[0074] Embodiment 2
[0075] An embodiment of the present application provides an asymmetric link aggregation management method, which is applied to the switching fabric described in Embodiment 1. As Figure 2 shown, it is a flowchart of the asymmetric link aggregation management method. The method specifically includes the following steps:
[0076] Step S100: Periodically send detection status LACPDUs to each port;
[0077] After the switching fabric is started, it periodically sends detection status LACPDUs to each port, and the ports that meet the conditions will be added to the aggregation group.
[0078] Step S200: After receiving the detection status LACPDU sent by the node, send a synchronization status LACPDU, and determine that the local end is the active end based on the synchronization status LACPDU;
[0079] After receiving the detection status LACPDU from the peer, perform message synchronization and send a synchronization status LACPDU; after receiving the peer synchronization status packet, elect the local end (because the set system priority is high) as the active end.
[0080] Step S300: Determine the active ports based on a preset maximum number of nodes;
[0081] Select the active ports according to the upper limit threshold of the number of active ports. Since the designed upper limit threshold is the maximum node value, all ports directly connected to the nodes and meeting the conditions will be selected as active ports, so as to maximize the realization of service traffic diversion.
[0082] The switching fabric selects the ports with higher priority as the active ports by comparing the ports in the aggregation group, so that the active ports have the function of sending and receiving service packets, and participate in the sending and receiving of service packets in a load-sharing manner.
[0083] Step S400: Send a service processing status LACPDU to the node through the active port to complete the negotiation and enter the normal working state;
[0084] All active ports enable the function of receiving and sending service packets, and send a service processing status LACPDU to the peer. After receiving the service processing status LACPDU from the peer, the negotiation process is completed, and it enters the normal working state, and periodically sends the current status LACPDU.
[0085] Step S500: After entering the normal working state, periodically send the current status LACPDU to the active port.
[0086] The switching mechanism also needs to detect whether the peer information is correct and whether the peer has a situation of not sending for a timeout, and perform corresponding exception handling. Specifically:
[0087] As Figure 3 shown, it is the exception handling flowchart on the switching mechanism side, and the method further includes:
[0088] Step S601: If the LACPDU packet sent by the node is not received for a timeout, continuously send three detection status LACPDUs;
[0089] Step S602: If the node still does not respond, configure the local end to periodically send the detection status LACPDU, and set the active port corresponding to the node to an inactive port.
[0090] When the switching mechanism does not receive the LACPDU packet of the node for a timeout, send the LACPDU according to the processing method of the standard LACP protocol. That is, continuously send three detection status LACPDUs. If the peer still does not respond after three times, the local end is configured to periodically send the default packet, and at the same time, the switching mechanism sets this port to an inactive port and blocks the port, and does not distribute the traffic to this node.
[0091] This method can also be applied to the hot plugging of the board of the rack-mounted firewall product. Specifically, on the switching mechanism side, when a new node joins, it specifically includes the following steps:
[0092] As Figure 4 shown, it is the processing flowchart of the newly added node, and the method further includes:
[0093] Step S611: When a new node joins, detect whether it is in a connected state with the new node;
[0094] Step S612: If it is in a connected state, send a detection status LACPDU to the new node to enter the negotiation process.
[0095] When a new node joins the distributed system, after the switch dynamically detects that an internal port is directly connected to the internal port of the newly joined node, it sends a detection status LACPDU to the new node to start the negotiation process. When the new node is ready, it starts to reply to the switch. After the switch negotiates and selects this link as the active link, the new node has the function of receiving and sending service data, and starts to split the service traffic for this node.
[0096] Node exit:
[0097] The method further includes:
[0098] If a link failure of the node is detected, the active port corresponding to the node is set to an inactive port.
[0099] When a certain node exits due to a hardware failure, the LACP on the switch side detects the link failure, and will set the port directly connected to this node to an inactive port, block the port, and no longer distribute service traffic to this node. At the same time, load sharing is performed among the remaining active ports.
[0100] This method realizes the management of cross-multinode asymmetric link aggregation, simplifies the system, can dynamically adjust the active and inactive states of the link, realizes flexible deployment, and solves the problems of high complexity and inflexible use of the existing methods.
[0101] The embodiment of the present application further provides a link aggregation method, which is applied to the node described in Embodiment 1, as Figure 5 shown in the flowchart of the link aggregation method. The method specifically includes the following steps:
[0102] Step S701: Receive the detection status LACPDU sent by the switch;
[0103] Step S702: Analyze the detection status LACPDU to obtain the current state of the switch and the port operation KEY value;
[0104] Step S703: Package the port operation KEY value and the system ID agreed upon by each node into the local detection status LACPDU and send it to the switch;
[0105] When a node that has been configured and has the service processing ability receives the LACPDU of the switch, when packaging the local LACPDU, fill in the port operation KEY value decoded from the LACPDU of the switch, and each node fixedly writes the agreed system ID, so that the LACP protocol on the switch side thinks that the received LACPDU is from the same device.
[0106] The LACPDUs of each node negotiate with the standard LACP of the switch by filling in a unified and fixed system ID and pretending to be from one device.
[0107] The operation key value, current status, and peer information of the LACPDU on the node side are filled in to be consistent with the corresponding information of the LACPDU of the received switching fabric, and other values are written as fixed values according to the protocol specifications.
[0108] Step S704: Receive the synchronization status LACPDU sent by the switching fabric, update the status, and then reply with the synchronization status LACPDU.
[0109] Step S705: Receive the service processing status LACPDU sent by the switching fabric to enable the service message sending and receiving functions of the corresponding ports.
[0110] As the passive end on the node side, in the standard LACP protocol, it is necessary to compare the port priorities of the active ends received and recorded by each port and select the corresponding active ports. Since the ports on the node side in this application are scattered on each node and it is not convenient to compare, a simplified process is made here: for each node on the passive end, no active end-passive end election is performed, no peer port priority comparison is made, and no LACPDU message indicating that this port is in the service processing status is actively encapsulated.
[0111] The node side first keeps periodically sending the synchronization status LACPDU until it receives the service processing status LACPDU sent by the peer, then this port has the service message sending and receiving functions, and the LACPDU status is updated to the service processing status LACPDU and sent to the peer.
[0112] At this point, the negotiation between the node side and the switching fabric is completed, and the link enters the normal working state. The switching fabric and each port in the node aggregation group periodically send the LACPDU of the current status.
[0113] To simplify the design of the node side, only the standard LACP on the switching fabric side detects whether the status of the node side has changed. The node side only sends messages and judges whether it times out without receiving the LACPDU, and does not perform the peer status detection work. Specifically:
[0114] If the node times out without receiving the LACPDU message from the switching fabric, it stops sending the LACPDU message to the switching fabric until it receives the LACPDU message sent by the switching fabric again, and then updates the status of the corresponding port of the node according to the port status of the switching fabric.
[0115] When the node times out without receiving the LACPDU message from the switching fabric, the node stops sending the LACPDU message until it receives the LACPDU from the switching fabric again, and then updates the status of this port according to the port status of the switching fabric.
[0116] This method can also be applied to the hot pluggable boards of rack-mounted firewall products. Specifically, on the node side, when the software exits actively due to an exception:
[0117] If the node cannot perform business processing, the function of receiving and sending service packets on the corresponding port of the node is closed and the current aggregation group is exited.
[0118] Specifically:
[0119] Stop sending LACPDU packets to the switching device. After two timeouts, the switching device sets the active port corresponding to the node to an inactive port;
[0120] Or, rewrite the aggregation group ID in the local detection status LACPDU sent to the switching device. The aggregation group ID includes the port operation KEY value and the system ID agreed upon by each node.
[0121] When a problem occurs in the software operation of a certain node, such as the failure to load configuration commands and the inability to correctly perform business processing, this node should close the function of receiving and sending service packets on its own ports and actively exit the current aggregation group to prevent the switching device from distributing service traffic to this node again.
[0122] This node can choose the following two methods to actively exit the aggregation group:
[0123] The first method: This node stops sending LACPDU packets. After the switching device detects two timeouts, it will block the connection link. However, the timeliness of this method is relatively poor. The short timeout is 3 seconds and the long timeout is 90 seconds.
[0124] The second method: This node changes the aggregation group ID (system ID or operation KEY value) of the sent LACPDU. When the switching device receives the changed LACPDU, it will cause the port to leave the aggregation group. If the system ID changes, the switching device believes that the peer node connected has changed. If the operation KEY changes, the switching device believes that the attribute of the peer node has changed.
[0125] After the node leaves the aggregation group, the switching device stops sending LACPDU.
[0126] Software recovery and re-joining:
[0127] When the node re-joins the aggregation group, the aggregation group ID is restored and encapsulated into the detection status LACPDU and sent to the switching device for re-negotiation. After the negotiation is completed, it joins the aggregation group.
[0128] After a node actively exits and returns to normal after self - processing, it needs to re - join the aggregation group. The specific method is to restore the previous aggregation group ID, encapsulate the LACPDU and send it to the switching mechanism to start the re - negotiation process. After the negotiation is completed, it can join the aggregation group, and the switching mechanism will distribute the service traffic to this node according to the load - balancing algorithm.
[0129] This method can also be used for load sharing in the firewall stacking system:
[0130] In order to enable the switching mechanism to hash - distribute the flows in two directions (for example, two flows of SIP: 192.168.0.1, DIP: 10.0.0.1 and SIP: 10.0.0.1, DIP: 192.168.0.1) to the same node, create a session, and perform subsequent SE and other processing to avoid excessive flow redirection problems, it is only necessary to configure the LACP on the switching - mechanism side as the source IP + destination IP (SIP - XOR - DIP) load - sharing method, and no additional processing is required on the board side.
[0131] On the node side, in order to support LACP negotiation, each node will run a self - developed, simplified, and asymmetric LACP program. The specific work of this LACP program is as follows:
[0132] Packet reception: That is, receive the detection - status LACPDU from the switching mechanism;
[0133] Packet unpacking and packing: Parse the current status of the peer and the port - operation KEY value from the detection - status LACPDU, fill them into the corresponding positions of the local end of the LACPDU, fill the peer information completely into the partner part, and fill the unified and fixed system ID of each node into the corresponding position of the local end, and then encapsulate it into the detection - status LACPDU;
[0134] Packet transmission: Reply to the peer with the detection - status LACPDU; after receiving the peer's synchronization - status LACPDU, update the status and send the synchronization - status LACPDU; after receiving the peer's service - processing - status LACPDU, enable the function of receiving and sending service - message packets on this port and reply with the service - processing - status LACPDU; after entering the normal working state, periodically send the current - status packet; when no LACPDU from the peer is received within the timeout period, stop sending LACPDU. As Figure 6 shown, it is a schematic diagram of the LACP packet - receiving and - sending state machine implemented on the node side.
[0135] The simplified and asymmetric LACP on the node side only performs simple processing such as packet reception, unpacking, packing, transmission, and timeout judgment, does not perform port active - inactive management, and enables the port service - processing ability according to the service - processing - status packet of the switching mechanism.
[0136] This method is based on the principle of minimizing the modification to the current system code, realizing a simplified and asymmetric LACP, improving system compatibility and facilitating code maintenance. By applying the load sharing function of LACP, it enhances the collaborative business processing ability of the distributed system and effectively reduces related flow redirection problems. It supports the dynamic joining and exiting of nodes, improves the scalability of the distributed system, enables flexible deployment, realizes cross-node asymmetric link aggregation management, simplifies the system, can dynamically adjust the active and inactive states of the links, enables flexible deployment, and solves the problems of high complexity and inflexible use in existing methods.
[0137] An embodiment of this application also provides an electronic device, which includes a memory and a processor. The memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the asymmetric link aggregation management method described in Embodiment 2.
[0138] An embodiment of this application also provides a readable storage medium, in which computer program instructions are stored. When the computer program instructions are read and run by a processor, they execute the asymmetric link aggregation management method described in Embodiment 2.
[0139] In several embodiments provided by this application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the drawings show the possible architectures, functions, and operations of devices, methods, and computer program products according to multiple embodiments of this application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0140] In addition, in each embodiment of this application, the various functional modules can be integrated together to form an independent part, or each module can exist alone, or two or more modules can be integrated to form an independent part.
[0141] When the above-mentioned functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art or a part of this technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0142] The above are only the embodiments of this application and are not used to limit the protection scope of this application. For those skilled in the art, this application can have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of this application shall be included in the protection scope of this application. It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0143] The above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by this application and should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
[0144] It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitations, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.
Claims
1. An asymmetric link aggregation device, characterized in that, The device includes: A switching mechanism, which is set as the active end, connected to the node through a port in a link aggregation manner, periodically sends detection status LACPDUs to the node, and dynamically adjusts the active and inactive states of the link based on whether the node can participate in service message processing. Multiple nodes, which are set as the passive end, and the number of active ports corresponding to the nodes is set to accommodate the maximum number of nodes. The nodes reply LACPDUs to the switching mechanism and start the negotiation process. The nodes are set as active ports and have the function of sending and receiving service messages.
2. An asymmetric link aggregation management method, characterized in that, Applied to the switching mechanism described in claim 1, the method includes: Periodically send detection status LACPDUs to each port. After receiving the detection status LACPDU sent by the node, send a synchronization status LACPDU, and determine that the local end is the active end based on the synchronization status LACPDU. Determine the active ports based on the preset maximum number of nodes. Send service processing status LACPDUs to the node through the active ports to complete the negotiation and enter the normal working state. After entering the normal working state, periodically send the current status LACPDUs to the active ports. The method further includes: dynamically adjusting the active and inactive states of each node in the link according to the timeout response status of the node, link failure, and connection status of the new node.
3. The asymmetric link aggregation management method according to claim 2, wherein The method further includes: If the LACPDU message sent by the node is not received within the timeout period, continuously send three detection status LACPDUs. If the node still does not respond, configure the local end to periodically send detection status LACPDUs, and set the active port corresponding to the node as an inactive port.
4. The asymmetric link aggregation management method according to claim 2, wherein The method further includes: When a new node joins, detect whether it is in a connected state with the new node. If it is in a connected state, send a detection status LACPDU to the new node to enter the negotiation process.
5. The asymmetric link aggregation management method according to claim 2, wherein The method further includes: If a link failure of the node is detected, set the active port corresponding to the node as an inactive port.
6. A link aggregation method, characterized in that, Applied to the node described in claim 1, the method includes: Receive the detection status LACPDU sent by the switching mechanism. Parse the detection status LACPDU to obtain the current state of the switching mechanism and the port operation KEY value. Encapsulate the port operation KEY value and the system ID agreed upon by each node into the local detection status LACPDU and send it to the switching mechanism. Receive the synchronization status LACPDU sent by the switching mechanism, update the status, and reply the synchronization status LACPDU. Receive the service processing status LACPDU sent by the switching mechanism to enable the service message sending and receiving function of the corresponding port. The method further includes: The node joins the aggregation group by restoring the aggregation group ID, or exits the aggregation group by rewriting the aggregation group ID. The aggregation group ID includes the port operation KEY value and the system ID agreed upon by each node.
7. The link aggregation method according to claim 6, wherein The method further includes: If the node does not receive the LACPDU message from the switching mechanism within the timeout period, it stops sending LACPDU messages to the switching mechanism. When it receives the LACPDU message sent by the switching mechanism again, it updates the local port status corresponding to the node according to the port status of the switching mechanism.
8. The link aggregation method according to claim 6, wherein The method further includes: If the node is unable to perform service processing, it closes the service message sending and receiving functions of the port corresponding to the node and exits the current aggregation group.
9. The link aggregation method according to claim 8, wherein The closing of the service message sending and receiving functions of the port corresponding to the node and exiting the current aggregation group includes: Stopping sending LACPDU messages to the switching mechanism. After two timeouts, the switching mechanism sets the active port corresponding to the node to an inactive port; Alternatively, rewriting the aggregation group ID in the local detection status LACPDU sent to the switching mechanism.
10. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the asymmetric link aggregation management method according to any one of claims 2 to 5.
11. A readable storage medium, characterized in that, Computer program instructions are stored in the readable storage medium. When the computer program instructions are read and run by a processor, they execute the asymmetric link aggregation management method according to any one of claims 2 to 5.
Citation Information
Patent Citations
Link aggregation method, apparatus, and system
WO2015070383A1