A method and device for preventing hash polarization of multi-level cross-device link aggregation connections

By recording the root node hash algorithm and dynamically adjusting the hash algorithm in the multi-level M-LAG architecture, the hash polarization problem is solved, and uniform load sharing of traffic in the multi-level M-LAG system is achieved.

CN119070972BActive Publication Date: 2025-11-04NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411044893.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2025-11-04
Estimated Expiration
2044-07-31

AI Technical Summary

Technical Problem

In a multi-level M-LAG architecture, multiple traffic streams may experience hash polarization after being continuously hashed by M-LAG devices at different levels. This can cause traffic to be sent to only one of the M-LAG devices at other levels, resulting in an inability to distribute the load evenly.

Method used

By recording the root node hash algorithm, detecting polarized cross-device link aggregation groups, filtering and setting new hash algorithms, and dynamically adjusting hash algorithms to distribute traffic evenly, the system includes using a traffic monitoring module to detect hash polarization, an algorithm filtering module to select suitable hash algorithms, and an algorithm setting module to set new hash algorithms in the corresponding registers.

Benefits of technology

It achieves uniform load balancing of traffic in cross-device link aggregation systems, avoids hash polarization, and ensures that traffic is evenly distributed to member devices of other M-LAG systems in multi-level M-LAG systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119070972B_ABST
    Figure CN119070972B_ABST
Patent Text Reader

Abstract

The application provides a method and device for preventing multi-level cross-device link aggregation connection hash polarization, the method comprising: recording a root node hash algorithm; setting the root node hash algorithm for each effective cross-device link aggregation group; detecting a polarized cross-device link aggregation group; screening a new hash algorithm for the polarized cross-device link aggregation group; and setting the new hash algorithm for the polarized cross-device link aggregation group.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to a cross-device link aggregation technology, in particular to a method and device for preventing multi-level cross-device link aggregation connection hash polarization. BACKGROUND

[0002] M-LAG (Multi chassis link aggregation) virtually connects two physical devices into a virtual M-LAG system at the aggregation level to access the network, realizes cross-device link aggregation, and thus provides device-level redundancy protection and traffic load sharing.

[0003] Under the M-LAG system, the M-LAG protocol technology data flow between two M-LAG devices adjacent to each other is transmitted through a peer-link; in addition, there is a Keep alive link between the two devices in addition to the IPL link, which is used to detect the state of the neighbor, that is, to exchange Keep alive messages to perform MAD (Multi Active Detection) when the peer-link fails, so as to avoid both M-LAG devices running in the master device role.

[0004] When there are many devices in the network, in order to ensure the efficiency and reliability of traffic forwarding between communication devices, a multi-level M-LAG architecture can be used, and different levels of M-LAG systems are connected through cross-device link aggregation groups, so that M-LAG devices at the same level preferentially forward traffic through local cross-device link aggregation groups to other levels of M-LAG devices; even if a member link of an M-LAG device at another level fails, it can still be transmitted through other working member links, reducing the traffic transmission of the peer-link.

[0005] However, in the multi-level M-LAG architecture, multiple groups of traffic may be polarized after continuous hash calculation through different levels of M-LAG devices, resulting in traffic being sent to only one M-LAG device at another level. SUMMARY

[0006] The purpose of the present application is to provide a method and device for preventing multi-level cross-device link aggregation connection hash polarization, so as to evenly load share multiple groups of traffic from a higher level cross-device link aggregation system to the member links connecting the next level cross-device link aggregation system.

[0007] To achieve the above object, the application provides a method for preventing hash polarization of multi-level cross-device link aggregation connection, which comprises the following steps: recording a root node hash algorithm; setting the root node hash algorithm for each effective cross-device link aggregation group; detecting a polarized cross-device link aggregation group; screening a new hash algorithm for the polarized cross-device link aggregation group; and setting the new hash algorithm for the polarized cross-device link aggregation group.

