A method and device for planning equivalent multipath load sharing

By traversing hash algorithms and IP addresses on ECMP devices and selecting the most even load-sharing scheme, the problem of uneven load on ECMP devices is solved, thereby improving network performance and quality of service.

CN119945972BActive Publication Date: 2025-12-02NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411297671.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-15
Publication Date
2025-12-02
Estimated Expiration
2044-09-15

AI Technical Summary

Technical Problem

In complex network environments, a single load-sharing algorithm may lead to uneven load distribution on ECMP devices, resulting in congestion, high latency, and high packet loss rates, which can negatively impact network performance and QoS.

Method used

By establishing a remote login connection on the device to be configured, traversing the list of hash algorithms, simulating data packet forwarding, recording the sending ratio of each candidate IP address and hash algorithm member path, and selecting the most evenly distributed hash algorithm and IP address for load balancing.

Benefits of technology

This achieves even distribution of ECMP device load, reducing congestion and packet loss rates, and improving network performance and QoS.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119945972B_ABST
    Figure CN119945972B_ABST
Patent Text Reader

Abstract

This disclosure provides a method and apparatus for planning Equivalent Multipath (ECMP) load balancing. The method includes: a control device establishing a remote login connection with a device to be configured and setting up Equivalent Multipath (ECMP) to reach the destination device; sequentially traversing each hash algorithm in a hash algorithm list; controlling the device to be configured to switch to the currently traversed hash algorithm via the remote login connection, sending it a hash factor type, a set of candidate source IP addresses, and the IP address of the destination device; controlling the device to be configured to initiate the construction of multiple data packets based on the hash factor type, each with a candidate source IP address and a destination device IP address; causing the device to be configured to calculate and record the transmission ratio of each member path of ECMP associated with each candidate source IP address; and obtaining this ratio via the remote login connection to select service IP addresses for the device to be configured and load balance the data packets sent to the destination device based on the member paths selected by the hash algorithm from ECMP.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to communication technology, specifically to a method and apparatus for planning equivalent multipath load sharing. Background Technology

[0002] ECMP (Equal-Cost Multi-Path) is a Layer 3 (L3) load balancing technology. When network devices perform IP routing and packet forwarding at the network layer, ECMP, which consists of multiple member paths with the same routing cost, distributes the forwarded data packets evenly across the member paths of ECMP.

[0003] When a network device selects a member path, it obtains the hash factor from the forwarded data packet, calculates the hash value according to a preset hash algorithm, and identifies the member path to be selected based on the calculated hash value. For example, it selects the member path corresponding to the modulo value after taking the modulo of the calculated hash value; or it adds the calculated hash value to the offset and takes the modulo to select the member path corresponding to the modulo value.

[0004] In some complex networking environments, a single load-sharing algorithm cannot meet the load-sharing requirements, which may lead to uneven load distribution among devices. This can result in some member paths being overloaded and congested, causing congestion, high latency, and packet loss rates. Network resources are not effectively utilized by algorithms with remotely configured equivalent multipath, and network performance may also degrade, leading to a decrease in Quality of Service (QoS). Summary of the Invention

[0005] The purpose of this disclosure is to provide a method and apparatus for planning load balancing of equal-cost multipath routes, and to test the hash algorithm factors of equal-cost multipath routing on the device to be configured.

[0006] To achieve the above objectives, this disclosure provides a method for planning Equivalent Multipath (ECMP) load balancing. The method includes: establishing a remote login connection with a device to be configured; setting up an Equivalent Multipath (ECMP) path from the device to the destination device via the remote login connection; sequentially traversing each hash algorithm in a hash algorithm list; controlling the device to be configured to switch to the currently traversed hash algorithm via the remote login connection; sending a hash factor type, a set of candidate source IP addresses, and the IP address of the destination device as the destination IP address to the device to be configured via the remote login connection; controlling the device to be configured to construct multiple data packets based on the hash factor type, each with a candidate source IP address and a destination IP address; enabling the device to calculate a hash value according to the currently traversed hash algorithm, select an ECMP member path for each constructed data packet, calculate and record the transmission ratio of each ECMP member path associated with each candidate source IP address; and obtaining the transmission ratio recorded by the device to be configured based on the currently traversed hash algorithm and each member path corresponding to each candidate source IP address via the remote login connection.

