Method, device and storage medium for determining hash algorithm information for load balancing

The load balancing device determines the hashing algorithm information of the second communication device based on the hashing algorithm information and the number of ports information of the first communication device, solving the problem of load balancing selecting hashing algorithm information in a multi-level network, and achieving more efficient load balancing and reducing network polarization.

CN115914234BActive Publication Date: 2025-04-01HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110887822.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-03
Publication Date
2025-04-01
Estimated Expiration
2041-08-03

AI Technical Summary

Technical Problem

In multi-level networking, how to select appropriate hash algorithm information for communication devices to achieve load balancing, especially in cloud computing and data center applications, due to the large network scale, the prior art is difficult to effectively solve this problem.

Method used

The load balancing device receives the hashing algorithm information and the number of ports information of the first communication device, and determines the hashing algorithm information of the second communication device to realize load balancing. The specific method includes determining the second hash algorithm information based on the first hash algorithm information, the number of ports information and the number of ports information of the second communication device, and updating the hash algorithm information of the first communication device if necessary.

Benefits of technology

By reasonably determining the hashing algorithm information of the second communication device, the polarization phenomenon of the network can be effectively reduced and the efficiency and effect of load balancing can be improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115914234B_ABST
    Figure CN115914234B_ABST
Patent Text Reader

Abstract

A method, device and storage medium for determining hash algorithm information for load balancing, which are used to determine second hash algorithm information for load balancing of a second communication device based on first hash algorithm information of a first communication device and information on a first number of first ports. In the present application, a load balancing device receives a first message. The first message includes first hash algorithm information of a load balancing method of the first communication device and information on a first number of first ports of the first communication device. The load balancing device determines second hash algorithm information of a load balancing method of the second communication device based on the first hash algorithm information and the first number information. Since the load balancing device can obtain the first hash algorithm information and the first number used by the first communication device for load balancing, the second hash algorithm information can be determined more reasonably based on the first hash algorithm information and the first number information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of wireless communications, and in particular, to a method, device, and storage medium for determining hash algorithm information for load balancing. Background Art

[0002] Load balancing, also known as load balance or load sharing, refers to forwarding traffic evenly through multiple links. Load balancing is generally used to improve the overall processing capacity of the network. It can expand the network bandwidth, increase the network throughput, enhance the data processing capacity, and improve the network availability without changing the existing network structure.

[0003] Existing load balancing usually adopts the following balancing method: extracting an integrated bit sequence from a data message to obtain a load balancing parameter, then using a solidified hash algorithm (such as a cyclic redundancy check (CRC) algorithm) to calculate the hash value of the message, then performing a modulus operation on the obtained hash value according to the number of ports to obtain a hash modulus value, and forwarding the message through the physical port corresponding to the hash modulus value.

[0004] In cloud computing and data center application networks, due to scale requirements, top of rack (TOR) / leaf two-layer or TOR / leaf / spine three-layer networking is often used. In multi-level networking, how to select hash algorithm information for communication devices has become an urgent problem to be solved. Summary of the invention

[0005] The present application provides a method, device and storage medium for determining hash algorithm information for load balancing, which are used to determine second hash algorithm information for load balancing of a second communication device based on first hash algorithm information of a first communication device and information on a first number of first ports.

[0006] In a first aspect, the present application provides a method for determining hash algorithm information of load balancing, in which a load balancing device receives a first message, the first message including first hash algorithm information of a load balancing method of a first communication device and information about a first number of first ports of the first communication device. The load balancing device determines second hash algorithm information of a load balancing method of a second communication device based on the first hash algorithm information and the first number information.

[0007] Since the load balancing device can obtain the first hash algorithm information used by the first communication device for load balancing and the first number of the first output port of the first communication device, it can more reasonably determine the second hash algorithm information based on the first hash algorithm information and the first number of information.

[0008] In a possible implementation, the load balancing device may determine the second hash algorithm information based on the first hash algorithm information, the first quantity information, and the second quantity information of the second port of the second communication device. Since the second communication device needs to perform a modulus operation on the second quantity by taking the hash value calculated based on the second hash algorithm information in the process of load balancing the message, and then determine the output port corresponding to the message based on the obtained hash modulus value, that is, the second quantity will affect the distribution of the message of the second communication device at each port, therefore, the second hash algorithm information can be determined more reasonably in combination with the number of ports of the second communication device.

[0009] In a possible implementation, since the first communication device performs load balancing by taking the hash value modulo the first quantity, and the second communication device performs load balancing by taking the hash value modulo the second quantity, when the first quantity and the second quantity are different, the first hash algorithm information and the second hash algorithm information may be different or the same. Even if the first hash algorithm information and the second hash algorithm information are the same, for the message received by the second communication device after balancing based on the first hash algorithm information and the first quantity, the second communication device may send and receive multiple messages through different links, thereby alleviating the polarization phenomenon of the network.

[0010] In another possible implementation, the first quantity is the same as the second quantity, and the first hash algorithm information is different from the second hash algorithm information. In this case, for the message received by the second communication device after balancing based on the first hash algorithm information and the first quantity, the second communication device may also send and receive multiple messages through different links. Therefore, the polarization phenomenon of the network can be reduced.

[0011] In a possible implementation, the first hash algorithm information includes at least one of the following: the first hash algorithm, the parameter items of the first hash key information, the arrangement order of the parameter items of the first hash key information, and the first hash value determination method. The second hash algorithm information includes at least one of the following: the second hash algorithm, the parameter items of the second hash key information, the arrangement order of the parameter items of the second hash key information, or the second hash value determination method. In this way, it can be more compatible with the existing technology.

[0012] In order to improve the flexibility of the scheme, in one possible implementation, when the first hash algorithm information is different from the second hash algorithm information, the first hash algorithm information and the second hash algorithm information satisfy at least one of the following: the first hash algorithm is different from the second hash algorithm; the parameter items of the first hash key information are different from the parameter items of the second hash key information; the arrangement order of the parameter items of the first hash key information is different from the arrangement order of the parameter items of the second hash key information; or, the first hash value taking method is different from the second hash value taking method.

[0013] The present application is applicable to a variety of load balancing technologies. For example, the first quantity may include: the number of equal cost multipath (ECMP group) members of the first communication device. In this case, the above-mentioned first hash algorithm information may also be applicable to the process of load balancing based on ECMP technology. For another example, the number of link aggregation group (LAG group) members of the first communication device. In this case, the above-mentioned first hash algorithm information may also be applicable to the process of load balancing based on LAG technology.

[0014] In a possible implementation, the load balancing device may also receive a second message, the second message including third hash algorithm information of the load balancing method of the first communication device and information on the third number of the third port of the first communication device. The load balancing device may determine the second hash algorithm information of the load balancing method of the second communication device based on the first message and the second message. Since the first communication device may perform load balancing once or multiple times, and one or more of the multiple load balancings may affect the diversity of the messages received by the second communication device, if the first communication device can send the hash algorithm information of the multiple load balancings to the load balancing device, the load balancing device may determine more reasonable second hash algorithm information.

[0015] In a possible implementation, the first number includes the number of equal cost multipath (ECMP group) members of the first communication device, and the third number includes the number of link aggregation group (LAG group) members of the first communication device. In this way, it can be more compatible with the existing technology.

[0016] In a possible implementation, the load balancing device can determine the second hash algorithm information of the load balancing method of the second communication device based on the first message, the second message, and the second number of the second port of the second communication device. Since the second communication device needs to take the modulus of the hash value calculated based on the second hash algorithm information on the second number in the process of load balancing the message, and then determine the output port corresponding to the message based on the obtained hash modulus value, that is, the second number will affect the distribution of the message of the second communication device at each port. Therefore, the second hash algorithm information can be determined more reasonably in combination with the number of ports of the second communication device.

[0017] In a possible implementation, the second hash algorithm information satisfies the first condition, and the first condition includes: performing hash calculations on the first message and the second message based on the second hash algorithm information, and taking the obtained two hash values ​​modulo the second quantity of the second port of the second communication device, respectively, and the obtained two hash modulo values ​​are different. In this way, the received first message and the second message can be sent through two different ports corresponding to two different hash modulo values, thereby alleviating the network polarization problem.

[0018] In a possible implementation, the first condition also includes: performing hash calculations on the first message and the second message respectively based on the first hash algorithm information, and taking the two obtained hash values ​​modulo the first quantity respectively, and the two obtained hash modulo values ​​are the same. In this way, the first message and the second message can be sent to the second communication device by two different or the same upper-level devices of the second communication device (including the first communication device and other communication devices) after load balancing based on the first hash algorithm information and the first quantity. Furthermore, for the first message and the second message that meet the first condition, they can be sent through different links after load balancing based on the second hash algorithm information, thereby alleviating the polarization problem.

[0019] In a possible implementation, the first condition also includes: performing hash calculations on the first message and the second message respectively based on the third hash algorithm information, and taking the modulus of the two obtained hash values ​​on the third quantity respectively, and connecting the obtained two hash modulus values ​​to the port corresponding to the first communication device. The third hash algorithm information is the hash algorithm information corresponding to the load balancing method of the first communication device, and the third quantity includes the number of the third ports of the first communication device. In this way, the first message and the second message are both sent to the second communication device by the upper-level device of the second communication device after load balancing based on the first hash algorithm information, the first quantity, the third hash algorithm information and the third quantity. Furthermore, for the first message and the second message that meet the first condition, they can be sent through different links after load balancing based on the second hash algorithm information, thereby alleviating the polarization problem.

[0020] In another possible implementation, the load balancing device may pre-establish a hash algorithm information association relationship, and the hash algorithm information association relationship may be stored in a table or other form of document. The hash algorithm information association relationship includes: the first hash algorithm information, the first quantity information, the second quantity information of the port of the second communication device, and the association relationship of the second hash algorithm information. In this way, the load balancing device can query the preset hash algorithm information association relationship based on the first hash algorithm information and the first quantity information to obtain the second hash algorithm information.

[0021] In a possible implementation, the hash algorithm information association relationship further includes: first hash algorithm information, first quantity information, third hash algorithm information, third quantity information, information on the hash modulus value corresponding to the port of the first communication device connected to the second communication device, second quantity information on the port of the second communication device, and an association relationship between the second hash algorithm information. In this way, more reasonable second hash algorithm information with less diversity loss can be found from the hash algorithm information association relationship based on multiple hash algorithm information of the first communication device.

[0022] In one possible implementation, the load balancing device can determine the fourth quantity corresponding to the hash algorithm information in N hash algorithm information; N is a positive integer. Select the hash algorithm information whose corresponding fourth quantity is greater than 1 from the N hash algorithm information as the second hash algorithm information. Among them, for the hash algorithm information in the N hash algorithm information, the fourth quantity corresponding to the hash algorithm information is: based on the hash algorithm information, hash calculations are performed on the M messages respectively, and the M hash values ​​obtained are modulo the second quantity of the port of the second communication device respectively, and the M hash modulo values ​​are deduplicated to obtain the number of numerical values; M is an integer greater than 1. In this way, the M messages can be distributed to at least two links after load balancing based on the second hash algorithm information and the second quantity, thereby alleviating the polarization problem of the network.

[0023] In one possible implementation, the load balancing device may select the fourth largest number of corresponding hash algorithm information from the N hash algorithm information as the second hash algorithm information. In this way, if the fourth largest number of hash algorithm information is selected as the second hash algorithm information, the M messages can be distributed to as many links as possible for transmission, thereby alleviating the polarization problem of the network as much as possible.

[0024] In one possible implementation, M messages satisfy the second condition, and the second condition includes: performing hash calculations on the M messages based on the first hash algorithm information, and taking the obtained M hash values ​​modulo the first quantity, and the obtained M hash modulo values ​​are the same. In this way, if other communication devices receive M messages, they will send the M messages to the second communication device after load balancing based on the first hash algorithm information and the first quantity. Furthermore, for the M messages that meet the second condition, they can be sent through different links after load balancing based on the second hash algorithm information, thereby alleviating the polarization problem.

[0025] In a possible implementation, the second condition further includes: performing hash calculations on the M messages based on the third hash algorithm information, and taking the modulo of the obtained M hash values ​​on the third quantity, and connecting the obtained M hash modulo values ​​to the second communication device at the layer 2 physical port corresponding to the first communication device. The third hash algorithm information is the hash algorithm information corresponding to the load balancing method of the first communication device, and the third quantity includes the number of the third port of the first communication device.

[0026] In this way, the first message and the second message are both sent to the second communication device by the upper-level device of the second communication device after load balancing based on the first hash algorithm information, the first quantity, the third hash algorithm information and the third quantity. Furthermore, for the first message and the second message that meet the first condition, they can be sent through different links after load balancing based on the second hash algorithm information, thereby alleviating the polarization problem.

[0027] In one possible implementation, after the load balancing device receives the first message, it also includes: determining that there is no second hash algorithm information that satisfies the first condition, and determining fourth hash algorithm information of the load balancing method of the second communication device; sending a third message to the first communication device, and the third message is used to instruct the first communication device to update the hash algorithm information corresponding to the load balancing method of the first communication device based on the fourth hash algorithm information and information on the second number of ports of the second communication device.

[0028] In this way, the first communication device can reselect the hash algorithm to alleviate the polarization problem in the network. The scheme for selecting the hash algorithm and other parameters in the hash algorithm information by the first communication device can participate in the aforementioned method for selecting the second hash algorithm information for the second communication device, which will not be repeated here.

[0029] In a possible implementation, after the load balancing device receives the first message, it also includes: determining that there is no second hash algorithm information that meets the first condition, and determining the fourth hash algorithm information of the load balancing method of the second communication device. The load balancing device determines the fifth hash algorithm information of the load balancing method of the first communication device based on the fourth hash algorithm information, the first number of information, and the second number of ports of the second communication device. The load balancing device sends a fourth message to the first communication device, and the fourth message is used to notify the first communication device to forward the message based on the fifth hash algorithm information.

[0030] In this way, the load balancing device can reselect the hash algorithm for the first communication device to alleviate the polarization problem in the network. The scheme for selecting the hash algorithm and the parameters in other hash algorithm information for the first communication device can participate in the aforementioned method for selecting the second hash algorithm information for the second communication device, which will not be repeated here.

[0031] In a possible implementation, the fourth hash algorithm information satisfies the following conditions: hash calculations are performed on the third message and the fourth message based on the fourth hash algorithm information, and the two hash values ​​obtained are modulo the second quantity, and the two hash modulo values ​​obtained are different. In this way, the third message and the fourth message can be sent through two links on the second communication device, thereby alleviating the polarization problem of the network.

[0032] In one possible implementation, the third message and the fourth message satisfy: hash calculations are performed on the third message and the fourth message respectively based on the fifth hash algorithm information, and the two hash values ​​obtained are modulo the first quantity respectively, and the two hash modulo values ​​obtained are the same. In this way, the upper device of the second communication device can send the third message and the fourth message to the second communication device after load balancing based on the fifth hash algorithm information and the first quantity. Furthermore, the third message and the fourth message can be sent on the second communication device through two links, thereby alleviating the polarization problem of the network.

[0033] In one possible implementation, before the load balancing device determines the second hash algorithm information of the load balancing method of the second communication device based on the first hash algorithm information and the first quantity information, it also includes: determining that the second communication device is a slave device. After the load balancing device receives the first hash algorithm information of the load balancing method of the first communication device and the first quantity information of the ports of the first communication device, it also includes: determining that there is no second hash algorithm information that meets the first condition, and updating the second communication device to a master device. In this way, hash algorithm information can be reselected for the first communication device based on the new hash algorithm information determined for the second communication device, thereby achieving the purpose of alleviating the network polarization problem.