[0008] To achieve the above object, the application also provides a device for preventing hash polarization of multi-level cross-device link aggregation connection, which comprises the following components: a first register for recording a root node hash algorithm; a plurality of second registers, each of which corresponds to a cross-device link aggregation group; a traffic monitoring module for detecting a polarized cross-device link aggregation group; an algorithm screening module for screening a new hash algorithm for the polarized cross-device link aggregation group; and an algorithm setting module for setting the root node hash algorithm in each effective cross-device link aggregation group corresponding second register according to the root node hash algorithm recorded by the first register, and setting the new hash algorithm in the second register corresponding to the polarized cross-device link aggregation group.

[0009] The application has the beneficial effect that when the member device of the cross-device link aggregation M-LAG system detects that the cross-device link aggregation group of the other level M-LAG system is polarized, the hash algorithm of the polarized cross-device link aggregation group is dynamically modified, so that the traffic to the other level M-LAG system is evenly load shared to the member devices of the other level M-LAG system. BRIEF DESCRIPTION OF DRAWINGS

[0010] Figure 1 A flowchart of a method for preventing hash polarization of multi-level cross-device link aggregation connection provided by the application is provided.

[0011] Figure 2 A schematic diagram of multi-level cross-device link aggregation connection is provided.

[0012] Figure 3 A flowchart of cross-device link aggregation group hash polarization detection provided by the application is provided.

[0013] Figure 4 A flowchart of screening hash algorithm for the polarized cross-device link aggregation group provided by the application is provided.

[0014] Figure 5 A schematic diagram of updating root node algorithm in multi-level cross-device link aggregation connection provided by the application is provided.

[0015] Figure 6 A schematic diagram of a device for preventing hash polarization of multi-level cross-device link aggregation connection provided by the application is provided. DETAILED DESCRIPTION

[0016] Examples will be described in sufficient detail to enable those skilled in the art to make and use it. Examples may not be described in complete detail due to the apparent nature of the examples to one skilled in the art. The examples typically do not describe fully functioning examples, as that would be readily understood and appreciated by those skilled in the art.

[0017] As used in the description of the disclosure herein, the term "includes" means includes but not limited to; the term "containing" means includes but not limited to; the terms "above", "within" and "below" include the number; the terms "greater than", "less than" means not including the number. The term "based on" means at least based on part of it.

[0018] Figure 1 A flow chart of an embodiment of a method for preventing polarization of multi-level cross-device link aggregation connection provided by the present application is shown, the method comprises,

[0019] Step 101, record the root node hash algorithm;

[0020] Step 102, for each effective cross-device link aggregation group, set the root node hash algorithm;

[0021] Step 103, detect the polarization cross-device link aggregation group;

[0022] Step 104, for the polarization cross-device link aggregation group, screen the new hash algorithm;

[0023] Step 105, set the new hash algorithm for the polarization cross-device link aggregation group.

[0024] The beneficial effects of the present application are that when the member device of the cross-device link aggregation M-LAG system detects the polarization of the cross-device link aggregation group connected to the other level M-LAG system, the hash algorithm of the polarization cross-device link aggregation group is dynamically modified, so that the traffic to the other level M-LAG system is evenly load shared to the member device of the other level M-LAG system.

[0025] Figure 2 In the multi-level cross-device link aggregation connection shown, M-LAG system 10 is the first level M-LAG system, M-LAG system 20 is the second level M-LAG system, and M-LAG system 30 is the third level M-LAG system; one of the M-LAG devices 11 of the first level M-LAG system is designated as the root node.

[0026] After the cross-device link aggregation group of M-LAG system 10 is effective, it is connected to M-LAG system 20 through M-LAG interface M-LAG int1.

[0027] After the cross-device link aggregation group of the M-LAG system 20 is enabled, the M-LAG system 10 is connected through the M-LAG interface M-LAG int2-1, and the M-LAG system 30 is connected through the M-LAG interface M-LAG int2-2.

[0028] After the cross-device link aggregation group of the M-LAG system 30 is enabled, the M-LAG system 20 is connected through the M-LAG interface M-LAG int3.