[0007] To achieve the above objectives, this disclosure also provides a method for planning Equivalent Multipath (ECMP) load balancing. The method includes: establishing a remote login connection with the device to be configured; setting the ECMP path from the device to the destination device via the remote login connection; sequentially traversing each hash algorithm in a hash algorithm list; controlling the device to be configured to switch to the currently traversed hash algorithm via the remote login connection; sending a hash factor type, multiple sets of candidate source IP addresses, and the IP address of the destination device as the destination IP address to the device to be configured via the remote login connection; controlling the device to be configured to construct multiple data packets with each set of candidate source IP addresses and the destination IP address based on the hash factor type via the remote login connection; enabling the device to be configured to calculate a hash value according to the currently traversed hash algorithm, select a member path of ECMP for each constructed data packet, calculate and record the transmission ratio of each member path of ECMP associated with each candidate source IP address; and obtaining the transmission ratio recorded by the device to be configured based on the currently traversed hash algorithm and each member path corresponding to each set of candidate source IP addresses via the remote login connection.

[0008] To achieve the above objectives, this disclosure discloses a planned equivalent multipath load balancing device, which includes a network interface, a switching chip, a processor, and a memory; the processor executes the above methods by running processor-executable instructions in the memory, thereby testing the hash algorithm factors required for selecting member paths of the equivalent multipath on the device to be configured via remote login connection.

[0009] To achieve the above objectives, this disclosure also provides a method for remotely configuring equivalent multipath, applied to a device to be configured. The method includes: establishing a remote login connection with a control device; switching to the currently traversed hash algorithm via the remote login connection; receiving, via the remote login connection, a hash factor type, a set of candidate source IP addresses or multiple sets of candidate IP addresses, and the IP address of the destination device as the destination IP address from the control device; initiating, via the remote login connection, multiple data packets constructed based on the hash factor type, each containing a candidate source IP address and a destination IP address; calculating hash values ​​according to the currently traversed hash algorithm; selecting an ECMP member path for each constructed data packet; and calculating and recording the transmission ratio of each ECMP member path associated with each candidate source IP address; or, via the remote login connection, initiating multiple data packets constructed based on the hash factor type, each containing a candidate source IP address and a destination IP address; calculating hash values ​​according to the currently traversed hash algorithm; selecting an ECMP member path for each constructed data packet; and calculating and recording the transmission ratio of each ECMP member path associated with each candidate source IP address.

[0010] This disclosure also provides a planning equivalent multipath load-sharing device, the device including a network interface, a switching chip, a processor, and a memory; the processor executes processor-executable instructions in the memory to perform a method for testing the hash algorithm factors of the equivalent multipath on the source device of the device to be configured.

[0011] The beneficial effect of this disclosure is that, considering that the network consists of multiple levels of devices, a single load-sharing algorithm cannot meet the load-sharing requirements, and uneven load distribution among devices may occur. On the configured device, the appropriate IP address or hash algorithm is selected for the device by testing the hash algorithm factor. Attached Figure Description

[0012] Figure 1 A flowchart illustrating an embodiment of a method for planning equivalent multipath load balancing;

[0013] Figure 2 This disclosure provides a schematic diagram of a hash algorithm for selecting a uniform load within a planned range of IP addresses;

[0014] Figure 3 for Figure 2 A schematic diagram of the data acquisition program;

[0015] Figure 4 for Figure 2 A schematic diagram of a data analysis program;

[0016] Figure 5 This is a schematic diagram of an embodiment of a device for planning equivalent multipath load sharing provided in this disclosure. Detailed Implementation

[0017] The following detailed description will be provided with reference to several examples illustrated in the accompanying figures. In this detailed description, numerous specific details are used to provide a comprehensive understanding of this disclosure. Known methods, processes, components, and circuits are not described in detail in the examples to avoid obscuring their meaning.

[0018] In the terminology used, the term "including" means including but not limited to; the term "containing" means including but not limited to; the terms "above," "within," and "below" include the number itself; the terms "greater than" and "less than" mean not including the number itself. The term "based on" means based on at least a portion of them.

[0019] Figure 1 This disclosure provides an embodiment of a method for planning load balancing across equivalent multipath paths, the embodiment including,

