CN114827016B - Method, device, equipment and storage medium for switching link aggregation scheme - Google Patents

Method, device, equipment and storage medium for switching link aggregation scheme Download PDF

Info

Publication number
CN114827016B
CN114827016B CN202210379377.7A CN202210379377A CN114827016B CN 114827016 B CN114827016 B CN 114827016B CN 202210379377 A CN202210379377 A CN 202210379377A CN 114827016 B CN114827016 B CN 114827016B
Authority
CN
China
Prior art keywords
link aggregation
aggregation group
target
scheme
information
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
CN202210379377.7A
Other languages
Chinese (zh)
Other versions
CN114827016A (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.)
Zhuhai Xingyun Zhilian Technology Co Ltd
Original Assignee
Zhuhai Xingyun Zhilian Technology 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 Zhuhai Xingyun Zhilian Technology Co Ltd filed Critical Zhuhai Xingyun Zhilian Technology Co Ltd
Priority to CN202210379377.7A priority Critical patent/CN114827016B/en
Publication of CN114827016A publication Critical patent/CN114827016A/en
Application granted granted Critical
Publication of CN114827016B publication Critical patent/CN114827016B/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

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 application discloses a method, a device, equipment and a storage medium for switching a link aggregation scheme, wherein the method comprises the following steps: when a link aggregation scheme updating instruction is received, a first table entry is obtained, wherein the first table entry comprises an identification field and an information field; determining a first target table entry corresponding to a first link aggregation scheme which is currently used according to the first identifier, and determining a second target table entry corresponding to a second link aggregation scheme which is not currently used according to the first target table entry; updating the first identifier in the identifier field to a second identifier of a second target table item, and updating the first link aggregation group information in the information field to second link aggregation group information according to the content in the second target table item; and carrying out data communication according to the updated second identifier in the identifier field and the updated second link aggregation group information in the information field. By adopting the embodiment of the application, the switching of the link aggregation scheme can be realized, and the routing error generated when the link aggregation scheme is switched is avoided.

Description