[0029] The root node algorithm register of each M-LAG device of the M-LAG system 10, 20, and 30 is used to record a root node hash algorithm, such as CRC-8.

[0030] In the initial state, the M-LAG device 11 and 12 each set an M-LAG algorithm register to record the hash algorithm CRC-8 of the cross-device link aggregation group connected by the M-LAG int 1; the M-LAG device 21 and 22 each set two M-LAG algorithm registers to respectively record the algorithms CRC-8 of the cross-device link aggregation groups connected by the M-LAG int 2-1 and the M-LAG int 2-2; and the M-LAG device 31 and 32 each set an M-LAG algorithm register to respectively record the hash algorithm CRC-8 of the cross-device link aggregation group connected by the M-LAG int 3.

[0031] In the initial state, the M-LAG algorithm register of each member device of each M-LAG system records a root node hash algorithm.

[0032] In the M-LAG system 10, after the M-LAG device 11 receives a plurality of groups of data messages of traffic, the egress port found in the layer 2 / layer 3 forwarding table is the M-LAG int 1, the hash factor (such as a three-tuple, a five-tuple, or a seven-tuple) is obtained from the received data message, the hash value is calculated according to the root node hash algorithm of the M-LAG algorithm register, and the message is sent through the local port 11a or 11b of the M-LAG int 1 corresponding to the hash value, so as to evenly load share the traffic to the member links connected to the next-level M-LAG system 20.

[0033] In the M-LAG system 20, after the M-LAG device 21 receives a plurality of groups of data messages of traffic from the M-LAG system 10, the egress port found in the layer 2 / layer 3 forwarding table is the M-LAG int 2-2, the hash factor is obtained from the received data message, the hash value is calculated based on the root node hash algorithm, and the message is sent through the local port of the M-LAG int 2-2 corresponding to the hash value to the M-LAG system 30.

[0034] Normally, M-LAG device 21 will evenly hash the multiple sets of traffic sent through M-LAG int2-2 to both member ports 21a, 21b; but if the root node hashing algorithm is unreasonable, M-LAG device 21 will send most or even all of the packets through member port 21a to M-LAG system 30, and hashing polarization across the device link aggregation group occurs.

[0035] M-LAG device 21 monitors the traffic of the cross-device link aggregation group connected by M-LAG int2-2 to detect whether hashing polarization across the device link aggregation group occurs.

[0036] Figure 3 In this embodiment, the cross-device link aggregation group hashing polarization detection provided by the present application comprises the following steps:

[0037] Step 301, when the traffic monitoring period arrives, calculate the traffic load of each member port of the aggregation interface;

[0038] M-LAG device 21 is based on the preset traffic monitoring period timing.

[0039] M-LAG device 21 reads the number of sent packets recorded by the port counters of member ports 21a, 21b of M-LAG int2-2 in the completed traffic monitoring period at each time the traffic monitoring period arrives, and obtains the traffic values of member ports 21a, 21b in the last traffic monitoring period; for example, the traffic value of member port 21a is 6G, and the traffic value of member port 21b is 22G.

[0040] M-LAG device 21 calculates the traffic load of member port 21a as 19% and the traffic load of member port 21b as 69% according to the bandwidth 32G of the member port.

[0041] Step 302, determine whether the difference of the traffic loads between each member port is greater than a specified value; if yes, execute step 303, and if no, return to step 301;

[0042] M-LAG device 21 calculates the difference of the traffic loads between member ports 21a and 21b as 50%, which exceeds the preset traffic load difference 10%.

[0043] In this step, if M-LAG device 21 calculates the difference of the traffic loads between member ports 21a and 21b as less than the preset traffic load difference 10%, return to step 301, and recalculate the traffic loads of member ports 21a and 21b respectively when a new traffic monitoring period arrives, to detect whether hashing polarization occurs.

[0044] Step 303, determine that hashing polarization across the device link aggregation group occurs.