[0020] Process 101: Establish a remote login connection with the device to be configured;

[0021] Process 102: Connect via remote login and configure the Equal Cost Multipath (ECMP) to reach the destination device from the device to be configured;

[0022] To handle 103, iterate through each hash algorithm in the hash algorithm list in order.

[0023] To handle error 104, the system uses a remote login connection to control the device to be configured to switch to the currently traversed hash algorithm; it also uses the remote login connection to send the hash factor type, a set of candidate source IP addresses, and the IP address of the destination device as the destination IP address to the device to be configured.

[0024] Process 105: Through remote login connection, control the device to be configured to construct multiple data packets based on the hash factor type, with each candidate source IP address and destination IP address.

[0025] The device to be configured calculates the hash value according to the hash algorithm being traversed, selects an ECMP member path for each constructed data packet, and records the number of packets sent for each ECMP member path associated with each candidate source IP address.

[0026] The beneficial effect of this disclosure is that, considering that the network consists of multiple levels of devices, a single load-sharing algorithm cannot meet the load-sharing requirements, and uneven load distribution among devices may occur. On the configured device, the appropriate IP address or hash algorithm is selected for the device by testing the hash algorithm factor.

[0027] Figure 2 This disclosure provides a schematic diagram of a hash algorithm for selecting a uniform load within a planned range of IP addresses; including the following processes:

[0028] Start the control device and the network device to be configured. Figure 2 Before the processing shown, configure the local area network management IP address and allow remote login on the network device to be configured; for example, the network device to be configured is set to allow Telnet (Telecommunication Network Protocol) or SSH (Secure Shell).

[0029] The control device configures the network device to be configured for the hash factor type used in ECMP traffic load balancing, such as triples, quintuples, or septuplets. This disclosure is not limited to either flow-based or packet-based hash load balancing. For packet-based hash load balancing, the embodiments of this disclosure select appropriate hash parameters and source IP addresses; the additional fields used for hash value calculation in packet-based analysis mode are unaffected.

[0030] The control device is configured with a list of hash algorithms that include multiple hash algorithms.

[0031] In step 201, the control device checks whether a network connection has been established with the management IP address of the network device being configured. If yes, proceed to step 202; otherwise, terminate the process of selecting a hash algorithm and service IP address for the network device to be configured within the planned IP address range.

[0032] To test network connectivity, the control device sends an ICMP (Internet Control Message Protocol) echo request data packet to the management IP address of the network device to be configured.

[0033] When the network device to be configured receives an ICMP echo request, it will return an ICMP echo reply data packet.

[0034] After waiting, the control device receives an ICMP echo reply from the device to be configured, confirming that a network connection has been established with the network device to be configured.

[0035] Process 202 to determine if a remote login connection has been established. If yes, proceed to process 203; otherwise, terminate the process of selecting a hash algorithm and service IP address for the network device to be configured within the planned IP address range.

[0036] The control device starts the remote login client (telnet / SSH client), performs authentication, and then obtains a remote login connection by telnet or SSH according to the operating system prompt. Remote login is successful.

[0037] Process 203 and execute the data acquisition program;

[0038] The control device, based on a remote login connection, controls the device to be configured and executes a data acquisition program. The control device simulates sending data packets based on candidate IP addresses and traversed hash parameters to obtain ECMP member path routing information for different traffic from the device to the destination device. This data acquisition program is as follows: Figure 3 As shown, the following processes are included:

[0039] Process 2031 by connecting remotely and configuring ECMP.

[0040] The control device connects remotely and sets up ECMP on the device to be configured to reach the destination device.

[0041] Process 2032 by sending the hash factor type, candidate IP address, and destination IP address to the device to be configured via remote login connection.

[0042] In the examples disclosed herein, the destination IP address is the service IP address of the destination device, that is, the IP address that the network device will reach via the configured ECMP.

[0043] In the examples disclosed herein, if the network device to be configured sends a data packet to the destination device through a single service IP address, the candidate IP addresses sent by the control device to the network device to be configured are a group of IP addresses, such as IP1-IP10.