Method, device, equipment and storage medium for switching link aggregation scheme
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, an apparatus, a device, and a storage medium for switching a link aggregation scheme.
Background
With the development of communication technology, the communication volume between network devices is larger and larger, and the traffic volume of each port of the network device is also larger accordingly. Therefore, a link aggregation method is required to achieve a reasonable load sharing effect of traffic between multiple ports of the network device, that is, multiple physical ports of the network device are aggregated together to form a logical port, so as to implement load sharing of the throughput of the outgoing/incoming traffic at each member port.
The common link aggregation method fixedly supports one or more aggregation schemes, when one aggregation scheme is used, other aggregation schemes cannot be switched, and for multiple aggregation schemes, switching between aggregation schemes is realized by only updating configuration of one table entry. When the message is transmitted through the aggregation group selected by the table entry, since the message is still transmitted by using the table entry when the table entry is configured and updated, the subsequent message may still be transmitted by using the original aggregation group or by selecting the wrong aggregation group. Therefore, the general method of switching the link aggregation scheme may cause a large number of routing errors.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a storage medium for switching a link aggregation scheme, wherein a first target table item which is currently used and a second target table item which is not currently used are determined through a first table item, a first identifier of the first table item is updated to be a second identifier of the second target table item, an information field of the first table item is updated according to the content of the second target table item, and then data communication is carried out through the second identifier updated by the first table item and the updated information field, so that the switching of the link aggregation scheme is realized, and a routing error generated when the link aggregation scheme is switched is avoided.
In a first aspect, an embodiment of the present application provides a method for switching a link aggregation scheme, including:
when a link aggregation scheme updating instruction is received, obtaining a first table entry, wherein the first table entry comprises an identification field and an information field, identification in the identification field is used for indicating a target table entry corresponding to a currently used link aggregation scheme, and link aggregation group information in the information field indicates summary information of the currently used link aggregation scheme, wherein the current identification in the identification field is a first identification, and the current information in the information field is first link aggregation group information;
determining a first target table entry corresponding to a first link aggregation scheme currently used according to the first identifier, and determining a second target table entry corresponding to a second link aggregation scheme not currently used according to the first target table entry, where the first target table entry includes at least one link aggregation group in the first link aggregation scheme and a start address and an aggregation member list corresponding to the at least one link aggregation group, and the second target table entry includes at least one link aggregation group in the second link aggregation scheme and a start address and an aggregation member list corresponding to the at least one link aggregation group;
updating the first identifier in the identifier field to a second identifier of the second target table entry, and updating the first link aggregation group information in the information field to second link aggregation group information according to the content in the second target table entry;
and carrying out data communication according to the second identification updated in the identification field and the second link aggregation group information updated in the information field.
In a possible implementation manner of the first aspect, the updating the first link aggregation group information in the information field to second link aggregation group information according to the content in the second target entry includes:
determining the second link aggregation group information according to the content in the second target table entry;
updating the first link aggregation group information in the information field to the second link aggregation group information.
In a possible implementation manner of the first aspect, the link aggregation group information includes at least one link aggregation group and a start address and an aggregation member number corresponding to the at least one link aggregation group; the determining the second link aggregation group information according to the content in the second target entry includes:
taking at least one link aggregation group in the second link aggregation scheme and a start address corresponding to the at least one link aggregation group in the second target table entry as the at least one link aggregation group in the second link aggregation group information and the start address corresponding to the at least one link aggregation group;
determining, according to at least one link aggregation group in the second link aggregation scheme in the second target entry and a member list corresponding to the at least one link aggregation group, an aggregation member number corresponding to the at least one link aggregation group in the second link aggregation group information.
In one possible implementation manner of the first aspect, before the updating the first identifier in the identifier field to the second identifier of the second target entry, the method further includes:
modifying the second link aggregation scheme;
and updating the second target table entry according to the modified second link aggregation scheme.
In a possible implementation manner of the first aspect, the modifying the second link aggregation scheme includes:
modifying one or more of the at least one link aggregation group, a starting address corresponding to the at least one link aggregation group, and an aggregation member list corresponding to the at least one link aggregation group in the second link aggregation scheme.
In a possible implementation manner of the first aspect, the performing data communication according to the updated second identifier in the identifier field and the updated second link aggregation group information in the information field includes:
determining a first target link aggregation group and a corresponding initial address thereof according to the updated second link aggregation group information;
determining a second target table entry corresponding to a currently used second link aggregation scheme according to the second identifier;
determining an aggregation member list of the first target link aggregation group from the second target table entry according to the first target link aggregation group;
and performing data communication according to the aggregation member list of the first target link aggregation group.
In a possible implementation manner of the first aspect, the determining, from the second target entry, an aggregation member list of the first target link aggregation group according to the first target link aggregation group includes:
determining a second target link aggregation group from the second target table entry according to the starting address corresponding to the first target link aggregation group, wherein the starting address corresponding to the second target link aggregation group is the same as the starting address corresponding to the first target link aggregation group;
and taking the aggregation member list of the second target link aggregation group as the aggregation member list of the first target link aggregation group.
In a second aspect, an embodiment of the present application provides an apparatus for switching a link aggregation scheme, including:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a first table entry, and the first table entry comprises an identification field and an information field;
a first determining unit, configured to determine, according to the first identifier, a first target entry corresponding to a first link aggregation scheme currently used;
a second determining unit, configured to determine, according to the first target entry, a second target entry corresponding to a second link aggregation scheme that is not currently used;
a first updating unit, configured to update the first identifier in the identifier field to a second identifier of the second target table entry;
a second updating unit, configured to update the first link aggregation group information in the information field to second link aggregation group information according to content in the second target entry;
and the communication unit is used for carrying out data communication according to the second identifier updated in the identifier field and the second link aggregation group information updated in the information field.
In one possible embodiment of the second aspect, the apparatus further comprises:
a third determining unit, configured to determine the second link aggregation group information according to the content in the second target entry;
the second updating unit is specifically configured to:
updating the first link aggregation group information in the information field to the second link aggregation group information.
In one possible implementation manner of the second aspect, the link aggregation group information includes at least one link aggregation group and a start address and an aggregation member number corresponding to the at least one link aggregation group; the third determining unit is specifically configured to:
taking at least one link aggregation group in the second link aggregation scheme and a start address corresponding to the at least one link aggregation group in the second target table entry as the at least one link aggregation group in the second link aggregation group information and the start address corresponding to the at least one link aggregation group;
determining, according to at least one link aggregation group in the second link aggregation scheme in the second target entry and a member list corresponding to the at least one link aggregation group, an aggregation member number corresponding to the at least one link aggregation group in the second link aggregation group information.
In one possible embodiment of the second aspect, the apparatus further comprises:
a modifying unit, configured to modify the second link aggregation scheme;
a fourth updating unit, configured to update the second target entry according to the modified second link aggregation scheme.
In a possible implementation manner of the second aspect, the modifying unit is specifically configured to:
modifying one or more of the at least one link aggregation group, a starting address corresponding to the at least one link aggregation group, and an aggregation member list corresponding to the at least one link aggregation group in the second link aggregation scheme.
In one possible embodiment of the second aspect, the apparatus further comprises:
a fourth determining unit, configured to determine, according to the updated second link aggregation group information, a first target link aggregation group and a start address corresponding to the first target link aggregation group;
a fifth determining unit, configured to determine, according to the second identifier, a second target entry corresponding to a currently used second link aggregation scheme;
a sixth determining unit, configured to determine, according to the first target link aggregation group, an aggregation member list of the first target link aggregation group from the second target entry;
the communication unit is specifically configured to perform data communication according to the aggregation member list of the first target link aggregation group.
In a possible implementation manner of the second aspect, the sixth determining unit is specifically configured to:
determining a second target link aggregation group from the second target table entry according to the start address corresponding to the first target link aggregation group, wherein the start address corresponding to the second target link aggregation group is the same as the start address corresponding to the first target link aggregation group;
and taking the aggregation member list of the second target link aggregation group as the aggregation member list of the first target link aggregation group.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, and an input/output interface, where the processor, the memory, and the input/output interface are connected to each other, where the input/output interface is used to input or output data, the memory is used to store program codes, and the processor is used to call the program codes to execute the method for switching the link aggregation scheme according to the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, where the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to execute the method for switching the link aggregation scheme according to the first aspect.
In the embodiment of the present application, when a link aggregation scheme is switched, a first target entry corresponding to a currently used first link aggregation scheme and a second target entry corresponding to a currently unused second link aggregation scheme are determined through an identification field and an information field of a first entry, at this time, the identification field of the first entry is a first identifier, and current information in the information field is first link aggregation group information, that is, data communication is currently performed by using the first link aggregation scheme. Updating the first identifier of the first entry to a second identifier of the second target entry, updating the first link aggregation group in the information field of the first entry to second link aggregation group information according to the content in the second target entry, and performing data communication through the second identifier updated by the first entry and the updated information field, that is, switching and performing data communication by using a second link aggregation scheme, thereby implementing switching of the link aggregation scheme, wherein no influence is caused on the use of an old link aggregation scheme when a new link aggregation scheme is switched to be used, and a routing error generated when the link aggregation scheme is switched is avoided.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application.
Fig. 1 is a schematic application scenario diagram of a method for switching a link aggregation scheme according to an embodiment of the present application;
fig. 2 is a flowchart illustrating a method for switching a link aggregation scheme according to an embodiment of the present application;
fig. 3 is an exemplary diagram of a method for switching a link aggregation scheme according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a device for switching a link aggregation scheme according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all 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 application.
The terms "first", "second", and "third", etc. in the description, claims, and drawings of the present application are used solely to distinguish between different objects and not to describe a particular order. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. Such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements recited, but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those skilled in the art can explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
In this application, "at least one" means one or more, "a plurality" means two or more, "at least two" means two or three and three or more, "and/or" for describing an association relationship of associated objects, which means that there may be three relationships, for example, "a and/or B" may mean: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one item(s) below" or similar expressions refer to any combination of these items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b," a and c, "" b and c, "or" a and b and c.
Referring to fig. 1, fig. 1 is a schematic application scenario diagram of a method for switching a link aggregation scheme according to an embodiment of the present application.
As shown in fig. 1, when a new packet is received, it is necessary to determine which aggregation group to transmit through, that is, the packet is classified into the aggregation group according to a certain packet field (e.g., five-tuple), and if it is determined to transmit through aggregation group 0, look up an aggregation table, determine an aggregation member (port/queue) list in aggregation group 0, that is, port 0/queue 0 and port 1/queue 1 … port n/queue n in aggregation group 0, and then perform routing and then distribute in the aggregation group.
In this process, if a link aggregation scheme is to be switched, that is, aggregation groups are divided again for multiple ports or queues, a general link aggregation scheme cannot be switched or can only be switched fixedly, and an aggregation table is usually required to be modified during switching, however, transmission of a message may still be performed during modification, which may cause a large number of routing errors. Based on this, the embodiment of the present application provides a method for switching a link aggregation scheme.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for switching a link aggregation scheme according to an embodiment of the present application.
As shown in fig. 2, the method for switching the link aggregation scheme of the embodiment of the present application may include, but is not limited to, the following steps:
s201, when receiving a link aggregation scheme update instruction, obtaining a first entry, where the first entry includes an identifier field and an information field.
The first entry includes an identification field and an information field, where an identification in the identification field is used to indicate a target entry corresponding to a currently used link aggregation scheme, and link aggregation group information in the information field indicates summary information of the currently used link aggregation scheme, where a current identification in the identification field is a first identification, and current information in the information field is first link aggregation group information.
S202, a first target table entry corresponding to a first link aggregation scheme currently used is determined according to the first identifier, and a second target table entry corresponding to a second link aggregation scheme not currently used is determined according to the first target table entry.
The first target entry includes at least one link aggregation group in the first link aggregation scheme and a start address and an aggregation member list corresponding to the link aggregation group, and the second target entry includes at least one link aggregation group in the second link aggregation scheme and a start address and an aggregation member list corresponding to the link aggregation group. The first link aggregation scheme and the second link aggregation scheme are schemes for performing link aggregation on multiple physical ports of the same network device, where for a certain link aggregation scheme, the number of aggregation members in each link aggregation group in the link aggregation scheme may be unequal, that is, the number of ports in each link aggregation group may be unequal, for example, the network device includes 10 ports, the first link aggregation scheme includes four link aggregation groups and their corresponding start addresses and aggregation member lists, where the four link aggregation groups are: the system comprises an aggregation group 1, an aggregation group 2, an aggregation group 3 and an aggregation group 4, wherein the four aggregation groups respectively correspond to the following starting addresses: address 1, address 2, address 3, and address 4, where the member list of aggregation group 1 includes port 1 and port 2, the member list of aggregation group 2 includes port 3, port 4, and port 5, the member list of aggregation group 3 includes port 6, port 7, and port 8, and the member list of aggregation group 4 includes port 9 and port 10. For example, the second link aggregation scheme includes three link aggregation groups and their corresponding start addresses and aggregation member lists, where the three link aggregation groups are: an aggregation group 5, an aggregation group 6, and an aggregation group 7, where the start addresses corresponding to the three aggregation groups are address 5, address 6, and address 7, respectively, where a member list of the aggregation group 5 includes port 1, port 2, port 3, and port 4, a member list of the aggregation group 6 includes port 5, port 6, and port 7, and a member list of the aggregation group 7 includes port 8, port 9, and port 10.
S203, update the first identifier in the identifier field to the second identifier of the second target entry, and update the first link aggregation group information in the information field to the second link aggregation group information according to the content in the second target entry.
In some optional embodiments, the link aggregation group information includes at least one link aggregation group and a start address and an aggregation member number corresponding to the link aggregation group; the determining the second link aggregation group information according to the content in the second target entry includes:
taking at least one link aggregation group in the second link aggregation scheme and a start address corresponding to the at least one link aggregation group in the second target table entry as the at least one link aggregation group in the second link aggregation group information and the start address corresponding to the at least one link aggregation group;
determining the number of aggregation members corresponding to the at least one link aggregation group in the second link aggregation group information according to the at least one link aggregation group in the second link aggregation scheme in the second target entry and the member list corresponding to the at least one link aggregation group.
Taking the example in the step S202 as an illustration, the second link aggregation scheme in the second target entry includes three link aggregation groups and their corresponding start addresses and aggregation member lists, where the three link aggregation groups are: the system comprises an aggregation group 5, an aggregation group 6 and an aggregation group 7, wherein the starting addresses corresponding to the three aggregation groups are address 5, address 6 and address 7, respectively, a member list of the aggregation group 5 comprises port 1, port 2, port 3 and port 4, a member list of the aggregation group 6 comprises port 5, port 6 and port 7, and a member list of the aggregation group 7 comprises port 8, port 9 and port 10.
The second link aggregation group information includes at least one link aggregation group and a start address and a number of members corresponding to the link aggregation group, the second link aggregation group information includes the three link aggregation groups and a start address and a number of aggregation members corresponding to the three link aggregation groups, and the three link aggregation groups are: an aggregation group 5, an aggregation group 6, and an aggregation group 7, where the three aggregation groups respectively correspond to a start address of address 5, address 6, and address 7, the number of aggregation members of the aggregation group 5 is 4, the number of aggregation members of the aggregation group 6 is 3, and the number of aggregation members of the aggregation group 7 is 3.
In some optional embodiments, before the updating the first identifier in the identifier field to the second identifier of the second target entry, the method further includes:
modifying the second link aggregation scheme;
and updating the second target table entry according to the modified second link aggregation scheme.
Wherein the modifying the second link aggregation scheme includes:
modifying one or more items of the at least one link aggregation group, the start address corresponding to the at least one link aggregation group, and the aggregation member list corresponding to the at least one link aggregation group in the second link aggregation scheme.
Taking the example in the step S202 as an illustration, the second link aggregation scheme in the second target entry includes three link aggregation groups and their corresponding start addresses and aggregation member lists, where the three link aggregation groups are: an aggregation group 5, an aggregation group 6, and an aggregation group 7, where the start addresses corresponding to the three aggregation groups are address 5, address 6, and address 7, respectively, where a member list of the aggregation group 5 includes port 1, port 2, port 3, and port 4, a member list of the aggregation group 6 includes port 5, port 6, and port 7, and a member list of the aggregation group 7 includes port 8, port 9, and port 10.
When modifying the second link aggregation scheme, one or more items of the at least one link aggregation group, the start address corresponding to the at least one link aggregation group, and the aggregation member list corresponding to the at least one link aggregation group in the second link aggregation scheme may be modified. That is, the number of the link aggregation groups included in the second link aggregation scheme is modified, the start address corresponding to the link aggregation group is modified, and the member list included in the link aggregation group is modified. For example, the second link aggregation scheme is modified to obtain a modified second link aggregation scheme, where the modified second link aggregation scheme includes two link aggregation groups and their corresponding start addresses and aggregation member lists, where the two link aggregation groups are: an aggregation group 8 and an aggregation group 9, where the start addresses corresponding to the two aggregation groups are address 8 and address 9, respectively, a member list of the aggregation group 8 includes port 1, port 2, port 3, and port 4, and a member list of the aggregation group 9 includes port 5, port 6, port 7, port 8, port 9, and port 10.
And S204, carrying out data communication according to the updated second identifier in the identifier field and the updated second link aggregation group information in the information field.
In some optional embodiments, the performing data communication according to the updated second identifier in the identifier field and the updated second link aggregation group information in the information field includes:
determining a first target link aggregation group and a corresponding initial address thereof according to the updated second link aggregation group information;
determining a second target table entry corresponding to a currently used second link aggregation scheme according to the second identifier;
determining an aggregation member list of the first target link aggregation group from the second target table entry according to the first target link aggregation group;
and carrying out data communication according to the aggregation member list of the first target link aggregation group.
Taking the example in the step S203 as an illustration, the second link aggregation group information includes the three link aggregation groups and their corresponding start addresses and aggregation member numbers, where the three link aggregation groups are: an aggregation group 5, an aggregation group 6, and an aggregation group 7, where the three aggregation groups respectively correspond to a start address of address 5, address 6, and address 7, the number of aggregation members of the aggregation group 5 is 4, the number of aggregation members of the aggregation group 6 is 3, and the number of aggregation members of the aggregation group 7 is 3.
When a new message arrives, a first target link aggregation group and a start address corresponding to the first target link aggregation group are determined according to the second link aggregation group information, for example, the first target link aggregation group is determined to be an aggregation group 5, and a start address corresponding to the first target link aggregation group is determined to be an address 5, that is, the start address of the first target link aggregation group is determined to be an address 5.
And determining a second target table entry corresponding to a currently used second link aggregation scheme according to the second identifier. Taking the example in the step S203 as an illustration, the second link aggregation scheme in the second target entry includes three link aggregation groups and their corresponding start addresses and aggregation member lists, where the three link aggregation groups are: the system comprises an aggregation group 5, an aggregation group 6 and an aggregation group 7, wherein the starting addresses corresponding to the three aggregation groups are address 5, address 6 and address 7, respectively, a member list of the aggregation group 5 comprises port 1, port 2, port 3 and port 4, a member list of the aggregation group 6 comprises port 5, port 6 and port 7, and a member list of the aggregation group 7 comprises port 8, port 9 and port 10.
The determining an aggregation member list of the first target link aggregation group from the second target entry according to the first target link aggregation group includes:
determining a second target link aggregation group from the second target table entry according to the start address corresponding to the first target link aggregation group, where the start address corresponding to the second target link aggregation group is the same as the start address corresponding to the first target link aggregation group;
and taking the aggregation member list of the second target link aggregation group as the aggregation member list of the first target link aggregation group.
The start address of the first target link aggregation group is address 5, the second target link aggregation group with the start address of address 5 in the second target entry is aggregation group 5, the member list of the aggregation group 5 includes port 1, port 2, port 3, and port 4, that is, the aggregation member list of the second target link aggregation group includes port 1, port 2, port 3, and port 4, and the aggregation member list of the second target link aggregation group is used as the aggregation member list of the first target link aggregation group.
Finally, the new message performs data communication according to the aggregation member list of the first target link aggregation group, that is, performs data communication through port 1, port 2, port 3, and port 4.
In the embodiment of the present application, when a link aggregation scheme is switched, a first target entry corresponding to a currently used first link aggregation scheme and a second target entry corresponding to a currently unused second link aggregation scheme are determined through an identification field and an information field of a first entry, at this time, the identification field of the first entry is a first identifier, and current information in the information field is first link aggregation group information, that is, data communication is currently performed by using the first link aggregation scheme. Updating the first identifier of the first entry to a second identifier of the second target entry, updating the first link aggregation group in the information field of the first entry to second link aggregation group information according to the content of the second target entry, and performing data communication through the updated second identifier of the first entry and the updated information field, that is, switching and performing data communication by using a second link aggregation scheme, thereby implementing switching of the link aggregation scheme, wherein no influence is caused on the use of an old link aggregation scheme when a new link aggregation scheme is switched to be used, and a routing error generated when the link aggregation scheme is switched is avoided.
In order to explain the method of switching the link aggregation scheme, the following description is made in conjunction with an example of a procedure of switching the link aggregation scheme. Referring to fig. 3, fig. 3 is a diagram illustrating an example of a method for switching a link aggregation scheme according to an embodiment of the present application. As shown in fig. 3, a first target entry corresponding to a first currently used link aggregation scheme and a second target entry corresponding to a second currently unused link aggregation scheme are determined according to a first identifier in a first entry identifier field, where link aggregation group information in an information field in the first entry is first link aggregation group information. The first identifier is used to identify the first target table entry, and the second identifier is used to identify the second target table entry.
When switching a link aggregation scheme, modifying the first identifier in the identifier field to a second identifier of the second target entry, updating link aggregation group information in an information field of the first entry from first link aggregation group information to second link aggregation group information according to content in the second target entry, where the first link aggregation group information is obtained from the first target entry, the second link aggregation group information is obtained from the second target entry, and finally performing data communication according to the updated second identifier in the identifier field of the first entry and the updated second link aggregation group information in the information field.
It is understood that the detailed description of fig. 3 can refer to the related method shown in fig. 2, and will not be repeated herein.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a device for switching a link aggregation scheme according to an embodiment of the present application. As shown in fig. 4, the apparatus 400 for switching link aggregation scheme includes:
an obtaining unit 401, configured to obtain a first entry, where the first entry includes an identification field and an information field;
a first determining unit 402, configured to determine, according to the first identifier, a first target entry corresponding to a first link aggregation scheme currently used;
a second determining unit 403, configured to determine, according to the first target entry, a second target entry corresponding to a second link aggregation scheme that is not currently used;
a first updating unit 404, configured to update the first identifier in the identifier field to a second identifier of the second target table entry;
a second updating unit 405, configured to update the first link aggregation group information in the information field to second link aggregation group information according to the content in the second target entry;
a communication unit 406, configured to perform data communication according to the updated second identifier in the identifier field and the updated second link aggregation group information in the information field.
In one possible embodiment, the above apparatus further comprises:
a third determining unit 407, configured to determine the second link aggregation group information according to the content in the second target entry;
the second updating unit 405 is specifically configured to:
and updating the first link aggregation group information in the information field to the second link aggregation group information.
In a possible embodiment, the link aggregation group information includes at least one link aggregation group and its corresponding start address and aggregation member number; the third determining unit 407 is specifically configured to:
taking at least one link aggregation group in the second link aggregation scheme in the second target table entry and a start address corresponding to the at least one link aggregation group as the at least one link aggregation group in the second link aggregation scheme information and the start address corresponding to the at least one link aggregation group;
determining the number of aggregation members corresponding to the at least one link aggregation group in the second link aggregation group information according to the at least one link aggregation group in the second link aggregation scheme in the second target entry and the member list corresponding to the at least one link aggregation group.
In one possible embodiment, the above apparatus further comprises:
a modifying unit 408, configured to modify the second link aggregation scheme;
a fourth updating unit 409, configured to update the second target entry according to the modified second link aggregation scheme.
In a possible implementation, the modifying unit 408 is specifically configured to:
modifying one or more of the at least one link aggregation group, a start address corresponding to the at least one link aggregation group, and an aggregation member list corresponding to the at least one link aggregation group in the second link aggregation scheme.
In one possible embodiment, the above apparatus further comprises:
a fourth determining unit 410, configured to determine a first target link aggregation group and a start address corresponding to the first target link aggregation group according to the updated second link aggregation group information;
a fifth determining unit 411, configured to determine, according to the second identifier, a second target entry corresponding to a currently used second link aggregation scheme;
a sixth determining unit 412, configured to determine, according to the first target link aggregation group, an aggregation member list of the first target link aggregation group from the second target entry;
the communication unit 406 is specifically configured to perform data communication according to the aggregation member list of the first target link aggregation group.
In a possible implementation manner, the sixth determining unit 412 is specifically configured to:
determining a second target link aggregation group from the second target table entry according to the start address corresponding to the first target link aggregation group, where the start address corresponding to the second target link aggregation group is the same as the start address corresponding to the first target link aggregation group;
and taking the aggregation member list of the second target link aggregation group as the aggregation member list of the first target link aggregation group.
According to the embodiment of the present application, the units in the apparatus shown in fig. 4 may be respectively or entirely combined into one or several other units to form one or several other units, or some unit(s) therein may be further split into multiple functionally smaller units to form one or several other units, which may achieve the same operation without affecting the achievement of the technical effect of the embodiment of the present application. The units are divided based on logic functions, and in practical application, the functions of one unit can be realized by a plurality of units, or the functions of a plurality of units can be realized by one unit.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure, where the electronic device 500 includes a processor 501, a memory 502, an input/output interface 503, and a communication bus 504. The processor 501 is connected to a memory 502 and an input-output interface 503, for example, the processor 501 may be connected to the memory 502 and the input-output interface 503 through a communication bus 504.
The memory 502 is used for storing programs; the processor 501 is configured to execute the program stored in the memory, and when the program is executed, the processor 501 executes the method in any one of the possible embodiments of the method for switching the link aggregation scheme.
It should be understood that in the embodiment of the present application, the memory 502 includes, but is not limited to, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), or a portable read-only memory (CDROM), and an external memory other than a computer memory and a processor cache, and a part of the memory 502 may also include a nonvolatile random access memory, for example, the memory 502 may also store device type information.
The processor 501 may be one or more Central Processing Units (CPUs), and in the case that the processor 501 is one CPU, the CPU may be a single-core CPU or a multi-core CPU; the processor 501 may also be other general-purpose processors, 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, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The steps performed in the foregoing embodiment may be implemented based on the structure of the electronic device 500 shown in fig. 5, and the processor 501 may perform the implementation described in any optional embodiment of the method for switching a link aggregation scheme provided in this embodiment, and may also perform the implementation of the apparatus 400 for switching a link aggregation scheme described in this embodiment, specifically, the processor 501 may implement the functions of the first determining unit 402, the second determining unit 403, the first updating unit 404, the second updating unit 405, the third determining unit 407, the modifying unit 408, the fourth updating unit 409, the fourth determining unit 410, the fifth determining unit 411, and the sixth determining unit 412 in the apparatus shown in fig. 4. The input-output interface 503 can implement the functions of the acquisition unit 401 and the communication unit 406 in the apparatus shown in fig. 4. The memory 502 may provide a buffer when the processor 501 executes the implementation of the apparatus 400 for switching link aggregation scheme described in the embodiment of the present application, and may also store a computer program required by the processor 501 to execute the implementation of the apparatus 400 for switching link aggregation scheme described in the embodiment of the present application.
There is also provided in an embodiment of the present application a computer storage medium storing a computer program which, when executed by a processor, implements the method as shown in fig. 2.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like.