[0045] M-LAG device 21 detected that the current hash algorithm caused uneven load balancing on member ports 21a and 21b of M-LAG int2-2; the traffic sent by member port 21a was significantly less than the traffic sent by the other member port; that is, hash polarization occurred in the cross-device link aggregation group connected to M-LAGint2-2.

[0046] When the M-LAG device 21 or M-LAG device 22 of the M-LAG system 20 is based on Figure 3 The illustrated embodiment detects hash polarization in cross-device link aggregation, initiates a hash algorithm filtering task, and executes... Figure 4 The hash algorithm filtering process is shown; suitable hash algorithms are selected for cross-device link aggregation groups with hash polarization.

[0047] Figure 4 The hash algorithm filtering process shown includes the following steps:

[0048] Step 401: Poll multiple alternative hash algorithms in round-robin fashion;

[0049] The M-LAG device 21 selects an unused alternative hash parameter, such as CRC-4, from multiple alternative hash algorithms, including CRC-4, CRC-12, CRC-16, and CRC-CCITT.

[0050] Step 402: Calculate the hash value based on the current candidate hash algorithm and the hash factor of the packets of multiple traffic groups.

[0051] In M-LAG system 20, after receiving multiple sets of traffic data packets from M-LAG system 10, M-LAG device 21 looks up the outgoing port M-LAG int2-2 in the Layer 2 / Layer 3 forwarding table, obtains the hash factor from the received data packet, and calculates the hash value based on the currently polled hash algorithm CRC-4. The packet is then forwarded to M-LAG system 30 through the local port of M-LAGint2-2 corresponding to the calculated hash value.

[0052] Step 403: In the aggregation interface of the polarized cross-device link, multiple sets of traffic are sent by selecting the member port corresponding to the calculated hash value;

[0053] The M-LAG device 21 calculates the hash value based on the received packets of multiple traffic streams and then sends it through the member port 21a or 21b corresponding to the hash value.

[0054] The M-LAG device 21 performs the same process in step 404 as it does in step 303; the process in step 303 is merged here and will not be described again.

[0055] Step 404, when the flow monitoring period arrives, the flow load of each member port of the aggregation interface is calculated;

[0056] The M-LAG device 21 performs the processing of step 404 in the same way as the processing of step 301, and the processing mechanism of step 301 is incorporated herein, and will not be described again.

[0057] Step 405, it is judged whether the difference of the flow load between the member ports is greater than a specified value; if yes, step 406 is executed; if no, step 409 is executed.

[0058] If the M-LAG device 21 calculates that the difference of the flow load between the member ports 21a and 21b exceeds the preset flow load difference 10%, it indicates that the current hash algorithm CRC-4 still causes hash polarization, and the hash algorithm is continued to be screened for the hash-polarized cross-device link aggregation group.

[0059] If the M-LAG device 21 calculates that the difference of the flow load between the member ports 21a and 21b is less than the preset flow load difference 10%, it indicates that the current hash algorithm CRC-4 can continue to uniformly load share the groups of flows after the load sharing of the previous M-LAG system to the next M-LAG system.

[0060] Step 406, the difference of the flow load between the member ports corresponding to the current candidate hash algorithm is recorded.

[0061] If the M-LAG device 21 determines via the processing of step 405 that the difference of the flow load between the member ports 21a and 21b exceeds the preset flow load difference 10%, the M-LAG device 21 records the difference of the flow load between the member ports 21a and 21b corresponding to the hash algorithm CRC-4.

[0062] Step 407, it is judged whether all candidate hash algorithms have been polled, if no, step 401 is returned; if yes, step 408 is executed.

[0063] Step 408, the candidate hash parameter corresponding to the minimum flow load difference is selected as the new hash parameter.

[0064] Since in the initialization state, each M-LAG system calculates the hash value based on the root node hash algorithm; in order to avoid unreasonable setting of the root node hash algorithm, the lower-level M-LAG device cannot uniformly load share the groups of flows to the next M-LAG device, if all candidate hash algorithms will cause hash polarization, before refreshing the root node hash algorithm in the network, the hash algorithm with smaller flow load difference is selected first.