[0044] In another example of this disclosure, if the network device to be configured is a computing node server with multiple computing nodes, and it is necessary to select a hash algorithm and corresponding IP address for each computing node within the planned IP address range, the control device sends multiple sets of IP addresses to the computing node server. Each set of IP addresses contains multiple candidate IP addresses, each corresponding to a different computing node. For example, if the computing node server has four computing nodes, the control device sends multiple sets of candidate IP addresses to the computing node server, and each set of candidate IP addresses contains four candidate IP addresses.

[0045] Process 2033: Determine if the list of algorithms to be traversed is empty. If it is, end the data acquisition program and enter the data analysis program 204; otherwise, execute the processing of the data acquisition program 2034.

[0046] The control device reads a preset list of hash algorithms. If the list is empty, it indicates that all hash algorithms in the list have been traversed, and the data acquisition process is complete. If the list is not empty, the data acquisition process continues.

[0047] Processing 2034 involves switching the device to be configured to the currently traversed hash algorithm via remote login connection.

[0048] The control device iterates through a list of hash algorithms, sequentially selecting the next hash algorithm. Through remote login, it switches the device to be configured to the currently selected hash algorithm. After switching the hash algorithm, the control device removes the currently selected hash algorithm from the hash algorithm list.

[0049] In this disclosure, there are no restrictions on the type of hash algorithm used to calculate the traffic load balancing of each member path of ECMP.

[0050] Process 2035, which uses remote login to connect and control the device to be configured to simulate message forwarding.

[0051] The control device connects remotely and inputs corresponding commands into the network device to be configured to activate the underlying chip capabilities of the switching chip of the network device to perform simulated packet forwarding.

[0052] For example, the control device sends a set of IP addresses IP1-IP10 and the destination device's IP address IP1000 to the network device to be configured; the control device will then switch the network device to be configured to use the CRC-8 hash algorithm.

[0053] The network device to be configured constructs multiple data packets with source IP address IP1 and destination IP address IP1000. Then, it reads the triplet, quintuple, and septum of the constructed packets according to the CRC-8 hash algorithm to calculate the hash value. Then, it takes the modulo of the number of ECMP member paths and selects a member path for these constructed data packets based on the modulo result. The packet count of each member path (the virtual outgoing port of the member path) is recorded.

[0054] Next, the network device to be configured constructs multiple data packets with source IP address IP2 and destination IP address IP1000. The device calculates the hash value using the CRC-8 hash algorithm, selects an ECMP member path for these constructed data packets, and records the forwarding count for each member path (the virtual outgoing port of the member path). This process is repeated to complete the simulated packet forwarding for this group of candidate IP addresses. The device records the packet forwarding count for each member path using the CRC-8 hash algorithm with source IP addresses from IP1 to IP10.

[0055] Alternatively, the control device sends multiple sets of IP addresses to the network device to be configured, which acts as a computing node server; one set of IP addresses is IP11, IP12, IP13, IP14, and the destination device's IP address is IP1000; the control device then switches the network device to be configured to use the CRC-8 hash algorithm.

[0056] The computing nodes 1-4 of the device to be configured construct multiple data packets with IP11, IP12, IP13, and IP14 as source IP addresses and IP1000 as destination IP address. Each packet calculates a hash value according to the CRC-8 hash algorithm. An ECMP member path is selected for these constructed data packets, and the forwarding count value of each member path (the virtual outgoing port of the member path) is recorded.

[0057] Next, computing nodes 1-4 construct multiple data packets using another set of candidate IP addresses as source IP addresses and IP1000 as the destination IP address. Each packet's hash value is calculated using the CRC-8 hash algorithm. An ECMP member path is selected for these constructed data packets, and the forwarding count for each member path (the virtual outgoing port of the member path) is recorded. In this way, the device under configuration records the number of packets forwarded using the CRC-8 hash algorithm on each member path with each computing node using each set of candidate IP addresses as source IP addresses.

[0058] After process 2035 is completed, the control device returns to process 2031 and continues to traverse the hash algorithm table until all hash algorithms in the hash algorithm table have been traversed.

[0059] Process error 204 and execute the data analysis program;

[0060] The control device, based on a remote login connection, obtains the number of forwarded data packets for each member path recorded by the device to be configured, executes a data analysis program, and selects IP addresses and hash parameters for the device to be configured that can evenly distribute the load across the member paths of ECMP to the destination device; such as Figure 4 As shown, the data analysis program includes the following processing:

[0061] Process 2041 by retrieving the hash algorithm traversal results from the device to be configured via remote login and storing them in the local database.

[0062] The control device connects via remote login and obtains the packet forwarding counts of each member path recorded by the data acquisition program through the login device to be configured. The obtained data is stored in a dictionary format and corresponds to the algorithm number applied by the network device at this time, and then stored in the database.

[0063] To process 2042, read the hash algorithm traversal results from the data sequentially.

[0064] The control device reads the packet forwarding count of each member path corresponding to each hash algorithm, which is recorded by the data acquisition program, according to the algorithm number.

[0065] If the network device to be configured sends a data packet to the destination device through a single service IP address, the source IP addresses (IP1-IP10) are read according to the CRC-8 algorithm number, and the packet forwarding count of each member path is recorded by the data acquisition program to calculate the sending ratio of the member path.

[0066] If the network device to be configured is a computing node server, each group of IP addresses is read as the source IP address according to the CRC-8 algorithm number, and the packet forwarding count of each member path is recorded by the data acquisition program.

[0067] Process 2042 and calculate the load sharing results;

[0068] In one example of this disclosure, if the network device to be configured sends a data packet to the destination device using a single service IP address, it reads the packet forwarding counts for each member path corresponding to source IP addresses IP1-IP10 according to the CRC-8 algorithm number, and calculates the transmission ratio of the member path; then, based on the read packet forwarding counts for each member path corresponding to source IP address IP2, it calculates the transmission ratio of the member path; and so on, to complete the calculation of the load balancing result for source IP addresses IP1-IP10. Then, the control device reads the packet forwarding counts for each member path corresponding to source IP addresses IP1-IP10 again according to other algorithm numbers to calculate the load balancing result.

[0069] In another example of this disclosure, when configuring a network device as a computing node server, the first group of candidate IP addresses (IP11-IP12) are read as source IP addresses based on the CRC-8 algorithm number. The transmission ratio of data packets simulated by the four computing nodes in each member path is calculated. Then, based on the next group of candidate IP addresses as source IP addresses, the transmission ratio of data packets simulated by each computing node in each member path is calculated. This process is repeated to calculate the load balancing result of multiple groups of candidate IP addresses as source IP addresses for the four computing nodes. Then, the control device reads the packet forwarding count for each member path corresponding to each group of candidate IP addresses as source IP addresses based on other algorithm numbers to calculate the load balancing result.

[0070] Similarly, the control device reads data based on the algorithm number of each hash algorithm and calculates the load-sharing result.

[0071] Process 205 to determine whether a hash algorithm with evenly distributed traffic and the source IP address have been identified; if yes, proceed to process 207; otherwise, proceed to process 206.

[0072] Based on the calculated load balancing results, the device to be configured selects an algorithm for even traffic distribution and the source IP address. During the implementation of this scheme, the inventors of this disclosure discovered through testing that after traversing hash algorithms, the load balancing ratio of each member path based on different hash algorithms is different. There will not be a situation where multiple hash algorithms simultaneously achieve even load balancing with the same load balancing ratio for each member path; however, there may be instances where the load balancing ratios of one or more hash algorithms within the planned IP address range are uneven, resulting in some member paths having a load balancing ratio of zero or significantly lower than other member paths.

[0073] Therefore, the control device can select the hash algorithm with the most uniform load sharing ratio and the source IP address with a uniform load sharing ratio under the hash algorithm based on the calculated load sharing results.

[0074] If the load sharing of one or more hash algorithms is uneven within the planned IP address range, resulting in some member paths having a load sharing ratio of zero or significantly lower than other member paths, it is necessary to select other candidate IP addresses from the planned IP address range to replace these IP addresses, and then re-traverse the hash algorithms and select a hash algorithm again within the planned IP address range.

[0075] If the process fails (206), the candidate IP addresses with uneven load distribution will be transformed, the hash algorithm list will be reset, and the process will return to (203).

[0076] In one example of this disclosure, if the network device to be configured sends a data packet to the destination device through a single service IP address, two new IP addresses are selected from the planned IP address range to replace the candidate IP addresses IP1 and IP2 with uneven load sharing, the hash algorithm list is reset, processing 203 is returned, and the data collection program is re-executed.

