A negotiation method and apparatus for preventing hash polarization
Patent Information
- Application Number
- CN202311276440.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-09-28
AI Technical Summary
但是,网络设备的数量较多,同一网络内的网络设备来自相同制造商,网络设备使用的交换芯片类型相同,网络运维人员需要规划并手动修改hash计算的算法、种子、偏移值,导致手动维护工作量较大;如果同一网络内的网络设备来自不同制造商,运维人员还需要判断不同芯片计算哈希值采用的不同的算法、种子、偏移值是否会得到相同的哈希值计算结果
[0007] To achieve the above objectives, this application also provides a negotiation device to prevent hash polarization, comprising: a processor and a memory; the memory for storing processor-executable instructions; wherein the processor executes the processor-executable instructions in the memory to perform the following operations: mapping the 24-bit device identifier of the device's MAC address to a hash value calculation parameter group for the device; wherein the hash value calculation parameter group includes a 4-bit hash algorithm parameter value, a 16-bit hash seed parameter value, and a 4-bit hash offset parameter value; setting the hash calculation negotiation parameter group for the device, including network layer information, switching chip model information, and the hash value calculation parameter group; publishing the hash calculation negotiation parameter group for the device; receiving hash calculation negotiation parameter groups published by other devices; establishing parameter negotiation neighbors with network devices at directly adjacent network layers based on the received hash calculation negotiation parameter group; determining that the switching chip model information of the device is the same as the switching chip model information of the parameter negotiation neighbor and that the hash value calculation parameter group of the device is different from the hash value calculation parameter group of the parameter negotiation neighbor; selecting the corresponding hash algorithm, hash seed, and offset value using the hash value calculation parameter group of the device, and calculating the hash value used to select the load-sharing forwarding path.
Smart Images