[0065] Step 409, determining the current alternative hash algorithm as the new hash algorithm;

[0066] If the M-LAG device 21 determines via the process of step 405 that the difference of the traffic load between the member ports 21a and 21b is less than the preset traffic load difference of 10%, the M-LAG device 21 selects the hash algorithm CRC-4 as the new hash algorithm.

[0067] Step 410, setting the new hash algorithm for the polarization cross-device link aggregation group.

[0068] The M-LAG device 21 sets the hash algorithm recorded in the algorithm register of the M-LAG int 2-2 to the new hash algorithm; that is, the hash algorithm screened in step 408 or step 409.

[0069] Via Figure 4 The embodiment shown, the M-LAG device 21 dynamically adjusts the hash parameter, optimizing the traffic load sharing of the cross-device link aggregation group that occurs hash polarization. The M-LAG device 22 can be based on Figure 3 、 Figure 4 The embodiment, performing cross-device link aggregation group hash polarization detection and performing hash algorithm screening.

[0070] When the M-LAG device 21 or the M-LAG device 22 of the M-LAG system 20 determines that all alternative hash algorithms will cause hash polarization of the cross-device link aggregation group based on Figure 4 The embodiment shown, the M-LAG device 21 outputs notification information for updating the root node hash algorithm through the device display interface, and notifies the network maintenance personnel to start the root node hash algorithm update.

[0071] Figure 5 The schematic diagram provided in the present application for updating the root node algorithm in the multi-level cross-device link aggregation connection.

[0072] The network maintenance personnel refreshes the root node hash algorithm of the root node algorithm register of the M-LAG device 11, 12 of the first-level M-LAG system through the instruction, such as CRC-32.

[0073] The M-LAG device 11, 12 records the cross-device link aggregation group of the M-LAG int 1 connection as the hash algorithm CRC-32 according to the refreshed root node algorithm register.

[0074] The M-LAG device 11, 12 respectively generates hash algorithm update notification packets 501 and 502 carrying the new root node hash algorithm CRC-302, and sends them to the M-LAG device 21, 22 respectively.

[0075] The M-LAG devices 21, 22 receive the hash algorithm update notification messages 501, 502, respectively, and flush the hash algorithm CRC-32 of the root node algorithm register. The M-LAG devices 21, 22 receive the hash algorithm update notification messages 501 and 502, and flush the root node algorithm register according to the later-arriving hash algorithm update notification message.

[0076] After the M-LAG devices 21, 22 update the root node algorithm register, respectively, they also flush the algorithm register of the M-LAG int 2-1 and the M-LAG int 2-2 to the new root node hash algorithm CRC-32.

[0077] After the M-LAG devices 21, 22 update the root node algorithm register, respectively, they generate hash algorithm update notification messages 503 and 504, respectively, carrying the new root node hash algorithm CRC-32, and send them to the M-LAG devices 31, 32, respectively.

[0078] The M-LAG devices 31, 32 receive the hash algorithm update notification messages 503, 504, respectively, and flush the hash algorithm CRC-32 of the root node algorithm register. The M-LAG devices 31, 32 receive the hash algorithm update notification messages 503 and 504, and flush the root node algorithm register according to the later-arriving hash algorithm update notification message.

[0079] After the M-LAG devices 31, 32 update the root node algorithm register, respectively, they also flush the algorithm register of the M-LAG int 3 to the new root node hash algorithm CRC-32.

[0080] In this way, in the multi-level cross-device link aggregation connection, the root node hash algorithm of each M-LAG system is updated, avoiding the hash polarization of the cross-device link aggregation group of the low-level M-LAG system due to the inappropriate root node hash algorithm.

[0081] After the devices of each level of M-LAG system flush the root node algorithm, they can flush the algorithm register of the M-LAG int according to the new root node hash algorithm. Figure 3 , Figure 4 , Figure 5 The disclosed examples continue to dynamically adjust the hash algorithm, so that the multiple groups of traffic that have undergone repeated hash calculation are evenly forwarded through different levels of cross-device link aggregation groups.