[0077] In another example of this disclosure, if the network device to be configured is a computing node server, other candidate IP addresses are selected within the planned IP address range to replace one or more candidate IP addresses in a certain group, the hash algorithm list is reset, a processing 203 error is returned, and the data collection program is re-executed.

[0078] Process 207 to set the hash algorithm and service IP address for the network device to be configured.

[0079] The control device, through remote login connection, identifies the source IP address with evenly distributed traffic and sets it as the service IP address of the device to be configured, used as the source IP address for sending data packets to the destination device. The control device, through remote login connection, also sets the hash algorithm with evenly distributed traffic as the hash algorithm used by the device to be configured (computing node) to calculate and select ECMP member paths.

[0080] Figures 2-4 In the embodiment, each candidate hash algorithm in the hash algorithm list of the control device contains an offset; different candidate hash algorithms may contain different or the same offset.

[0081] When the traversed hash algorithm of the device to be configured includes an offset, in the per-stream mode, the hash value is calculated based on the triples, quintuples, and septuplets, added to the offset, and then moduloed according to the number of ECMP members to select the member path; or in the per-packet mode, the hash value is calculated based on the triples, quintuples, septuplets, and additional fields, added to the offset, and then moduloed according to the number of ECMP members to select the member path.

[0082] The solution provided in this disclosure is simple and flexible to implement. By switching the hash algorithm on the network device to be configured, the traversal can be completed quickly, which is highly flexible. The control device analyzes and mines the data collected by the network device to be configured, calculates the hash algorithm that makes the traffic load evenly distributed, selects the appropriate service IP address within the planned IP address range, and makes the service traffic sent from the network device to the destination device more evenly distributed across the member paths of ECMP.

[0083] Figure 5 This is a schematic diagram of an embodiment of a device for planning Equivalent Multipath (ECMP) load balancing provided in this disclosure. The device 50 includes a processor 51, a memory 52, a switching chip 53, and a network interface 531. The processor 51 executes processor-executable instructions in the memory 52 to perform the following processes: establishing a remote login connection with the device to be configured; setting up Equivalent Multipath (ECMP) from the device to the destination device via the remote login connection; sequentially traversing each hash algorithm in the hash algorithm list; controlling the device to be configured to switch to the currently traversed hash algorithm via the remote login connection; sending a hash factor type, a set of candidate source IP addresses, and the IP address of the destination device as the destination IP address to the device to be configured via the remote login connection; and controlling the device to be configured to construct multiple data packets based on the hash factor type, each with a candidate source IP address and a destination IP address.

[0084] Processor 51 executes the following processes using processor-executable instructions in execution memory 52: determining all hash algorithms in the traversed hash algorithm list; obtaining, via a remote login connection, the number of packets sent for each ECMP member path associated with each candidate source IP address corresponding to each traversed hash algorithm; calculating the sending ratio of each traversed hash algorithm to each member path corresponding to each candidate source IP address; and setting a candidate source IP and the traversed hash algorithm corresponding to the most uniform sending ratio of each ECMP member path as the IP address and applied hash algorithm of the device to be configured, respectively.

[0085] Processor 51 performs the following processes by running processor-executable instructions in memory 52: determining all hash algorithms in the traversed hash algorithm list; obtaining the number of packets sent for each ECMP member path associated with each candidate source IP address corresponding to each traversed hash algorithm via a remote login connection; calculating the sending ratio of each traversed hash algorithm to each member path corresponding to each candidate source IP address; replacing each candidate source IP address corresponding to any member path with a sending ratio of zero with a new candidate source IP address; and re-traversing each hash algorithm in the hash algorithm list in sequence.

[0086] Processor 51 executes the following processes via processor-executable instructions in execution memory 52: establishing a remote login connection with the device to be configured; setting the equivalent multipath (ECMP) path from the device to the destination device via the remote login connection; sequentially traversing each hash algorithm in the hash algorithm list; controlling the device to be configured to switch to the currently traversed hash algorithm via the remote login connection; sending the hash factor type, multiple sets of candidate source IP addresses, and the IP address of the destination device as the destination IP address to the device to be configured via the remote login connection; controlling the device to be configured to construct multiple data packets with each set of candidate source IP addresses and the destination IP address based on the hash factor type via the remote login connection; enabling the device to be configured to calculate the hash value according to the currently traversed hash algorithm, select an ECMP member path for each constructed data packet, and record the number of packets sent on each ECMP member path associated with each candidate source IP address.