[0034] In a possible implementation, at least one of the first hash algorithm information or the first amount of information is carried in the following information: a link layer discovery protocol LLDP message, an open shortest path first routing protocol OSPF message, or a border gateway routing protocol BGP message. In this way, it can be more compatible with the existing technology.

[0035] In a second aspect, a communication device is provided, which may be the aforementioned load balancing device, and the communication device may include a communication unit and a processing unit to perform the above-mentioned first aspect or any one of the embodiments of the first aspect. The communication unit is used to perform functions related to sending and receiving. Optionally, the communication unit includes a receiving unit and a sending unit. In one design, the communication device is a communication chip, the processing unit may be one or more processors or processor cores, and the communication unit may be an input / output circuit or port of the communication chip.

[0036] In another design, the communication unit may be a transmitter and a receiver, or the communication unit may be a transmitter and a receiver.

[0037] Optionally, the communication device also includes various modules that can be used to execute the above-mentioned first aspect or any implementation of the first aspect.

[0038] In a third aspect, a communication device is provided, which may be the aforementioned load balancing device, and may include a processor and a memory. Optionally, a transceiver is further included, the memory is used to store a computer program or instruction, and the processor is used to call and run the computer program or instruction from the memory, and when the processor executes the computer program or instruction in the memory, the communication device executes the aforementioned first aspect or any one of the implementations of the first aspect.

[0039] Optionally, there are one or more processors and one or more memories.

[0040] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

[0041] Optionally, the transceiver may include a transmitter (transmitter) and a receiver (receiver).

[0042] In a fourth aspect, a communication device is provided, which may be the aforementioned load balancing device, and may include a processor. The processor is coupled to a memory and may be used to execute the first aspect or any implementation of the first aspect. Optionally, the communication device further includes a memory. Optionally, the communication device further includes a communication interface, and the processor is coupled to the communication interface.

[0043] In one implementation, when the communication device is a load balancing device, the communication interface may be a transceiver, or an input / output interface. Optionally, the transceiver may be a transceiver circuit. Optionally, the input / output interface may be an input / output circuit.

[0044] In another implementation, when the communication device is a chip or a chip system, the communication interface may be an input / output interface, an interface circuit, an output circuit, an input circuit, a pin or a related circuit on the chip or the chip system, etc. The processor may also be embodied as a processing circuit or a logic circuit.

[0045] In a fifth aspect, a system is provided, the system comprising the above-mentioned communication apparatus, a first communication device and a second communication device.

[0046] In a sixth aspect, a computer program product is provided, the computer program product comprising: a computer program (also referred to as code, or instruction), which, when executed, enables a computer to execute the above-mentioned first aspect or any one of the implementations of the first aspect.

[0047] In the seventh aspect, a computer-readable storage medium is provided, which stores a computer program (also referred to as code, or instruction) which, when executed on a computer, enables the computer to execute the above-mentioned first aspect or any one of the implementations of the first aspect.

[0048] In an eighth aspect, a chip system is provided, which may include a processor. The processor is coupled to a memory and may be used to execute the above-mentioned first aspect or any one of the embodiments of the first aspect. Optionally, the chip system also includes a memory. The memory is used to store a computer program (also referred to as code, or instruction). The processor is used to call and run the computer program from the memory so that the device equipped with the chip system executes the first aspect or any one of the embodiments of the first aspect.

[0049] In a ninth aspect, a processing device is provided, comprising: an interface circuit and a processing circuit. The interface circuit may include an input circuit and an output circuit. The processing circuit is used to receive a signal through the input circuit and transmit a signal through the output circuit, so that the first aspect or any embodiment of the first aspect is implemented.

[0050] In the specific implementation process, the above-mentioned processing device can be a chip, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be a transistor, a gate circuit, a trigger, and various logic circuits. The input signal received by the input circuit can be, for example, but not limited to, received and input by a receiver, and the signal output by the output circuit can be, for example, but not limited to, output to a transmitter and transmitted by the transmitter, and the input circuit and the output circuit can be the same circuit, which is used as an input circuit and an output circuit at different times. This application does not limit the specific implementation of the processor and various circuits.

[0051] In one implementation, the communication device may be a part of a load balancing device, such as an integrated circuit product such as a system chip or a communication chip. The interface circuit may be an input / output interface, an interface circuit, an output circuit, an input circuit, a pin or a related circuit on the chip or the chip system. The processing circuit may be a logic circuit on the chip. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1a , Figure 1b , Figure 1c and Figure 1d Schematic diagrams of several system architectures applicable to embodiments of the present application;

[0053] Figure 2a , Figure 2b , Figure 2c and Figure 2d Several system architecture schematic diagrams provided for embodiments of the present application;

[0054] Figure 3 A schematic diagram of the structure of a communication device provided in an embodiment of the present application;

[0055] Figure 4 A flow chart of a method for determining hash algorithm information for load balancing provided in an embodiment of the present application;

[0056] Figure 5 A schematic diagram of the distribution of the diversity of hash key information provided in an embodiment of the present application;

[0057] Figure 6 A flowchart of another method for determining hash algorithm information for load balancing provided in an embodiment of the present application;

[0058] Figure 7a A flowchart of another method for determining hash algorithm information for load balancing provided in an embodiment of the present application;

[0059] Figure 7b A flowchart of another method for determining hash algorithm information for load balancing provided in an embodiment of the present application;

[0060] Figure 8a A schematic diagram of the structure of an extended LLDP message for carrying first hash algorithm information and first quantity information provided in an embodiment of the present application;

[0061] Figure 8b A schematic diagram of the structure of another OSPF message for carrying first hash algorithm information and first quantity information provided in an embodiment of the present application;

[0062] Figure 8c A schematic diagram of the structure of another BGP message for carrying first hash algorithm information and first quantity information provided in an embodiment of the present application;

[0063] Fig. 9 A schematic diagram of the structure of a communication device provided in an embodiment of the present application;

[0064] Fig.10 A schematic diagram of the structure of another communication device provided in an embodiment of the present application;

[0065] Fig.11 A schematic diagram of the structure of another communication device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0066] It should be understood that the technical solutions of the embodiments of the present application can be applied to various communication systems, for example: data center networks including internal server access switches in data centers and interconnections between switches, operator cross-metropolitan area interconnections or backbone networks, mobile bearer fronthaul or backhaul areas, metropolitan area multi-service bearers, data center interconnections, industrial communications and other communication systems based on Ethernet technology, as well as communication systems between different components or modules in industrial or communication equipment.

[0067] Figure 1a , Figure 1b , Figure 1c and Figure 1d Several system architecture diagrams applicable to the embodiments of the present application are shown as examples. Figure 1a As shown, the system architecture includes a first communication device and a load balancing device. The load balancing device can be connected to the first communication device to receive the first hash algorithm information used by the first communication device for load balancing and the number of first ports of the first communication device (for distinction, the number of first ports is referred to as the first number). The load balancing device selects the second hash algorithm information for the second communication device based on the first hash algorithm information and the first number information. The first number information in the embodiment of the present application refers to information that can indicate the first number.

[0068] like Figure 1aAs shown, the system architecture may also include a second communication device, which may send a message based on the second hash algorithm information selected by the load balancing device. The first communication device may be the upstream of the second communication device, and the first communication device sends the message to the second communication device, which then sends it to other devices. The first communication device may also be the downstream of the second communication device, and the second communication device sends the message to the first communication device, which then sends it to other devices. In order to more clearly introduce the solution provided in the embodiment of the present application, the subsequent content takes the first communication device as the upstream of the second communication device as an example.

[0069] The first communication device and the second communication device in the embodiment of the present application can be a network device, or a chip set inside the network device. The device includes but is not limited to: data center switches, operator metropolitan area network routers, campus network switches, artificial intelligence (AI) and high-performance computing network switches, core routers, Internet Protocol Radio Access Network (IPRAN) based on the Internet protocol, packet transport network (PTN) box or frame switch equipment, etc.

[0070] In the embodiment of the present application, there are various relationships between the load balancing device and the second communication device, such as Figure 1a As shown in , the load balancing device can be a module or unit in the second communication device. Figure 1b As shown in , the load balancing device may also be a device independent of the first communication device and the second communication device.

[0071] In the embodiment of the present application, the first communication device and the second communication device may be different devices, such as Figure 1a and Figure 1b In another possible implementation, as shown in Figure 1c and Figure 1dAs shown, the first communication device and the second communication device can also be in the same communication device 100, for example, the first communication device can be a layer 3 (Layer 3, L3) communication module in the communication device 100, and the second communication device can be a layer 2 (Layer 2, L2) communication module in the communication device 100; the first communication device can select a next hop for the message at layer 3 based on the first hash algorithm information, and the second communication device can select a port of layer 2 for the message at layer 2 based on the second hash algorithm information. For another example, the first communication device can be a layer 2 communication module in the communication device 100, and the second communication device can be a layer 3 communication module in the communication device 100; the second communication device can select a next hop for the message at layer 3 based on the second hash algorithm information, and the first communication device can select a port of layer 2 for the message at layer 2 based on the first hash algorithm information. Figure 1c and Figure 1d In order to more clearly introduce the solution provided by the embodiment of the present application, the following content is introduced by taking the first communication device as a layer 3 communication module in the communication device 100 and the second communication device as a layer 2 communication module in the communication device 100 as an example.

[0072] also, Figure 1c The load balancing device may be a module independent of the first communication device and the second communication device. Figure 1d The load balancing device can be a module in the second communication device. Of course, Figure 1c The load balancing device may also be a module on other devices other than the communication device 100, which is not limited in the embodiment of the present application.

[0073] Before further introducing the embodiments of the present application, the terms and nouns involved in the embodiments of the present application are first explained.

[0074] (1) The technology used in the load balancing method.

[0075] The first hash algorithm information of the first communication device in the embodiment of the present application can be applied to a variety of scenarios. For example, the first communication device can select a next hop for the message based on the first hash algorithm information, for example, it can select a next hop for the message based on equal-cost multi-path routing (ECMP) technology. Among them, the first communication device selecting the next hop for the message can also be understood as the first communication device selecting a logical port for the message, such as selecting a logical port for the message at layer 3. The logical port in the embodiment of the present application can also be called a logical egress port.

[0076] For another example, the first communication device may select a physical port for the message based on the first hash algorithm information, such as selecting a physical port for the message at layer 2, such as selecting a physical port for the message based on link aggregation (LAG) technology, where LAG may also be referred to as a trunk technology. The physical port may also be referred to as a physical egress port.

[0077] (2)ECMP.

[0078] The following is an example of a first communication device performing load balancing through the ECMP technology based on the first hash algorithm information. For the sake of distinction, the hash algorithm included in the first hash algorithm information is referred to as the first hash algorithm, the hash key information in the first hash algorithm information is referred to as the first hash key information, and the hash value determination method in the first hash algorithm information is referred to as the first hash value determination method:

[0079] The first communication device receives the first message, obtains the network layer identifier of layer 3 of the first message (ie, the destination Internet protocol (IP) address (DIP), etc.), and queries the network layer routing table.

[0080] When the first communication device determines, according to the network layer routing table, that there are multiple paths to the destination IP of the first message (that is, there are multiple equal-cost next hops in the path to the destination IP), the first communication device executes the following:

[0081] The first communication device extracts information corresponding to the parameter item of the first hash key information from the first message according to the preset parameter item of the first hash key information.

[0082] The first communication device arranges the information of the extracted parameter items of the first hash key information in sequence according to the preset arrangement order of the parameter items of the first hash key information to form the first hash key information (hash key) (it should be noted that if the information of certain parameter items is not extracted, the preset value can be filled in the corresponding field of the first hash key information according to the preset rules).

[0083] The first communication device performs a hash calculation on the first hash key information based on the first hash algorithm, and determines a hash value from the obtained value based on the first hash value obtaining method.

[0084] The first communication device performs a modulo operation on the first number of the first port of the first communication device with the obtained hash value to obtain the hash modulo value of the first message. It should be noted that the first number of the first port of the first communication device: in this example, it can be understood as the number of ECMP group members corresponding to the first message on the first communication device; it can also be understood as the total number of paths to the destination IP of the first message, or the total number of paths to the IP subnet of the destination IP of the first message; or, or it can be understood as the number of next hops to the subnet where the destination IP of the first message is located.

[0085] Further, the first communication device determines the next hop information corresponding to the hash modulus value of the first message (for example, determining that the next hop is the second communication device) based on the correspondence between the preset hash modulus value and the next hop communication device (or the correspondence between the preset hash modulus value and the preset logical output port), and then the first communication device sends the first message to the next hop (for example, the second communication device). The first communication device determining the next hop can also be understood as determining the logical output port, and the first communication device can send the message through the logical output port.

[0086] The above content is introduced below by taking the example of a first communication device performing load balancing through ECMP technology based on the first hash algorithm information. The schemes for other communication devices to perform load balancing through ECMP technology based on other hash algorithm information are similar. The hash algorithm information and the number of ECMP group members that may be used may be different, which will not be repeated here.

[0087] (3) LAG.

[0088] The following is an example of a first communication device performing load balancing through the LAG technology based on the first hash algorithm information. For the sake of distinction, the hash algorithm included in the first hash algorithm information is referred to as the first hash algorithm, the hash key information in the first hash algorithm information is referred to as the first hash key information, and the hash value determination method in the first hash algorithm information is referred to as the first hash value determination method:

[0089] The first communication device receives the first message, obtains the link layer identifier of layer 2 of the first message (ie, the destination media access control (MAC) address (destination MAC), etc.), and queries the MAC table.

[0090] When the first communication device determines according to the MAC table that there are multiple ports to the destination MAC of the first message, the first communication device executes the following:

[0091] The first communication device extracts information corresponding to the parameter item of the first hash key information from the first message according to the preset parameter item of the first hash key information.

[0092] The first communication device arranges the information of the extracted parameter items of the first hash key information in sequence according to the preset arrangement order of the parameter items of the first hash key information to form the first hash key information (hash key) (it should be noted that if the information of certain parameter items is not extracted, the preset value can be filled in the corresponding field of the first hash key information according to the preset rules).

[0093] The first communication device performs a hash calculation on the first hash key information based on the first hash algorithm, and determines a hash value from the obtained value based on the first hash value obtaining method.

[0094] The first communication device performs a modulo operation on the obtained hash value and the first number of the first port of the first communication device to obtain the hash modulo value of the first message; it should be noted that, in this example, the first number of the first port of the first communication device can be understood as the number of LAG group (Group) members corresponding to the first message on the first communication device, and can also be understood as the total number of ports corresponding to the destination MAC of the first message on the first communication device, or can be understood as the total number of paths to the destination MAC of the first message.

[0095] Further, the first communication device determines the port corresponding to the hash modulus value of the first message according to the correspondence between the preset hash modulus value and the port (which can be understood as the physical output port), and sends the first message through the port.

[0096] The above content is introduced below by taking the example of the first communication device performing load balancing through LAG technology based on the first hash algorithm information. The way in which the first communication device performs load balancing through LAG technology based on the third hash algorithm information is similar to it, except that each item in the first hash algorithm information is replaced with each item in the third hash algorithm information, and the first quantity is replaced with the third quantity of the third port of the first communication device. The rest of the content is similar to it and will not be repeated here. The schemes for performing load balancing through LAG technology using other hash algorithm information are similar to it, and the hash algorithm information and the number of LAG group members that may be used may be different, which will not be repeated here.