[0082] Figure 6The device schematic diagram for preventing multi-level cross-device link aggregation connection hash polarization is provided for the present application. The device 60 comprises a first register R1 for recording a root node hash algorithm; a plurality of second registers R2, each corresponding to a cross-device link aggregation group. A traffic monitoring module 601 is configured to detect a polarized cross-device link aggregation group; an algorithm screening module 602 is configured to screen a new hash algorithm for the polarized cross-device link aggregation group; and an algorithm setting module 603 is configured to set the root node hash algorithm in each second register corresponding to an effective cross-device link aggregation group according to the root node hash algorithm recorded in the first register, and set a new hash algorithm in the second register corresponding to the polarized cross-device link aggregation group.

[0083] When the algorithm screening module 602 screens the new hash algorithm, a plurality of candidate hash algorithms are polled; the plurality of candidate hash algorithms are polled; a hash value is calculated according to the current candidate hash algorithm and a hash factor of the packets of the plurality of groups of traffic; in the aggregation interface of the polarized cross-device link, a member port corresponding to the calculated hash value is selected to send the plurality of groups of traffic; and when the difference between the traffic loads of the member ports of the aggregation interface within a traffic monitoring period does not exceed a preset value, the current candidate hash algorithm is determined to be the new hash algorithm.

[0084] The traffic monitoring module 601 is also configured to monitor the load sharing traffic of the packets of the plurality of groups of traffic on each member link of the polarized cross-device link aggregation group within a traffic monitoring period, and notify the algorithm screening module 602; the algorithm screening module 602 is configured to calculate the traffic loads of the member ports of the aggregation interface and the difference between the traffic loads of the member ports of the aggregation interface within the traffic monitoring period, and when the difference between the traffic loads of the member ports of the aggregation interface within the traffic monitoring period exceeds a preset value, record the traffic load difference corresponding to the current candidate hash algorithm, and poll the next candidate hash algorithm.

[0085] The algorithm screening module 602 is also configured to select the candidate hash parameter corresponding to the minimum traffic load difference as the new hash parameter when the polling of the plurality of candidate hash algorithms is completed; and output notification information for updating the root node hash algorithm through a display interface of an input / output system 606.

[0086] The algorithm setting module 603 is also configured to set a new root node hash algorithm in the first register R1 and in each second register R2 based on a hash algorithm setting instruction input by the input / output system 606.

[0087] The receiving module 604 is configured to receive a hash algorithm update notification message carrying a new root node hash algorithm; the algorithm setting module 603 is further configured to record the new root node hash algorithm in the first register R1 and set the new root node hash algorithm in each second register R2 according to the hash algorithm update notification message. The algorithm setting module 603 is further configured to read the new root node hash algorithm recorded in the first register and generate a hash algorithm update notification message; and the sending module 605 is further configured to send the hash algorithm update notification message carrying the new root node hash algorithm through each member link of the polar cross-device link aggregation.

[0088] The above merely describes the preferred embodiments of the present application, but should not be used to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for preventing multi-level cross-device link aggregation connection hash polarization, characterized in that, The method comprises, recording a root node hash algorithm; setting the root node hash algorithm for each effective cross-device link aggregation group; detecting a polarized cross-device link aggregation group; selecting a new hash algorithm for the polarized cross-device link aggregation group; including: polling a plurality of candidate hash algorithms; calculating a hash value according to a current candidate hash algorithm and a hash factor of a packet of a plurality of groups of traffic; selecting a member port corresponding to the calculated hash value to send the plurality of groups of traffic in an aggregation interface of the polarized cross-device link; determining the current candidate hash algorithm as the new hash algorithm when a difference in traffic load between the member ports of the aggregation interface within a traffic monitoring period does not exceed a preset value; and setting the new hash algorithm for the polarized cross-device link aggregation group.