[0087] Processor 51 executes the following processes using processor-executable instructions in execution memory 52: determining all hash algorithms in the traversed hash algorithm list; obtaining the number of packets sent for each ECMP member path associated with each group of candidate source IP addresses corresponding to each traversed hash algorithm via a remote login connection; calculating the sending ratio of each traversed hash algorithm to each member path corresponding to each group of candidate source IP addresses; and setting the most uniform sending ratio of each ECMP member path to a group of candidate source IPs and traversed hash algorithms, respectively, as the IP address and applied hash algorithm of a set of computing power nodes to be configured.

[0088] Processor 51 performs the following processes by running processor-executable instructions in memory 52: determining all hash algorithms in the traversed hash algorithm list; obtaining, via a remote login connection, the number of packets sent for each ECMP member path associated with each group of candidate source IP addresses corresponding to each traversed hash algorithm; calculating the sending ratio of each traversed hash algorithm to each member path corresponding to each group of candidate source IP addresses; replacing any group of candidate source IP addresses with a member path having a sending ratio of zero with a new group of candidate source IP addresses; and re-traversing each hash algorithm in the hash algorithm list in sequence.

[0089] In the above list of hash algorithms, each candidate hash algorithm recorded does not contain an offset; or, each candidate hash algorithm recorded in the list of hash algorithms contains an offset.

[0090] The above description is merely a preferred embodiment of this disclosure and is not intended to limit this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for planning load sharing across equivalent multipath paths, characterized in that, The method includes, Establish a remote login connection with the device to be configured; Through the remote login connection, configure the Equivalent Multipath (ECMP) from the device to be configured to the destination device; Iterate through each hash algorithm in the list of hash algorithms in order; Through the remote login connection, the device to be configured is controlled to switch to the currently traversed hash algorithm; Through the remote login connection, a hash factor type, a set of candidate source IP addresses, and the IP address of the destination device as the destination IP address are sent to the device to be configured. Through the remote login connection, the device to be configured is controlled to construct multiple data packets based on the hash factor type, according to each of the candidate source IP address and the destination IP address; The device to be configured calculates a hash value based on the message feature value of each data packet read by the currently traversed hash algorithm, selects a member path of ECMP for each constructed data packet, and records the number of packets sent by each member path of ECMP associated with each candidate source IP address. Determine all hash algorithms that have been traversed from the list of hash algorithms; Through the remote login connection, obtain the number of packets sent for each member path of ECMP associated with each candidate source IP address corresponding to each traversed hash algorithm; Calculate the transmission ratio of each traversed hash algorithm to each member path corresponding to each candidate source IP address; Once a candidate source IP and the hash algorithm being traversed are identified corresponding to the most uniform transmission ratio of each member path of the ECMP, the candidate source IP and the hash algorithm being traversed are respectively set as the IP address and the applied hash algorithm of the device to be configured.

2. The method according to claim 1, characterized in that, The method also includes, If no candidate source IP address corresponding to the most uniform transmission ratio of each member path of the ECMP is identified and no traversed hash algorithm is found, replace each candidate source IP address corresponding to any member path with a transmission ratio of zero with a new candidate source IP address. Re-traverse each hash algorithm in the list of hash algorithms in order.

3. The method according to claim 1, characterized in that, The list of hash algorithms records that each candidate hash algorithm does not contain an offset; or... Each candidate hash algorithm recorded in the hash algorithm list contains an offset.

