Method and equipment for planning equivalent multipath load sharing
By testing the hashing algorithm factors on the device to be configured and selecting the appropriate IP address or hashing algorithm, the problem of uneven load sharing in complex networking environments is solved, and network performance and service quality are improved.
Patent Information
- Application Number
- CN202411297671.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-15
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2044-09-15
AI Technical Summary
In a complex networking environment, a single load sharing algorithm cannot meet the needs of load sharing, resulting in uneven load sharing of equipment, overload congestion of some member paths, degradation of network performance, and reduced quality of service (QoS).
Through the remote login connection, the equivalent multi-path ECMP of the device to be configured is set, and the hash algorithm list is traversed, the device to be configured is controlled to switch to the hash algorithm currently traversed, multiple data packets are constructed, and the transmission ratio of the ECMP member path associated with each candidate source IP address is calculated and recorded, so as to select the appropriate hash algorithm and IP address to achieve uniformity of load sharing.
By testing the hashing algorithm factors and selecting the appropriate IP address or hashing algorithm, the problem of uneven load sharing is solved and network performance and service quality is improved.
Smart Images

Figure CN119945972A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to communication technology, and specifically to a method and device for planning equal-cost multi-path load sharing. Background Art
[0002] ECMP (Equal-Cost Multi-Path) technology is a Layer 3 (L3) load balancing technology. When network devices perform IP routing and packet forwarding through the network layer, ECMP, which is composed of multiple member paths with the same routing cost, evenly distributes the forwarded data packets on each member path of ECMP.
[0003] When a network device selects a member path, it obtains a hash factor from the forwarded data message, calculates a hash value according to a preset hash algorithm, and identifies the member path to be selected based on the calculated hash value; for example, after taking the modulus of the calculated hash value, the member path corresponding to the modulus value is selected; or the calculated hash value is added to the offset and then the modulus is taken, and the member path corresponding to the modulus value is selected.
[0004] In some complex networking environments, a single load sharing algorithm cannot meet the needs of load sharing, and uneven load sharing may occur among devices. Some member paths may be overloaded and congested, resulting in congestion, high latency and packet loss rates. Network resources are not effectively utilized, and network performance may decline, leading to a decrease in the quality of service (QoS). Summary of the invention
[0005] The purpose of the present disclosure is to provide a method and device for planning equal-cost multi-path load sharing, and to test the hash algorithm factors of equal-cost multi-path routing in the device to be configured.
[0006] To achieve the above-mentioned purpose, the present disclosure provides a method for planning equal-cost multi-path load sharing, the method comprising: establishing a remote login connection with a device to be configured; setting an equal-cost multi-path ECMP for the device to be configured to reach a destination device through the remote login connection; traversing each hash algorithm in a hash algorithm list in order; controlling the device to be configured to switch to the currently traversed hash algorithm through the remote login connection; sending a hash factor type, a group of candidate source IP addresses, and an IP address of a destination device as a destination IP address to the device to be configured through the remote login connection; controlling the device to be configured to construct multiple data packets with each candidate source IP address and the destination IP address based on the hash factor type through the remote login connection; so that the device to be configured calculates a hash value according to the currently traversed hash algorithm, selects a member path of ECMP for each constructed data packet, calculates and records the sending ratio of each member path of ECMP associated with each candidate source IP address; and obtains the sending ratio of each member path corresponding to each candidate source IP address based on the currently traversed hash algorithm recorded by the device to be configured through the remote login connection.
[0007] To achieve the above-mentioned purpose, the present disclosure also provides a method for planning equal-cost multi-path load sharing, the method comprising: establishing a remote login connection with a device to be configured; setting an equal-cost multi-path ECMP for the device to be configured to reach a destination device through the remote login connection; traversing each hash algorithm in a hash algorithm list in order; controlling the device to be configured to switch to the currently traversed hash algorithm through the remote login connection; sending a hash factor type, multiple groups of candidate source IP addresses, and an IP address of a destination device as a destination IP address to the device to be configured through the remote login connection; controlling the device to be configured to construct multiple data packets with each group of candidate source IP addresses and a destination IP address based on the hash factor type through the remote login connection; so that the device to be configured calculates a hash value according to the currently traversed hash algorithm, selects a member path of ECMP for each constructed data packet, calculates and records the sending ratio of each member path of ECMP associated with each candidate source IP address; and obtains the sending ratio of each member path corresponding to the currently traversed hash algorithm and each group of candidate source IP addresses recorded by the device to be configured through the remote login connection.
[0008] To achieve the above-mentioned purpose, the present invention discloses a planned equal-cost multi-path load sharing device, which includes a network interface, a switching chip, a processor and a memory; the processor executes the above-mentioned method by running processor-executable instructions in the memory, thereby testing the hash algorithm factors required for selecting member paths of equal-cost multi-paths on the device to be configured through a remote login connection.
[0009] To achieve the above-mentioned purpose, the present disclosure also provides a method for remotely configuring equivalent multi-path, which is applied to a device to be configured, and the method includes: establishing a remote login connection with a control device; switching to the currently traversed hash algorithm through the remote login connection; receiving a hash factor type, a group of candidate source IP addresses or multiple groups of candidate IP addresses, and an IP address of a destination device as a destination IP address from the control device through the remote login connection; starting to construct multiple data packets with each candidate source IP address and destination IP address based on the hash factor type through the remote login connection, calculating a hash value according to the currently traversed hash algorithm, selecting a member path of ECMP for each constructed data packet, and calculating and recording the sending ratio of each member path of ECMP associated with each candidate source IP address; or, starting to construct multiple data packets with each group of candidate source IP addresses and destination IP addresses based on the hash factor type through the remote login connection, calculating a hash value according to the currently traversed hash algorithm, selecting a member path of ECMP for each constructed data packet, and calculating and recording the sending ratio of each member path of ECMP associated with each group of candidate source IP addresses.
[0010] The present disclosure also provides a device for planning equal-cost multi-path load sharing, which includes a network interface, a switching chip, a processor and a memory; the processor executes the method of testing the hash algorithm factors of the equal-cost multi-path on the source device side of the above-mentioned device to be configured by running the processor executable instructions in the memory.
[0011] The beneficial effect of the present disclosure is that, considering that the network is composed of multi-level devices, a single load sharing algorithm cannot meet the demand for load sharing, and uneven load sharing of devices may occur. The hash algorithm factor is tested on the device to be configured to select a suitable IP address or hash algorithm for the device. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 A flowchart of an embodiment of a method for planning equal-cost multi-path load sharing;
[0013] Figure 2 A schematic diagram of a hash algorithm for selecting a uniform load within a planned IP address range is provided for the present disclosure;
[0014] Figure 3 for Figure 2 Schematic diagram of the data collection procedure;
[0015] Figure 4 for Figure 2 Schematic diagram of the data analysis procedure;
[0016] Figure 5 A schematic diagram of an embodiment of a device for planning equal-cost multi-path load sharing provided by the present disclosure. DETAILED DESCRIPTION
[0017] The present invention will be described in detail with multiple examples shown in multiple figures. In the following detailed description, multiple specific details are used to provide a comprehensive understanding of the present disclosure. Known methods, processes, components and circuits are not described in detail in the examples to avoid making these examples difficult to understand.
[0018] Among the terms used, the term "include" means including but not limited to; the term "contain" means including but not limited to; the terms "above", "within" and "below" are inclusive of the number; the terms "greater than" and "less than" are exclusive of the number. The term "based on" means based on at least a part thereof.
[0019] Figure 1 The present disclosure provides a method embodiment for planning equal-cost multi-path load sharing, the embodiment comprising:
[0020] Process 101, establishing a remote login connection with the device to be configured;
[0021] Process 102, setting an equal cost multipath ECMP from the device to be configured to the destination device through a remote login connection;
[0022] Process 103, traverse each hash algorithm in the hash algorithm list in order;
[0023] Process 104, through the remote login connection, control the device to be configured to switch to the currently traversed hash algorithm; through the remote login connection, 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 the remote login connection, control the device to be configured to construct multiple data packets with each candidate source IP address and destination IP address based on the hash factor type.
[0025] The device to be configured calculates the hash value according to the currently traversed hash algorithm, selects a member path of ECMP for each constructed data message, and records the number of messages sent by each member path of ECMP associated with each candidate source IP address.
[0026] The beneficial effect of the present disclosure is that, considering that the network is composed of multi-level devices, a single load sharing algorithm cannot meet the demand for load sharing, and uneven load sharing of devices may occur. The hash algorithm factor is tested on the device to be configured to select a suitable IP address or hash algorithm for the device.
[0027] Figure 2 A schematic diagram of a hash algorithm for selecting a uniform load within a planned IP address range is provided for the present disclosure; the following processing is included:
[0028] Start the control device and the network device to be configured Figure 2 Before the processing shown, the network device to be configured is configured with a LAN management IP address and remote login is allowed; for example, the network device to be configured is set to allow Telnet (Telecommunication Network Protocol) or SSH (Secure Shell).
[0029] The control device sets the type of hash factor used by the network device to be configured for traffic load sharing on ECMP, such as a triplet, a quintuple, or a septuple. The present disclosure is not limited to hash load sharing in a flow-by-flow mode or a packet-by-packet mode. For hash load sharing in a packet-by-packet mode, the present disclosure embodiment is applied to select appropriate hash parameters and source IP addresses, and the additional fields used for hash value calculation in the packet-by-packet analysis mode are not affected.
[0030] Controls setting of a hash algorithm list with multiple hash algorithms on the device.
[0031] Processing 201, the control device detects whether a network connection has been established with the management IP address of the configured network device. If so, execute processing 202; if not, terminate the process of selecting a hash algorithm and a service IP address within the planned IIP address range for the network device to be configured.
[0032] To detect the network connection, 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] After receiving the ICMP echo request, the network device to be configured will return an ICMP echo reply data packet.
[0034] After the control device waits, it 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, determine whether the remote login connection has been established, if so, execute process 203; if not, terminate the process of selecting a hash algorithm and a service IP address within the planned IP address range for the network device to be configured.
[0036] The control device starts the remote login client (telnet / SSH client), performs identity authentication, and then obtains the remote login connection telnet or SSH remote login success according to the prompt of the operating system.
[0037] Process 203, executing a data collection program;
[0038] The control device controls the device to be configured based on the remote login connection and executes the data collection program; the control device to be configured simulates sending data packets based on the candidate IP address and the traversed hash parameters, and obtains the member path selection information of different flows of ECMP from the device to be configured to the destination device; the data collection program is as follows Figure 3 As shown, the following processing is included:
[0039] Process 2031, connect via remote login, and set up ECMP.
[0040] The control device is connected via remote login, and ECMP is set on the device to be configured to reach the destination device.
[0041] Process 2032, sending the hash factor type, candidate IP address, and destination IP address to the device to be configured through the remote login connection.
[0042] In the example disclosed herein, the destination IP address is a service IP address of a destination device, that is, an IP address to be reached by the network device via the configured ECMP.
[0043] In the example of the present disclosure, if the network device to be configured sends a data message to the destination device through a single service IP address, the candidate IP address sent by the control device to the network device to be configured is a group of IP addresses, such as IP1-IP10.
[0044] In another example of the present disclosure, if the network device to be configured is a computing node server with multiple computing nodes, it is necessary to select a hash algorithm and a corresponding IP address for each computing node in the planned IP address range. The control device sends multiple groups of IP addresses to the computing node server, and each group of IP addresses contains multiple candidate IP addresses corresponding to each computing node. For example, if the computing node server has 4 computing nodes, the control device sends multiple groups of candidate IP addresses to the computing node server, and each group of candidate IP addresses contains 4 candidate IP addresses.
[0045] Processing 2033, determine whether the list of Hash algorithms to be traversed is empty, if so, end the data collection program and enter the data analysis program 204; if not, execute processing 2034 of the data collection program.
[0046] The control device reads the preset hash algorithm list. If the hash algorithm list is empty, it indicates that all the hash algorithms in the hash algorithm list have been traversed and the data collection program has been completed. If the hash algorithm list is not empty, the data collection program continues to be processed.
[0047] Process 2034, switch the device to be configured to the currently traversed hash algorithm through the remote login connection
[0048] The control device sequentially traverses the next hash algorithm based on the hash algorithm list, and switches the device to be configured to the currently traversed hash algorithm through the remote login connection. After the control device controls the device to be configured to switch the hash algorithm, the currently traversed hash algorithm is deleted from the hash algorithm list.
[0049] In the present disclosure, there is no restriction on the type of hash algorithm used to calculate the traffic load sharing of each member path of ECMP.
[0050] Process 2035, control the simulated message forwarding of the device to be configured through the remote login connection.
[0051] The control device is connected via remote login, and inputs corresponding instructions in the network device to be configured to mobilize the chip bottom layer capability of the switching chip of the network device to be configured to simulate message forwarding.
[0052] For example, the control device sends a group of IP addresses IP1-IP10 to the network device to be configured, and the IP address of the destination device is IP1000; the control device switches the network device to be configured to the hash algorithm CRC-8.
[0053] The network device to be configured constructs multiple data packets with source IP address IP1 and destination IP address IP1000, and then reads the triplet, quintuple, and septuple of the constructed packets according to the hash algorithm CRC-8 to calculate the hash value, and then takes the modulus according to the number of member paths of ECMP. According to the modulo result, a member path is selected for these constructed data packets, and the packet count of each member path (the virtual output port of the member path) is recorded.
[0054] After that, the network device to be configured constructs multiple data packets with source IP address IP2 and destination IP address IP1000; the device to be configured calculates the hash value according to the hash algorithm CRC-8, selects a member path of ECMP for these constructed data packets, and records the count value of the forwarded message of each member path (the virtual outbound port of the member path). And so on, the simulated message forwarding of this group of candidate IP addresses is completed. The device to be configured records the message forwarding count value of each member path using the CRC-8 hash algorithm and the source IP addresses are IP1-IP10.
[0055] Alternatively, the control device sends multiple groups of IP addresses to the network device to be configured as a computing power node server; one group of IP addresses is IP11, IP12, IP13, IP14, and the IP address of the destination device is IP1000; the control device switches the network device to be configured to the hash algorithm CRC-8.
[0056] The computing power nodes 1 to 4 of the device to be configured respectively construct multiple data packets with IP11, IP12, IP13, and IP14 as source IP addresses and IP1000 as destination IP addresses, calculate hash values for each of them according to the hash algorithm CRC-8, select a member path of ECMP for these constructed data packets, and record the count value of the forwarding message of each member path (the virtual output port of the member path).
[0057] Afterwards, computing nodes 1 to 4 use another group of candidate IP addresses as the source IP address and IP1000 as the destination IP address to construct multiple data packets, calculate the hash value of each according to the hash algorithm CRC-8, select a member path of ECMP for these constructed data packets, and record the count value of the forwarded message of each member path (the virtual outbound port of the member path). In this way, the device to be configured records the number of message forwardings of each member path using the CRC-8 hash algorithm and each computing node using the candidate IP address of each group as the source IP address.
[0058] After processing 2035 is completed, the control device returns to processing 2031 and continues to traverse the hash algorithm table until all hash algorithms in the hash algorithm table are traversed.
[0059] Process 204, executing a data analysis program;
[0060] The control device obtains the number of forwarding data packets recorded by each member path from the device to be configured based on the remote login connection, executes the data analysis program, and selects the IP address and hash parameter that can be evenly distributed to the destination device through each member path of ECMP for the device to be configured; Figure 4 As shown, the data analysis program includes the following processing:
[0061] Process 2041, obtain the hash algorithm traversal result from the device to be configured through the remote login connection and store it in the local database.
[0062] The control device, through the remote login connection, obtains the message forwarding count of each member path recorded by the data acquisition program by logging into the record of the device to be configured, stores the obtained data in a dictionary format, and corresponds to the algorithm number applied by the network device at this time, and stores it in the database.
[0063] Process 2042, read the hash algorithm traversal result from the data in order;
[0064] The control device reads, according to the algorithm number, the message forwarding count of each member path corresponding to each hash algorithm and recorded by the data collection program.
[0065] If the network device to be configured sends a data message to the destination device through a single service IP address, read the message forwarding count of each member path recorded by the data collection program according to the CRC-8 algorithm number with IP1-IP10 as the source IP address, and 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 message forwarding count of each member path is recorded by the data collection program.
[0067] Process 2042, calculating the load sharing result;
[0068] In an example of the present disclosure, if the network device to be configured sends a data message to the destination device through a single service IP address, the message forwarding counts of each member path corresponding to IP1-IP10 as the source IP address are read according to the algorithm number of CRC-8, and the sending ratio of the member path is calculated; then based on the read message forwarding counts of each member path corresponding to IP2 as the source IP address, the sending ratio of the member path is calculated; and the calculation of the load sharing result of IP1-IP10 as the source IP address is completed by analogy. Then, the control device reads the message forwarding counts of each member path corresponding to IP1-IP10 as the source IP address according to other algorithm numbers to calculate the load sharing result.
[0069] In another example of the present disclosure, if the network device computing node server to be configured reads the first group of candidate IP addresses IP11-IP12 as the source IP address according to the algorithm number of CRC-8, and the four computing nodes simulate the sending ratio of the data packets sent in each member path; then based on reading the next group of candidate IP addresses as the source IP address, each computing node simulates the sending ratio of the data packets sent in each member path; and so on, multiple groups of candidate IP addresses are calculated as the load sharing results of the source IP addresses of the four computing nodes. Then, the control device reads the message forwarding count of each group of candidate IP addresses as the source IP address corresponding to each member path according to other algorithm numbers, and calculates the load sharing result.
[0070] By analogy, the control device reads data based on the algorithm number of each hash algorithm and completes the calculation of the load sharing result.
[0071] Process 205, determine whether the hash algorithm and source IP address for evenly sharing traffic are identified; if so, execute process 207; if not, execute process 206.
[0072] The device to be configured selects an algorithm and source IP address that evenly shares traffic based on the calculated load sharing result. The inventor of the present disclosure has found through testing experiments in the process of implementing the solution that after traversing the hash algorithm, the load sharing ratios of each member path implemented based on different hash algorithms are different, and there will not be a situation where multiple hash algorithms simultaneously achieve uniform load sharing and the load sharing ratios of each member path are the same; however, there will be a situation where the load sharing ratios of one or more hash algorithms within the planned IP address range are uneven, resulting in the load sharing ratios of some member paths being zero or significantly lower than other member paths.
[0073] Therefore, the control device can select a hash algorithm with the most uniform load sharing ratio and a source IP address with a uniform load sharing ratio under the hash algorithm according to the calculated load sharing result.
[0074] When the load sharing of one or more hash algorithms in the planned IP address range is uneven, resulting in the load sharing ratio of some member paths being zero or significantly lower than that of other member paths, other candidate IP addresses need to be selected from the planned IP address range to replace these IP addresses, and then the hash algorithm is traversed again and a hash algorithm is selected again in the planned IP address range.
[0075] Process 206, change the unevenly shared candidate IP addresses, reset the hash algorithm list, and return to process 203.
[0076] In an example of the present 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 within the planned IP address range to replace the candidate IP addresses IP1 and IP2 with uneven load sharing, the hash algorithm list is reset, and processing 203 is returned to re-execute the data collection program.
[0077] In another example of the present disclosure, if the network device to be configured is a computing power 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, and processing 203 is returned to re-execute the data collection program.
[0078] Process 207, setting a hash algorithm and a service IP address for the network device to be configured.
[0079] The control device, through the remote login connection, sets the source IP address that identifies the traffic load sharing to be evenly distributed as the service IP address of the device to be configured, which is used to send the source IP address of the data message to the destination device. The control device, through the remote login connection, sets the hash algorithm that identifies the traffic load sharing to be evenly distributed to the hash algorithm that the device to be configured (computing power node) calculates and selects the member path of ECMP.
[0080] Figure 2-Figure 4 In the embodiment, in the hash algorithm list of the control device, each candidate hash algorithm includes an offset; the offsets included in different candidate hash algorithms may be different or the same.
[0081] When the traversed hash algorithm to which the device to be configured switches includes an offset, in flow-by-flow mode, after a hash value is calculated based on the triplet, quintuple, or septuple, the value is added to the offset and modulo the number of ECMP members to select a member path; or in packet-by-packet mode, after a hash value is calculated based on the triplet, quintuple, septuple, and additional field, the value is added to the offset and modulo the number of ECMP members to select a member path.
[0082] The solution provided by the present invention is easy and flexible to implement. By switching the hash algorithm in the network device to be configured, the traversal can be completed quickly with high flexibility. The control device analyzes and mines the data collected by the network device to be configured, calculates a hash algorithm that evenly shares the traffic load, selects a suitable service IP address in the planned IP address range, and enables the service traffic sent from the network device to be configured to the destination device to be more evenly loaded on each member path of the ECMP.
[0083] Figure 5 A schematic diagram of an embodiment of a device for planning equal-cost multi-path load sharing provided by the present disclosure; the device 50 includes a processor 51 and a memory 52, a switching chip 53, and a network interface 531. The processor 51 executes the following processing by running the processor executable instructions in the memory 52: establishing a remote login connection with the device to be configured; setting the equal-cost multi-path ECMP for the device to be configured to reach the destination device through the remote login connection; traversing each hash algorithm in the hash algorithm list in order; controlling the device to be configured to switch to the currently traversed hash algorithm through the remote login connection; sending a hash factor type, a set of candidate source IP addresses, and an IP address of the destination device as the destination IP address to the device to be configured through the remote login connection; controlling the device to be configured to construct multiple data packets with each candidate source IP address and the destination IP address based on the hash factor type through the remote login connection.
[0084] The processor 51 executes the following processing by running the processor executable instructions in the memory 52: determining all hash algorithms in the traversed hash algorithm list; obtaining the number of message sending of each member path of the ECMP associated with each candidate source IP address corresponding to each traversed hash algorithm through a remote login connection; calculating the sending ratio of each member path corresponding to each traversed hash algorithm and each candidate source IP address; setting a candidate source IP corresponding to the most uniform sending ratio of each member path of the ECMP and the traversed hash algorithm as the IP address of the device to be configured and the application hash algorithm, respectively.
[0085] The processor 51 executes the following processing by running the processor executable instructions in the memory 52: determining all hash algorithms in the hash algorithm list that have been traversed; obtaining the number of message sending of each member path of the ECMP associated with each candidate source IP address corresponding to each traversed hash algorithm through a remote login connection; calculating the sending ratio of each member path corresponding to each traversed hash algorithm and 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 order.
[0086] The processor 51 executes the following processing by running the processor executable instructions in the memory 52: establishing a remote login connection with the device to be configured; setting an equivalent cost multi-path ECMP for the device to be configured to reach the destination device through the remote login connection; traversing each hash algorithm in the hash algorithm list in order; controlling the device to be configured to switch to the currently traversed hash algorithm through the remote login connection; sending a hash factor type, multiple groups of candidate source IP addresses, and the IP address of the destination device as the destination IP address to the device to be configured through the remote login connection; controlling the device to be configured to construct multiple data packets with each group of candidate source IP addresses and the destination IP address based on the hash factor type through the remote login connection; so that the device to be configured calculates a hash value according to 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.
[0087] The processor 51 executes the following processing by running the processor executable instructions in the memory 52: determining all hash algorithms in the traversed hash algorithm list; obtaining the number of message sending of each member path of the ECMP associated with each group of candidate source IP addresses corresponding to each traversed hash algorithm through a remote login connection; calculating the sending ratio of each member path corresponding to each traversed hash algorithm and each group of candidate source IP addresses; corresponding a group of candidate source IPs and a traversed hash algorithm to the most uniform sending ratio of each member path of the ECMP, and setting them to the IP addresses of a group of computing nodes to be configured and the application hash algorithm respectively.
[0088] The processor 51 executes the following processing by running the processor executable instructions in the memory 52: determining all hash algorithms in the hash algorithm list that have been traversed; obtaining the number of message sending of each member path of the ECMP associated with each group of candidate source IP addresses corresponding to each traversed hash algorithm through a remote login connection; calculating the sending ratio of each member path corresponding to each traversed hash algorithm and 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 group of new candidate source IP addresses; and re-traversing each hash algorithm in the hash algorithm list in order.
[0089] In the above hash algorithm list, each candidate hash algorithm recorded does not include an offset; or, each candidate hash algorithm recorded in the hash algorithm list includes an offset.
[0090] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the scope of protection of the present disclosure.
Claims
1. A method for planning equal-cost multipath load sharing, characterized in that: The method comprises, Establish a remote login connection with the device to be configured; Setting an equal cost multipath ECMP from the device to be configured to the destination device through the remote login connection; Iterate through each hash algorithm in the hash algorithm list in order; Controlling the device to be configured to switch to the currently traversed hash algorithm through the remote login connection; Sending, through the remote login connection, a hash factor type, a set of candidate source IP addresses, and an IP address of the destination device as a destination IP address to the device to be configured; Controlling the device to be configured to construct multiple data packets with each candidate source IP address and the destination IP address based on the hash factor type through the remote login connection; The device to be configured calculates a hash value according to the currently traversed hash algorithm, selects a member path of the ECMP for each constructed data message, and records the number of messages sent by each member path of the ECMP associated with each candidate source IP address.
2. The method according to claim 1, characterized in that The method further comprises, Determining that all hash algorithms in the hash algorithm list have been traversed; Obtaining, through the remote login connection, the number of messages sent by each member path of the ECMP associated with each candidate source IP address corresponding to each traversed hash algorithm; Calculate the sending ratio of each member path corresponding to each traversed hash algorithm and each candidate source IP address; A candidate source IP corresponding to the most uniform sending ratio of each member path of the ECMP and a traversed hash algorithm are set as the IP address of the device to be configured and the applied hash algorithm respectively.
3. The method according to claim 1, characterized in that The method further comprises, Determining that all hash algorithms in the hash algorithm list have been traversed; Obtaining, through the remote login connection, the number of messages sent by each member path of the ECMP associated with each candidate source IP address corresponding to each traversed hash algorithm; Calculate the sending ratio of each member path corresponding to each traversed hash algorithm and each candidate source IP address; Replace each candidate source IP address corresponding to any member path with a sending ratio of zero with a new candidate source IP address; Re-order and traverse each hash algorithm in the hash algorithm list.
4. The method according to claim 1, characterized in that: Each candidate hash algorithm recorded in the hash algorithm list does not include an offset; or, Each candidate hash algorithm recorded in the hash algorithm list includes an offset.
5. A method for planning equal-cost multipath load sharing, characterized in that: The method comprises, Establish a remote login connection with the device to be configured; Setting an equal cost multipath ECMP from the device to be configured to the destination device through the remote login connection; Iterate through each hash algorithm in the hash algorithm list in order; Controlling the device to be configured to switch to the currently traversed hash algorithm through the remote login connection; Sending, through the remote login connection, a hash factor type, multiple groups of candidate source IP addresses, and an IP address of the destination device as a destination IP address to the device to be configured; Controlling the device to be configured to construct multiple data packets having each group of candidate source IP addresses and the destination IP address based on the hash factor type through the remote login connection; The device to be configured calculates a hash value according to the currently traversed hash algorithm, selects a member path of the ECMP for each constructed data message, and records the number of messages sent by each member path of the ECMP associated with each candidate source IP address.
6. The method according to claim 5, characterized in that The method further comprises, Determining that all hash algorithms in the hash algorithm list have been traversed; Obtaining, through the remote login connection, the number of messages sent by each member path of the ECMP associated with each group of candidate source IP addresses corresponding to each traversed hash algorithm; Calculate the sending ratio of each member path corresponding to each traversed hash algorithm and each group of candidate source IP addresses; correspond the most uniform sending ratio of each member path of the ECMP to a group of candidate source IPs and the traversed hash algorithms, and set them to the IP addresses of a group of computing nodes to be configured and the applied hash algorithms respectively.
7. The method according to claim 5, characterized in that The method further comprises, Determining that all hash algorithms in the hash algorithm list have been traversed; Obtaining, through the remote login connection, the number of messages sent by each member path of the ECMP associated with each group of candidate source IP addresses corresponding to each traversed hash algorithm; Calculate the sending ratio of each member path corresponding to each traversed hash algorithm and each group of candidate source IP addresses; Replace any set of candidate source IP addresses having member paths with a sending ratio of zero with a set of new candidate source IP addresses; Re-order each hash algorithm in the hash algorithm list.
8. The method according to claim 5, characterized in that Each candidate hash algorithm recorded in the hash algorithm list does not include an offset; or, Each candidate hash algorithm recorded in the hash algorithm list includes an offset.
9. A planning equal-cost multi-path load sharing device, characterized in that: The device includes a network interface, a switching chip, a processor and a memory; the processor executes the method described in any one of Claims 1 to 4 or Claims 2 to 5 by running processor-executable instructions in the memory.
10. A method for planning equal-cost multipath load sharing, characterized in that: The method comprises, Establish a remote login connection with the control device; Switching to the currently traversed hash algorithm through the remote login connection; Receiving, from the control device via the remote login connection, a hash factor type, a set of candidate source IP addresses or multiple sets of candidate IP addresses, and an IP address of the destination device as a destination IP address; Through the remote login connection, start constructing multiple data messages with each candidate source IP address and the destination IP address based on the hash factor type, calculate the hash value according to the currently traversed hash algorithm, select a member path of the equal cost multi-path ECMP for each constructed data message, and record the number of messages sent by each member path of the ECMP associated with each candidate source IP address; or, Through the remote login connection, start constructing multiple data packets with each group of candidate source IP addresses and the destination IP address based on the hash factor type, calculate the hash value according to the currently traversed hash algorithm, select a member path of the ECMP for each constructed data packet, and record the number of packets sent by each member path of the ECMP associated with each group of candidate source IP addresses.
Citation Information
Patent Citations
Method for realizing equal cost multipath of IP route and device
CN101572667A
Multichannel transmission load balancing method and device
CN101753463A
Method and device for forwarding messages
CN102158398A
Method and device for performing session persistence on link load balance application
CN109347623A
Method and device for determining load-balanced Hash algorithm information and storage medium
CN115914234A