2. The method of claim 1, wherein, The method further comprises, when the difference in traffic load between the member ports of the aggregation interface within the traffic monitoring period exceeds the preset value; recording the difference in traffic load between the member ports of the aggregation interface corresponding to the current candidate hash algorithm; polling a next candidate hash algorithm of the plurality of candidate hash algorithms.

3. The method of claim 2, wherein, The method further comprises, when the polling of the plurality of candidate hash algorithms is completed; selecting a candidate hash parameter corresponding to a minimum traffic load difference as the new hash parameter; outputting notification information of updating the root node hash algorithm through a display interface.

4. The method of claim 3, wherein, The method further comprises, determining that a new root node hash algorithm has been recorded; carrying a hash algorithm update notification packet of the new root node hash algorithm through each member link of the polarized cross-device link aggregation.

5. The method of claim 4, wherein, The method further comprises, recording the new root node hash algorithm based on an input hash algorithm setting instruction; or recording the new root node hash algorithm according to a received hash algorithm update notification packet.

6. A device for preventing multi-level cross-device link aggregation connection hash polarization, characterized in that, The device comprises, a first register configured to record a root node hash algorithm; a plurality of second registers, each of which corresponds to a cross-device link aggregation group; a traffic monitoring module configured to detect a polarized cross-device link aggregation group; an algorithm screening module configured to screen a new hash algorithm for the polarized cross-device link aggregation group; polling a plurality of candidate hash algorithms; polling a plurality of candidate hash algorithms; calculating a hash value according to a current candidate hash algorithm and a hash factor of a packet of a plurality of groups of traffic; selecting a member port corresponding to the calculated hash value to send the plurality of groups of traffic in an aggregation interface of the polarized cross-device link; determining the current candidate hash algorithm as the new hash algorithm when a difference in traffic load between the member ports of the aggregation interface within a traffic monitoring period does not exceed a preset value; an algorithm setting module configured to set the root node hash algorithm in each effective cross-device link aggregation group corresponding second register according to the root node hash algorithm recorded by the first register; and set the new hash algorithm in the second register corresponding to the polarized cross-device link aggregation group.

7. The device according to claim 6, wherein The flow monitoring module is further configured to monitor load sharing of the packets of the multiple groups of flows on each member link of the polarization cross-device link aggregation group during a flow monitoring period, and notify the algorithm screening module; The algorithm screening module is configured to calculate flow load of each member port of the aggregation interface and flow load difference between the member ports of the aggregation interface during the flow monitoring period, and determine that the flow load difference between the member ports of the aggregation interface exceeds the preset value when the flow load difference between the member ports of the aggregation interface during the flow monitoring period exceeds the preset value. record the flow load difference corresponding to the current candidate hash algorithm; poll the next candidate hash algorithm.

8. The device of claim 7, wherein, The algorithm screening module is further configured to select a candidate hash parameter corresponding to a minimum flow load difference as the new hash parameter when polling the multiple candidate hash algorithms is completed, and output, through a display interface, notification information of updating the root node hash algorithm.

9. The apparatus of claim 8, wherein, The device further comprises a sending module, The algorithm setting module is further configured to read the new root node hash algorithm recorded in the first register, and generate a hash algorithm update notification packet; The sending module is further configured to carry the hash algorithm update notification packet of the new root node hash algorithm through each member link of the polarization cross-device link aggregation.

10. The apparatus of claim 9, wherein, The device further comprises a receiving module; The algorithm setting module is further configured to set a new root node hash algorithm in the first register and in each of the second registers based on a hash algorithm setting instruction; or, The receiving module is configured to receive the hash algorithm update notification packet carrying the new root node hash algorithm; The algorithm setting module is further configured to record the new root node hash algorithm in the first register and set the new root node hash algorithm in each of the second registers according to the hash algorithm update notification packet.

Citation Information

Patent Citations

  • Method and device for realizing dynamic load balance

    CN103401801A

  • Load balancing method and equipment

    CN113132249A