4. A method for planning load sharing across equivalent multipath paths, characterized in that, The method includes, Establish a remote login connection with the device to be configured; Through the remote login connection, configure the Equivalent Multipath (ECMP) from the device to be configured to the destination device; Iterate through each hash algorithm in the list of hash algorithms in order; Through the remote login connection, the device to be configured is controlled to switch to the currently traversed hash algorithm; Through the remote login connection, the hash factor type, multiple sets of candidate source IP addresses, and the IP address of the destination device as the destination IP address are sent to the device to be configured. Through the remote login connection, the device to be configured is controlled to construct multiple data packets based on the hash factor type, according to each group of candidate source IP addresses and the destination IP address; The device to be configured calculates a hash value based on the message feature value of each data packet read by the currently traversed hash algorithm, selects a member path of ECMP for each constructed data packet, and records the number of packets sent by each member path of ECMP associated with each candidate source IP address. Determine all hash algorithms that have been traversed from the list of hash algorithms; Through the remote login connection, obtain the number of packets sent for each member path of ECMP associated with each group of candidate source IP addresses corresponding to each traversed hash algorithm; Calculate the sending ratio of each traversed hash algorithm and each member path corresponding to each group of candidate source IP addresses; when the group of candidate source IPs and traversed hash algorithms corresponding to the most uniform sending ratio of each member path of the ECMP are identified, set the group of candidate source IPs and traversed hash algorithms corresponding to the most uniform sending ratio as the IP addresses and applied hash algorithms of the group of computing power nodes to be configured.

5. The method according to claim 4, characterized in that, The method also includes, If no candidate source IP address corresponding to the most uniform sending ratio of each member path of the ECMP is identified and no traversed hash algorithm is used, any candidate source IP address with a member path having a sending ratio of zero will be replaced with a new candidate source IP address. Re-traverse the list of hash algorithms in order for each hash algorithm.

6. The method according to claim 4, characterized in that, The list of hash algorithms records that each candidate hash algorithm does not contain an offset; or... Each candidate hash algorithm recorded in the hash algorithm list contains an offset.

7. A planning equivalent multipath load-sharing device, characterized in that, The device includes a network interface, a switching chip, a processor, and a memory; the processor executes processor-executable instructions in the memory to perform the method according to any one of claims 1-3 or the method according to any one of claims 4-6.

8. A method for planning load sharing across equivalent multipath paths, characterized in that, The method includes, Establish a remote login connection with the control equipment; Through the remote login connection, switch to the currently traversed hash algorithm; Through the remote login connection, the system receives from the control device a hash factor type, a set of candidate source IP addresses or multiple sets of candidate IP addresses, and the IP address of the destination device as the destination IP address. Through the remote login connection, multiple data packets are constructed based on the hash factor type, according to each candidate source IP address and the destination IP address. The hash value is calculated based on the packet feature value of each data packet read by the currently traversed hash algorithm. A member path of Equivalent Multipath (ECMP) is selected for each constructed data packet. The number of packets sent by each member path of ECMP associated with each candidate source IP address is recorded, so that the control device can determine all hash algorithms that have been traversed in the hash algorithm list through the remote login connection. Through the remote login connection, obtain the number of packets sent for each member path of ECMP associated with each candidate source IP address corresponding to each traversed hash algorithm; Calculate the transmission ratio of each traversed hash algorithm and each member path corresponding to each candidate source IP address; when a candidate source IP and traversed hash algorithm corresponding to the most uniform transmission ratio of each member path of the ECMP are identified, set the candidate source IP and traversed hash algorithm corresponding to the most uniform transmission ratio as the IP address and applied hash algorithm of the device to be configured, respectively; or, Through the remote login connection, multiple data packets are constructed based on the hash factor type according to each group of candidate source IP addresses and the destination IP address. The hash value is calculated according to the packet feature value of each data packet read by the currently traversed hash algorithm. A member path of the ECMP is selected for each constructed data packet. The number of packets sent by each member path of the ECMP associated with each group of candidate source IP addresses is recorded, so that the control device can determine all hash algorithms that have been traversed in the hash algorithm list through the remote login connection. Through the remote login connection, obtain the number of packets sent by each member path of ECMP associated with each group of candidate source IP addresses corresponding to each traversed hash algorithm; calculate the sending ratio of each traversed hash algorithm to each member path corresponding to each group of candidate source IP addresses; when a group of candidate source IPs and traversed hash algorithms corresponding to the most uniform sending ratio of each member path of ECMP are identified, set the group of candidate source IPs and traversed hash algorithms corresponding to the most uniform sending ratio as the IP address and applied hash algorithm of a group of computing power nodes to be configured, respectively.

Citation Information

Patent Citations

  • Method for realizing equal cost multipath of IP route and device

    CN101572667A

  • Multichannel transmission load balancing method and device

    CN101753463A