Claims (8)

1. A method of switching a link aggregation scheme, the method comprising:
when a link aggregation scheme updating instruction is received, a first entry is obtained, wherein the first entry comprises an identification field and an information field, identification in the identification field is used for indicating a target entry corresponding to a currently used link aggregation scheme, and link aggregation group information in the information field indicates summary information of the currently used link aggregation scheme, wherein the current identification in the identification field is a first identification, and the current information in the information field is first link aggregation group information;
determining a first target entry corresponding to a first link aggregation scheme currently used according to the first identifier, and determining a second target entry corresponding to a second link aggregation scheme not currently used according to the first target entry, where the first target entry includes at least one link aggregation group in the first link aggregation scheme and a start address and an aggregation member list corresponding to the at least one link aggregation group, and the second target entry includes at least one link aggregation group in the second link aggregation scheme and a start address and an aggregation member list corresponding to the at least one link aggregation group, the first link aggregation scheme and the second link aggregation scheme are different schemes for performing link aggregation for multiple physical ports of the same network device, and the number of aggregation members corresponding to each link aggregation group in a single link aggregation scheme is not limited;
modifying one or more items of the at least one link aggregation group, a starting address corresponding to the at least one link aggregation group, and an aggregation member list corresponding to the at least one link aggregation group in the second link aggregation scheme;
updating the second target table entry according to the modified second link aggregation scheme;
updating the first identifier in the identifier field to a second identifier of the second target table entry, and updating the first link aggregation group information in the information field to second link aggregation group information according to the content in the second target table entry;
and carrying out data communication according to the second identification updated in the identification field and the second link aggregation group information updated in the information field.
2. The method of claim 1, wherein said updating the first link aggregation group information in the information field to second link aggregation group information according to the content in the second target entry comprises:
determining the second link aggregation group information according to the content in the second target table entry;
updating the first link aggregation group information in the information field to the second link aggregation group information.
3. The method of claim 1 or 2, wherein the link aggregation group information comprises at least one link aggregation group and its corresponding starting address and aggregation member number; the determining the second link aggregation group information according to the content in the second target entry includes:
taking at least one link aggregation group in the second link aggregation scheme and a start address corresponding to the at least one link aggregation group in the second target table entry as the at least one link aggregation group in the second link aggregation group information and the start address corresponding to the at least one link aggregation group;
determining the number of aggregation members corresponding to at least one link aggregation group in the second link aggregation group information according to at least one link aggregation group in the second link aggregation scheme and the member list corresponding to the link aggregation group in the second target entry.
4. The method of claim 1, wherein the communicating data according to the updated second identifier in the identifier field and the updated second link aggregation group information in the information field comprises:
determining a first target link aggregation group and a corresponding initial address thereof according to the updated second link aggregation group information;
determining a second target table entry corresponding to a currently used second link aggregation scheme according to the second identifier;
determining an aggregation member list of the first target link aggregation group from the second target table entry according to the first target link aggregation group;
and carrying out data communication according to the aggregation member list of the first target link aggregation group.
5. The method of claim 4, wherein said determining the list of aggregation members for the first target link aggregation group from the second target entry based on the first target link aggregation group comprises:
determining a second target link aggregation group from the second target table entry according to the starting address corresponding to the first target link aggregation group, wherein the starting address corresponding to the second target link aggregation group is the same as the starting address corresponding to the first target link aggregation group;
and taking the aggregation member list of the second target link aggregation group as the aggregation member list of the first target link aggregation group.
6. An apparatus for switching a link aggregation scheme, the apparatus comprising:
an obtaining unit, configured to obtain a first entry when a link aggregation scheme update instruction is received, where the first entry includes an identification field and an information field, where an identification in the identification field is used to indicate a target entry corresponding to a currently used link aggregation scheme, and link aggregation group information in the information field indicates summary information of the currently used link aggregation scheme, where a current identification in the identification field is a first identification, and current information in the information field is first link aggregation group information;
a first determining unit, configured to determine, according to the first identifier, a first target entry corresponding to a first link aggregation scheme currently in use, and determine, according to the first target entry, a second target entry corresponding to a second link aggregation scheme not in use currently, where the first target entry includes at least one link aggregation group in the first link aggregation scheme and a start address and an aggregation member list corresponding to the at least one link aggregation group, and the second target entry includes at least one link aggregation group in the second link aggregation scheme and a start address and an aggregation member list corresponding to the at least one link aggregation group, the first link aggregation scheme and the second link aggregation scheme are different schemes for performing link aggregation for multiple physical ports of the same network device, and the number of aggregation members corresponding to each link aggregation group in a single link aggregation scheme is not limited;
a modifying unit, configured to modify one or more of the at least one link aggregation group, a starting address corresponding to the at least one link aggregation group, and an aggregation member list corresponding to the at least one link aggregation group in the second link aggregation scheme;
a first updating unit, configured to update the second target entry according to the modified second link aggregation scheme;
a second updating unit, configured to update the first identifier in the identifier field to a second identifier of the second target entry, and update the first link aggregation group information in the information field to second link aggregation group information according to content in the second target entry;
and the communication unit is used for carrying out data communication according to the updated second identifier in the identifier field and the updated second link aggregation group information in the information field.
7. An electronic device comprising a processor, a memory and an input/output interface, wherein the processor, the memory and the input/output interface are connected to each other, wherein the input/output interface is used for inputting or outputting data, the memory is used for storing program codes, and the processor is used for calling the program codes and executing the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to carry out the method according to any one of claims 1 to 5.
CN202210379377.7A 2022-04-12 2022-04-12 Method, device, equipment and storage medium for switching link aggregation scheme Active CN114827016B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210379377.7A CN114827016B (en) 2022-04-12 2022-04-12 Method, device, equipment and storage medium for switching link aggregation scheme

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210379377.7A CN114827016B (en) 2022-04-12 2022-04-12 Method, device, equipment and storage medium for switching link aggregation scheme

