CN110071868B - Link aggregation method, device and network equipment - Google Patents

Link aggregation method, device and network equipment Download PDF

Info

Publication number
CN110071868B
CN110071868B CN201910312946.4A CN201910312946A CN110071868B CN 110071868 B CN110071868 B CN 110071868B CN 201910312946 A CN201910312946 A CN 201910312946A CN 110071868 B CN110071868 B CN 110071868B
Authority
CN
China
Prior art keywords
network device
aggregation
network
equipment
identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910312946.4A
Other languages
Chinese (zh)
Other versions
CN110071868A (en
Inventor
李丹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Information Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201910312946.4A priority Critical patent/CN110071868B/en
Publication of CN110071868A publication Critical patent/CN110071868A/en
Application granted granted Critical
Publication of CN110071868B publication Critical patent/CN110071868B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • H04L45/245Link aggregation, e.g. trunking

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a link aggregation method, a link aggregation device and network equipment. The method comprises the following steps: monitoring an LACP message according to a multicast address of a multicast group; when an LACP message is monitored, determining whether a recorded equipment identifier exists locally in the first network equipment, wherein the recorded equipment identifier is an equipment identifier of network equipment which completes link aggregation with the first network equipment; if the first network equipment has the recorded equipment identification locally, judging whether the first network equipment performs link aggregation with the source network equipment or not according to the equipment identification of the source network equipment of the LACP message carried by the LACP message and the recorded equipment identification; and if so, disconnecting the aggregation link between the network equipment which completes link aggregation, updating the recorded equipment identifier to the equipment identifier of the source equipment, and performing link aggregation with the source network equipment. The aggregation connection of one network device and a plurality of network devices at the same time can be realized.

Description

Link aggregation method, device and network equipment
Technical Field
The present invention relates to the field of network application technologies, and in particular, to a link aggregation method, an apparatus, and a first network device.
Background
In order to increase the bandwidth and the reliability of communication between the physical device and the server, link aggregation is required between the physical device and the server. The method is limited by the number of network cards of the server, and usually requires to create multiple virtual devices on the server, so when link aggregation is required, the link aggregation is performed 1 to 1 between the devices, that is, a physical device can only perform link aggregation with one virtual device, which results in that other virtual devices cannot communicate with the physical device due to the inability of link aggregation, and resource waste is caused.
Disclosure of Invention
Embodiments of the present invention provide a link aggregation method, an apparatus, and a network device, so as to implement aggregation connection between one physical device and multiple network devices at the same time, thereby improving resource utilization of the network devices. The specific technical scheme is as follows:
in a first aspect of the embodiments of the present invention, a link aggregation method is provided, where the link aggregation method is applied to a first network device, a multicast group to which the first network device belongs further includes a second network device, the second network device is a physical device and includes a plurality of aggregation interfaces, and the first network device is any one of a plurality of virtual devices of one entity server in the multicast group or any one of a plurality of entity servers in the multicast group, and the method includes:
monitoring a Link Aggregation Control Protocol (LACP) message according to the multicast address of the multicast group;
when an LACP message is monitored, determining whether a recorded device identifier exists locally in the first network device, wherein the recorded device identifier is a device identifier of a network device which completes link aggregation with the first network device;
if the first network device locally has a recorded device identifier, judging whether the first network device performs link aggregation with the source network device according to the device identifier of the source network device of the LACP message carried by the LACP message and the recorded device identifier;
and if so, disconnecting the aggregation link between the source network equipment and the network equipment which completes link aggregation, updating the recorded equipment identifier to the equipment identifier of the source equipment, and performing link aggregation with the source network equipment.
With reference to the first aspect, in a first possible implementation manner, determining, according to the device identifier of the source network device of the LACP packet and the recorded device identifier that are carried in the LACP packet, whether the first network device performs link aggregation with the source network device includes:
judging whether the device priority included by the device identifier of the source network device is higher than the device priority included by the recorded device identifier, wherein the priority of the second network device is higher than the priorities of the first network device and the other network devices, and the priorities of the first network device and the other network devices are the same;
if yes, executing a step of disconnecting the aggregation link between the aggregation link and the network equipment which completes link aggregation;
otherwise, discarding the LACP message.
With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner, the method further includes:
and if the link aggregation fails, clearing the equipment identifier of the source equipment.
With reference to the first aspect, in a third possible implementation manner, the method further includes:
if the first network device does not have the recorded device identifier locally, recording the device identifier of the source device, and performing link aggregation with the source network device;
and if the link aggregation fails, clearing the recorded equipment identification.
In a second aspect of the embodiments of the present invention, a link aggregation method is provided, which is applied to a second network device, where the second network device is a physical device and includes multiple aggregation interfaces, a multicast group to which the second network device belongs further includes a first network device, and the first network device is any one of multiple virtual devices of one entity server in the multicast group, or is any one of multiple entity servers in the multicast group, and the method includes:
monitoring a Link Aggregation Control Protocol (LACP) message according to the multicast address of the multicast group;
if the LACP message is monitored, whether an idle aggregation interface exists in the aggregation interfaces is inquired; if so, recording the corresponding relation between the equipment identifier of the source network equipment of the LACP message and the aggregation interface distributed for the source equipment, and performing link aggregation with the source network equipment.
With reference to the second aspect, in a first possible implementation manner, the method further includes:
and if the link aggregation fails, releasing the aggregation interface allocated to the source equipment.
With reference to the second aspect, in a second possible implementation manner, the method further includes:
and if the plurality of aggregation interfaces are inquired to have no idle aggregation interface, discarding the LACP message.
In a third aspect of the embodiments of the present invention, there is provided a link aggregation apparatus, which is applied to a first network device, where a multicast group to which the first network device belongs further includes a second network device, the second network device is a physical device and includes a plurality of aggregation interfaces, the first network device is any one of a plurality of virtual devices of one entity server in the multicast group, or is any one of a plurality of entity servers in the multicast group, and the apparatus includes:
a first message monitoring module, configured to monitor a link aggregation control protocol LACP message according to a multicast address of the multicast group;
an identifier recording module, configured to determine whether a recorded device identifier exists locally in the first network device when an LACP packet is monitored, where the recorded device identifier is a device identifier of a network device that has completed link aggregation with the first network device;
an identifier determining module, configured to determine, if the first network device locally has a recorded device identifier, whether the first network device performs link aggregation with a source network device according to a device identifier of the source network device of the LACP packet and the recorded device identifier, where the LACP packet is carried by the first network device;
and if so, disconnecting the aggregation link between the source network equipment and the network equipment which completes link aggregation, updating the recorded equipment identifier to the equipment identifier of the source equipment, and performing link aggregation with the source network equipment.
With reference to the third aspect, in a first possible implementation manner, the identifier determining module is specifically configured to determine whether a device priority included in the device identifier of the source network device is higher than a device priority included in the recorded device identifier, where a priority of the second network device is higher than priorities of the first network device and the other network devices, and the priorities of the first network device and the other network devices are the same;
if yes, executing a step of disconnecting the aggregation link between the aggregation link and the network equipment which completes link aggregation;
otherwise, discarding the LACP message.
With reference to the third aspect or the first possible implementation manner of the third aspect, the identifier recording module is further configured to clear the device identifier of the source device if the link aggregation fails.
With reference to the third aspect, in a third possible implementation manner, the identifier recording module is further configured to record, if the first network device does not have a recorded device identifier locally, the device identifier of the source device, and perform link aggregation with the source network device;
and if the link aggregation fails, clearing the recorded equipment identification.
In a fourth aspect of the embodiments of the present invention, the apparatus is applied to a second network device, where the second network device is a physical device and includes a plurality of aggregation interfaces, the multicast group to which the second network device belongs further includes a first network device, and the first network device is any one of a plurality of virtual devices of one entity server in the multicast group, or is any one of a plurality of entity servers in the multicast group, and the apparatus includes:
a second message monitoring module, configured to monitor a link aggregation control protocol LACP message according to the multicast address of the multicast group;
the interface binding module is used for inquiring whether an idle aggregation interface exists in the aggregation interfaces if the LACP message is monitored; if so, recording the corresponding relation between the equipment identifier of the source network equipment of the LACP message and the aggregation interface distributed for the source equipment, and performing link aggregation with the source network equipment.
With reference to the fourth aspect, in a first possible implementation manner, the interface binding module is further configured to release the aggregation interface allocated to the source device if link aggregation fails.
With reference to the fourth aspect, in a second possible implementation manner, the interface binding module is further configured to discard the LACP packet if it is found that there is no idle aggregation interface in the aggregation interfaces.
In a fifth aspect of the embodiments of the present invention, there is provided a first network device, where a multicast group to which the first network device belongs further includes a second network device, the second network device is a physical device and includes a plurality of aggregation interfaces, the first network device is any one of a plurality of virtual devices of one entity server in the multicast group or is any one of a plurality of entity servers in the multicast group, and the first network device includes:
a memory for storing a computer program;
a processor adapted to perform the method steps of any of the above first aspects when executing a program stored in the memory.
In a sixth aspect of the embodiments of the present invention, there is provided a second network device, where the second network device is a physical device and includes a plurality of aggregation interfaces, a multicast group to which the second network device belongs further includes a first network device, the first network device is any one of a plurality of virtual devices of one entity server in the multicast group or is any one of a plurality of entity servers in the multicast group, and the second network device further includes:
a memory for storing a computer program;
a processor for implementing the method steps of the second aspect when executing the program stored in the memory.
In a seventh aspect of embodiments of the present invention, there is provided a computer-readable storage medium having stored therein a computer program which, when executed by a processor, performs the method steps of any one of the above-mentioned first aspects.
In an eighth aspect of embodiments of the present invention, there is provided a computer-readable storage medium having stored therein a computer program which, when executed by a processor, performs the method steps of any one of the above-mentioned second aspects.
The link aggregation method, the link aggregation device and the network device provided by the embodiment of the invention can enable the first network device to disconnect link aggregation with other network devices and perform link aggregation with the second network device when receiving the LACP message sent by the second network device under the condition that the first network device and other network devices in the multicast group have completed link aggregation. Under the condition that the first network device and the second network device have completed link aggregation, when receiving the LACP message sent by other network devices in the multicast group, the first network device and the second network device can continue to maintain the completed link aggregation. Therefore, the second network device can perform link aggregation with the plurality of first network devices at the same time, so that mutual communication is realized, and the resource utilization rate of the network devices is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1a is a schematic diagram of a networking architecture according to an embodiment of the present invention;
FIG. 1b is a second schematic diagram of a networking architecture according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a link aggregation method according to an embodiment of the present invention;
fig. 3 is another schematic flow chart of a link aggregation method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a link aggregation apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a link aggregation apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a network device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In this embodiment of the present invention, a plurality of network devices belong to the same multicast group, and a networking architecture may be as shown in fig. 1a, including a plurality of first type network devices 110 and a second type network device 120, where the second type network device 120 may be a physical device, and according to different application scenarios, the first type network device 110 and the second type network device 120 may refer to different network devices, for example, in one possible application scenario, the first type network devices 110 may be a plurality of virtual devices created on a server, and the second type network device 120 may be a physical device connected to the server. In other alternative embodiments, the first type network device 110 may also be an entity server.
Based on the above-mentioned technical problem, an embodiment of the present invention provides a link aggregation method, so that the second type network device 120 performs link aggregation with each first type network device 110 through a plurality of aggregation interfaces (as shown in fig. 1 b), thereby improving a bandwidth between the second type network device and the first type network device 110, and improving a resource utilization rate of the network device. Specifically, referring to fig. 2, fig. 2 is a flowchart illustrating a link aggregation method according to an embodiment of the present invention, where the method may be applied to any first type of network device, and in order to refer to an execution subject of the method and other first type of network devices in a multicast group differently, the first type of network device to which the method is applied is hereinafter referred to as a first network device, the other first type of network devices is referred to as other network devices, and the second type of network device is referred to as a second network device. The method can comprise the following steps:
s201, monitors an LACP (Link Aggregation Control Protocol) message according to a multicast address of a multicast group.
The LACP message carries a device identifier of a network device that sends the LACP message. S202, when the LACP message is monitored, whether the recorded equipment identification exists locally in the first network equipment is determined.
The recorded device identifier is a device identifier of a network device for which the first network device has completed link aggregation, and may be of the second network device or of another network device.
S203, if the first network device has the recorded device identification locally, judging whether the first network device performs link aggregation with the source network device according to the device identification of the source network device of the LACP message carried by the LACP message and the recorded device identification.
In this step, the number of the LACP messages may be one or more, and specifically, whether the first network device performs link aggregation with the source network device may be determined in the following manner:
judging whether the device priority included by the device identifier of the source network device is higher than the device priority included by the recorded device identifier, wherein the priority of the second network device is higher than the priorities of the first network device and other network devices, and the priorities of the first network device and other network devices are the same;
if yes, go to step S204;
otherwise, discarding the LACP message.
After discarding the LACP message, it means that the recorded device identifier locally existing in the first network device is an identifier of another network device, and the network device sending the LACP message is also another network device, in this case, the first network device continues to maintain the previously aggregated link and continues to monitor the LACP message.
It should be noted that, in addition to using the device priority to distinguish the first network device from the second network device, other ways may be used for distinguishing, and are not listed here.
And S204, when the judgment result is yes, disconnecting the aggregation link between the network equipment and the network equipment which completes link aggregation, updating the recorded equipment identifier into the equipment identifier of the source equipment, and performing link aggregation with the source network equipment.
In the embodiment of the present invention, once an aggregation link between a network device that has completed link aggregation is disconnected, it means that a recorded device identifier locally existing in a first network device is an identifier of another network device, and a second network device exists in a network device that sends an LACP packet, in this case, the first network device performs link aggregation with the second network device, and in the case that link aggregation is successful, the aggregation link is used to perform interaction of subsequent service packets, thereby improving the resource utilization rate of the network device; and under the condition that the link aggregation fails, clearing the equipment identifier of the source equipment (namely, the second network equipment) and continuously monitoring the LACP message.
Further, in this embodiment of the present invention, after step S202 is executed, if the first network device does not locally have a recorded device identifier, the device identifier of the source device is recorded, and link aggregation is performed with the source network device; if the link aggregation fails, the recorded equipment identifier is cleared, and the LACP message is continuously monitored. Here, when the number of LACP messages is multiple, the device identifier of any source device may be recorded, or one source device may be selected according to a preset selection rule, and the identifier of the source device is recorded.
The following station is at a second network device side, and describes a link aggregation method provided in an embodiment of the present invention, where the second network device includes multiple aggregation interfaces, and relevant configurations of a second layer and a third layer of the multiple aggregation interfaces are the same, and in consideration of saving port resources, the multiple aggregation interfaces may be generated by a same group of physical ports, and the method may refer to fig. 3, and includes:
s301, monitoring the LACP message according to the multicast address of the multicast group.
It can be understood that the LACP messages that can be monitored by the second network device include LACP messages multicast by the first network device and LACP messages multicast by other network devices.
S302, if the LACP message is monitored, whether an idle aggregation interface exists in the aggregation interfaces is inquired, if the idle aggregation interface exists in the aggregation interfaces, S303 is executed, and if the idle aggregation interface does not exist in the aggregation interfaces, S304 is executed.
S303, record the correspondence between the device identifier of the source network device of the LACP packet and the aggregation interface allocated to the source device, and perform link aggregation with the source device.
The allocation manner of the aggregation interfaces may be different according to different application scenarios, and for example, the aggregation interfaces may be pre-ordered, sequentially allocated according to the ordered order, or randomly allocated, which is not limited in this embodiment. If the link aggregation is successful, the service message can be received and transmitted by the allocated aggregation interface and the source network device, and if the link aggregation is failed, the aggregation interface allocated to the source device can be released.
S304, discarding the LACP message.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a link aggregation negotiation apparatus according to an embodiment of the present invention, which is applied to a first network device, where a multicast group to which the first network device belongs further includes a second network device, the second network device is a physical device and includes a plurality of aggregation interfaces, the first network device is any one of a plurality of virtual devices of an entity server in the multicast group or is any one of a plurality of entity servers in the multicast group, and the apparatus includes:
a first message monitoring module 401, configured to monitor a link aggregation control protocol LACP message according to a multicast address of a multicast group;
an identifier recording module 402, configured to determine whether a recorded device identifier exists locally in the first network device when the LACP packet is monitored, where the recorded device identifier is a device identifier of a network device that has completed link aggregation with the first network device;
an identifier determining module 403, configured to determine, if the first network device locally has a recorded device identifier, whether the first network device performs link aggregation with the source network device according to the device identifier of the source network device of the LACP packet and the recorded device identifier that are carried in the LACP packet;
and if so, disconnecting the aggregation link between the network equipment which completes link aggregation, updating the recorded equipment identifier to the equipment identifier of the source equipment, and performing link aggregation with the source network equipment.
In an optional embodiment, the identifier determining module 403 is specifically configured to determine whether a device priority included in the device identifier of the source network device is higher than a device priority included in the recorded device identifier, where a priority of the second network device is higher than priorities of the first network device and other network devices, and the priorities of the first network device and other network devices are the same;
if yes, executing a step of disconnecting the aggregation link between the aggregation link and the network equipment which completes link aggregation;
otherwise, discarding the LACP message.
In an alternative embodiment, the identifier recording module 402 is further configured to clear the device identifier of the source device if the link aggregation fails.
In an optional embodiment, the identifier recording module 402 is further configured to record the device identifier of the source device and perform link aggregation with the source network device if the first network device does not locally have a recorded device identifier;
and if the link aggregation fails, clearing the recorded equipment identification.
Referring to fig. 5, fig. 5 is another schematic structural diagram of a link aggregation negotiation apparatus according to an embodiment of the present invention, which is applied to a second network device, where the second network device is a physical device and includes a plurality of aggregation interfaces, and a multicast group to which the second network device belongs further includes a first network device, where the first network device is any one of a plurality of virtual devices of an entity server in the multicast group, or is any one of a plurality of entity servers in the multicast group, where the apparatus includes:
a second message monitoring module 501, configured to monitor a link aggregation control protocol LACP message according to a multicast address of a multicast group;
an interface binding module 502, configured to query whether an idle aggregation interface exists in the multiple aggregation interfaces if an LACP packet is monitored; if so, recording the corresponding relation between the equipment identifier of the source network equipment of the LACP message and the aggregation interface distributed for the source equipment, and performing link aggregation with the source network equipment.
In an optional embodiment, the interface binding module 502 is further configured to release the aggregation interface allocated to the source device if the link aggregation fails.
In an optional embodiment, the interface binding module 502 is further configured to discard the LACP packet if it is found that no idle aggregation interface exists in the aggregation interfaces.
An embodiment of the present invention further provides a network device, as shown in fig. 6, including:
a memory 601 for storing a computer program;
the processor 602, configured to execute the program stored in the memory 601, if the network device is a first network device, may implement the following steps:
monitoring a Link Aggregation Control Protocol (LACP) message according to a multicast address of a multicast group;
when the LACP message is monitored, determining whether a recorded equipment identifier exists locally in the first network equipment, wherein the recorded equipment identifier is an equipment identifier of the network equipment which completes link aggregation with the first network equipment;
if the first network equipment has the recorded equipment identification locally, judging whether the first network equipment performs link aggregation with the source network equipment or not according to the equipment identification of the source network equipment of the LACP message carried by the LACP message and the recorded equipment identification;
and if so, disconnecting the aggregation link between the network equipment which completes link aggregation, updating the recorded equipment identifier to the equipment identifier of the source equipment, and performing link aggregation with the source network equipment.
In an optional embodiment, determining, according to the device identifier of the source network device of the LACP packet and the recorded device identifier carried in the LACP packet, whether the first network device performs link aggregation with the source network device specifically includes:
judging whether the device priority included by the device identifier of the source network device is higher than the device priority included by the recorded device identifier, wherein the priority of the second network device is higher than the priorities of the first network device and other network devices, and the priorities of the first network device and other network devices are the same;
if yes, executing a step of disconnecting the aggregation link between the aggregation link and the network equipment which completes link aggregation;
otherwise, discarding the LACP message.
In an optional embodiment, the method further comprises:
and if the link aggregation fails, clearing the equipment identifier of the source equipment.
In an optional embodiment, the method further comprises:
if the first network equipment does not have the recorded equipment identification locally, recording the equipment identification of the source equipment, and carrying out link aggregation with the source network equipment;
and if the link aggregation fails, clearing the recorded equipment identification.
If the network device is a second network device, the following steps can be implemented:
monitoring a Link Aggregation Control Protocol (LACP) message according to a multicast address of a multicast group;
if the LACP message is monitored, whether an idle aggregation interface exists in the aggregation interfaces is inquired; if so, recording the corresponding relation between the equipment identifier of the source network equipment of the LACP message and the aggregation interface distributed for the source equipment, and performing link aggregation with the source network equipment.
In an optional embodiment, the method further comprises:
and if the link aggregation fails, releasing the aggregation interface allocated to the source equipment.
In an optional embodiment, the method further comprises:
and if the plurality of aggregation interfaces are inquired to have no idle aggregation interface, discarding the LACP message.
The Memory mentioned in the above electronic device may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In yet another embodiment provided by the present invention, a computer-readable storage medium is further provided, which has instructions stored therein, and when the instructions are executed on a computer, the computer is caused to execute any one of the link aggregation methods in the above embodiments.
In yet another embodiment, a computer program product containing instructions is also provided, which when run on a computer causes the computer to perform any of the link aggregation methods in the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the first network device, the second network device, the computer-readable storage medium, and the computer program product, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (18)

1. A link aggregation method, applied to a first network device, where a multicast group to which the first network device belongs further includes a second network device, the second network device is a physical device and includes multiple aggregation interfaces, and the first network device is any one of multiple virtual devices of one entity server in the multicast group or any one of multiple entity servers in the multicast group, where the method includes:
monitoring a Link Aggregation Control Protocol (LACP) message according to the multicast address of the multicast group;
when an LACP message is monitored, determining whether a recorded device identifier exists locally in the first network device, wherein the recorded device identifier is a device identifier of a network device which completes link aggregation with the first network device;
if the first network device locally has a recorded device identifier, judging whether the first network device performs link aggregation with the source network device according to the device identifier of the source network device of the LACP message carried by the LACP message and the recorded device identifier;
and if so, disconnecting the aggregation link between the source network equipment and the network equipment which completes link aggregation, updating the recorded equipment identifier to the equipment identifier of the source equipment, and performing link aggregation with the source network equipment.
2. The method according to claim 1, wherein determining whether the first network device performs link aggregation with the source network device according to the device identifier of the source network device of the LACP packet and the recorded device identifier carried in the LACP packet specifically includes:
judging whether the device priority included by the device identifier of the source network device is higher than the device priority included by the recorded device identifier, wherein the priority of the second network device is higher than the priorities of the first network device and other network devices, the priorities of the first network device and the other network devices are the same, and the other devices are network devices except the first network device in the multiple virtual devices or network devices except the first network device in the multiple entity servers;
if yes, executing a step of disconnecting the aggregation link between the aggregation link and the network equipment which completes link aggregation;
otherwise, discarding the LACP message.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
and if the link aggregation fails, clearing the equipment identifier of the source equipment.
4. The method of claim 1, further comprising:
if the first network device does not have the recorded device identifier locally, recording the device identifier of the source device, and performing link aggregation with the source network device;
and if the link aggregation fails, clearing the recorded equipment identification.
5. A link aggregation method, applied to a second network device, where the second network device is a physical device and includes multiple aggregation interfaces, a multicast group to which the second network device belongs further includes a first network device, and the first network device is any one of multiple virtual devices of one entity server in the multicast group or any one of multiple entity servers in the multicast group, and the method includes:
monitoring a Link Aggregation Control Protocol (LACP) message according to the multicast address of the multicast group;
if the LACP message is monitored, whether an idle aggregation interface exists in the aggregation interfaces is inquired; if so, recording the corresponding relation between the equipment identifier of the source network equipment of the LACP message and the aggregation interface distributed for the source equipment, and performing link aggregation with the source network equipment.
6. The method of claim 5, further comprising:
and if the link aggregation fails, releasing the aggregation interface allocated to the source equipment.
7. The method of claim 6, further comprising:
and if the plurality of aggregation interfaces are inquired to have no idle aggregation interface, discarding the LACP message.
8. A link aggregation apparatus, applied to a first network device, where the multicast group to which the first network device belongs further includes a second network device, the second network device is a physical device and includes a plurality of aggregation interfaces, and the first network device is any one of a plurality of virtual devices of one entity server in the multicast group or any one of a plurality of entity servers in the multicast group, where the apparatus includes:
a first message monitoring module, configured to monitor a link aggregation control protocol LACP message according to a multicast address of the multicast group;
an identifier recording module, configured to determine whether a recorded device identifier exists locally in the first network device when an LACP packet is monitored, where the recorded device identifier is a device identifier of a network device that has completed link aggregation with the first network device;
an identifier determining module, configured to determine, if the first network device locally has a recorded device identifier, whether the first network device performs link aggregation with a source network device according to a device identifier of the source network device of the LACP packet and the recorded device identifier, where the LACP packet is carried by the first network device;
and if so, disconnecting the aggregation link between the source network equipment and the network equipment which completes link aggregation, updating the recorded equipment identifier to the equipment identifier of the source equipment, and performing link aggregation with the source network equipment.
9. The apparatus according to claim 8, wherein the identifier determining module is specifically configured to determine whether the device identifier of the source network device includes a device priority that is higher than a device priority that is included in the recorded device identifier, wherein the priority of the second network device is higher than the priorities of the first network device and other network devices, the priorities of the first network device and the other network devices are the same, and the other devices are network devices other than the first network device in the plurality of virtual devices or network devices other than the first network device in the plurality of entity servers;
if yes, executing a step of disconnecting the aggregation link between the aggregation link and the network equipment which completes link aggregation;
otherwise, discarding the LACP message.
10. The apparatus according to claim 8 or 9, wherein the identifier recording module is further configured to clear the device identifier of the source device if link aggregation fails.
11. The apparatus of claim 8, wherein the identity recording module is further configured to record the device identity of the source device and perform link aggregation with the source network device if the first network device does not locally have a recorded device identity;
and if the link aggregation fails, clearing the recorded equipment identification.
12. A link aggregation apparatus, applied to a second network device, where the second network device is a physical device and includes a plurality of aggregation interfaces, a multicast group to which the second network device belongs further includes a first network device, and the first network device is any one of a plurality of virtual devices of one entity server in the multicast group, or is any one of a plurality of entity servers in the multicast group, and the apparatus includes:
a second message monitoring module, configured to monitor a link aggregation control protocol LACP message according to the multicast address of the multicast group;
the interface binding module is used for inquiring whether an idle aggregation interface exists in the aggregation interfaces if the LACP message is monitored; if so, recording the corresponding relation between the equipment identifier of the source network equipment of the LACP message and the aggregation interface distributed for the source equipment, and performing link aggregation with the source network equipment.
13. The apparatus of claim 12, wherein the interface binding module is further configured to release the aggregation interface allocated to the source device if link aggregation fails.
14. The apparatus of claim 13, wherein the interface binding module is further configured to discard the LACP packet if it is found that there is no idle aggregation interface in the aggregation interfaces.
15. A first network device, wherein a multicast group to which the first network device belongs further includes a second network device, the second network device is a physical device and includes a plurality of aggregation interfaces, the first network device is any one of a plurality of virtual devices of one entity server in the multicast group or is any one of a plurality of entity servers in the multicast group, and the first network device includes:
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 4 when executing a program stored in the memory.
16. A second network device, wherein the second network device is a physical device and includes a plurality of aggregation interfaces, a multicast group to which the second network device belongs further includes a first network device, the first network device is any one of a plurality of virtual devices of one entity server in the multicast group or is any one of a plurality of entity servers in the multicast group, and the second network device further includes:
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 5 to 7 when executing a program stored in the memory.
17. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 4.
18. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 5-7.
CN201910312946.4A 2019-04-18 2019-04-18 Link aggregation method, device and network equipment Active CN110071868B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910312946.4A CN110071868B (en) 2019-04-18 2019-04-18 Link aggregation method, device and network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910312946.4A CN110071868B (en) 2019-04-18 2019-04-18 Link aggregation method, device and network equipment

Publications (2)

Publication Number Publication Date
CN110071868A CN110071868A (en) 2019-07-30
CN110071868B true CN110071868B (en) 2021-04-09

Family

ID=67368011

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910312946.4A Active CN110071868B (en) 2019-04-18 2019-04-18 Link aggregation method, device and network equipment

Country Status (1)

Country Link
CN (1) CN110071868B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102647355B (en) * 2012-04-12 2014-11-05 华为技术有限公司 LACP (Link Aggregation Control Protocol) consultation processing method, relay node and system
CN104219075B (en) * 2013-05-31 2017-10-24 新华三技术有限公司 A kind of LACP loop detecting methods and device based on open stream protocol
CN104683255B (en) * 2013-11-29 2018-02-13 华为技术有限公司 Equally loaded sharing method, device and the link aggregation system of physical port
CN109257304A (en) * 2017-07-12 2019-01-22 中兴通讯股份有限公司 A kind of bandwidth adjusting method, device, storage medium and the network equipment
CN109327386B (en) * 2018-10-24 2021-12-07 深圳市共进电子股份有限公司 Link aggregation method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN110071868A (en) 2019-07-30

Similar Documents

Publication Publication Date Title
CN110661658B (en) Node management method and device of block chain network and computer storage medium
WO2016131172A1 (en) Method and device for updating network service descriptor
KR20160139493A (en) Method and apparatus for managing encryption keys for cloud service
CN105991412A (en) Method and device for pushing message
CN109151075B (en) Log processing method and device and electronic equipment
CN112184436B (en) Data synchronization method, electronic device and readable storage medium
CN111556125B (en) Access request distribution method, load balancing equipment and electronic equipment
US9363199B1 (en) Bandwidth management for data services operating on a local network
WO2023040453A1 (en) Transaction information processing method and apparatus
JP2013222313A (en) Failure contact efficiency system
CN103347031A (en) Method and equipment for preventing address resolution protocol (ARP) message attack
CN105843675B (en) Thread exit method and device
CN113507431B (en) Message management method, device, equipment and machine-readable storage medium
CN110661673B (en) Heartbeat detection method and device
CN110990415A (en) Data processing method and device, electronic equipment and storage medium
CN109995787A (en) A kind of data processing method and relevant device
CN110071868B (en) Link aggregation method, device and network equipment
WO2017162045A1 (en) Message transmission method and terminal equipment
CN109347810B (en) Method and device for processing message
CN107483637B (en) NFS-based client link management method and device
CN111629054B (en) Message processing method, device and system, electronic equipment and readable storage medium
EP3190743B1 (en) Packet processing method, network server and virtual private network system
CN106559439B (en) A kind of method for processing business and equipment
CN110113187B (en) Configuration updating method and device, configuration server and configuration system
CN109039822B (en) BFD protocol message filtering method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230612

Address after: 310052 11th Floor, 466 Changhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: H3C INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 310052 Changhe Road, Binjiang District, Hangzhou, Zhejiang Province, No. 466

Patentee before: NEW H3C TECHNOLOGIES Co.,Ltd.