[0097] Figure 2a A schematic diagram of a system architecture provided by an embodiment of the present application is exemplarily shown. Figure 2a As shown, the embodiment of the present application can be applicable to a three-level Clos (CLOS) network architecture, which includes a TOR / leaf / spine three-level network, and each level can include multiple communication devices (the communication device can be a switch), such as Figure 2a As shown, the TOR level includes 8 communication devices. Figure 2aThe leaf level includes 8 communication devices. Figure 2a The spine level includes 16 communication devices. Figure 2a The TOR-level communication device can be connected to one or more servers, such as server 118 connected to TOR-level communication device 8, server 117 connected to TOR-level communication device 7, server 116 connected to TOR-level communication device 2, and server 115 connected to TOR-level communication device 1.

[0098] exist Figure 2a Under the system architecture shown, there can usually be two traffic load balancings, one in the forwarding direction from the TOR communication device to the leaf communication device, and the other in the forwarding direction from the leaf communication device to the spine communication device. For example, the TOR-level communication device 8 is connected to the leaf-level communication device through four links, and is used to send its own message to the leaf level through the four links, for example, the message can be sent through the above-mentioned ECMP technology. The leaf-level communication device 8 is connected to the spine-level communication device through four links, and is used to send its own message to the spine level through the four links, for example, the message can be sent through the above-mentioned ECMP technology.

[0099] Above Figure 1a and Figure 1b The first communication device in may be Figure 2a The TOR-level communication device in the second communication device may be Figure 2a A leaf-level communication device in; or, the first communication device is Figure 2a The leaf-level communication device in the second communication device is Figure 2a The load balancing device may be a module inside the second communication device, or may be a device or module independent of the TOR-level communication device and the leaf-level communication device.

[0100] For example, after receiving the first message and the second message, the TOR-level communication device 8 calculates that the hash modulus value of the first message is the same as the hash modulus value of the second message based on its own hash algorithm information and port number, and then sends the first message and the second message to the same leaf-level communication device, such as the leaf-level communication device 8. The first message and the second message may come from the same server or different servers.

[0101] Further, after receiving the first message and the second message, the leaf-level communication device 8 calculates the hash modulus values ​​corresponding to the two messages based on its own hash algorithm information and the number of ports. Since the hash modulus values ​​of the two messages calculated by the TOR-level communication device 8 based on its own hash algorithm information and the number of ports are the same, the hash modulus values ​​of the two messages calculated by the leaf-level communication device 8 based on its own hash algorithm information and the number of ports are also the same. In this way, for the multiple messages received by the leaf-level communication device 8 from the TOR, the leaf-level communication device 8 only sends the multiple messages through one link, and cannot balance the multiple messages to multiple links for sending.

[0102] On the other hand, the leaf-level communication device 8 will also receive one or more messages from other TOR-level communication devices (TOR-level communication device 7), such as the third message and the fourth message. Similarly, since the TOR-level communication device 7 sends the two messages to the Leaf-level communication device 8 based on its own hash algorithm information and the number of ports, according to the calculated hash modulus value of the third message and the hash modulus value of the fourth message, the leaf-level communication device 8 calculates the same hash modulus value of the third message and the fourth message based on its own hash algorithm information and the number of ports. In the case where the hash algorithm information of the TOR-level communication device 7 and the TOR-level communication device 8 are the same, and the number of ports of the two is also the same, the hash modulus values ​​of the first message, the second message, the third message, and the fourth message calculated by the leaf-level communication device 8 are all the same. Therefore, for the multiple messages received by the leaf level from different TOR-level communication devices (TOR-level communication device 7 and TOR-level communication device 8), the leaf-level communication device 8 only sends the four messages through one link, and cannot balance the multiple messages to multiple links for transmission.

[0103] Traffic load balancing pursues balance, that is, the traffic to be forwarded is evenly shared among multiple downstream links. If the traffic to be forwarded is not evenly shared among multiple downstream links, the link loads will be high and low. When the high-load link is close to full load, the low-load link will be idle, and the overall network utilization will be low. This phenomenon is called polarization. From the above analysis, it can be seen that if the occurrence of polarization is to be slowed down, it is necessary to set the hash algorithm information for the load balancing device more reasonably, which is exactly the problem to be solved in the embodiments of the present application.

[0104] It should be noted that the above Figure 2a In the example, the hash algorithm of layer 3 is used between communication devices. In actual application, Figure 2aAny device that needs to be load balanced can perform layer 3 load balancing and layer 2 load balancing. For example, a TOR-level communication device 8 can have multiple links to a leaf-level communication device 8 based on LAG. For another example, a leaf-level communication device 8 can have multiple links to a spine-level communication device 16 based on LAG. In this case, the TOR-level communication device 8 needs to perform load balancing at layer 3 and layer 2 respectively, and the leaf-level communication device 8 needs to perform load balancing at layer 3 and layer 2 respectively.

[0105] Figure 2b A schematic diagram of a system architecture provided by an embodiment of the present application is exemplarily shown. Figure 2b As shown, the embodiments of the present application can be applicable to a network architecture that uses a link aggregation group (LAG) / port aggregation (trunk) for traffic load balancing, and can also be applicable to the interaction of load balancing information between a server and a switch that uses bonding for traffic load balancing.

[0106] Figure 2b shows the system architecture of a 3-level L2 network, Figure 2b In the example, TOR-level communication devices are interconnected through Leaf-level communication devices. Server #A1 and Server #A2 can use bond link aggregation mode to access TOR-level communication devices, such as TOR #1 and TOR #2. TOR #1 and TOR #2 are connected to leaf #1 and leaf #2 back to back through link aggregation. Leaf #1 and leaf #2 are connected to TOR #3 and TOR #4 through back-to-back link aggregation. Server #B1 and Server #B 2 use bond link aggregation mode to access TOR #3 and TOR #4.

[0107] Figure 2c A schematic diagram of a system architecture provided by an embodiment of the present application is shown exemplarily. Figure 2b The difference is, Figure 2c The system architecture shown in the figure removes the leaf-level communication equipment, and is a system architecture of a 2-level L2 network.

[0108] like Figure 2b As shown in the figure, the traffic from server #A1 and server #A2 to server #B1 and server #B2 will be hashed once on the server and then hashed once on the TOR-level communication device. Figure 2a The polarization problem caused by the double hashing discussed above, if Figure 2b Improper selection of hash algorithm information on the server side and TOR-level communication device side will also lead to polarization problems.

[0109] You can continue to see Figure 2b , if there are multiple back-to-back links between leaf#1 and leaf#2 to TOR#3 and TOR#4, the traffic from server#A1 and server#A2 to server#B1 and server#B2 can be hashed once on the TOR-level communication devices (TOR#1 and TOR#2), and then hashed once on the leaf-level communication devices (leaf#1 and leaf#2). Figure 2a The polarization problem caused by the double hashing discussed above can also lead to polarization problems if the hash algorithm information selection on the TOR-level communication device and the leaf-level communication device side is unreasonable.

[0110] It should be added that there is another possible situation. If there is a back-to-back link between leaf#1 and leaf#2 to TOR#3 and TOR#4, but leaf#1 and leaf#2 are dual-homed to TOR#3 and TOR#4 based on bonding, then: the traffic from server#A1 and server#A2 to server#B1 and server#B2 can be hashed once on the TOR-level communication device (TOR#1 and TOR#2), and then hashed once on the leaf-level communication device (leaf#1 and leaf#2). Figure 2a The polarization problem caused by the double hashing discussed above can also lead to polarization problems if the hash algorithm information selection on the TOR-level communication device and the leaf-level communication device side is unreasonable.

[0111] like Figure 2b He Ru Figure 2c As shown, in another possible implementation, the server is connected to two TOR-level communication devices at the same time, and the two links can be in master-slave mode. Taking server #A1 as an example, the message sent by server #A1 can first select the next hop based on ECMP (perform a hash operation) according to the IP address at layer 3 of the server; then select the port link based on LAG (perform another hash operation) at layer 2 of server #A1. Since two hashes are performed, based on the above Figure 2a The polarization problem caused by the double hashing discussed above, if Figure 2b Improper selection of hash algorithm information for layer 3 and layer 2 on the server side can also lead to polarization problems.

[0112] like Figure 2b He Ru Figure 2cAs shown in another possible implementation, when the packets from server #A1 and server #A2 arrive at TOR #1, TOR #1 can first select the next hop based on ECMP (perform a hash operation) according to the IP address at layer 3; then select the port link based on LAG (perform another hash operation) at layer 2 of TOR #1. Figure 2a The polarization problem caused by the double hashing discussed above, if Figure 2b If the hash algorithm information of layer 3 and layer 2 on the TOR#1 side is not selected properly, it will also cause polarization problems. If the occurrence of polarization is to be mitigated, it is necessary to set the hash algorithm information for the load balancing device more reasonably, which is exactly the problem to be solved by the embodiments of the present application.

[0113] It should be noted that the above Figure 1a and Figure 1b The first communication device in may be Figure 2b The server in the second communication device may be Figure 2b Alternatively, the first communication device is Figure 2a The TOR-level communication device in the second communication device is Figure 2a The load balancing device may be a module inside the second communication device, or may be a device or module independent of the TOR-level communication device and server.

[0114] Alternatively, the above Figure 1a and Figure 1b The first communication device in may be Figure 2b The TOR-level communication device in the second communication device may be Figure 2b Alternatively, the first communication device is a leaf-level communication device. Figure 2a The leaf-level communication device in the second communication device is Figure 2a The load balancing device may be a module inside the second communication device, or may be a device or module independent of the TOR-level communication device and the leaf-level communication device.

[0115] Above Figure 1c and Figure 1d The first communication device and the second communication device in the embodiment may be Figure 2b For example, the first communication device may be a module in the server middle layer 3, and the second communication device may be a module in the server middle layer 2. Alternatively, the first communication device may be a module in the server middle layer 2, and the second communication device may be a module in the server middle layer 3. The load balancing device may be a module inside the server, or may be a device or module independent of the server.

[0116] In another possible implementation manner, the above Figure 1c and Figure 1d The first communication device and the second communication device in the embodiment may be Figure 2b A module in a TOR-level communication device in a TOR-level communication device. For example, the first communication device may be a module in layer 3 of a TOR-level communication device, and the second communication device may be a module in layer 2 of a TOR-level communication device. Alternatively, the first communication device may be a module in layer 2 of a TOR-level communication device, and the second communication device may be a module in layer 3 of a TOR-level communication device. The load balancing device may be a module inside a TOR-level communication device, or may be a device or module independent of a TOR-level communication device.

[0117] In another possible implementation manner, the above Figure 1c and Figure 1d The first communication device and the second communication device in the embodiment may be Figure 2b The load balancing device may be a module in a leaf-level communication device. For example, the first communication device may be a module in layer 3 of a leaf-level communication device, and the second communication device may be a module in layer 2 of a leaf-level communication device. Alternatively, the first communication device may be a module in layer 2 of a leaf-level communication device, and the second communication device may be a module in layer 3 of a leaf-level communication device. The load balancing device may be a module inside a leaf-level communication device, or may be a device or module independent of a leaf-level communication device.

[0118] Figure 2d A schematic diagram of a system architecture provided by an embodiment of the present application is exemplarily shown. Figure 2d As shown, the embodiment of the present application can be applied to a three-level Clos (CLOS) network architecture, which includes a TOR / leaf / spine three-level network, and each level can include multiple communication devices (the communication device can be a switch). Figure 2d As shown, the TOR level includes 4 communication devices. Figure 2a The leaf level includes four logical communication devices, namely leaf level communication device 1, leaf level communication device 3 and leaf level communication device 4. Leaf level communication device 1 can be composed of multiple physical leaf level communication devices, such as Figure 2d In the figure, the leaf-level communication device 1a and the leaf-level communication device 1b are bundled to obtain a logical leaf-level communication device 1. The spine level includes two communication devices, which are represented as 1-2 in the figure. The TOR-level communication device can connect to one or more servers, such as Figure 2d Shown are server 121, server 122, server 123, server 124, etc.

[0119] and Figure 2a Similar, due to Figure 2d In the TOR-level communication device and the leaf-level communication device, at least two hashes are performed, so if Figure 2d Improper selection of hash algorithm information for mid-leaf communication devices can also lead to polarization problems.

[0120] In addition, any communication device in the embodiments of the present application may perform traffic load balancing once, or may perform load balancing multiple times, such as performing load balancing once at layer 3 of a TOR-level communication device, and performing load balancing once at layer 2 of a TOR-level communication device. For another example, performing load balancing once at layer 3 of a leaf-level communication device, and performing load balancing once at layer 2 of a leaf-level communication device.

[0121] Combine the following Figure 2d Take the example of TOR-level communication equipment performing load balancing twice at layer 3 and layer 2 respectively. After receiving the first message, the TOR-level communication device 1 calculates the hash modulus value of the first message based on the hash algorithm information of layer 3 and the number of ECMP group members corresponding to the destination IP address of the first message, and determines the next hop corresponding to the first message based on the hash modulus value and the corresponding relationship between the hash modulus value and the preset hash modulus value and the next hop (or called logical port). Further, based on the hash algorithm information of layer 2 and the number of LAG group members corresponding to the destination MAC of the first message, the hash modulus value of the first message is calculated, and based on the corresponding relationship between the hash modulus value and the preset hash modulus value and the physical port, the physical port corresponding to the first message is determined, and the first message is sent to the next hop corresponding to the first message through the physical port. Figure 2d As shown, there are four links from the TOR-level communication device to the leaf-level communication device 1, two of which are connected to the leaf-level communication device 1a, and the other two are connected to the leaf-level communication device 1b. The TOR-level communication device can select a transmission link for the first message from the four links connected to the leaf-level communication device 1 based on the LAG technology.

[0122] It should be noted that in Figure 2dIn the embodiment, since a leaf-level communication device may be composed of multiple devices bound together, the hash algorithm selected by the leaf-level communication device may be affected by the hash algorithm information of layer 3 of the TOR-level communication device on the one hand, and may also be affected by the hash algorithm information of layer 2 of the TOR-level communication device on the other hand (for example, it will affect the number of diversity of messages received by the leaf-level communication device 1a, which will be described in detail in subsequent embodiments and will not be elaborated here). It can also be understood that multiple load balancing may be performed on the first communication device, and the multiple load balancing may affect the selection of the hash algorithm of the second communication device. Therefore, a possible implementation method is also provided in the embodiment of the present application, that is, the second communication device can determine its own hash algorithm information in combination with the hash algorithm information of at least two load balancing of the first communication device.

[0123] For the sake of distinction, in the embodiment of the present application, the hash algorithm information of layer 3 of the load balancing performed by the first communication device is referred to as the first hash algorithm information, and the hash algorithm information of layer 2 of the load balancing performed by the first communication device is referred to as the third hash algorithm information. The contents involved in this scheme will be described in detail later and will not be introduced here.

[0124] Above Figure 1a and Figure 1b The first communication device in may be Figure 2d The TOR-level communication device in the second communication device may be Figure 2d A leaf-level communication device in; or, the first communication device is Figure 2d The leaf-level communication device in the second communication device is Figure 2d The load balancing device may be a module inside the second communication device, or may be a device or module independent of the TOR-level communication device and the leaf-level communication device.