Publications (2)

Publication Number Publication Date
CN114827016A CN114827016A (en) 2022-07-29
CN114827016B true CN114827016B (en) 2023-03-24

Family

ID=82535631

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210379377.7A Active CN114827016B (en) 2022-04-12 2022-04-12 Method, device, equipment and storage medium for switching link aggregation scheme

Country Status (1)

Country Link
CN (1) CN114827016B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019019991A1 (en) * 2017-07-24 2019-01-31 新华三技术有限公司 Creation of aggregation group
CN113542145A (en) * 2020-04-20 2021-10-22 华为技术有限公司 Method for sharing Ethernet link aggregation group load and network equipment

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102364892B (en) * 2011-10-12 2013-04-24 华为技术有限公司 Link aggregation control protocol (LACP) link switching and data transmission method and apparatus thereof
WO2014118938A1 (en) * 2013-01-31 2014-08-07 株式会社日立製作所 Communication path management method
US9553798B2 (en) * 2013-04-23 2017-01-24 Telefonaktiebolaget L M Ericsson (Publ) Method and system of updating conversation allocation in link aggregation
TW201448537A (en) * 2013-04-23 2014-12-16 Ericsson Telefon Ab L M A method and system of updating conversation allocation in link aggregation
CN109995567A (en) * 2017-12-29 2019-07-09 北京华为数字技术有限公司 Method, equipment and the system of link aggregation group progress automatic protection
CN111083068A (en) * 2018-10-22 2020-04-28 中兴通讯股份有限公司 Aggregation link convergence method, device and storage medium
US10924390B2 (en) * 2018-11-02 2021-02-16 Hewlett Packard Enterprise Development Lp Updating entries of a distribution data structure
CN112583709B (en) * 2019-09-27 2024-05-28 深圳市中兴微电子技术有限公司 Routing method, system, switching equipment and medium for link aggregation
CN113132249A (en) * 2019-12-31 2021-07-16 华为技术有限公司 Load balancing method and equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019019991A1 (en) * 2017-07-24 2019-01-31 新华三技术有限公司 Creation of aggregation group
CN113542145A (en) * 2020-04-20 2021-10-22 华为技术有限公司 Method for sharing Ethernet link aggregation group load and network equipment