Figure CN117319299B_ABST
Abstract
Description
Technical Field
[0001] This application relates to communication technology, specifically a negotiation method and device for preventing hash polarization. Background Technology
[0002] A network consists of multiple levels of devices. When a network deploys multiple forwarding paths to share the load among different levels of devices, the network devices perform hash calculations on the received forwarding packets and select the path corresponding to the calculated hash value for forwarding. To avoid the load sharing of packets of the same data flow across different forwarding paths, the network devices use a flow-by-flow hash algorithm to ensure that the same data flow is forwarded through the same path in an equivalent multipath.
[0003] However, if two or more consecutive devices in a network use the same per-flow hash algorithm, packets of the same data stream will be forwarded by network devices at different network levels through the path corresponding to the same hash value. This results in uneven distribution of workload across multiple paths at different network levels, leading to hash polarization.
[0004] To address uneven load balancing within a network, network administrators manually configure the algorithms, seeds, and offsets of network devices to avoid calculating the same path selection hash parameters across different network layers. However, with a large number of network devices, especially those from the same manufacturer and using the same type of switching chip, administrators need to plan and manually modify the hash calculation algorithms, seeds, and offsets, resulting in a significant workload. Furthermore, if the network devices are from different manufacturers, administrators must determine whether different algorithms, seeds, and offsets used by different chips will yield the same hash result. Summary of the Invention
[0005] The purpose of this application is to provide a negotiation method and device to prevent hash polarization, so that traffic will not undergo hash polarization after passing through two or more hash calculations by different devices in the network.
[0006] To achieve the above objectives, this application provides a negotiation method to prevent hash polarization. The method includes: mapping a 24-bit device identifier of the device's MAC address to a hash value calculation parameter group for the device; wherein the parameter group includes a 4-bit hash algorithm parameter value, a 16-bit hash seed parameter value, and a 4-bit hash offset parameter value; setting the hash calculation negotiation parameter group for the device, including network layer information, switching chip model information, and the hash value calculation parameter group; publishing the hash calculation negotiation parameter group for the device; receiving hash calculation negotiation parameter groups published by other devices; establishing parameter negotiation neighbors with directly adjacent network devices at the same network layer based on the received hash calculation negotiation parameter group; determining that the switching chip model information of the device is the same as the switching chip model information of the parameter negotiation neighbor, and that the hash value calculation parameter group of the device is different from that of the parameter negotiation neighbor; selecting the corresponding hash algorithm, hash seed, and offset value using the hash value calculation parameter group of the device, and calculating the hash value used to select a load-sharing forwarding path.
[0007] To achieve the above objectives, this application also provides a negotiation device to prevent hash polarization, comprising: a processor and a memory; the memory for storing processor-executable instructions; wherein the processor executes the processor-executable instructions in the memory to perform the following operations: mapping the 24-bit device identifier of the device's MAC address to a hash value calculation parameter group for the device; wherein the hash value calculation parameter group includes a 4-bit hash algorithm parameter value, a 16-bit hash seed parameter value, and a 4-bit hash offset parameter value; setting the hash calculation negotiation parameter group for the device, including network layer information, switching chip model information, and the hash value calculation parameter group; publishing the hash calculation negotiation parameter group for the device; receiving hash calculation negotiation parameter groups published by other devices; establishing parameter negotiation neighbors with network devices at directly adjacent network layers based on the received hash calculation negotiation parameter group; determining that the switching chip model information of the device is the same as the switching chip model information of the parameter negotiation neighbor and that the hash value calculation parameter group of the device is different from the hash value calculation parameter group of the parameter negotiation neighbor; selecting the corresponding hash algorithm, hash seed, and offset value using the hash value calculation parameter group of the device, and calculating the hash value used to select the load-sharing forwarding path. Attached Figure Description
[0008] Figure 1 The negotiation method for preventing hash polarization provided in this application;
[0009] Figure 2 A network diagram illustrating the application for preventing hash polarization negotiation is provided in this application.
[0010] Figure 3 This is a schematic diagram of the mapping hash calculation negotiation parameter group in an embodiment of this application;
[0011] Figure 4 This is a schematic diagram of an embodiment of the negotiation device for preventing hash polarization provided in this application. Detailed Implementation
[0012] The following detailed description will be provided with reference to several examples illustrated in the accompanying figures. In this detailed description, numerous specific details are used to provide a comprehensive understanding of the present application. Known methods, steps, components, and circuits are not described in detail in the examples to avoid obscuring their meaning.
[0013] In the terminology used, the term "including" means including but not limited to; the term "containing" means including but not limited to; the terms "above," "within," and "below" include the number itself; the terms "greater than" and "less than" mean not including the number itself. The term "based on" means based on at least a portion of them.
[0014] Figure 1 The diagram shown is a flowchart of an embodiment of the negotiation method for preventing hash polarization provided in this application. The method includes:
[0015] Step 101: Map the 24-bit device identifier of the MAC address of this device to the hash value calculation parameter group of this device; which includes a 4-bit hash algorithm parameter value, a 16-bit hash seed parameter value, and a 4-bit hash value offset parameter value.
[0016] Step 102: Set the hash calculation negotiation parameter group for this device, which includes network layer information, switching chip model information, and hash value calculation parameter group;
[0017] Step 103: Publish the hash calculation negotiation parameter group for this device;
[0018] Step 104: Receive the hash calculation negotiation parameter group published by other devices;
[0019] Step 105: Calculate the negotiation parameter group based on the received hash and establish parameter negotiation neighbors with network devices at the directly connected adjacent network layer.
[0020] Step 106: Determine that the switching chip model information of this device is the same as the switching chip model information of the parameter negotiation neighbor, and that the hash value calculation parameter group of this device is different from the hash value calculation parameter group of the parameter negotiation neighbor.
[0021] Step 107: Select the corresponding hash algorithm, hash seed, and offset value from the hash value calculation parameter group of this device, and calculate the hash value used to select the load-sharing forwarding path.
[0022] Figure 2 A network diagram illustrating the application for preventing hash polarization negotiation is provided in this application. Figure 2The network as shown includes access layer switches 111-114, aggregation layer switches 121-124, and backbone layer switches 131-133.
[0023] Figure 2 Each switch is provided with two network element entities: a Hash calculation management unit and a Hash calculation hardware capability set (Hash Set). The Hash calculation management unit is responsible for negotiating Hash calculation capabilities for multipath forwarding load sharing with other switches; the Hash calculation hardware capability set (Hash Set) is used for automatically configuring the hash calculation negotiation parameter group as the Hash calculation capability set when the switch is initialized; the hash calculation negotiation parameter group includes network layer information, switching chip model information, and the hash value calculation parameter group <Algorithm, Seed, Offset> and other information.
[0024] The Hash calculation management unit sets values respectively representing the access layer, the aggregation layer, and the backbone layer according to the layer to which the local device belongs.
[0025] The Hash calculation management unit initially sets the switching chip model information including <company (manufacturer information) / Type (main chip product series information) / SubTyp (specific model information)> according to the switching chip manufacturer and chip type of the switch.
[0026] Figure 3 is a schematic diagram of mapping the hash calculation negotiation parameter group in the embodiment of the present application. The Hash calculation management unit of each switch reads the MAC address of the local device; for example, Figure 3 as shown in the figure, the MAC address includes a 24-bit OUI (Organizationally Unique Identifier) and a 24-bit NIC (Network Interface Card).
[0027] The Hash calculation management unit maps the 24-bit NIC into a 4-bit hash algorithm parameter value, a 16-bit hash seed parameter value, and a 4-bit hash offset parameter value. There is no limitation on the mapping manner of the hash calculation negotiation parameter group by the Hash calculation management unit. For example, the high 4 bits, the middle 16 bits, and the low 4 bits are respectively mapped into a value representing the hash algorithm (Algorithm), a value representing the hash seed (Seed), and a value representing the offset (Offset); or the high 4 bits, the middle 4 bits, and the low 16 bits are respectively mapped into values of the hash value calculation parameter group <Algorithm, Seed, Offset>.
[0028] by Figure 3The mapping shown eliminates the need for manually planning and configuring hash calculation negotiation parameter groups for each switch within the network. This is because the NIC is a unique 24-bit number assigned internally by the manufacturer. Figure 2 The access layer, aggregation layer, and backbone layer switches within the internal network are manufactured by the same manufacturer. Figure 3 The mapping shown is initialized by each switch.<Algorithm,Seed,Offset> The values are different, so hash polarization will not occur.
[0029] Access layer switches 111-114, aggregation layer switches 121-124, and backbone layer switches 131-133 each publish their own hash calculation negotiation parameter groups within the network; and receive hash calculation negotiation parameter groups published by other switches. This application does not limit the protocol messages used to publish hash calculation negotiation parameter groups; for example, hash calculation negotiation parameter groups can be carried through extended attribute fields of BGP protocol messages.
[0030] Taking aggregation layer switch 121 as an example, switch 121 receives hash calculation negotiation parameter groups from other switches in the network and establishes parameter negotiation neighbors with directly connected adjacent aggregation layer switches 131-133; and establishes parameter negotiation neighbors with directly connected adjacent access layer switches 111-112.
[0031] Although switch 121 can receive hash calculation negotiation parameter groups from access layer switches 113 and 114 at adjacent levels through backbone layer switches 131-133, switch 121 is not directly connected to access layer switches 113 and 114, and there is no need to establish a neighbor relationship for negotiating hash parameters.
[0032] Access layer switches 111-112 establish parameter negotiation neighbors with directly connected aggregation layer switches 121 and 122; access layer switches 113-114 establish parameter negotiation neighbors with directly connected aggregation layer switches 123 and 124.
[0033] Backbone layer switches 131-133 establish parameter negotiation neighbors with directly connected aggregation layer switches 121-124.
[0034] Aggregation layer switch 121 compares the hash calculation negotiation parameter groups of this device with those of its parameter negotiation neighbors (backbone layer switches 131-133 and access layer switches 111-112).
[0035] Switch 121 (Hash Calculation Management Unit) first processes the switching chip model information of this device. <company type subtyp>The device compares its chip model information with that of other neighbors. If the chip model information of both ends is the same, the values representing the algorithm, seed, and offset in the hash value calculation parameter group are compared. If the chip model information of both ends is different, the device checks whether the hash value calculation parameter group of this device and the hash value calculation parameter group of the neighbor will calculate the routing forwarding hash value according to the compatibility check rules. If different routing forwarding hash values are calculated, the device is compatible. If the same hash value is calculated, the device is incompatible.
[0036] Figure 2 In one embodiment of this application, switch 121 compares the switching chip model information of its own devices switches 111 and 131 and finds them to be the same; if the algorithm, seed, and offset value algorithms of its own devices and switches 111 and 131 are different, then there is no need to modify the hash value calculation parameter group of its own devices; the processing of switches 111 and 131 is the same.
[0037] In another embodiment of this application, switch 121 compares the switching chip model information of its own device and switch 111 to find that they are the same; it also compares the algorithm, seed, and offset values of its own device and switch 111 to find that they are the same, and determines that the network layer of its own device is higher than the network layer of its neighboring switch 111; according to the hash value calculation parameter modification rules, it arbitrarily selects one of the three values, algorithm value, seed value, and offset value, to modify.
[0038] After switch 121 modifies one of its values, for example, changing the value 01 representing the CRC-4 hash algorithm to the value 10 representing the CRC-8 hash algorithm, it republishes the hash calculation negotiation parameter group, namely the network layer information, the switch chip model information, and the hash value calculation parameter group.<Algorithm,Seed,Offset> .
[0039] In yet another embodiment of this application, if switch 131 receives the re-republished hash calculation negotiation parameter group from switch 121, it compares the switching chip model information of its own device and switch 121 to see if they are the same, and also confirms that the algorithm, seed, and offset values republished by its own device and switch 121 are identical. Switch 131 determines that its network layer is higher than that of its neighboring switch 121; and determines to arbitrarily select one of the three values—algorithm value, seed value, and offset value—for modification according to the hash value calculation parameter modification rules.
[0040] After this modification, the hash values calculated by switches 111, 121, and 131 for the same data flow are all different, thus avoiding hash polarization problems.
[0041] In other embodiments provided in this application, if the switching chip model information of the switch 121 is different from that of the switch 111, then according to the compatibility check rules, it checks whether the hash value calculation parameter group of the switch 121 and the hash value calculation parameter group of the neighboring switch 111 will calculate different hash values.
[0042] According to the compatibility check rules, switch 121 selects the corresponding hash algorithm, hash seed, and offset value based on its own hash value calculation parameter group. The hash value calculated for routing and forwarding is different from the hash value calculated by the neighboring switch 111. Switch 121 does not need to modify its own hash value calculation parameter group. The compatibility check process for switches 111 and 131 is the same.
[0043] In another compatibility check embodiment provided in this application, switch 121 compares the switching chip model information of its own device and switch 111 and finds them to be different; then, according to the compatibility check rules, it checks the hash value calculation parameter group of its own device with the hash value calculation parameter group of the neighboring switch 111. Switch 121 determines, according to the compatibility check rules, that its own device and the neighboring switch 111 have incompatible hash value calculation parameter groups, that is, the calculated routing and forwarding hash values are the same.
[0044] Comparison of Switches 121 The network layer of this device is the same as that of neighboring switch 111; it is determined that the network layer of this device is higher than that of neighboring switch 111; according to the hash value calculation parameter modification rules (set priority for these three values, and select them in order of priority from high to low or from low to high), select one of the three values representing the algorithm, seed, and offset value for modification.
[0045] After modifying one of the values, switch 121 republishes the hash calculation negotiation parameter group. Switch 131 receives the republished hash calculation negotiation parameter group, compares the switching chip model information of its device with that of switch 121, and finds that the multipath forwarding routing hash values calculated by the algorithm, seed, and offset values republished by its device and switch 121 are incompatible. Switch 131 determines that its network layer is higher than that of its neighboring switch 121; it then determines to modify any one of the three values (algorithm value, seed value, and offset value) according to the hash value calculation parameter modification rules, and then republishes the negotiated hash calculation negotiation parameter group. Alternatively, if switch 131 receives the republished hash calculation negotiation parameter group from switch 121 and the compatibility check result is compatible, then no modification to the hash value calculation parameter group is required.
[0046] In this application, if network maintenance personnel manually modify the hash value calculation parameter group of any switch...<Algorithm,Seed,Offset> After any value is set, the switch whose hash calculation parameters have been modified also publishes a hash calculation negotiation parameter group to negotiate hash calculation parameters with other devices in the network to avoid hash polarization.
[0047] Figure 4 This application provides a schematic diagram of a negotiation device embodiment for preventing hash polarization. The device 40 includes a processor 41, a memory 42, and a switching unit 43. The memory 42 is used to store executable instructions of the processor 41 to implement the hash calculation management unit 421 and the hash calculation hardware capability set 422.
[0048] Processor 41, through processor-executable instructions in memory 42, maps the 24-bit device identifier of its MAC address to a hash value calculation parameter set for its device using hash calculation hardware capability set 422. This parameter set includes a 4-bit hash algorithm parameter value, a 16-bit hash seed parameter value, and a 4-bit hash offset parameter value. It also sets the hash calculation negotiation parameter set for its device, which includes network layer information, switching chip model information, and the hash value calculation parameter set. Processor 41, through processor-executable instructions in memory 42, and Hash calculation management unit 421, publishes the hash calculation negotiation parameter set for its device; receives hash calculation negotiation parameter sets published by other devices; establishes parameter negotiation neighbors with directly adjacent network devices based on the received hash calculation negotiation parameter sets; determines that the switching chip model information of its device is the same as that of the parameter negotiation neighbor's switching chip model information and that its hash value calculation parameter set is different from that of the parameter negotiation neighbor's hash value calculation parameter set; and selects the corresponding hash algorithm, hash seed, and offset value using its own hash value calculation parameter set to calculate the hash value used for selecting a load-sharing forwarding path.
[0049] Processor 41 executes processor-executable instructions in memory. Hash calculation management unit 421 determines that the switching chip model information of this device is the same as that of the parameter negotiation neighbor, and that the hash value calculation parameter group of this device is the same as that of the parameter negotiation neighbor. It determines that the network layer of this device is higher than that of the parameter negotiation neighbor. According to the hash value calculation parameter modification rules, it selects one of the hash algorithm parameter value, hash seed parameter value, and hash value offset value recorded in the hash calculation hardware capability set 422 from the hash value calculation parameter group of this device for modification. It republishes the hash calculation negotiation parameter group of this device to the parameter negotiation neighbor. This includes the network layer information of this device, the switching chip model information, and the modified hash value calculation parameter group. Switching unit 43 selects the corresponding hash algorithm, hash seed, and offset value with the modified hash value calculation parameter group of this device to calculate the hash value used to select the load-sharing forwarding path.
[0050] The processor 41 executes processor-executable instructions in the execution memory 42, and the hash calculation management unit 421 performs the following operations: determining that the switching chip model information of this device is different from the switching chip model information of the parameter negotiation neighbor; checking, according to the compatibility check rules, whether the hash value calculation parameter group of this device and the hash value calculation parameter group of the parameter negotiation neighbor are compatible parameter groups for calculating different hash values; the switching unit 43 selects the corresponding hash algorithm, hash seed, and offset value based on the hash value calculation parameter group of this device, and calculates the hash value used to select the load-sharing forwarding path.
[0051] Processor 41 executes processor-executable instructions in execution memory 42, and Hash calculation management unit 421 performs the following operations: Determines that the switching chip model information of this device differs from that of the parameter negotiation neighbor's switching chip model information; checks, according to compatibility rules, whether the hash value calculation parameter group of this device and the hash value calculation parameter group of the parameter negotiation neighbor are incompatible parameter groups with the same hash value; determines that the network layer of this device is higher than the network layer of the parameter negotiation neighbor; and, according to hash value calculation parameter modification rules, selects one of the hash algorithm parameter value, hash seed parameter value, or hash value offset parameter value from the hash value calculation parameter group of this device recorded in the hash calculation hardware capability set 422 for modification. Switching unit 43, using the modified hash value calculation parameter group of this device, selects the corresponding hash algorithm, hash seed, and offset value to calculate the hash value used for selecting the load-sharing forwarding path.
[0052] Processor 41 executes processor-executable instructions in memory 42, and Hash calculation management unit 421 performs the following operations: receiving hash value calculation parameter group setting instructions; modifying the parameter values corresponding to the hash value calculation parameter group of this device in the hash value calculation hardware capability set 422 according to the hash value calculation parameter group setting instructions. Processor 41 executes processor-executable instructions in memory 42, and Hash calculation management unit 421 also performs the following operations: publishing the modified hash calculation negotiation parameter group recorded in the hash calculation hardware capability set 422.
[0053] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.< / company>
Claims
1. A negotiation method to prevent hash polarization, characterized in that, The method includes: Map the 24-bit device identifier of this device's MAC address to the hash value calculation parameter group of this device; which includes a 4-bit hash algorithm parameter value, a 16-bit hash seed parameter value, and a 4-bit hash value offset parameter value; Configure the hash calculation negotiation parameter group for this device, which includes network layer information, switching chip model information, and the hash value calculation parameter group; Publish the hash calculation negotiation parameter group of this device; Receive hash calculation negotiation parameter sets published by other devices; Based on the received hash calculation negotiation parameter set, establish parameter negotiation neighbors with network devices at the directly connected adjacent network layer; It is determined that the switching chip model information of the device is the same as the switching chip model information of the parameter negotiation neighbor, and the hash value calculation parameter group of the device is different from the hash value calculation parameter group of the parameter negotiation neighbor; The corresponding hash algorithm, hash seed, and offset value are selected based on the hash value calculation parameter group of the device to calculate the hash value used to select the load-sharing forwarding path.
2. The method according to claim 1, characterized in that, The method further includes determining that the switching chip model information of the device is the same as the switching chip model information of the parameter negotiation neighbor and that the hash value calculation parameter group of the device is the same as the hash value calculation parameter group of the parameter negotiation neighbor; The network layer of this device is determined to be higher than the network layer of the neighboring device as specified in the parameter negotiation. According to the hash value calculation parameter modification rules, select one of the hash algorithm parameter value, hash seed parameter value, or hash value offset parameter value from the hash value calculation parameter group of this device for modification; The device republishes its hash calculation negotiation parameter set to its parameter negotiation neighbors, including the device's network layer information, switching chip model information, and the modified hash value calculation parameter set. Using the modified hash value calculation parameter group of this device, select the corresponding hash algorithm, hash seed, and offset value to calculate the hash value used to select the load-sharing forwarding path.
3. The method according to claim 1, characterized in that, The method also includes, It is determined that the switching chip model information of this device is different from the switching chip model information of the neighboring device in the parameter negotiation. According to the compatibility check rules, the hash value calculation parameter group of the device and the hash value calculation parameter group of the parameter negotiation neighbor are checked to see if they are compatible parameter groups for calculating different hash values. The corresponding hash algorithm, hash seed, and offset value are selected based on the hash value calculation parameter group of the device to calculate the hash value used to select the load-sharing forwarding path.
4. The method according to claim 1, characterized in that, The method also includes, It is determined that the switching chip model information of this device is different from the switching chip model information of the neighboring device in the parameter negotiation. According to the compatibility check rules, the hash value calculation parameter group of this device and the hash value calculation parameter group of the parameter negotiation neighbor are incompatible parameter groups with the same hash value. The network layer of this device is determined to be higher than the network layer of the neighboring device as specified in the parameter negotiation. According to the hash value calculation parameter modification rules, select one of the hash algorithm parameter value, hash seed parameter value, or hash value offset parameter value from the hash value calculation parameter group of this device for modification; Using the modified hash value calculation parameter group of this device, select the corresponding hash algorithm, hash seed, and offset value to calculate the hash value used to select the load-sharing forwarding path.
5. The method according to claim 1, characterized in that, Before publishing the hash calculation negotiation parameter group of the device, the method further includes, Receive instructions for setting hash value calculation parameter groups; Modify the parameter values corresponding to the hash value calculation parameter group of this device according to the hash value calculation parameter group setting instruction.
6. A negotiation device for preventing hash polarization, characterized in that, The device includes a switching unit, a processor, and a memory; the memory stores processor-executable instructions; wherein the processor executes the processor-executable instructions in the memory to perform the following operations: Map the 24-bit device identifier of this device's MAC address to the hash value calculation parameter group of this device; which includes a 4-bit hash algorithm parameter value, a 16-bit hash seed parameter value, and a 4-bit hash value offset parameter value; Configure the hash calculation negotiation parameter group for this device, which includes network layer information, switching chip model information, and the hash value calculation parameter group; Publish the hash calculation negotiation parameter group of this device; Receive hash calculation negotiation parameter sets published by other devices; Based on the received hash calculation negotiation parameter set, establish parameter negotiation neighbors with network devices at the directly connected adjacent network layer; It is determined that the switching chip model information of the device is the same as the switching chip model information of the parameter negotiation neighbor, and the hash value calculation parameter group of the device is different from the hash value calculation parameter group of the parameter negotiation neighbor; The switching unit selects the corresponding hash algorithm, hash seed, and offset value using the hash value calculation parameter group of the device, and calculates the hash value used to select the load-sharing forwarding path.
7. The device according to claim 6, characterized in that, The processor also performs the following operations by executing processor-executable instructions in the memory: It is determined that the switching chip model information of the device is the same as the switching chip model information of the parameter negotiation neighbor, and the hash value calculation parameter group of the device is the same as the hash value calculation parameter group of the parameter negotiation neighbor; The network layer of this device is determined to be higher than the network layer of the neighboring device as specified in the parameter negotiation. According to the hash value calculation parameter modification rules, select one of the hash algorithm parameter value, hash seed parameter value, or hash value offset parameter value from the hash value calculation parameter group of this device for modification; The device republishes its hash calculation negotiation parameter set to its parameter negotiation neighbors, including the device's network layer information, switching chip model information, and the modified hash value calculation parameter set. The switching unit selects the corresponding hash algorithm, hash seed, and offset value using the modified hash value calculation parameter group of the device, and calculates the hash value used to select the load-sharing forwarding path.
8. The device according to claim 6, characterized in that, The processor also performs the following operations by executing processor-executable instructions in the memory: It is determined that the switching chip model information of this device is different from the switching chip model information of the neighboring device in the parameter negotiation. According to the compatibility check rules, the hash value calculation parameter group of the device and the hash value calculation parameter group of the parameter negotiation neighbor are checked to see if they are compatible parameter groups for calculating different hash values. The switching unit selects the corresponding hash algorithm, hash seed, and offset value using the hash value calculation parameter group of the device, and calculates the hash value used to select the load-sharing forwarding path.
9. The device according to claim 6, characterized in that, The processor also performs the following operations by executing processor-executable instructions in the memory: It is determined that the switching chip model information of this device is different from the switching chip model information of the neighboring device in the parameter negotiation. According to the compatibility check rules, the hash value calculation parameter group of this device and the hash value calculation parameter group of the parameter negotiation neighbor are incompatible parameter groups with the same hash value. The network layer of this device is determined to be higher than the network layer of the neighboring device as specified in the parameter negotiation. According to the hash value calculation parameter modification rules, select one of the hash algorithm parameter value, hash seed parameter value, or hash value offset parameter value from the hash value calculation parameter group of this device for modification; The switching unit selects the corresponding hash algorithm, hash seed, and offset value using the modified hash value calculation parameter group of the device, and calculates the hash value used to select the load-sharing forwarding path.
10. The device according to claim 6, characterized in that, Before the processor executes the processor-executable instructions in the memory to publish the hash calculation negotiation parameter group of the device, it also performs the following operations: Receive instructions for setting hash value calculation parameter groups; Modify the parameter values corresponding to the hash value calculation parameter group of this device according to the hash value calculation parameter group setting instruction.
Citation Information
Patent Citations
Routing announcement method and device, communication equipment and storage medium
CN108965120A
Synchronization method and device
CN111211852A