[0125] Figure 3 The structural diagram of a communication device provided in an embodiment of the present application is exemplarily shown. The communication device may be a forwarding device, and the following description is made by taking the communication device as a switch as an example.

[0126] like Figure 3 As shown, the communication device may include a switching chip 510 for processing traffic forwarding and a central processing unit (CPU) 520 for managing and controlling the switching chip.

[0127] The switching chip 510 includes one or more ports 511, such as port #1, port #2, ... port #mn+n, where m can be an integer greater than 1, and n can be an integer greater than 2. Figure 3 The number of ports is only for reference. In practice, the communication device may include more than Figure 3 A greater or lesser number of ports in the

[0128] like Figure 3 As shown, multiple ports can be aggregated into one port block. Figure 3 In the example, multiple port blocks 512 are shown, such as Figure 3 Port block 512 can decode the external message into a frame and send it to processing module 513. Figure 3 Multiple processing modules are exemplified, such as processing module (pipe) #0 ... processing module (pipe) #y. Port block 512 can also receive a message to be sent from processing module 513 and encode and send it.

[0129] The processing module 513 may include an ingress processing module (Ingress Pipeline) and an egress processing module (Egress Pipeline). The ingress processing module (Ingress Pipeline) may be used to extract message information, generate message descriptions, and perform table lookups (e.g. Figure 3 The table (tables) / ternary content addressable memory (Ternary Content Addressable Memories, TCAM) 514 in the packet is then sent to the memory management unit (memory management unit, MMU) 515. After scheduling, the MMU 515 sends the packet to the corresponding port connected to the egress processing module (EgressPipeline) for encoding and packaging, and the processed packet is sent out through the selected port. In this processing flow, the table lookup forwarding decision can be implemented in the ingress processing module (Ingress Pipeline), including traffic load balancing.

[0130] Figure 3 When the communication device shown is the second communication device, and the load balancing device is located in the second communication device, the load balancing device may include Figure 3 The processor 520 in the embodiment may be the processor 520, or may be a processor configured in Figure 3module in the processor 520 in the load balancing device. The second hash algorithm information determined by the load balancing device can be sent to the switching chip 510 through the processor 520. It should be noted that in addition to determining the second hash algorithm information of the second communication device for load balancing, the load balancing device can also adjust the number of ports for message forwarding of the second communication device. When the load balancing device adjusts the number of ports for message forwarding of the second communication device, the adjusted number of ports can also be sent to the switching chip 510 through the processor 520. The management interface controller (management interface controller) 516 of the switching chip 510 can send the second hash algorithm information and / or the port number information of the second communication device received from the processor CPU 520 to a designated component, such as the processing module 513. The management interface controller 516 can also feed back the relevant configuration of the second communication device (such as the current number of ports of the second communication device) to the processor 520.

[0131] The management interface controller 516 can also send the designated message received from the port to the processor 520, and can also send the message that the processor CPU 520 needs to send to the switch chip for sending. Figure 3 The communication device shown is a second communication device, and the load balancing device is a device independent of the second communication device. The load balancing device can send the second hash algorithm information to the second communication device, and the second communication device sends the message received through the port to the processor 520. The processor 520 parses the message, determines the second hash algorithm information, and sends it to the switching chip 510. The load balancing device adjusts the number of ports for forwarding messages of the second communication device, and can also send the adjusted number of ports to the second communication device. After the second communication device obtains the adjusted number of ports through the processor 520, it sends it to the switching chip 510.

[0132] Based on the above, Figure 4 A flow chart showing a method for determining hash algorithm information of a load balancing method provided in an embodiment of the present application is exemplified. The method can be performed by the aforementioned Figures 1a to 2c Load balancing device. Figure 4 As shown, the method includes:

[0133] S401, a load balancing device receives a first message, where the first message includes first hash algorithm information of a load balancing method of a first communication device and information on a first number of first ports of the first communication device.

[0134] In an embodiment of the present application, the first hash algorithm information and the first number of the first port of the first communication device may be sent directly by the first communication device to the load balancing device; or may be sent by other devices, such as an information sharing module. Before S401, the information sharing module may obtain the first hash algorithm information of the first communication device and the first number of the first port of the first communication device from the first communication device.

[0135] S402: The load balancing device determines second hash algorithm information of a load balancing method of the second communication device according to the first hash algorithm information and the first quantity information.

[0136] In the embodiment of the present application, the load balancing device may be a module or unit in the second communication device, or a module or unit of a device independent of the first communication device and the second communication device. If it is a device independent of the first communication device and the second communication device, then after S402, the load balancing device may send the second hash algorithm information to the second communication device. In this way, the second communication device may forward the message based on the second hash algorithm information.

[0137] Since the load balancing device can communicate with the first communication device, the first hash algorithm information and the first quantity information can be obtained, and then the second hash algorithm information determined according to the first hash algorithm information and the first quantity information of the first port of the first communication device can be more reasonable.

[0138] In the embodiment of the present application, multiple hash algorithm information is involved, and for the purpose of distinction, it is referred to as the first hash algorithm information, the second hash algorithm information, etc. Each hash algorithm information may include: at least one of the parameter items of the hash key information, the arrangement order of the parameter items of the hash key information, the hash algorithm, or the value-taking method of the hash value. For the purpose of distinction, the various parameters in the first hash algorithm information are respectively referred to as the first hash algorithm, the parameter items of the first hash key information, the arrangement order of the parameter items of the first hash key information, the first hash algorithm, and the value-taking method of the first hash value. The various parameters in the second hash algorithm information are respectively referred to as the second hash algorithm, the parameter items of the second hash key information, the arrangement order of the parameter items of the second hash key information, the second hash algorithm, and the value-taking method of the second hash value. And the various parameters in the subsequent third hash algorithm information are respectively referred to as the third hash algorithm, the parameter items of the third hash key information, the arrangement order of the parameter items of the third hash key information, the third hash algorithm, and the value-taking method of the third hash value.

[0139] The following takes the first hash algorithm information as an example to introduce the various parameters included in the hash algorithm information. Other hash algorithm information (such as the second hash algorithm information, the third hash algorithm information, etc.) are similar and will not be repeated here.

[0140] Parameter a1, parameter item of hash key information.

[0141] The parameter items of the hash key information may include fields carried by the message itself, such as the network layer destination address, the network layer source address, the transport layer destination port, the transport layer source port, the network layer protocol identifier, the congestion notification tag (CNTag), the virtual network tag (VNTag), the virtual local area network (VLAN) identifier, etc.

[0142] In another possible implementation, the parameter items of the hash key information in the embodiment of the present application also include an area (which can also be understood as bit width, bit length, etc.) for parameter values ​​of the parameter items of the hash key information. For example, the parameter items of the hash key information may include: the upper 16 bits of the network layer destination address, the lower 16 bits of the network layer source address, or the upper 16 bits of the network layer original address, etc. It can be seen that through the parameter items of the hash key information, the bits to be extracted from the parameter values ​​corresponding to the various parameter items used to construct the hash key information can be determined.

[0143] The parameter items of the hash key information may also include information of the communication device to which the message currently belongs. For example, for the first message received by the first communication device, the parameter items of the hash key information corresponding to the first hash algorithm information of the first communication device may include the first port identifier of the first message arriving at the first communication device, the identifier of the first communication device (it should be noted that the identifier of the first communication device is configurable, and the identifier of the first communication device may be different in different systems, which is not limited in the embodiments of the present application), etc.

[0144] It should be noted that for some messages, it may not be possible to extract the parameter items of the above-mentioned hash key information of the message. In this case, the communication device that performs load balancing on the message can fill this field with the default value, 0 or other set value.

[0145] For example, the first communication device receives a first message, and the first message is an ARP message. The parameter items of the hash key information corresponding to the first hash algorithm information may include fields carried by the message itself, such as the network layer destination address, the network layer source address, the transport layer destination port, the transport layer source port, the network layer protocol identifier, CNTag, VNTag, and VLAN identifier. Since the first message does not have network layer and transport information, it is impossible to extract the network layer and transport layer information of the first message, such as the network layer destination address, the network layer source address, the transport layer destination port, the transport layer source port, etc. In this case, when the first communication device constructs the hash key information corresponding to the first message, it can fill in the values ​​corresponding to the parameter items corresponding to the network layer and transport layer information with default values, 0, or other set values.

[0146] Parameter a2, the arrangement order of each parameter item of the hash key information.

[0147] The arrangement order of each parameter item of the hash key information may change. For example, the parameter items of the hash key information corresponding to the first hash algorithm information and the second hash algorithm information are the same, but the arrangement order of each parameter item is different.

[0148] Parameter a3, hash algorithm.

[0149] For a hash algorithm information, after constructing the hash key information according to the above parameters a1 and a2, the operation can be performed according to the hash algorithm corresponding to the hash algorithm information to obtain the operation result corresponding to the hash algorithm.

[0150] A hash algorithm may refer to an algorithm for calculating hash key information, such as a cyclic redundancy check (CRC) algorithm, an exclusive OR folding (XOR folding) or an exclusive OR (XOR) object, a split sum, and the like.

[0151] The CRC algorithm is essentially a reciprocal XOR of the hash key information (a string of bits). For example, assuming the hash key information is a 16-bit binary information g = 1011 0110 0100 0011, this binary code can be expressed as an algebraic polynomial g(x) = x 15 +x 13 +x 12 +x 10 +x 9 +x 6 +x 1 +1, where the value of the kth bit in g corresponds to x in g(x) k coefficient, multiply g(x) by x mThat is, add m zeros after g, and then divide it by the m-order polynomial h(x) to get the (m-1)-order remainder r(x). The binary code r corresponding to the remainder r(x) is the CRC calculation result.

[0152] That is to say, in the CRC algorithm, what changes are the hash key information used as the dividend and the m-order polynomial h(x) used as the divisor. h(x) is also usually called the generator polynomial. Generator polynomials are usually used to identify and distinguish different CRC algorithms. For example, "CRC algorithm A" actually means "the generator polynomial used by the CRC algorithm is A" or "the generator polynomial used by the CRC algorithm is identified by the name A". For example, you can say "CRC-16-CCITT" or "CRC 0x1021", where "CRC-16-CCITT" is the agreed CRC name and 0x1021 is the generator polynomial. Of course, devices or other CRC algorithm implementation entities can also name CRC for identification and distinction.

[0153] Parameter a4: the hash value selection method.

[0154] In the embodiment of the present application, for a hash algorithm information, a value obtained by operating the hash key information using the hash algorithm corresponding to the hash algorithm information can be determined from the value according to the value-taking method of the hash value corresponding to the hash algorithm information.

[0155] For example, the hash value may be obtained by extracting the lower 16 bits of the hash algorithm operation result as the hash value, extracting the upper 16 bits of the hash algorithm operation result as the hash value, or extracting all bits of the hash algorithm operation result as the hash value.

[0156] In order to alleviate the polarization problem in the network, the first hash algorithm information and the second number of ports of the second communication device satisfy at least one of the following: the first number is different from the second number, and the first hash algorithm information is the same as the second hash algorithm information; the first number is different from the second number, and the first hash algorithm information is different from the second hash algorithm information; or, the first number is the same as the second number, and the first hash algorithm information is different from the second hash algorithm information.

[0157] Since the first communication device performs load balancing by taking the hash value modulo the first quantity, and the second communication device performs load balancing by taking the hash value modulo the second quantity, when the first quantity and the second quantity are different, the first hash algorithm information and the second hash algorithm information may be different or the same. Even if the first hash algorithm information and the second hash algorithm information are the same, for the message received by the second communication device after balancing based on the first hash algorithm information and the first quantity, the second communication device may send and receive multiple messages through different links, thereby reducing the polarization phenomenon of the network.

[0158] In another case, if the first number is the same as the second number, and the first hash algorithm information is different from the second hash algorithm information, then for the message received by the second communication device after balancing based on the first hash algorithm information and the first number, the second communication device may also send and receive multiple messages through different links. Therefore, the polarization phenomenon of the network can be reduced.

[0159] Wherein, when the first hash algorithm information is different from the second hash algorithm information, the first hash algorithm information and the second hash algorithm information satisfy at least one of the following:

[0160] The first hash algorithm is different from the second hash algorithm; the parameter items of the first hash key information are different from the parameter items of the second hash key information; the arrangement order of the parameter items of the first hash key information is different from the arrangement order of the parameter items of the second hash key information; or the first hash value determination method is different from the second hash value determination method.

[0161] If at least one of the above contents is satisfied, then for the first message and the second message from the first communication device, even if the first message and the second message are hashed based on the first hash algorithm information, and the two hash values ​​obtained are modulo the first quantity, and the two hash modulo values ​​obtained are the same, then the first message and the second message are hashed based on the second hash algorithm information, and the two hash modulo values ​​obtained are modulo the second quantity, and the two hash modulo values ​​obtained may be different, and then the first message and the second message can be sent respectively through two different links corresponding to the two hash modulo values, thereby alleviating the polarization problem in the network.

[0162] In the embodiment of the present application, the number of ports of the noun communication device is defined. For the purpose of distinction, the number of first ports of the first communication device is referred to as the first number, and the number of second ports of the second communication device is referred to as the second number. In one possible implementation, the first number includes: the number of equal cost multipath (ECMP group) members of the first communication device; or, the number of link aggregation group (LAG group) members of the first communication device. They are introduced below respectively.

[0163] In implementation mode 1, the first number of the first port of the first communication device may be: the number of equal cost multi-path (ECMP group) members of the first communication device.

[0164] For example, the number of equal-cost multipath (ECMP group) members of the first communication device can also be understood as the number of first communication device layer 3 paths through which the first communication device can transmit the received message (such as the first message) to the destination IP address of the first message (the number of layer 3 paths can also be understood as the number of layer 3 logical ports).

[0165] The number of equal-cost multipath (ECMP group) members of the first communication device can also be understood as the number of ports (or ports) of layer 3 of the first communication device corresponding to the IP subnet address in the destination IP address of the first message. The number of ports can also be understood as the number of equal-cost paths, the number of next hops or the number of logical ports (or logical ports).

[0166] In implementation mode 2, the first number of the first port of the first communication device may be: the number of link aggregation group (LAG group) members of the first communication device.

[0167] For example, the number of link aggregation group (LAG group) members of the first communication device can also be understood as the number of layer 2 ports of the first communication device through which the first communication device can transmit the received message (such as the first message) to the destination MAC address of the first message (the number of layer 2 ports can also be understood as the number of physical ports of layer 2).

[0168] The number of link aggregation group (LAG group) members of the first communication device can also be understood as the number of ports (or ports) of layer 2 of the first communication device corresponding to the destination MAC address of the first message, and the number of ports can also be understood as the number of physical ports (or physical ports).

[0169] Similarly, the second hash algorithm information can be applied to the processing of the layer 3 load balancing method of the second communication device. The second number of the second port of the second communication device may include: the number of equal cost multipath (ECMPgroup) members of the second communication device. The second hash algorithm information can be applied to the processing of the layer 2 load balancing method of the second communication device. The second number of the second port of the second communication device may include: the number of link aggregation group (LAGgroup) members of the second communication device. The specific content is similar to the above content and will not be repeated.

[0170] In S402, in a possible implementation, the load balancing device may determine the second hash algorithm information based on the first hash algorithm information, the first quantity information, and the second quantity information of the second port of the second communication device. In this way, the second hash algorithm information may be determined more reasonably in combination with the number of ports of the second communication device.

[0171] Regarding the above Figure 2aIt can be seen from the example given in that for multiple messages received at the leaf level from the same or different TOR communication devices, the leaf-level communication device 8 only sends the multiple messages through one link, and cannot balance the multiple messages to multiple links for sending. In order to distribute the multiple messages from the first communication device to the multiple links of the second communication device as evenly as possible, in the above S402, the second hash algorithm information selected by the load balancing device can meet the first condition, and the first condition includes: hashing the first message and the second message based on the second hash algorithm information, and taking the two obtained hash values ​​modulo the second number of the second port of the second communication device, and the two obtained hash modulo values ​​are different. In this way, the received first message and the second message can be sent through two different ports corresponding to two different hash modulo values, thereby alleviating the network polarization problem.

[0172] In a possible implementation, the first message and the second message may be two messages that are transmitted to the second communication device by other communication devices (such as the first communication device and / or other communication devices) after load balancing using the first hash algorithm information and the first quantity.

[0173] In another possible implementation, the first condition may also include: performing hash calculations on the first message and the second message respectively based on the first hash algorithm information, and taking the two obtained hash values ​​modulo the first quantity respectively, and the two obtained hash modulo values ​​are the same. In this way, the first message and the second message may be sent to the second communication device by two different upper-level devices of the second communication device (including the first communication device and other communication devices) after load balancing based on the first hash algorithm information and the first quantity. The first message and the second message may also be sent to the second communication device by the same upper-level device of the second communication device (such as the first communication device) after load balancing based on the first hash algorithm information and the first quantity, for example, they may be sent to the second communication device through the same logical link or the same physical link of the first communication device. Furthermore, for the first message and the second message that meet the first condition, they may be sent through different links after load balancing based on the second hash algorithm information, thereby alleviating the polarization problem.

[0174] An example is used to illustrate the beneficial effect when the second hash algorithm information satisfies the first condition: for example, after the first communication device receives the first message and the second message from the same communication device or from different communication devices, it performs hash calculations on the first message and the second message based on the first hash algorithm information, and respectively takes the two hash values ​​obtained modulo a first quantity. The two hash modulo values ​​obtained are the same, so the first communication device determines to send the first message and the second message to the second communication device through the same link. The second communication device performs hash calculations on the first message and the second message based on the second hash algorithm information, and respectively takes the two hash values ​​obtained modulo a second quantity. The two hash modulo values ​​obtained are different, so the first message and the second message are sent to the next hop through two different links. In this way, when the second hash algorithm information satisfies the first condition, messages with the same characteristics that have been filtered by the previous hop communication device can be sent out through different links as much as possible, thereby alleviating the above-mentioned Figure 2a The polarization problem mentioned in the article is caused by unreasonable selection of hash algorithm information.

[0175] Let’s understand the cause of polarization problems from another perspective. Figure 5 The following is a schematic diagram showing the distribution of a diversity of hash key information provided by an embodiment of the present application. Figure 5 As shown, set S1 includes hash key information corresponding to each message generated by the first communication device, such as 12 hash key information such as key#1, key#2...key#12. Set S2 represents a schematic diagram of the hash modulus value obtained by respectively operating the 12 hash key information in set S1 based on the first hash algorithm information and taking the obtained hash value modulo the first number, as shown in FIG. Figure 5 As shown, the 12 hash modulus values ​​calculated from the 12 hash key information in set S1 are 12, among which there are repeated values ​​in the 12 hash modulus values. After deduplication of the 12 hash modulus values, 4 different hash modulus values ​​can be obtained, namely, hash modulus value A, hash modulus value B, hash modulus value C and hash modulus value D. It can be understood that the first communication device can disperse the data streams corresponding to the 12 hash key information to 4 links (or 4 equal cost multipath (ECMP group) members or 4 link aggregation group (LAG group) members) for transmission. For a communication device, there is a corresponding relationship between the hash modulus value calculated by the communication device and the transmission link of the communication device, and two hash modulus values ​​calculated by a communication device can correspond to two transmission links.

[0176] like Figure 5The first communication device calculates that the hash modulus values ​​corresponding to the hash key information key#1, key#2 and key#3 are all hash modulus values ​​A, that is, the data streams corresponding to the hash key information key#1, key#2 and key#3 are all sent through the same link, for example, they are all sent to the second communication device.

[0177] If the second communication device still uses the first hash algorithm information for balancing, and the first number of the first port of the first communication device is the same as the number of ports of the second communication device, the hash modulus values ​​corresponding to the hash key information key#1, key#2, and key#3 calculated by the second communication device are all hash modulus values ​​A. In this case, the data streams corresponding to the hash key information key#1, key#2, and key#3 are not load balanced on the second communication device, but are sent out through the same link, which may cause polarization problems.

[0178] If the hash modulus value obtained by calculating the hash key information is understood as diversity, then Figure 5 As shown, on the first communication device, the number of 12 hash modulus values ​​corresponding to the 12 hash key information after duplication is 4, which can be understood as the diversity corresponding to the first hash algorithm information on the first communication device is 4. If the second communication device still uses the first hash algorithm information for balancing, and the first number of the first port of the first communication device is the same as the number of ports of the second communication device, on the second communication device, the number of 3 hash modulus values ​​corresponding to the 3 hash key information (key#1, key#2 and key#3) after duplication is 1 (as shown in FIG. Figure 5 As shown in the set S3, that is, the diversity corresponding to the three hash key information (key#1, key#2 and key#3) is 1. At this time, no matter how many sending links there are on the second communication device, the data stream corresponding to the three hash key information is sent through only one link. It can be seen that the diversity of the message after the load balancing processing of the first communication device is reduced due to the hash algorithm information selected on the second communication device, which leads to the generation of polarization problems.

[0179] In order to alleviate the polarization problem, a possible implementation manner is also provided in the embodiment of the present application. In this implementation manner, the above S402 can be replaced by:

[0180] The load balancing device determines a fourth quantity corresponding to the hash algorithm information in N hash algorithm information; N is a positive integer, and the hash algorithm information corresponding to the fourth quantity greater than 1 is selected from the N hash algorithm information as the second hash algorithm information.

[0181] Among them, for the hash algorithm information in the N hash algorithm information, the fourth quantity corresponding to the hash algorithm information is: performing hash calculations on the M messages based on the hash algorithm information, taking the obtained M hash values ​​modulo the second quantity of the port of the second communication device, and removing the duplicated M hash modulo values; M is an integer greater than 1. In this way, the M messages can be distributed to at least two links after load balancing based on the second hash algorithm information and the second quantity, thereby alleviating the polarization problem of the network.

[0182] In another possible implementation, the M messages may be M messages that are transmitted to the second communication device after load balancing by other communication devices (such as the first communication device and / or other communication devices) using the first hash algorithm information and the first quantity.

[0183] In another possible implementation, M messages satisfy the second condition, and the second condition includes: performing hash calculations on the M messages based on the first hash algorithm information, and taking the obtained M hash values ​​modulo the first quantity, and the obtained M hash modulo values ​​are the same. In this way, if other communication devices receive M messages, they will send the M messages to the second communication device after load balancing based on the first hash algorithm information and the first quantity. Furthermore, for the M messages that meet the second condition, they can be sent through different links after load balancing based on the second hash algorithm information, thereby alleviating the polarization problem.

[0184] Combination Figure 5 For example, the M messages may be messages corresponding to the above-mentioned hash key information key#1, key#2 and key#3, and the selected second hash algorithm information must satisfy: hash calculations are performed on the M messages based on the second hash algorithm information, the M hash values ​​obtained are modulo the second number, and the number of values ​​obtained after deduplication of the M hash modulo values ​​is greater than 1. In this way, at least two links can be selected for sending messages corresponding to the hash key information key#1, key#2 and key#3, thereby alleviating the polarization problem.

[0185] The above contents are illustrated by examples through Table 1 below.

[0186] Table 1 Distribution of hash modulus values ​​after the first communication device and the second communication device perform operations on the received message

[0187]

[0188]

[0189] In order to more clearly introduce the embodiments of the present application, Table 1 assumes that the first number of the first port of the first communication device is the same as the number of ports of the second communication device, the parameter items of the hash key information corresponding to the first hash algorithm information are the same as the parameter items of the hash key information corresponding to the second hash algorithm information, the sorting method of the parameter items of the hash key information corresponding to the first hash algorithm information is the same as the sorting method of the parameter items of the hash key information corresponding to the second hash algorithm information, and the method of taking the hash value corresponding to the first hash algorithm information is the same as the method of taking the hash value corresponding to the second hash algorithm information.

[0190] As shown in Table 1, the hash algorithm corresponding to the first hash algorithm information adopted by the first communication device is CRC16a. The first communication device operates the received message based on the first hash algorithm information, and the obtained hash value is modulo the first quantity. The total number of hash modulo values ​​obtained after deduplication is 2, and the two values ​​can be represented as 0 and 3 respectively. The hash modulo value 0 corresponds to the first port of the first communication device, and the hash modulo value 3 corresponds to the fourth port of the first communication device. The first port of the first communication device is connected to the second communication device. In other words, the messages received by the second communication device are all messages whose hash modulo value is 0 after calculation on the first communication device (the message can be understood as the aforementioned M messages).

[0191] Please continue to refer to Table 1. If the hash algorithm corresponding to the second hash algorithm information used by the second communication device is CRC16a, then for the M messages received from the first communication device, the second communication device performs operations on the M messages received based on CRC16a, and the obtained hash value is modulo the first quantity, and the total number of the obtained hash modulus values ​​after deduplication is 1, as shown in Table 1, which is 0. That is, when the first hash algorithm information and the second hash algorithm information are the same, and the first quantity and the second quantity are the same, the first communication device performs calculations on the M messages, and the hash modulus values ​​corresponding to the obtained M messages are all 0, and the second communication device performs calculations on the M messages, and the hash modulus values ​​corresponding to the obtained M messages are also all 0, and the second communication device sends the M messages through the port corresponding to the hash modulus value of 0.

[0192] Please continue to refer to Table 1. If the hash algorithm corresponding to the second hash algorithm information used by the second communication device is CRC16b, then for the M messages received from the first communication device, the second communication device performs operations on the M messages received based on CRC16b, and the obtained hash value is modulo the first number, and the total number of the obtained hash modulo values ​​after deduplication is 4, as shown in Table 1, and the 4 values ​​are 1, 2, 3, and 0. That is, for the M messages from the first communication device, the second communication device can send them through 4 links, thereby alleviating the polarization problem of the network.

[0193] Please continue to refer to Table 1. If the hash algorithm corresponding to the second hash algorithm information used by the second communication device is CRC32HI, then for the M messages received from the first communication device, the second communication device performs operations on the M messages received based on 32HI, and the obtained hash value is modulo the first number, and the total number of the obtained hash modulo values ​​after deduplication is 1, as shown in Table 1, and the 1 value is represented as 0. That is, for the M messages from the first communication device, the second communication device can only send them through 1 link, which will cause polarization problems.

[0194] Please continue to refer to Table 1. If the hash algorithm corresponding to the second hash algorithm information adopted by the second communication device is CRC32LO, then for the M messages received from the first communication device, the second communication device performs operations on the M messages received based on CRC32LO, and the obtained hash value is modulo the first number, and the total number of hash modulo values ​​obtained after deduplication is 4, as shown in Table 1, and the 4 values ​​are 2, 0, 1, and 3 respectively (compared with the solution of the second communication device adopting CRC16b, the diversity number is the same, but the distribution order of the diversity value is different). That is, for the M messages from the first communication device, the second communication device can send them through 4 links, thereby alleviating the polarization problem of the network.

[0195] As can be seen from Table 1, when the hash algorithm corresponding to the first hash algorithm information is different from the hash algorithm corresponding to the second hash algorithm information, for example, the first hash algorithm information uses CRC16a and the second hash algorithm information uses CRC32HI, polarization problems may also occur. Therefore, simply limiting the hash algorithms used by the first hash algorithm information and the second hash algorithm information to be different cannot alleviate the polarization problem. In the solution provided in the embodiment of the present application, the selected second hash algorithm information must meet the following requirements: based on the second hash algorithm information, hash calculations are performed on M messages respectively, and the obtained M hash values ​​are modulo the second number respectively, and the number of values ​​obtained after deduplication of the M hash modulo values ​​is greater than 1. In this way, the polarization problem can be alleviated.

[0196] It should be noted that the above Table 1 is presented as an example in which the first number of the first ports of the first communication device is equal to the number of ports of the second communication device, the parameter items of the hash key information corresponding to the first hash algorithm information are the same as the parameter items of the hash key information corresponding to the second hash algorithm information, and the sorting method of the various parameter items of the hash key information corresponding to the first hash algorithm information is the same as the sorting method of the various parameter items of the hash key information corresponding to the second hash algorithm information, and the method of taking the hash value corresponding to the first hash algorithm information is the same as the method of taking the hash value corresponding to the second hash algorithm information. When the first number of the first ports of the first communication device is different from the number of ports of the second communication device, the parameter items of the hash key information corresponding to the first hash algorithm information are different from the parameter items of the hash key information corresponding to the second hash algorithm information, the sorting method of the various parameter items of the hash key information corresponding to the first hash algorithm information is different from the sorting method of the various parameter items of the hash key information corresponding to the second hash algorithm information, or the method of taking the hash value corresponding to the first hash algorithm information is different from the method of taking the hash value corresponding to the second hash algorithm information, at least one of the following is satisfied, then the values ​​of the 7th column and the 8th column of the above Table 1 may also change.

[0197] Table 2 Distribution of hash modulus values ​​after the first communication device and the third communication device perform operations on the received message

[0198]

[0199] In order to more clearly introduce the embodiments of the present application, Table 2 exemplarily shows the distribution of the hash modulus values ​​after the first communication device and the third communication device in Table 1 perform operations on the received message. Unlike Table 1, Table 3 shows the processing method of the message with a hash modulus value of 3 obtained after hashing on the first communication device, which will be described in detail below. For other contents, please refer to the description in the aforementioned Table 1, which will not be repeated here.

[0200] The hash modulus value 3 on the first communication device corresponds to the fourth port of the first communication device. The fourth port of the first communication device is connected to the third communication device. In other words, the messages received by the third communication device are all messages with a hash modulus value of 3 obtained after calculation on the first communication device (the scheme for selecting hash algorithm information for the third communication device in the embodiment of the present application can refer to the aforementioned scheme for selecting hash algorithm information for the second communication device, which will not be repeated here). And in Table 2, similar to Table 1, it is assumed that the first number of the first port of the first communication device is the same as the number of ports of the third communication device, the parameter items of the hash key information corresponding to the first hash algorithm information are the same as the parameter items of the hash key information corresponding to the hash algorithm information of the third communication device, the sorting method of each parameter item of the hash key information corresponding to the first hash algorithm information is the same as the sorting method of each parameter item of the hash key information corresponding to the hash algorithm information of the third communication device, and the value-taking method of the hash value corresponding to the first hash algorithm information is the same as the value-taking method of the hash value corresponding to the hash algorithm information of the third communication device.

[0201] The following takes the second and fourth rows of Table 2 as examples, and the contents of other rows are similar and will not be repeated. As shown in Table 2, if the hash algorithm corresponding to the hash algorithm information adopted by the third communication device is CRC16a, then for the message received from the first communication device, the third communication device performs operations on the multiple messages received based on CRC16a, and the obtained hash value is modulo the first quantity, and the total number of hash modulo values ​​obtained after deduplication is 1, as shown in Table 1, the value is 3. If the hash algorithm corresponding to the hash algorithm information adopted by the third communication device is CRC16b, then for the message received from the first communication device, the third communication device performs operations on the multiple messages received based on CRC16b, and the obtained hash value is modulo the first quantity, and the total number of hash modulo values ​​obtained after deduplication is 4, as shown in Table 1, the 4 values ​​are 3, 0, 1, and 2, respectively.

[0202] It can be seen from Table 2 that when the hash algorithm corresponding to the first hash algorithm information is different from the hash algorithm corresponding to the hash algorithm information of the third communication device, for example, the first hash algorithm information adopts CRC16a, and the hash algorithm information of the third communication device adopts CRC32HI, polarization problems may also occur. Therefore, simply limiting the hash algorithms used by the first hash algorithm information and the second hash algorithm information to be different cannot alleviate the polarization problem. In the scheme provided in the embodiment of the present application, the hash algorithm information selected for the third communication device can refer to the aforementioned scheme for selecting the second hash algorithm information, that is, the hash algorithm information selected for the third communication device must meet the following requirements: based on the hash algorithm information selected for the third communication device, hash calculations are performed on multiple messages respectively, and the multiple hash values ​​obtained are modulo the number of ports of the third communication device respectively, and the number of values ​​obtained after deduplication of the hash modulus values ​​is greater than 1. In this way, the polarization problem can be alleviated. The hash algorithm information selected for the third communication device can refer to the aforementioned scheme for selecting the second hash algorithm information, which will not be repeated.

[0203] In order to distribute the load more evenly on each link, the embodiment of the present application also provides a possible implementation method. In the above S402, the load balancing device selects the corresponding fourth largest number of hash algorithm information from the N hash algorithm information as the second hash algorithm information.

[0204] That is to say, in this implementation, the second hash algorithm information selected by the load balancing device not only satisfies: hash calculations are performed on the M messages based on the second hash algorithm information, the M hash values ​​obtained are modulo the second quantity, and the number of values ​​obtained after deduplication of the M hash modulo values ​​is greater than 1. Moreover, it is the hash algorithm information with the largest fourth quantity among the N hash algorithm information, which can also be understood as the hash algorithm information with the least diversity loss when load balancing is performed on the M messages. The N hash algorithm information can be several pre-configured selectable hash algorithm information, and the staff can also modify and supplement the preset N hash algorithm information at any time.

[0205] For example, according to the above Table 1, it can be seen that when the first number of the first port of the first communication device is equal to the number of ports of the second communication device, both are 4, the parameter items of the hash key information corresponding to the first hash algorithm information are the same as the parameter items of the hash key information corresponding to the second hash algorithm information, and the sorting method of the parameter items of the hash key information corresponding to the first hash algorithm information is the same as the sorting method of the parameter items of the hash key information corresponding to the second hash algorithm information, the value-taking method of the hash value corresponding to the first hash algorithm information is the same as the value-taking method of the hash value corresponding to the second hash algorithm information, if the hash algorithm corresponding to the first hash algorithm information is CRC16a, the second hash algorithm information can select CRC16b or CRC32LO.

[0206] In another possible implementation, the load balancing device may pre-establish a hash algorithm information association relationship, and the hash algorithm information association relationship may be stored in a table or other form of document. The hash algorithm information association relationship includes: the first hash algorithm information, the first quantity information, the second quantity information of the port of the second communication device, and the association relationship of the second hash algorithm information. Thus, in the above S402, the load balancing device may query the preset hash algorithm information association relationship based on the first hash algorithm information and the first quantity information to obtain the second hash algorithm information. Further, the load balancing device may query the preset hash algorithm information association relationship based on the first hash algorithm information, the first quantity information, and the second quantity of the second port of the second communication device to obtain the second hash algorithm information.

[0207] Table 3 lists several examples of hash algorithms corresponding to the first hash algorithm information and hash algorithms corresponding to the second hash algorithm information. Table 3 is shown by taking the parameter items of the hash key information corresponding to the first hash algorithm information as the same as the parameter items of the hash key information corresponding to the second hash algorithm information, and the sorting method of the various parameter items of the hash key information corresponding to the first hash algorithm information as the same as the sorting method of the various parameter items of the hash key information corresponding to the second hash algorithm information as an example. Take the first row of Table 3 as an example. When the first number of the first port of the first communication device is 4, the hash algorithm corresponding to the first hash algorithm information is CRC16b, and the number of ports of the second communication device is 4, the hash algorithm corresponding to the second hash algorithm information can be recommended to select CRC32LO. The hash algorithm corresponding to the second hash algorithm information in Table 3 can be pre-calculated or calculated in real time, for example, it can be evaluated by traversing various combinations or calculated by mathematical solution. The contents of other rows are similar and will not be elaborated.

[0208] Table 3 Examples of hash algorithms corresponding to the first hash algorithm information and the second hash algorithm information

[0209]

[0210] It can be seen from Table 3 that in the embodiment of the present application, the "number of values ​​obtained after hash modulus value deduplication" is used to quantitatively measure the load balancing effect of the system after multi-level load balancing, and the effects of various load balancing algorithm combinations can be pre-evaluated, so as to select a suitable load balancing algorithm combination to reduce the polarization problem of the system and obtain a better load balancing effect. Table 3 exemplifies several combinations of hash algorithms corresponding to the first hash algorithm information and the hash algorithms corresponding to the second hash algorithm information. It can be seen from Table 3 that when the first number of the first port of the first communication device and / or the number of ports of the second communication device change, the combination of the hash algorithm corresponding to the first hash algorithm information and the hash algorithm corresponding to the second hash algorithm information may change. For example, in Table 3, when the first number of the first port of the first communication device and the number of ports of the second communication device are both 4, the hash algorithm corresponding to the first hash algorithm information is CRC16b, and the hash algorithm corresponding to the second hash algorithm information can be CRC32LO. When the first number of the first port of the first communication device is 8 and the number of ports of the second communication device is 4, the hash algorithm corresponding to the first hash algorithm information is CRC16b, and the hash algorithm corresponding to the second hash algorithm information can be CRC16a. It can be seen that in order to solve multi-level load balancing, the number of ports of the load balancing subsystem of the multi-level communication equipment must also be considered; it can also be seen that even if the hash algorithms of the first hash algorithm information and the second hash algorithm information are different, there is no fixed set of first hash algorithm information and second hash algorithm information that can ensure that the polarization problem is solved and the optimal performance is obtained under all combinations of the number of ports of the first communication device and the number of ports of the second communication device.

[0211] In the embodiment of the present application, a communication device can perform load balancing once or multiple times. For example, the first communication device can perform load balancing once at layer 3 and once at layer 2. The above content is introduced by taking the first hash algorithm information as the hash algorithm information corresponding to any load balancing performed by the first communication device as an example. In another possible implementation, the first communication device can send the hash algorithm information of multiple load balancing performed to the load balancing device, so that the load balancing device can determine a more reasonable second hash algorithm information. Specifically, it can be as follows Figure 6 As shown in the flow chart of the method for determining the hash algorithm information of the load balancing, the method further includes before S402:

[0212] S4011, the load balancing device receives a second message, where the second message includes third hash algorithm information of the load balancing method of the first communication device and information on the third number of the third port of the first communication device.

[0213] The above S402 may be replaced by: the load balancing device determines the second hash algorithm information of the load balancing method of the second communication device according to the first message and the second message.

[0214] In another possible implementation manner, the above S402 may be replaced by: the load balancing device determines the second hash algorithm information of the load balancing method of the second communication device according to the first message, the second message and the second number.

[0215] It should be noted that the first message and the second message may be two different messages or the same message. In this case, it can also be understood that the first message also includes: third hash algorithm information and third quantity information.

[0216] exist Figure 6 In the scheme shown, the first hash algorithm information and the third hash algorithm information may be hash algorithm information corresponding to two load balancing of the first communication device. In one possible implementation, the first hash algorithm information is the hash algorithm information used by the first communication device for load balancing based on equal-cost multi-path technology at layer 3. The first quantity includes the number of equal-cost multi-path (ECMP group) members of the first communication device. The third hash algorithm information is the hash algorithm information used by the first communication device for load balancing based on link aggregation group (LAG) technology at layer 2. The third quantity includes the number of link aggregation group (LAG group) members of the first communication device.

[0217] Below Figure 2d Table 4 Figure 6 The scheme provided is described.

[0218] Table 4 Distribution of hash modulus values ​​after the first communication device and the second communication device perform operations on the received message

[0219]

[0220]

[0221] The first communication device in Table 4 is, for example, Figure 2d The TOR-level communication device 1 in the second communication device is, for example, a leaf-level communication device 1a. The first hash algorithm information is the hash algorithm information used by the TOR-level communication device layer 3 for load balancing. The third hash algorithm information is the hash algorithm information used by the TOR-level communication device layer 2 for load balancing.

[0222] like Figure 2dAs shown in Table 4, TOR-level communication device 1 corresponds to 4 logical output ports at layer 3, so the first quantity is 4. The hash algorithm corresponding to the first hash algorithm information is CRC16b. The number of hash modulus values ​​corresponding to the first hash algorithm information after deduplication is 4, and the values ​​are 0, 1, 2 and 3 respectively. Among them, the message with a hash modulus value of 0 goes to leaf-level communication device 1. The message with a hash modulus value of 1 goes to leaf-level communication device 2. The message with a hash modulus value of 2 goes to leaf-level communication device 3. The message with a hash modulus value of 3 goes to leaf-level communication device 4.

[0223] The number of physical outbound ports of TOR-level communication device 1 leading to leaf-level communication device 1 is 4, so the third number corresponding to the hash modulus value 0 is 4. The number of deduplicated hash modulus values ​​corresponding to the third hash algorithm information (the number of deduplicated hash modulus values ​​obtained by calculating the received message based on the third hash algorithm information) is 4, which are 0, 1, 2 and 3 respectively. Among them, the hash modulus values ​​0 and 1 go to leaf-level communication device 1a in leaf-level communication device 1, and the hash modulus values ​​2 and 3 go to leaf-level communication device 1b in leaf-level communication device 1.

[0224] The second communication device is a leaf-level communication device 1a, and the second number of its output ports is 2. When the second hash algorithm information used is CRC16a, the number of hash modulus values ​​obtained after deduplication is 2, that is, the diversity of the obtained message is 2.

[0225] It can be seen from Table 4 that although the diversity of the message output by layer 2 of TOR-level communication device 1 is 4, since leaf-level communication device 1 is formed by binding two physical leaf-level communication devices, for leaf-level communication device 1a, the diversity of the message received from TOR-level communication device 1 is only 2, not 4, that is, the diversity of the message received by the second communication device is reduced. Based on this, considering that the third hash algorithm information of the first communication device may affect the diversity of the second hash algorithm information, the second hash algorithm information can be more reasonably determined based on the first hash algorithm information and the third hash algorithm information.

[0226] Based on the above Figure 6In the provided scheme, the first condition mentioned in the above embodiment may also include: performing hash calculations on the first message and the second message respectively based on the third hash algorithm information, and taking the modulus of the two obtained hash values ​​on the third quantity respectively, and connecting the obtained two hash modulus values ​​to the second communication device at the port corresponding to the first communication device (such as the physical port at layer 2). In this way, the first message and the second message are both sent to the second communication device after load balancing by the upper-level device of the second communication device based on the first hash algorithm information, the first quantity, the third hash algorithm information and the third quantity. Furthermore, for the first message and the second message that meet the first condition, they can be sent through different links after load balancing based on the second hash algorithm information, thereby alleviating the polarization problem.

[0227] Based on the above Figure 6 In the scheme provided, the following Table 5 exemplarily provides a schematic table of hash algorithm information association relationships. As shown in Table 5, the hash algorithm information association relationships mentioned in the above embodiment may include: first hash algorithm information, first quantity information, third hash algorithm information, third quantity information, information on the hash modulus value corresponding to the port of the first communication device connected to the second communication device, information on the second quantity of the port of the second communication device, and the association relationship of the second hash algorithm information. In this way, more reasonable second hash algorithm information with less diversity loss can be found from the hash algorithm information association relationship based on multiple hash algorithm information of the first communication device.

[0228] Table 5 Schematic diagram of hash algorithm information association

[0229]

[0230] It should be noted that in Figure 2d In the network scenario shown, after the deployment is completed, the number of links connecting the TOR-level communication device where the computing cluster is located to the Leaf-level communication device can remain unchanged, but how the links are allocated to layer 3 ECMP and layer 2 LAG can change, and different allocations will cause the first number and the third number to change. In the embodiment of the present application, when the first number and the third number are updated, the second hash algorithm information of the second communication device can be updated again based on the updated first number and the third number.

[0231] Based on the above, Figure 7a and Figure 7b The flowchart of the method for determining two possible load balancing hash algorithm information provided in the embodiment of the present application is exemplified as follows: Figure 7a As shown, the method also includes:

[0232] S601: The load balancing device determines that the second communication device is a slave device.

[0233] There are many ways for the load balancing device to determine the master-slave relationship of the first communication device and the second communication device. For example, the priorities of the first communication device and the second communication device can be compared, and the one with a higher priority is the master device, and the one with a lower priority is the slave device. For another example, the MAC addresses of the first communication device and the second communication device can be compared, or it can be agreed that the device with a smaller MAC address is the master device.

[0234] In a possible implementation, it can be agreed that the hash algorithm information of the slave device can change with the hash algorithm information of the master device, based on which, subsequent S602 and S603 are executed when the second communication device is determined to be a slave device in S601. If under other agreed premises, such as agreeing that the hash algorithm information of the master device can change with the hash algorithm information of the slave device, S601 can be replaced by determining that the second communication device is the master device, and S602 and S603 are executed only when this premise is met.

[0235] S602, the load balancing device determines whether there is hash algorithm information that meets the first condition;

[0236] If yes, execute S603;

[0237] If not, execute S604;

[0238] S603: The load balancing device determines the hash algorithm information that meets the first condition as the second hash algorithm information.

[0239] S603 is similar to the aforementioned S402 method, and can be referred to each other, so it will not be described in detail.

[0240] S604: The load balancing device updates the second communication device to a master device.

[0241] In S604, the load balancing device may also update the first communication device to the master device. Alternatively, a message may be sent to the first communication device to notify the second communication device to update to the master device so that the first communication device updates itself to the slave device. There are many ways to change the second communication device to the master device, such as modifying the priority of the second communication device.

[0242] S605, the load balancing device selects fourth hash algorithm information; the fourth hash algorithm information is hash algorithm information used by the second communication device for message forwarding.

[0243] In S605, the fourth hash algorithm information selected by the load balancing device may be selected from preset hash algorithm information.

[0244] S606, the load balancing device sends a third message to the first communication device, where the third message is used to instruct the first communication device to update the hash algorithm corresponding to the load balancing method of the first communication device according to the fourth hash algorithm information and the second number of ports of the second communication device.

[0245] Through S606, the first communication device can reselect the hash algorithm to alleviate the polarization problem in the network. The scheme for selecting the hash algorithm and the parameters in other hash algorithm information by the first communication device can participate in the aforementioned method for selecting the second hash algorithm information for the second communication device, which will not be repeated here.

[0246] The third message may instruct the first communication device to update the hash algorithm corresponding to the single load balancing mode (such as layer 2 or layer 3 load balancing) or multiple load balancing (such as layer 2 and layer 3 load balancing) of the first communication device according to the fourth hash algorithm information and the second number of ports of the second communication device.

[0247] When the load balancing device and the second communication device are two devices respectively, the load balancing device may also send fourth hash algorithm information to the second communication device to inform the second communication device of the hash algorithm information used by the second communication device.

[0248] In another possible implementation manner, the load balancing device may reselect hash algorithm information for the first communication device. For example, after S604, the load balancing device may reselect hash algorithm information for the first communication device. Figure 7b The contents of the following S607 and S608 are implemented.

[0249] S607: The load balancing device determines fifth hash algorithm information of the load balancing method of the first communication device according to the fourth hash algorithm information, the first quantity information, and the second quantity information of the ports of the second communication device.

[0250] The fourth hash algorithm information satisfies the third condition, and the third condition includes: performing hash calculations on the third message and the fourth message based on the fourth hash algorithm information, and taking the two obtained hash values ​​modulo the second quantity, respectively, and the two obtained hash modulo values ​​are different. In this way, the third message and the fourth message can be sent through two links on the second communication device, thereby alleviating the polarization problem of the network.

[0251] The third message and the fourth message may be messages sent to the second communication device after other communication devices perform load balancing based on the fifth hash algorithm information and the first quantity. In another possible implementation, the third condition also includes: performing hash calculations on the third message and the fourth message respectively based on the fifth hash algorithm information, and taking the modulus of the two obtained hash values ​​on the first quantity respectively, and the two obtained hash modulus values ​​are the same. In this way, the superior device of the second communication device can send the third message and the fourth message to the second communication device after performing load balancing based on the fifth hash algorithm information and the first quantity. Furthermore, the third message and the fourth message can be sent on the second communication device through two links, thereby alleviating the polarization problem of the network.

[0252] Through S607, the load balancing device can reselect the hash algorithm for the first communication device to alleviate the polarization problem in the network. The scheme for selecting the hash algorithm and the parameters in other hash algorithm information for the first communication device can participate in the aforementioned method for selecting the second hash algorithm information for the second communication device, which will not be repeated here.

[0253] The scheme for the load balancing device to select the fourth Hash algorithm information is similar to the content of the aforementioned load balancing device selecting the second Hash algorithm information, which will not be repeated here.

[0254] In another possible implementation, the load balancing device may also determine the seventh hash algorithm information of the load balancing method of the first communication device based on the fourth hash algorithm information, the first quantity information, and the second quantity information of the ports of the second communication device. The fifth hash algorithm information and the seventh hash algorithm information may be hash algorithm information of two load balancing of the first communication device, for example, hash algorithm information corresponding to the load balancing of layer 3 and layer 2, respectively.

[0255] S608, the load balancing device sends a fourth message to the first communication device, where the fourth message is used to notify the first communication device to forward the message based on the fifth hash algorithm information.

[0256] In S608, after the hash algorithm information is reselected by the first communication device, the first communication device may be informed through a fourth message so that the first communication device forwards the message based on the reselected fifth hash algorithm information.

[0257] If the load balancing device in the embodiment of the present application is a device independent of the first communication device and the second communication device, the solution of the embodiment of the present application can be implemented by exchanging information with the first communication device and the second communication device respectively. If the load balancing device is located in the second communication device, the mutual information exchange between the first communication device and the second communication device can implement the above solution. It can be seen from the above content that through the interaction of information, the load balancing device can combine the information of the first communication device and the second communication device to select more reasonable hash algorithm information for the two, thereby alleviating the polarization problem.

[0258] In an embodiment of the present application, at least one of the first hash algorithm information or the first quantity of information is carried by the following information: a link layer discovery protocol (LLDP) message, an open shortest path first (OSPF) routing protocol message, or a border gateway protocol (BGP) message, a link aggregation control protocol (LACP).

[0259] Figure 8a A schematic diagram of the structure of an extended LLDP message for carrying first hash algorithm information and first quantity information provided by an embodiment of the present application is exemplarily shown.

[0260] like Figure 8a As shown, the extended LLDP message may include a TLV header and a TLV information string. The TLV header may include a TLV type and a TLV information string length. The TLV information string may include 802.1OUI 00-80-C2 (3 bytes), 802.1 subtype = 21 (1 byte), device type (1 byte), hash code ID (1 byte), and group members (1 byte). The device type may be used to indicate the entity type used by the data plane to implement traffic load balancing, such as the switch chip manufacturer model, the server version for link bonding, etc., which may be uniformly encoded.

[0261] like Figure 8a As shown, the hash algorithm coding identifier (hash code ID (1 byte (octets)) can be used to carry hash algorithm information, such as at least one of the following parameters in the above hash algorithm information (such as the aforementioned parameter a1, parameter a2, parameter a3 and parameter a4): hash algorithm, parameter items of hash key information, arrangement order of each parameter item of hash key information, or hash value acquisition method, etc. In one possible implementation, different combinations of each parameter in the hash algorithm information (such as the aforementioned parameter a1, parameter a2, parameter a3 and parameter a4) can be encoded and identified, so that the combination identifier is determined by the information carried by the field, and then the specific content of parameter a1, parameter a2, parameter a3 or parameter a4 in the combination is determined according to the combination identifier, thereby reducing the amount of data carried by the field.

[0262] like Figure 8a As shown, members of group (1 octets) may be used to carry a first amount of information.

[0263] Figure 8b A schematic diagram of the structure of another OSPF (or OSPF Opaque) message for carrying first hash algorithm information and first quantity information provided by an embodiment of the present application is exemplified.

[0264] like Figure 8b As shown, the extended OSPF message may include link state (LS) lifetime (age), options (options), opaque type (opaque type), opaque ID (opaque ID), advertising router (advertising router), LS sequence number (sequence number), LS checksum (checksum), length (length), device type (device type), hash code ID (hash code ID), and group members (members of group)).

[0265] Figure 8c The structure diagram of another BGP (or BGP Opaque) message for carrying the first hash algorithm information and the first quantity information provided by the embodiment of the present application is exemplarily shown. Figure 8cAs shown, the BGP message includes an address family identifier (address family identifier) ​​(2 bytes (octets)), a subsequent address family identifier (subsequent address family identifier) ​​(1 byte (octets)), a next hop address length (length of next hop address) (byte (octets)), which must be 0 (must be zero), a reserved bit (1 byte (octets)), which must be 0 (must be zero), an opaque key length (opaque key length) (2 bytes (octets)), and opaque key data (opaque key data) (4 bytes (octets)).

[0266] Figure 8b and Figure 8c The device type, hash code ID, and group members in the Figure 8a For LAG / Trunk application scenarios, the first hash algorithm information or the first quantity information may also be carried by an LACP message, and the carried information is similar to the information carried by protocols such as LLDP, and will not be described in detail.

[0267] The following content shows a schematic table of network utilization by way of example in Table 6 and Table 7. In Table 6, the first communication device is Figure 2a The TOR-level communication device in the second communication device is Figure 2a The leaf-level communication device in the invention uses the same hash algorithm information, that is, the hash algorithm corresponding to the first hash algorithm information is the same as the hash algorithm corresponding to the second hash algorithm information, the parameter items of the hash key information corresponding to the first hash algorithm information are the same as the parameter items of the hash key information corresponding to the second hash algorithm information; the arrangement order of the parameter items of the hash key information corresponding to the first hash algorithm information is the same as the arrangement order of the parameter items of the hash key information corresponding to the second hash algorithm information; the method for taking the hash value corresponding to the first hash algorithm information is the same as the method for taking the hash value corresponding to the second hash algorithm information.

[0268] Table 6 Schematic diagram of network utilization

[0269]

[0270]

[0271] Take the first row of Table 6 as an example. When the total number of flows is 294912 under the "#flows" traffic model, when the number of uplink ports of the first communication device and the second communication device is 4, the network utilization is 25%; when the number of uplink ports of the first communication device and the second communication device is 8, the network utilization is 12.5%; when the number of uplink ports of the first communication device and the second communication device is 16, the network utilization is 6.25%; when the number of uplink ports of the first communication device and the second communication device is 32, the network utilization is 3.125%. The contents of other rows are similar and will not be repeated. It can be seen from Table 6 that when the first communication device and the second communication device use the same hash algorithm information, the network utilization is low and a polarization problem occurs.

[0272] The first communication device in Table 7 is Figure 2a The second communication device is a medium TOR level communication device. Figure 2a In the mid-leaf communication device, the hash algorithm corresponding to the first hash algorithm information is CRC16b, and the hash algorithm corresponding to the second hash algorithm information is CRC32LO. The CRC algorithm is usually identified by a generator polynomial. CRC16b and CRC32LO are CRC code names, and the CRC generator polynomial corresponding to CRC16b is 0x1021. The CRC generator polynomial corresponding to CRC32LO is 0x1EDC6F41, where the 0x prefix indicates that this is a number represented in 16-bit base 16. The parameter items of the hash key information corresponding to the first hash algorithm information are the same as the parameter items of the hash key information corresponding to the second hash algorithm information, the arrangement order of the various parameter items of the hash key information corresponding to the first hash algorithm information is the same as the arrangement order of the various parameter items of the hash key information corresponding to the second hash algorithm information, and the value-taking method of the hash value corresponding to the first hash algorithm information is the same as the value-taking method of the hash value corresponding to the second hash algorithm information.

[0273] Table 7 Network utilization rate diagram

[0274]

[0275] Take the first row of Table 7 as an example. When the total number of flows under the "#flows" traffic model is 294912, when the number of uplink ports of the first communication device and the second communication device is 4, the network utilization is 99.9%; when the number of uplink ports of the first communication device and the second communication device is 8, the network utilization is 99.9%; when the number of uplink ports of the first communication device and the second communication device is 16, the network utilization is 98.814%; when the number of uplink ports of the first communication device and the second communication device is 32, the network utilization is 95.238%. The contents of other rows are similar and will not be repeated. It can be seen from Table 7 that after applying the solution provided in the embodiment of the present application, the network utilization can be improved and the polarization problem in the network can be alleviated.

[0276] It is understandable that in order to implement the functions in the above embodiments, the load balancing device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and method steps of each example described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.

[0277] Fig. 9 , Fig.10 and Fig.11 The following is a schematic diagram of the structure of possible communication devices provided in the embodiments of the present application. These communication devices can be used to implement the functions of the load balancing device in the above method embodiments, and thus can also achieve the beneficial effects possessed by the above method embodiments. In the embodiments of the present application, the communication device can be as follows: Figure 1a , Figure 1b , Figure 1c or Figure 1d The load balancing device shown may also be a module (such as a chip) applied to a load balancing device.

[0278] like Fig. 9 As shown, the communication device 1300 includes a processing unit 1310 and a transceiver unit 1320. The communication device 1300 is used to implement the above Figure 4 , Figure 6 , Figure 7a or Figure 7b The function of the load balancing device in the method embodiment shown in FIG.

[0279] When the communication device 1300 is used to implement Figure 4 , Figure 6 , Figure 7a or Figure 7bIn the method embodiment shown, the function of the load balancing device is as follows: the processing unit 1310 is used to perform, through the transceiver unit 1320: receiving a first message, the first message including first hash algorithm information of the load balancing method of the first communication device and information of the first number of the first port of the first communication device. According to the first hash algorithm information and the first number information, determining the second hash algorithm information of the load balancing method of the second communication device.

[0280] For more detailed description of the processing unit 1310 and the transceiver unit 1320, please refer to Figure 4 , Figure 6 , Figure 7a or Figure 7b The relevant description in the method embodiment shown is directly obtained and will not be repeated here.

[0281] like Fig.10 As shown, the communication device 1400 includes a processing circuit 1410 and an interface circuit 1420. The processing circuit 1410 and the interface circuit 1420 are coupled to each other. It is understood that the interface circuit 1420 can be a transceiver or an input-output interface. Optionally, the communication device 1400 may also include a memory for storing instructions executed by the processing circuit or storing input data required for the processing circuit 1410 to execute instructions or storing data generated after the processing circuit 1410 executes instructions.

[0282] When the communication device 1400 is used to implement Figure 4 , Figure 6 , Figure 7a or Figure 7b When the method is shown, the processing circuit 1410 is used to implement the function of the above-mentioned processing unit 1310, and the interface circuit 1420 is used to implement the function of the above-mentioned transceiver unit 1320.

[0283] like Fig.11 As shown, the communication device 1500 includes a processor 1510 and a communication interface 1520. The processor 1510 and the communication interface 1520 are coupled to each other. It is understood that the communication interface 1520 can be a transceiver or an input-output interface. Optionally, the communication device 1500 may also include a memory 1530 for storing instructions executed by the processor 1510 or storing input data required by the processor 1510 to execute instructions or storing data generated after the processor 1510 executes instructions.

[0284] When the communication device 1500 is used to implement Figure 4 , Figure 6 , Figure 7a or Figure 7b When the method is shown, the processor 1510 is used to implement the function of the above-mentioned processing unit 1310, and the communication interface 1520 is used to implement the function of the above-mentioned transceiver unit 1320.

[0285] When the communication device 1500 is used to implement Figure 4 , Figure 6 , Figure 7a or Figure 7b In the method embodiment shown, the function of the load balancing device is as follows: the processor 1510 is used to execute, through the communication interface 1520: receiving a first message, the first message including first hash algorithm information of the load balancing method of the first communication device and information of the first number of the first port of the first communication device. Determine the second hash algorithm information of the load balancing method of the second communication device based on the first hash algorithm information and the first number information.

[0286] In a possible implementation, the processor 1510 is configured to determine the second hash algorithm information according to the first hash algorithm information, the first quantity information, and the second quantity information of the second port of the second communication device.

[0287] In a possible implementation, the processor 1510 is further configured to: receive a second message through a communication interface, the second message including third hash algorithm information of a load balancing method of the first communication device and information about a third number of third ports of the first communication device, and determine the second hash algorithm information of the load balancing method of the second communication device according to the first message and the second message.

[0288] In a possible implementation, the processor 1510 is configured to determine second hash algorithm information of a load balancing method of the second communication device according to the first message, the second message, and information about a second number of second ports of the second communication device.

[0289] In a possible implementation, the processor 1510 is configured to: query a preset hash algorithm information association relationship based on the first hash algorithm information and the first quantity information to obtain the second hash algorithm information. The hash algorithm information association relationship includes: an association relationship between the first hash algorithm information, the first quantity information, the second quantity information of the port of the second communication device, and the second hash algorithm information.

[0290] In a possible implementation, the processor 1510 is used to: determine a fourth quantity corresponding to the hash algorithm information in N hash algorithm information; N is a positive integer; and select hash algorithm information whose corresponding fourth quantity is greater than 1 from the N hash algorithm information as the second hash algorithm information. Wherein, for the hash algorithm information in the N hash algorithm information, the fourth quantity corresponding to the hash algorithm information is: performing hash calculations on M messages based on the hash algorithm information, taking the obtained M hash values ​​modulo the second quantity of the port of the second communication device, and removing the duplicates of the obtained M hash modulo values; M is an integer greater than 1.

[0291] In a possible implementation, the processor 1510 is configured to select, from the N hash algorithm information, corresponding hash algorithm information with the largest fourth quantity as the second hash algorithm information.

[0292] In one possible implementation, the processor 1510 is further used to: determine that there is no second hash algorithm information that satisfies the first condition, and determine the fourth hash algorithm information of the load balancing method of the second communication device. A third message is sent to the first communication device through the communication interface 1520, and the third message is used to instruct the first communication device to update the hash algorithm information corresponding to the load balancing method of the first communication device according to the fourth hash algorithm information and the second number of ports of the second communication device. Among them, the first condition includes: performing hash calculations on the first message and the second message respectively based on the second hash algorithm information, and taking the modulus of the two hash values ​​obtained by the second number of ports of the second communication device, and the two hash modulus values ​​obtained are different.

[0293] In one possible implementation, the processor 1510 is further used to: determine that there is no second hash algorithm information that satisfies the first condition, and determine the fourth hash algorithm information of the load balancing method of the second communication device. Determine the fifth hash algorithm information of the load balancing method of the first communication device based on the fourth hash algorithm information, the first number of information, and the second number of ports of the second communication device. Send a fourth message to the first communication device through the communication interface 1520, and the fourth message is used to notify the first communication device to forward the message based on the fifth hash algorithm information.

[0294] In a possible implementation, the processor 1510 is further configured to: determine that the second communication device is a slave device; determine that there is no second hash algorithm information satisfying the first condition, and update the second communication device to a master device.

[0295] When the communication device is a chip applied to a load balancing device, the chip implements the function of the load balancing device in the above method embodiment. The chip receives information from other modules in the load balancing device, which is sent to the load balancing device by other devices; or the chip sends information to other modules in the load balancing device, which is sent to other devices by the load balancing device.

[0296] It is understandable that the processor in the embodiments of the present application may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.

[0297] According to the method provided in the embodiment of the present application, the present application also provides a computer program product, which includes: computer program code or instructions, when the computer program code or instructions are executed on a computer, the computer executes Figure 4 , Figure 6 , Figure 7a or Figure 7b A method according to any one of the embodiments shown.

[0298] According to the method provided in the embodiment of the present application, the present application also provides a computer-readable storage medium, which stores a program code, and when the program code is run on a computer, the computer executes Figure 4 , Figure 6 , Figure 7a or Figure 7b A method according to any one of the embodiments shown.

[0299] According to the method provided in the embodiment of the present application, the present application also provides a chip system, which may include a processor. The processor is coupled to the memory and can be used to execute Figure 4 , Figure 6 , Figure 7a or Figure 7b The method of any one of the embodiments shown in the embodiments. Optionally, the chip system also includes a memory. The memory is used to store a computer program (also referred to as code or instruction). The processor is used to call and run the computer program from the memory so that the device equipped with the chip system executes Figure 4 , Figure 6 , Figure 7a or Figure 7b A method according to any one of the embodiments shown.

[0300] According to the method provided in the embodiment of the present application, the present application also provides a system, which includes the aforementioned load balancing device and network device.

[0301] The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, a register, a hard disk, a mobile hard disk, a CD-ROM or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a load balancing device. Of course, the processor and the storage medium can also exist in the load balancing device as discrete components.

[0302] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When a computer program or instruction is loaded and executed on a computer, the process or function of the embodiment of the present application is executed in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device or other programmable device. The computer program or instruction can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer program or instruction can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, a hard disk, or a tape; it can also be an optical medium, such as a digital video disc; it can also be a semiconductor medium, such as a solid-state hard disk. The computer-readable storage medium may be a volatile or nonvolatile storage medium, or may include both volatile and nonvolatile types of storage media.

[0303] Note: A portion of this patent application document contains material which is subject to copyright protection. The copyright owner reserves all rights reserved except for the production of copies of the material in the patent file or patent record in the Patent Office.

[0304] In the various embodiments of the present application, unless otherwise specified or provided for in any logical conflict, the terms and / or descriptions between the different embodiments are consistent and may be referenced to each other, and the technical features in the different embodiments may be combined to form new embodiments according to their inherent logical relationships.

[0305] In this application, "multiple" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In the text description of this application, the character " / " generally indicates that the previous and next associated objects are in an "or" relationship; in the formula of this application, the character " / " indicates that the previous and next associated objects are in a "division" relationship. "Including at least one of A, B and C" can mean: including A; including B; including C; including A and B; including A and C; including B and C; including A, B and C.

[0306] It is understood that the various numbers involved in the embodiments of the present application are only for the convenience of description and are not used to limit the scope of the embodiments of the present application. The size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic.

Claims

1. A method for determining hash algorithm information for load balancing, characterized in that: include: Receive a first message, where the first message includes first hash algorithm information of a load balancing method of a first communication device and information of a first number of first ports of the first communication device; Determine second hash algorithm information of a load balancing method of a second communication device according to the first hash algorithm information and the first quantity information; The second communication device is located downstream or upstream of the first communication device; The first hash algorithm information and the second number of ports of the second communication device satisfy at least one of the following: The first number is different from the second number, and the first hash algorithm information is the same as the second hash algorithm information; The first number is different from the second number, and the first hash algorithm information is different from the second hash algorithm information; or, The first number is the same as the second number, and the first hash algorithm information is different from the second hash algorithm information.

2. The method according to claim 1, characterized in that The first hash algorithm information includes at least one of the following: A first hash algorithm, parameter items of the first hash key information, an arrangement order of the parameter items of the first hash key information, and a first hash value determination method; The second hash algorithm information includes at least one of the following: The second hash algorithm, the parameter items of the second hash key information, the arrangement order of the parameter items of the second hash key information, or the second hash value selection method.

3. The method according to claim 2, characterized in that In the case where the first hash algorithm information is different from the second hash algorithm information, the first hash algorithm information and the second hash algorithm information satisfy at least one of the following: The first hash algorithm is different from the second hash algorithm; The parameter item of the first hash key information is different from the parameter item of the second hash key information; The arrangement order of the parameter items of the first hash key information is different from the arrangement order of the parameter items of the second hash key information; or, The first Hash value determination method is different from the second Hash value determination method.

4. The method according to any one of claims 1 to 3, characterized in that: The first number includes: the number of equal cost multi-path (ECMP group) members of the first communication device; or, The number of link aggregation group (LAG group) members of the first communication device.

5. The method according to any one of claims 1 to 3, characterized in that: Before determining the second Hash algorithm information of the load balancing method of the second communication device according to the first Hash algorithm information and the first quantity information, the method further includes: receiving a second message, wherein the second message includes third hash algorithm information of the load balancing mode of the first communication device and information of a third number of third ports of the first communication device; The determining, according to the first hash algorithm information and the first quantity information, second hash algorithm information of the load balancing method of the second communication device includes: Determine second hash algorithm information of a load balancing method of a second communication device according to the first message and the second message.

6. The method according to claim 5, characterized in that The first number includes the number of equal cost multi-path (ECMP group) members of the first communication device, and the third number includes the number of link aggregation group (LAG group) members of the first communication device.

7. The method according to any one of claims 1 to 3, characterized in that: The second hash algorithm information satisfies a first condition, wherein the first condition includes: Based on the second hash algorithm information, hash calculations are performed on the first message and the second message respectively, and the two obtained hash values ​​are modulo the second number of the second port of the second communication device respectively, so that the two obtained hash modulo values ​​are different.

8. The method according to any one of claims 1 to 3, characterized in that: The determining, according to the first hash algorithm information and the first quantity information, second hash algorithm information of the load balancing method of the second communication device includes: According to the first hash algorithm information and the first quantity information, query the preset hash algorithm information association relationship to obtain the second hash algorithm information; The hash algorithm information association relationship includes: an association relationship between the first hash algorithm information, the first quantity information, the second quantity information of the ports of the second communication device, and the second hash algorithm information.

9. The method according to any one of claims 1 to 3, characterized in that: The determining, according to the first hash algorithm information and the first quantity information, second hash algorithm information of the load balancing method of the second communication device includes: Determine a fourth quantity corresponding to the hash algorithm information in N hash algorithm information; wherein N is a positive integer; Selecting a fourth number of hash algorithm information greater than 1 from the N hash algorithm information as the second hash algorithm information; Among them, for the hash algorithm information in the N hash algorithm information, the fourth number corresponding to the hash algorithm information is: Based on the hash algorithm information, hash calculations are performed on the M messages respectively, and the obtained M hash values ​​are modulo the second number of ports of the second communication device respectively, and the number of numerical values ​​obtained after deduplication of the M hash modulo values ​​is obtained; M is an integer greater than 1.

10. The method according to any one of claims 1 to 3, characterized in that: After receiving the first message, the method further includes: Determine that the second hash algorithm information that satisfies the first condition does not exist, and determine the fourth hash algorithm information of the load balancing method of the second communication device; Sending a third message to the first communication device, wherein the third message is used to instruct the first communication device to update the hash algorithm information corresponding to the load balancing mode of the first communication device according to the fourth hash algorithm information and information about the second number of ports of the second communication device; The first condition includes: Based on the second hash algorithm information, hash calculations are performed on the first message and the second message respectively, and the two obtained hash values ​​are modulo the second number of ports of the second communication device respectively, so that the two obtained hash modulo values ​​are different.

11. The method according to any one of claims 1 to 3, characterized in that: After receiving the first message, the method further includes: Determine that the second hash algorithm information that satisfies the first condition does not exist, and determine the fourth hash algorithm information of the load balancing method of the second communication device; Determine fifth hash algorithm information of a load balancing method of the first communication device according to the fourth hash algorithm information, the first number information, and the second number information of ports of the second communication device; A fourth message is sent to the first communication device, where the fourth message is used to notify the first communication device to forward the message based on the fifth hash algorithm information.

12. The method according to any one of claims 1 to 3, characterized in that: At least one of the first hash algorithm information or the first amount of information is carried in the following information: Link Layer Discovery Protocol LLDP message, Open Shortest Path First routing protocol OSPF message, or Border Gateway Routing Protocol BGP message.

13. A device for determining hash algorithm information for load balancing, characterized in that: The invention comprises a processor and a communication interface, wherein the processor is used for: receiving a first message through the communication interface, where the first message includes first hash algorithm information of a load balancing method of a first communication device and information of a first number of first ports of the first communication device; Determine, according to the first hash algorithm information and the first quantity information, second hash algorithm information of a load balancing method of a second communication device, where the second communication device is located downstream or upstream of the first communication device; The first hash algorithm information and the second number of ports of the second communication device satisfy at least one of the following: The first number is different from the second number, and the first hash algorithm information is the same as the second hash algorithm information; The first number is different from the second number, and the first hash algorithm information is different from the second hash algorithm information; or, The first number is the same as the second number, and the first hash algorithm information is different from the second hash algorithm information.

14. The device according to claim 13, characterized in that The first hash algorithm information includes at least one of the following: A first hash algorithm, parameter items of the first hash key information, an arrangement order of the parameter items of the first hash key information, and a first hash value determination method; The second hash algorithm information includes at least one of the following: The second hash algorithm, the parameter items of the second hash key information, the arrangement order of the parameter items of the second hash key information, or the second hash value selection method.

15. The device according to claim 14, characterized in that In the case where the first hash algorithm information is different from the second hash algorithm information, the first hash algorithm information and the second hash algorithm information satisfy at least one of the following: The first hash algorithm is different from the second hash algorithm; The parameter item of the first hash key information is different from the parameter item of the second hash key information; The arrangement order of the parameter items of the first hash key information is different from the arrangement order of the parameter items of the second hash key information; or, The first Hash value determination method is different from the second Hash value determination method.

16. The device according to any one of claims 13 to 15, characterized in that The first number includes: the number of equal cost multi-path (ECMP group) members of the first communication device; or, The number of link aggregation group (LAG group) members of the first communication device.

17. The device according to any one of claims 13 to 15, characterized in that The processor is further configured to: receiving a second message through the communication interface, where the second message includes third hash algorithm information of the load balancing method of the first communication device and information on a third number of third ports of the first communication device; Determine second hash algorithm information of a load balancing method of a second communication device according to the first message and the second message.

18. The device according to claim 17, characterized in that The first number includes the number of equal cost multi-path (ECMP group) members of the first communication device, and the third number includes the number of link aggregation group (LAG group) members of the first communication device.

19. The device according to any one of claims 13 to 15, characterized in that The second hash algorithm information satisfies a first condition, wherein the first condition includes: Based on the second hash algorithm information, hash calculations are performed on the first message and the second message respectively, and the two obtained hash values ​​are modulo the second number of the second port of the second communication device respectively, so that the two obtained hash modulo values ​​are different.

20. The device according to any one of claims 13 to 15, characterized in that The processor is configured to: According to the first hash algorithm information and the first quantity information, query the preset hash algorithm information association relationship to obtain the second hash algorithm information; The hash algorithm information association relationship includes: an association relationship between the first hash algorithm information, the first quantity information, the second quantity information of the ports of the second communication device, and the second hash algorithm information.

21. The device according to any one of claims 13 to 15, characterized in that The processor is configured to: Determine a fourth quantity corresponding to the hash algorithm information in N hash algorithm information; wherein N is a positive integer; Selecting a fourth number of hash algorithm information greater than 1 from the N hash algorithm information as the second hash algorithm information; Among them, for the hash algorithm information in the N hash algorithm information, the fourth number corresponding to the hash algorithm information is: Based on the hash algorithm information, hash calculations are performed on the M messages respectively, and the obtained M hash values ​​are modulo the second number of ports of the second communication device respectively, and the number of numerical values ​​obtained after deduplication of the M hash modulo values ​​is obtained; M is an integer greater than 1.

22. The device according to any one of claims 13 to 15, characterized in that The processor is further configured to: Determine that the second hash algorithm information that satisfies the first condition does not exist, and determine the fourth hash algorithm information of the load balancing method of the second communication device; Sending a third message to the first communication device through the communication interface, wherein the third message is used to instruct the first communication device to update the hash algorithm information corresponding to the load balancing mode of the first communication device according to the fourth hash algorithm information and information about the second number of ports of the second communication device; The first condition includes: Based on the second hash algorithm information, hash calculations are performed on the first message and the second message respectively, and the two obtained hash values ​​are modulo the second number of ports of the second communication device respectively, so that the two obtained hash modulo values ​​are different.

23. The device according to any one of claims 13 to 15, characterized in that The processor is further configured to: Determine that the second hash algorithm information that satisfies the first condition does not exist, and determine the fourth hash algorithm information of the load balancing method of the second communication device; Determine fifth hash algorithm information of a load balancing method of the first communication device according to the fourth hash algorithm information, the first number information, and the second number information of ports of the second communication device; A fourth message is sent to the first communication device through the communication interface, where the fourth message is used to notify the first communication device to forward the message based on the fifth hash algorithm information.

24. The device according to any one of claims 13 to 15, characterized in that At least one of the first hash algorithm information or the first amount of information is carried in the following information: Link Layer Discovery Protocol LLDP message, Open Shortest Path First routing protocol OSPF message, or Border Gateway Routing Protocol BGP message.

25. A communication device, characterized in that: The device comprises a processor and a memory, The memory is used to store executable programs; The processor is used to execute the computer executable program in the memory so that the method according to any one of claims 1 to 12 is executed.

26. A communication device, characterized in that: Comprising modules for executing the method as claimed in any one of claims 1 to 12.

27. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer-executable program, and when the computer-executable program is called by a computer, the computer executes the method according to any one of claims 1 to 12.

28. A chip system, characterized in that: include: A communication interface for inputting and / or outputting information; A processor, used to execute a computer executable program so that a device equipped with the chip system executes the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Load balancing hash computation for network switches

    CN102571558A

  • Method and network device for adjusting equal-cost route balanced sharing

    CN103414651A