Also Published As

Publication number Publication date
CN114827016A (en) 2022-07-29

Similar Documents

Publication Publication Date Title
CN111522641B (en) Task scheduling method, device, computer equipment and storage medium
CN104468401B (en) A kind of message processing method and device
US20170171304A1 (en) Service updating method and system for server cluster
CN111190854A (en) Communication data processing method, device, equipment, system and storage medium
CN111475250A (en) Network optimization method and device in cloud environment
US7725513B2 (en) Minimum processor instruction for implementing weighted fair queuing and other priority queuing
CN112702362B (en) Method and device for enhancing TCP/IP protocol stack, electronic equipment and storage medium
CN113986969A (en) Data processing method and device, electronic equipment and storage medium
CN114827016B (en) Method, device, equipment and storage medium for switching link aggregation scheme
CN110597643B (en) Inter-core communication method, processor and electronic equipment
CN109639555B (en) Link layer message generation method, link layer message generation device and terminal equipment
CN109150720B (en) Service chain message forwarding method, device, equipment and computer readable storage medium
CN113157465B (en) Message sending method and device based on pointer linked list
CN114079634B (en) Message forwarding method and device and computer readable storage medium
CN110912832A (en) Processing method and device for flow load balancing, electronic equipment and storage medium
CN116016539B (en) Service request processing method, device, server and storage medium
EP3893122A1 (en) Network processor and message processing method
CN111209042B (en) Method, device, medium and electronic equipment for establishing function stack
CN115225694B (en) Data stream transmission method, device, equipment and medium
CN114285905A (en) Service-based routing method and routing device
CN115865783B (en) Method and device for determining target node and computer readable storage medium
CN111464455B (en) Message output method and device
CN116208573A (en) Data processing method, device, electronic equipment and storage medium
CN117909045A (en) Log storage method, device and computer readable storage medium
US20200242096A1 (en) Network switch with network analysis data producer-consumer shared memory

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