Information processing method and apparatus
By receiving the bandwidth values of the second and third network devices in the first network device and determining the traffic weight, the packet loss problem of network devices in multiple path transmission scenarios is solved, and more efficient traffic forwarding is achieved.
Patent Information
- Application Number
- PCT/CN2024/116220
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-10-26
- Filing Date
- 2024-09-02
- Publication Date
- 2025-05-01
AI Technical Summary
Currently, network equipment has serious packet loss problems when forwarding service traffic, especially in multi-path transmission scenarios.
By receiving bandwidth values sent by the second and third network devices in the first network device, the weight of the traffic sent to these devices is determined to ensure that the traffic matches the bandwidth that the device can handle, thereby reducing packet loss.
It effectively reduces packet loss of service traffic and improves the stability and efficiency of network equipment in multiple path transmission scenarios.
Smart Images

Figure CN2024116220_01052025_PF_FP_ABST
Abstract
Description
Information processing method and device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on October 26, 2023, with application number 202311401953.4 and invention name “A Method and Device for Information Processing”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of communications, and in particular to an information processing method and device. Background Art
[0003] In a communications network, service traffic can be transmitted to its destination via multiple paths to optimize network resource utilization and maximize the quality of service provided to the service. For example, in some scenarios, service traffic can be transmitted to its destination via multiple paths that share load.
[0004] Although multiple paths are used to transmit business traffic, the current solution for forwarding business traffic by network equipment still has the problem of serious business traffic packet loss.
[0005] Therefore, a solution is urgently needed to solve the above problems.
[0006] Summary of the Invention
[0007] The embodiment of the present application provides an information processing method that can effectively reduce packet loss in business traffic.
[0008] The embodiment of the present application provides an information processing method that can effectively reduce packet loss in business traffic.
[0009] In a first aspect, an embodiment of the present application provides an information processing method that can be applied to a first network device. The first network device can receive a first bandwidth value sent by a second network device and a second bandwidth value sent by a third network device. The second network device and the third network device can both send traffic to a target prefix, the first bandwidth value indicating the bandwidth at which the second network device sends traffic to the target prefix, and the second bandwidth value indicating the bandwidth at which the third network device sends traffic to the target prefix. After receiving the first bandwidth value and the second bandwidth value, the first network device can determine, based on the first bandwidth value and the second bandwidth value, weights for sending traffic with the destination prefix as a destination to the second network device and the third network device, respectively. In this way, when forwarding traffic with the destination prefix as a destination, the first network device can send the traffic to the second network device and the third network device based on the weights, so that the traffic actually received by the second network device and the third network device matches the bandwidth at which they can send traffic to the target prefix, thereby rationally utilizing the bandwidth provided by the second network device and the third network device for sending traffic to the target prefix, thereby preventing the bandwidth provided by the second network device for sending traffic to the target prefix from being insufficient to carry the traffic received by the second network device with the destination prefix as a destination, thereby effectively avoiding service traffic packet loss.
[0010] In one possible implementation, the first network device, the second network device, and the third network device all belong to the first network domain, and the second network device and the third network device are border devices connected to the second network domain. In this case, the aforementioned first bandwidth value is the bandwidth corresponding to the cross-domain link connecting the second network device to the second network domain, and the second bandwidth value is the bandwidth corresponding to the cross-domain link connecting the third network device to the second network domain. In this case, the first network device in the first network domain can determine the weight of sending traffic with the destination prefix as the destination to the border device based on the bandwidth of the cross-domain link between the border device of the first network domain and the second network domain.
[0011] In one possible implementation, the first network device sends traffic destined for the destination prefix to the third network device via a fourth network device, and the first network device and the fourth network device are mutually equivalent load sharing devices. In this case, the first network device can send part of the traffic to the fourth network device, which is mutually equivalent load sharing device, to avoid traffic packet loss.
[0012] In one possible implementation, if the first network device and the fourth network device are load sharing devices, and in one possible implementation, the first network device may determine a weight for sending traffic with the destination prefix as the destination to the second network device as follows: Determine the weight for sending traffic with the destination prefix as the destination to the third network device as follows: Wherein: m is determined to be the first bandwidth value, and n is determined to be the second bandwidth value. In this manner, the first bandwidth value that the second network device can use to send traffic can match the traffic it receives, and the second bandwidth value that the third network device can use to send traffic can match the traffic it receives, thereby effectively avoiding service traffic packet loss.
[0013] In one possible implementation, considering that the link bandwidth between the first network device and the fourth network device is limited, the bandwidth of the link between the first network device and the fourth network device may also be considered when determining the weight of sending traffic to the third network device, thereby avoiding excessive traffic being sent to the fourth network device, which may cause packet loss when the traffic is transmitted between the first network device and the fourth network device. As a specific example, assuming that the bandwidth of the link between the first network device and the fourth network device is j, and the bandwidth of the link between the first network device and the second network device is k, then if the This indicates that the weight of diverting traffic to the fourth network device is reasonable, so the weight of sending traffic to the third network device can be determined to be Determine the weight for sending traffic to the second network device as If the This means that the weight of the traffic diverted to the fourth network device is too large, so the weight of sending traffic to the third network device can be determined to be Determine the weight for sending traffic to the second network device as
[0014] In a possible implementation, before determining the weight of sending traffic with the destination prefix as the destination to the second network device and the third network device respectively, the first network device may also determine whether a first traffic tuning condition is met, and when the aforementioned first traffic tuning condition is met, the weight of sending traffic with the destination prefix as the destination to the second network device and the third network device respectively is determined. The aforementioned first traffic tuning condition refers to a condition that will result in severe packet loss if equal-cost load sharing is continued. In an example, when the first bandwidth value is less than the second bandwidth value, and the first bandwidth value is not 0, and the difference between the first bandwidth value and the second bandwidth value is large, continuing to use the traditional equal-cost load sharing scheme will result in severe packet loss. Therefore, in an example, the first traffic tuning condition may be: the first bandwidth value is less than the second bandwidth value, the first bandwidth value is not 0, and the difference between the first bandwidth value and the second bandwidth value is greater than or equal to the first bandwidth threshold. In other words, the first network device can determine the weight of sending traffic with the destination prefix as the destination to the second network device and the third network device respectively when it is determined that the first bandwidth value is less than the second bandwidth value, the first bandwidth value is not 0, and the difference between the first bandwidth value and the second bandwidth value is greater than or equal to the first bandwidth threshold.
[0015] In one possible implementation, after determining the weights for sending traffic with the destination prefix as the destination to the second network device and the third network device respectively, the first network device may also save the weights for sending traffic with the destination prefix as the destination to the second network device and the third network device respectively in a forwarding table entry, so that in the traffic forwarding stage, the weights for sending traffic to the second network device and the third network device can be determined based on the forwarding table entry, so as to forward the received traffic based on the weights.
[0016] In one possible implementation, in addition to receiving the aforementioned first and second bandwidth values, the first network device may also receive a third bandwidth value sent by a fifth network device and a fourth bandwidth value sent by a sixth network device. The third bandwidth value indicates the bandwidth for the fifth network device to send traffic to the destination prefix, and the fourth bandwidth value indicates the bandwidth for the sixth network device to send traffic to the destination prefix. The fifth network device and the aforementioned second network device are both connected to the first network device, and the fifth and second network devices are load balancing devices. In other words, traffic received by the first network device may be load balancingly forwarded to the second and fifth network devices. The third and sixth network devices are both connected to the fourth network device, and the third and sixth network devices are load balancing devices. In other words, traffic received by the fourth network device may be load balancingly forwarded to the third and sixth network devices. Accordingly, the first network device may determine the weight for sending traffic with the destination prefix as the destination to the second, fifth, and fourth network devices based on the first, second, third, and fourth bandwidth values. That is, the traffic originally load-shared by the second network device and the fifth network device is load-shared by the second network device, the fifth network device, and the fourth network device, thereby reducing the traffic received by the second network device. Accordingly, it avoids serious packet loss due to the bandwidth value provided by the second network device being insufficient to carry the traffic received by itself.
[0017] In one possible implementation, before determining the weight of sending traffic with the destination prefix as the destination to the second network device, the fifth network device, and the fourth network device, the first network device may also determine whether a second traffic tuning condition is met. When the second traffic tuning condition is met, the weight of sending traffic with the destination prefix as the destination to the second network device, the fifth network device, and the fourth network device is determined. The second traffic tuning condition refers to a condition that will result in severe packet loss if equal-cost load sharing is continued. In an example, when the first total bandwidth provided by the first network device is less than the second total bandwidth provided by the fourth network device, and the first total bandwidth is not equal to 0, and the difference between the first total bandwidth and the second total bandwidth is greater than or equal to a second bandwidth threshold, continuing to use the traditional equal-cost load sharing scheme will result in severe packet loss. The first total bandwidth is the sum of the first bandwidth value and the third bandwidth value, and the second total bandwidth is the sum of the second bandwidth value and the fourth bandwidth value. Therefore, in one example, the second traffic optimization condition may be: the first total bandwidth provided by the first network device is less than the second total bandwidth provided by the fourth network device, the first total bandwidth is not equal to 0, and the difference between the first total bandwidth and the second total bandwidth is greater than or equal to a second bandwidth threshold. In other words, the first network device may determine the weight of sending traffic with the destination prefix as the destination to the second network device, the fifth network device, and the fourth network device after determining that the first total bandwidth provided by the first network device is less than the second total bandwidth provided by the fourth network device, the first total bandwidth is not equal to 0, and the difference between the first total bandwidth and the second total bandwidth is greater than or equal to the second bandwidth threshold.
[0018] In a possible implementation, the first network device may determine a weight for sending traffic with the destination prefix as the destination to the fourth network device as follows: Determine the weight for sending traffic with the destination prefix as the destination to the second network device as follows: Determine the weight for sending traffic with the destination prefix as the destination to the fifth network device as follows: Where: a is the first bandwidth value, b is the second bandwidth value, c is the third bandwidth value, and d is the fourth bandwidth value. This approach ensures that the first bandwidth value that the second network device can use to send traffic matches the traffic it receives, the third bandwidth value that the fifth network device can use to send traffic matches the traffic it receives, and the second total bandwidth that the fourth network device can use to send traffic matches the traffic it receives, thereby effectively avoiding service traffic packet loss.
[0019] In one possible implementation, considering that the link bandwidth between the first network device and the fourth network device is limited, the bandwidth of the link between the first network device and the fourth network device may also be considered when determining the weight of sending traffic to the fourth network device, thereby avoiding excessive traffic being sent to the fourth network device, which may cause packet loss when the traffic is transmitted between the first network device and the fourth network device. As a specific example, assuming that the bandwidth of the link between the first network device and the fourth network device is e, and the bandwidth of the link between the first network device and the second network device is f, then if the This indicates that the weight of diverting traffic to the fourth network device is reasonable, so the weight of sending traffic to the fourth network device can be determined to be Determine the weight for sending traffic to the second network device as And determine the weight of sending traffic to the fifth network device as If the This means that the weight of the traffic diverted to the fourth network device is too large, so the weight of sending traffic to the fourth network device can be determined to be Determine the weight for sending traffic with the destination prefix as the destination to the second network device as follows: Determine the weight for sending traffic with the destination prefix as the destination to the fifth network device as follows:
[0020] In one possible implementation, the second network device and the third network device are respectively connected to the first network device. Additionally, the first network device may also be connected to a seventh network device. The second, third, and seventh network devices may serve as load balancing devices. Traffic received by the first network device may be load-shared and forwarded across the second, third, and seventh network devices. In this case, the first network device may also receive a fifth bandwidth value sent by the seventh network device, where the fifth bandwidth value indicates the bandwidth at which the seventh network device sends traffic destined for a destination prefix. Accordingly, based on the first bandwidth value, the second bandwidth value, and the fifth bandwidth value, weights for sending traffic destined for the destination prefix to the second, third, and seventh network devices are determined. That is, when traffic received by the first network device can be load-shared and forwarded across three network devices (the second, third, and seventh network devices), weights for sending traffic to the three network devices may be determined based on the bandwidth values provided by the three network devices. This ensures that the bandwidths actually provided by the three network devices match the traffic they actually carry, thereby avoiding packet loss.
[0021] In one possible implementation, the sum of the first bandwidth value, the second bandwidth value, and the fifth bandwidth value is referred to as the third total bandwidth. In order to match the bandwidth actually provided by the aforementioned three network devices with the traffic actually carried by them, the weight of sending traffic with the target prefix as the destination to the second network device can be determined as: the ratio of the first bandwidth value to the third total bandwidth, the weight of sending traffic with the target prefix as the destination to the third network device can be determined as: the ratio of the second bandwidth value to the third total bandwidth; and the weight of sending traffic with the target prefix as the destination to the seventh network device can be determined as: the ratio of the fifth bandwidth value to the third total bandwidth.
[0022] In a possible implementation, the first network device receives the first bandwidth value sent by the second network device by receiving an intermediate system to intermediate system (IS-IS) message announced by the second network device, where the IS-IS message includes the first bandwidth value.
[0023] In one possible implementation, the IS-IS message may include a prefix type length value (TLV), the prefix TLV may include a first sub-TLV, and the first sub-TLV may include the first bandwidth value. In other words, the prefix TLV of the IS-IS message may be extended to extend the first sub-TLV to carry the first bandwidth value.
[0024] In a possible implementation, the first network device receives the first bandwidth value sent by the second network device by receiving an open shortest path first (OSPF) message announced by the second network device, where the OSPF message includes the first bandwidth value.
[0025] In one possible implementation, the OSPF message includes a prefix TLV, the prefix TLV includes a second sub-TLV, and the second sub-TLV includes the first bandwidth value. In other words, the prefix TLV of the OSPF message can be extended to extend the second sub-TLV to carry the first bandwidth value.
[0026] In a second aspect, an embodiment of the present application provides an information processing device, which is applied to a first network device, and the device includes: a receiving unit, which is used to receive a first bandwidth value sent by a second network device, the first bandwidth value indicating the bandwidth of the second network device sending traffic to a destination prefix; receiving a second bandwidth value sent by a third network device, the second bandwidth value indicating the bandwidth of the third network device sending traffic to the destination prefix; a processing unit, which is used to determine the weight of sending traffic with the destination prefix as the destination to the second network device and the third network device respectively based on the first bandwidth value and the second bandwidth value.
[0027] In a possible implementation, the first network device, the second network device, and the third network device all belong to a first network domain, and the second network device and the third network device are boundary devices connected to a second network domain.
[0028] In a possible implementation, the first network device sends traffic with the destination prefix as the destination to the third network device through the fourth network device, and the first network device and the fourth network device are equal-cost load sharing devices.
[0029] In a possible implementation, the processing unit is configured to determine a weight for sending traffic with the destination prefix as the destination to the second network device as follows: Determine the weight for sending traffic with the destination prefix as the destination to the third network device as follows: Wherein: determine that m is the first bandwidth value, and n is the second bandwidth value.
[0030] In a possible implementation, the processing unit is configured to send, to the second network device, a weight of the destination traffic with the destination prefix as the destination traffic: The weight for sending traffic with the destination prefix as the destination to the third network device is: Wherein: k is the bandwidth of the link between the first network device and the second network device, and j is the bandwidth of the link between the first network device and the fourth network device.
[0031] In one possible implementation, the processing unit is further used to determine that the first bandwidth value is less than the second bandwidth value, the first bandwidth value is not 0, and the difference between the first bandwidth value and the second bandwidth value is greater than or equal to a first bandwidth threshold before determining the weight of sending traffic with the destination prefix as the destination to the second network device and the third network device respectively.
[0032] In a possible implementation, the receiving unit is further configured to receive a third bandwidth value sent by a fifth network device, the third bandwidth value indicating the bandwidth of traffic sent by the fifth network device to a destination prefix; and receive a fourth bandwidth value sent by a sixth network device, the fourth bandwidth value indicating the bandwidth of traffic sent by the sixth network device to the destination prefix; and the processing unit is configured to determine, based on the first bandwidth value, the second bandwidth value, the third bandwidth value, and the fourth bandwidth value, weights for sending traffic with the destination prefix as a destination to the second network device, the fifth network device, and the fourth network device, respectively; wherein: the second network device and the fifth network device are respectively connected to the first network device, the third network device and the sixth network device are respectively connected to the fourth network device, and the traffic with the destination prefix as a destination received by the fourth network device is forwarded via the third network device and the sixth network device.
[0033] In one possible implementation, the processing unit is further configured to, before determining the weights for sending traffic with the destination prefix as the destination to the second network device, the fifth network device, and the fourth network device, respectively, determine that a first total bandwidth provided by the first network device is less than a second total bandwidth provided by the fourth network device, and that the first total bandwidth is not equal to 0, and that a difference between the first total bandwidth and the second total bandwidth is greater than or equal to a second bandwidth threshold. The first total bandwidth is the sum of the first bandwidth value and the third bandwidth value, and the second total bandwidth is the sum of the second bandwidth value and the fourth bandwidth value.
[0034] In a possible implementation, the processing unit is configured to determine a weight for sending traffic with the destination prefix as a destination to the fourth network device as follows: Determine the weight for sending traffic with the destination prefix as the destination to the second network device as follows: Determine the weight for sending traffic with the destination prefix as the destination to the fifth network device as follows: Wherein: a is the first bandwidth value, b is the second bandwidth value, c is the third bandwidth value, and d is the fourth bandwidth value.
[0035] In a possible implementation, the processing unit is configured to determine a weight for sending traffic with the destination prefix as a destination to the fourth network device as follows: Determine the weight for sending traffic with the destination prefix as the destination to the second network device as follows: Determine the weight for sending traffic with the destination prefix as the destination to the fifth network device as follows: Wherein: f is the sum of the bandwidth of the link between the first network device and the second network device and the bandwidth of the link between the first network device and the fifth network device, and e is the bandwidth of the link between the first network device and the fourth network device.
[0036] In one possible implementation, the second network device and the third network device are respectively connected to the first network device, and the first network device is also connected to a seventh network device. The receiving unit is further configured to receive a fifth bandwidth value sent by the seventh network device, where the fifth bandwidth value indicates a bandwidth for the seventh network device to send traffic to a destination prefix. The processing unit is configured to determine, based on the first bandwidth value, the second bandwidth value, and the fifth bandwidth value, a weight for sending traffic with the destination prefix as a destination to the second network device, the third network device, and the seventh network device, respectively.
[0037] In one possible implementation, according to the processing unit, it is used to: determine the weight of sending traffic with the target prefix as the destination to the second network device as: the ratio of the first bandwidth value to the third total bandwidth, where the third total bandwidth is the sum of the first bandwidth value, the second bandwidth value and the fifth bandwidth value; determine the weight of sending traffic with the target prefix as the destination to the third network device as: the ratio of the second bandwidth value to the third total bandwidth; determine the weight of sending traffic with the target prefix as the destination to the seventh network device as: the ratio of the fifth bandwidth value to the third total bandwidth.
[0038] In a possible implementation, the receiving unit is configured to receive an Intermediate System to Intermediate System (IS-IS) message advertised by the second network device, where the IS-IS message includes the first bandwidth value.
[0039] In a possible implementation, the IS-IS message includes a prefix type length value TLV, the prefix TLV includes a first sub-TLV, and the first sub-TLV includes the first bandwidth value.
[0040] In a possible implementation, the receiving unit is configured to receive an Open Shortest Path First (OSPF) message advertised by the second network device, where the OSPF message includes the first bandwidth value.
[0041] In a possible implementation, the OSPF message includes a prefix type length value TLV, the prefix TLV includes a second sub-TLV, and the second sub-TLV includes the first bandwidth value.
[0042] In a possible implementation, the processing unit is further configured to: store, in a forwarding table entry, weights for sending traffic with the destination prefix as a destination to the second network device and the third network device, respectively.
[0043] In a third aspect, an embodiment of the present application provides a device. The device includes a processor and a memory. The memory is configured to store instructions or computer programs. The processor is configured to execute the instructions or computer programs in the memory to perform any of the methods described in the first aspect above.
[0044] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions or a computer program, which, when executed on a computer, enables the computer to execute any one of the methods described in the first aspect above.
[0045] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions or a computer program, which, when executed on a computer, enables the computer to execute any one of the methods described in the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0047] FIG1a is a schematic diagram of an exemplary application scenario provided by an embodiment of the present application;
[0048] FIG1b is a schematic diagram of another exemplary application scenario provided by an embodiment of the present application;
[0049] FIG1c is a schematic diagram of another exemplary application scenario provided in an embodiment of the present application;
[0050] FIG1d is a schematic diagram of another exemplary application scenario provided by an embodiment of the present application;
[0051] FIG2 is a flow chart of an information processing method provided in an embodiment of the present application;
[0052] FIG3 is a schematic diagram of the structure of a sub-TLV provided in an embodiment of the present application;
[0053] FIG4a is a schematic diagram of an exemplary application scenario provided in an embodiment of the present application;
[0054] FIG4 b is a schematic diagram of another exemplary application scenario provided in an embodiment of the present application;
[0055] FIG4c is a schematic diagram of another exemplary application scenario provided in an embodiment of the present application;
[0056] FIG5 is a schematic diagram of the structure of an information processing device provided in an embodiment of the present application;
[0057] FIG6 is a schematic structural diagram of a device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] The embodiment of the present application provides an information processing method that can effectively reduce packet loss in business traffic.
[0059] Although multiple paths are currently used to transmit service traffic, the current network equipment forwarding solution still suffers from severe packet loss. The following describes specific scenarios where severe packet loss can occur.
[0060] See Figure 1a, which is a schematic diagram of an exemplary application scenario provided by an embodiment of the present application. As shown in Figure 1a:
[0061] RT1 and RT2 are the boundary devices used by Network Domain A to connect to Network Domain B. RTA and RTB are the boundary devices used by Network Domain B to connect to Network Domain A. RT1 is connected to RTA, and RT2 is connected to RTB. In addition to RTA and RTB, Network Domain B also includes RTC and RTD, which are the boundary devices used by Network Domain B to connect to Network Domain G.
[0062] The connection relationship between the network devices in network domain B is not described in detail here.
[0063] In one example, RT1 and RT2 may publish routes with the same destination prefix. For example, RT1 and RT2 may use virtual next-hop technology to publish routes including the same virtual next-hop destination prefix. As a specific example, an External Border Gateway Protocol (EBGP) neighbor relationship may be established between RT1 and RTA based on a loopback interface address. RT1 publishes routes to RTA, and an EBGP neighbor relationship may be established between RT2 and RTB based on the loopback interface address. RT2 publishes routes to RTB, and the routes published by RT1 to RTA and the routes published by RT2 to RTB may include the same destination prefix.
[0064] Accordingly, during the traffic forwarding phase, service traffic with the aforementioned destination prefix as its destination can be sent to RT1 via RTA, and RT1 will forward the service traffic to its destination. Service traffic with the aforementioned destination prefix as its destination can also be sent to RT2 via RTB, and RT2 will forward the service traffic to its destination.
[0065] In a specific example, the network devices in network domain G can send the service traffic with the aforementioned destination prefix as the destination to its destination via network domain B and network domain A. The transmission paths of the aforementioned service traffic in network domain B and network domain A may include two, namely: RTC-RTA-RT1 and RTD-RTB-RT2. In an example, the aforementioned two paths can be equal-cost load sharing paths. That is, the two paths represented by the dotted lines in Figure 1a carry the same traffic, both X. In other words, link RTA-RT1 and link RTB-RT2 share the same bandwidth of service traffic. In this case, RTC and RTD are equal-cost load sharing devices, and RTA and RTB are also equal-cost load sharing devices. Under normal circumstances, link RTA-RT1 and link RTB-RT2 can provide the same bandwidth for forwarding the aforementioned service traffic.
[0066] However, if some links in the RTA-RT1 link fail, for example, four of the five 100G links are disconnected. At this point, since the EBGP neighbor relationship between RTA and RT1 remains intact, the route advertisement process between RT1 and RTA remains the same as it was before the partial link failure in the RTA-RT1 link. Accordingly, the transmission paths for the aforementioned service traffic in network domains B and A can still include the RTC-RTA-RT1 and RTD-RTB-RT2 paths. Similarly, during the service traffic forwarding phase, service traffic destined for the aforementioned destination prefix is evenly distributed across the RTC-RTA-RT1 and RTD-RTB-RT2 paths. However, due to the partial link failure in the RTA-RT1 link, the bandwidth actually provided by the RTA-RT1 link for forwarding the aforementioned service traffic is insufficient to carry the received service traffic, resulting in traffic congestion on the RTA-RT1 link and severe packet loss.
[0067] Refer to Figure 1b, which is a schematic diagram of another exemplary application scenario provided by the embodiment of the present application. As shown in Figure 1b:
[0068] RT1, RT2, RT3, and RT4 are the border devices used by Network Domain A to connect to Network Domain B. RTA, RTB, RTC, and RTD are the border devices used by Network Domain B to connect to Network Domain A. RT1 is connected to RTA, RT2 is connected to RTB, RT3 is connected to RTC, and RT4 is connected to RTD. In addition to RTA, RTB, RTC, and RTD, Network Domain B also includes RTE, RTF, RTG, and RTH. RTG and RTH are the border devices used by Network Domain B to connect to Network Domain G.
[0069] The connection relationship between the network devices in network domain B is not described in detail here.
[0070] In one example, RT1, RT2, RT3, and RT4 can publish routes with the same destination prefix. For example, RT1, RT2, RT3, and RT4 can use virtual next-hop technology to publish routes including the same virtual next-hop destination prefix. Specifically, RT1 publishes a route including a certain destination prefix to RTA, RT2 publishes a route including the destination prefix to RTB, RT3 publishes a route including the destination prefix to RTC, and RT4 publishes a route including the destination prefix to RTD. Among them, the way RT1 publishes routes to RTA, the way RT2 publishes routes to RTB, the way RT3 publishes routes to RTC, and the way RT4 publishes routes to RTD are the same. Regarding the way RT1 publishes routes to RTA, please refer to the relevant description above and will not be repeated here.
[0071] Accordingly, during the traffic forwarding phase, the service traffic with the aforementioned destination prefix as its destination can be sent to RT1 via RTA, and RT1 will forward the service traffic to its destination. The service traffic with the aforementioned destination prefix as its destination can also be sent to RT2 via RTB, and RT2 will forward the service traffic to its destination. The service traffic with the aforementioned destination prefix as its destination can also be sent to RT3 via RTC, and RT3 will forward the service traffic to its destination. The service traffic with the aforementioned destination prefix as its destination can also be sent to RT4 via RTD, and RT4 will forward the service traffic to its destination.
[0072] In a specific example, the network devices in network domain G can send the service traffic with the aforementioned destination prefix as the destination to its destination via network domain B and network domain A. The transmission paths for the aforementioned service traffic in network domain B and network domain A may include four: RTG-RTE-RTA, RTG-RTE-RTC, RTH-RTF-RTB, and RTH-RTF-RTD. In an example, RTG-RTE and RTH-RTF can be equal-cost load-sharing paths. That is, RTG-RTE and RTH-RTF share service traffic of the same bandwidth, and the service traffic received by RTE is the same as the service traffic received by RTF. In this case, RTE and RTF are equal-cost load-sharing devices, and RTG and RTH are also equal-cost load-sharing devices. That is, the two paths represented by the dotted lines in Figure 1b carry the same traffic, both X. Under normal circumstances, the bandwidth that RTE can provide for forwarding the aforementioned service traffic is the same as the bandwidth that RTF can provide for forwarding the aforementioned service traffic. The bandwidth that RTE can provide for forwarding the aforementioned service traffic is the sum of the bandwidths that links RTA-RT1 and RTC-RT3 can provide for forwarding the aforementioned service traffic. The bandwidth that RTF can provide for forwarding the aforementioned service traffic is the sum of the bandwidths that links RTB-RT2 and RTD-RT4 can provide for forwarding the aforementioned service traffic.
[0073] However, if the bandwidth that RTE can provide for forwarding the aforementioned service traffic decreases, for example, when the link RTA-RT1 fails, during the service traffic forwarding phase, the service traffic with the aforementioned destination prefix as the destination is evenly distributed and forwarded on the RTG-RTE and RTH-RTF paths. However, since the bandwidth that RTE can provide for forwarding the aforementioned service traffic decreases, the bandwidth actually provided by RTE for forwarding the aforementioned service traffic is insufficient to carry the service traffic it receives, resulting in traffic congestion on the links RTE-RTA and / or RTE-RTC, causing severe packet loss.
[0074] See Figure 1c, which is a schematic diagram of another exemplary application scenario provided by an embodiment of the present application. As shown in Figure 1c:
[0075] RT1, RT2, RT3, RT4, RT5, and RT6 are the border devices used by Network Domain A to connect to Network Domain B. RTA, RTB, RTC, RTD, RTE, and RTF are the border devices used by Network Domain B to connect to Network Domain A. RT1 is connected to RTA, RT2 is connected to RTB, RT3 is connected to RTC, RT4 is connected to RTD, RT5 is connected to RTE, and RT6 is connected to RTF. In addition to RTA, RTB, RTC, and RTD, Network Domain B also includes RTG, RTH, RTI, and RTJ. RTI and RTJ are the border devices used by Network Domain B to connect to Network Domain G.
[0076] The connection relationship between the network devices in network domain B is not described in detail here.
[0077] In one example, RT1, RT2, RT3, RT4, RT5, and RT6 can publish routes with the same destination prefix. For example, RT1, RT2, RT3, RT4, RT5, and RT6 can use virtual next hop technology to publish routes including the same virtual next hop destination prefix. Specifically, RT1 publishes a route including a certain destination prefix to RTA, RT2 publishes a route including the destination prefix to RTB, RT3 publishes a route including the destination prefix to RTC, RT4 publishes a route including the destination prefix to RTD, RT5 publishes a route including the destination prefix to RTE, and RT6 publishes a route including the destination prefix to RTF. The manner in which RT1 publishes routes to RTA, the manner in which RT2 publishes routes to RTB, the manner in which RT3 publishes routes to RTC, the manner in which RT4 publishes routes to RTD, the manner in which RT5 publishes routes to RTE, and the manner in which RT6 publishes routes to RTF are the same. Regarding the manner in which RT1 publishes routes to RTA, please refer to the relevant description above and will not be repeated here.
[0078] Accordingly, in the traffic forwarding phase, the service traffic with the aforementioned destination prefix as the destination can be sent to RT1 via RTA, and RT1 will forward the service traffic to its destination. The service traffic with the aforementioned destination prefix as the destination can also be sent to RT2 via RTB, and RT2 will forward the service traffic to its destination. The service traffic with the aforementioned destination prefix as the destination can also be sent to RT3 via RTC, and RT3 will forward the service traffic to its destination. The service traffic with the aforementioned destination prefix as the destination can also be sent to RT4 via RTD, and RT4 will forward the service traffic to its destination. The service traffic with the aforementioned destination prefix as the destination can also be sent to RT5 via RTE, and RT5 will forward the service traffic to its destination. The service traffic with the aforementioned destination prefix as the destination can also be sent to RT6 via RTF, and RT6 will forward the service traffic to its destination.
[0079] In a specific example, the network equipment in network domain G can send the service traffic with the aforementioned destination prefix as the destination to its destination via network domain B and network domain A. Among them, the transmission paths of the aforementioned service traffic in network domain B and network domain A may include six, namely: RTI-RTG-RTA, RTI-RTG-RTC, RTI-RTG-RTE, RTJ-RTH-RTB, RTJ-RTH-RTD and RTJ-RTH-RTF. In an example, the link RTI-RTG and the link RTJ-RTH can be equal-cost load sharing paths. In this case, RTG and RTH are equal-cost load sharing devices, and RTI and RTJ are also equal-cost load sharing devices. That is: the two paths represented by the dotted lines in Figure 1c carry the same traffic, both of which are X.
[0080] In the network scenario shown in Figure 1c:
[0081] RTG can forward traffic via links RTG-RTA, RTG-RTC, and RTG-RTE. In one example, the links RTG-RTA, RTG-RTC, and RTG-RTE can be equal-cost load-sharing paths. That is, links RTA-RT1, RTC-RT3, and RTE-RT5 share the same bandwidth for traffic. Under normal circumstances, links RTA-RT1, RTC-RT3, and RTE-RT5 can provide the same bandwidth for forwarding the aforementioned traffic.
[0082] However, if some links in the link RTA-RT1 fail, RTG will still evenly distribute the service traffic with the aforementioned destination prefix as the destination to the links RTG-RTA, RTG-RTC, and RTG-RTE for forwarding. However, since some links in the link RTA-RT1 fail, the bandwidth actually provided by the link RTA-RT1 for forwarding the aforementioned service traffic is insufficient to carry the service traffic it receives, resulting in traffic congestion on the link RTA-RT1 and severe packet loss of the service traffic.
[0083] Similarly, RTH can be forwarded via the RTH-RTB, RTH-RTD, and RTH-RTF links. In one example, the aforementioned links RTH-RTB, RTH-RTD, and RTH-RTF can be equal-cost load-sharing paths. That is, the links RTB-RT2, RTD-RT4, and RTF-RT6 share the same bandwidth for service traffic. Under normal circumstances, the links RTB-RT2, RTD-RT4, and RTF-RT6 can provide the same bandwidth for forwarding the aforementioned service traffic.
[0084] However, if some links in the link RTB-RT2 fail, RTH will still evenly distribute the service traffic with the aforementioned destination prefix as the destination to the links RTH-RTB, RTH-RTD, and RTH-RTF for forwarding. However, since some links in the link RTB-RT2 fail, the bandwidth actually provided by the link RTB-RT2 for forwarding the aforementioned service traffic is insufficient to carry the service traffic it receives, resulting in traffic congestion on the link RTB-RT2 and severe packet loss of the service traffic.
[0085] Refer to Figure 1d, which is a schematic diagram of another exemplary application scenario provided by an embodiment of the present application. As shown in Figure 1d:
[0086] Network domain A includes network devices RT1, RTA, RTB, RTC, and RTD. RTC and RTD are boundary devices used by network domain A to connect to network domain G.
[0087] In one example, RT1 can advertise routes with the same destination prefix to RTA and RTB. Accordingly, during the traffic forwarding phase, service traffic with the aforementioned destination prefix as its destination can be sent to RT1 via RTA, and RT1 will forward the service traffic to its destination. Service traffic with the aforementioned destination prefix as its destination can also be sent to RT1 via RTB, and RT1 will forward the service traffic to its destination.
[0088] In a specific example, the network devices in network domain G can send the service traffic with the aforementioned destination prefix as the destination to its destination via network domain A. The transmission paths of the aforementioned service traffic in network domain A may include two, namely: RTC-RTA-RT1 and RTD-RTB-RT1. In an example, the aforementioned two paths may be equal-cost load-sharing paths. That is, the two paths represented by the dotted lines in Figure 1d carry the same traffic, both X. In other words, link RTA-RT1 and link RTB-RT1 share the same bandwidth of service traffic. In this case, RTA and RTB are equal-cost load-sharing devices, and RTC and RTD are also equal-cost load-sharing devices. Under normal circumstances, link RTA-RT1 and link RTB-RT1 can provide the same bandwidth for forwarding the aforementioned service traffic.
[0089] However, if some links in the RTA-RT1 link fail, for example, four of the five 100G links are broken, then during the service traffic forwarding phase, the service traffic with the aforementioned destination prefix as the destination is evenly distributed and forwarded on the two paths, RTC-RTA-RT1 and RTD-RTB-RT1. However, since some links in the RTA-RT1 link fail, the bandwidth actually provided by the RTA-RT1 link for forwarding the aforementioned service traffic is insufficient to carry the service traffic it receives, resulting in traffic congestion on the RTA-RT1 link and severe packet loss.
[0090] In the embodiment of the present application, the network domain may be an Interior Gateway Protocol (IGP) domain.
[0091] In order to solve the problem of severe packet loss in the above-mentioned business traffic, an embodiment of the present application provides an information processing method. Next, the information processing method is described in conjunction with the accompanying drawings. In the following description, "business traffic" can also be referred to as "traffic".
[0092] Referring to Figure 2, which is a flow chart of an information processing method provided by an embodiment of the present application, the method shown in Figure 2 can be applied to a first network device.
[0093] The information processing method provided in the embodiments of the present application can be applied to the network scenarios shown in Figure 1a, 1b, 1c, or 1d above. When the method is applied to the network scenario shown in Figure 1a, the first network device can correspond to the RTC shown in Figure 1a. When the method is applied to the network scenario shown in Figure 1b, the first network device can correspond to the RTE shown in Figure 1b. When the method is applied to the network scenario shown in Figure 1c, the first network device can correspond to the RTG shown in Figure 1c. When the method is applied to the network scenario shown in Figure 1d, the first network device can correspond to the RTC shown in Figure 1d.
[0094] The method shown in FIG. 2 may include the following steps S101 - S103 .
[0095] S101: Receive a first bandwidth value sent by a second network device, where the first bandwidth value indicates a bandwidth for the second network device to send traffic to a destination prefix.
[0096] S102: Receive a second bandwidth value sent by a third network device, where the second bandwidth value indicates a bandwidth for the third network device to send traffic to the destination prefix.
[0097] In the embodiment of the present application, the first network device, the second network device and the third network device all belong to the first network domain, wherein the first network domain may correspond to the network domain B in the aforementioned Figures 1a to 1d.
[0098] When the information processing method shown in Figure 2 is applied to the network scenario shown in Figure 1a or Figure 1b or Figure 1c, the second network device and the third network device are boundary devices connecting the second network domain, wherein the second network domain can be network domain A in Figures 1a to 1c.
[0099] When the method shown in FIG2 is applied to the application scenario shown in FIG1a, the second network device and the third network device may correspond to RTA and RTB shown in FIG1a, respectively. When the method shown in FIG2 is applied to the application scenario shown in FIG1b, the second network device and the third network device may correspond to RTA and RTB shown in FIG1b, respectively. When the method shown in FIG2 is applied to the application scenario shown in FIG1c, the second network device and the third network device may correspond to RTA and RTC shown in FIG1c, respectively. When the method shown in FIG2 is applied to the application scenario shown in FIG1d, the second network device and the third network device may correspond to RTA and RTB shown in FIG1d, respectively.
[0100] When the method shown in Figure 2 is applied to the application scenario shown in Figure 1a, the first bandwidth value can be the bandwidth provided by the link RTA-RT1 shown in Figure 1a for sending traffic to the target prefix, and the second bandwidth value can be the bandwidth provided by the link RTB-RT2 shown in Figure 1a for sending traffic to the target prefix.
[0101] When the method shown in Figure 2 is applied to the application scenario shown in Figure 1b, the first bandwidth value can be the bandwidth provided by the link RTA-RT1 shown in Figure 1b for sending traffic to the target prefix, and the second bandwidth value can be the bandwidth provided by the link RTB-RT2 shown in Figure 1b for sending traffic to the target prefix.
[0102] When the method shown in Figure 2 is applied to the application scenario shown in Figure 1c, the first bandwidth value can be the bandwidth provided by the link RTA-RT1 shown in Figure 1c for sending traffic to the target prefix, and the second bandwidth value can be the bandwidth provided by the link RTC-RT3 shown in Figure 1c for sending traffic to the target prefix.
[0103] When the method shown in Figure 2 is applied to the application scenario shown in Figure 1d, the first bandwidth value can be the bandwidth provided by the link RTA-RT1 shown in Figure 1d for sending traffic to the target prefix, and the second bandwidth value can be the bandwidth provided by the link RTB-RT1 shown in Figure 1d for sending traffic to the target prefix.
[0104] Next, the specific implementation of S101 is introduced.
[0105] In one example, the first network device may receive an IS-IS message announced by the second network device, and the IS-IS message carries the first bandwidth value. After receiving the IS-IS message, the first network device may parse the IS-IS message to obtain the first bandwidth value. The embodiment of the present application does not specifically limit the carrying position of the first bandwidth value in the IS-IS message. The first bandwidth value may, for example, be carried by any available field in the IS-IS message. In a specific example, the IS-IS message may include a prefix TLV, and the prefix TLV may include a first sub-TLV. The first sub-TLV may, for example, be used to carry the first bandwidth value.
[0106] Regarding the structure of the first sub-TLV, please refer to Figure 3, which is a schematic diagram of the structure of a sub-TLV provided in an embodiment of the present application. As shown in Figure 3, the first TLV includes a type field 310, a length field 320, and a value field 330, wherein the value field 330 further includes a type field 331, a greatest common divisor (GCD) field 332, and a bandwidth value field 333. Among them:
[0107] The type field 310 is used to indicate that the first sub-TLV is used to carry a bandwidth value.
[0108] The length field 320 indicates the length of the value field 330 .
[0109] The type field 331 may be used to indicate the purpose of the bandwidth value. For example, the type field 331 may indicate unequal load sharing. The first network device may execute S103 based on the value of the type field 331 to implement unequal load sharing.
[0110] The GCD field 332 may be used to indicate the unit of the bandwidth value. For example, a value of 100 in the GCD field 332 indicates that the unit of the bandwidth value is one hundred bytes.
[0111] The bandwidth value field 333 is used to carry a specific bandwidth value. For example, if the value carried by the bandwidth value field 333 is 100, it indicates that the first bandwidth value is: 100 bytes.
[0112] Figure 3 is only shown for the purpose of understanding this solution and does not constitute a limitation on the specific structure of the first sub-TLV. For example, in another example, the value field 330 may not include the type field 331, but include the GCD field 332 and the bandwidth value field 333, and carry the first bandwidth value through the GCD field 332 and the bandwidth value field 333.
[0113] Regarding the prefix TLV, it can be an extended Internet Protocol Reachability (Extended IP reachability) prefix TLV, a multi-topology IP Reach (MT IP Reach) prefix TLV, an Internet Protocol version 6 IP Reach (Internet Protocol version 6 IP Reach, IPv6 IP Reach) prefix TLV, or an MT IPv6 IP Reach prefix TLV.
[0114] In another example, the first network device may receive an OSPF message announced by the second network device, and the OSPF message carries the first bandwidth value. After receiving the OSPF message, the first network device may parse the OSPF message to obtain the first bandwidth value. The embodiment of the present application does not specifically limit the carrying position of the first bandwidth value in the OSPF message. The first bandwidth value may, for example, be carried by any available field in the OSPF message. In a specific example, the OSPF message may include a prefix TLV, and the prefix TLV may include a second sub-TLV, and the second sub-TLV may, for example, be used to carry the first bandwidth value. The structure of the second sub-TLV may be the same as the structure of the aforementioned first sub-TLV. Therefore, regarding the structure of the second sub-TLV, reference may be made to the previous description of the first sub-TLV, and no repeated description will be made here.
[0115] Regarding the prefix TLV, it can be an inter-area-prefix TLV (Inter-Area-Prefix TLV), an extended prefix TLV (External-Prefix TLV), or an intra-area-prefix TLV (Intra-Area-Prefix TLV), which is not specifically limited in the embodiments of the present application.
[0116] The specific implementation of S102 is similar to the specific implementation of S101. In one example, the first network device may receive an IS-IS message sent by a third network device, where the IS-IS message includes the second bandwidth value. The second bandwidth value may be carried, for example, by the third sub-TLV of the prefix TLV included in the IS-IS message. In another example, the first network device may receive an OSPF message sent by a third network device, where the OSPF message includes the second bandwidth value. The second bandwidth value may be carried, for example, by the fourth sub-TLV of the prefix TLV included in the OSPF message.
[0117] S103: Determine, based on the first bandwidth value and the second bandwidth value, weights for sending traffic with the destination prefix as a destination to the second network device and the third network device, respectively.
[0118] After the first network device receives the first bandwidth value and the second bandwidth value, it can determine the weight of sending traffic with the destination prefix as the destination to the second network device and the third network device respectively based on the first bandwidth value and the second bandwidth value. In an embodiment of the present application, in order to avoid the reduction of the bandwidth that the second network device can provide for sending traffic to the destination prefix, resulting in severe packet loss after the traffic is sent to the second network device. The first network device can send the received traffic with the destination prefix as the destination to the second network device and the third network device respectively, thereby reducing the traffic received by the second network device and avoiding traffic packet loss. Specifically, the first network device can determine the weight of sending traffic with the destination prefix as the destination to the second network device and the third network device respectively based on the first bandwidth value and the second bandwidth value. In this way, when forwarding traffic with the destination prefix as the destination, the first network device can send the aforementioned traffic to the second network device and the third network device based on the aforementioned weight, so that the traffic actually received by the second network device and the third network device matches the bandwidth with which they can send traffic to the target prefix, thereby reasonably utilizing the bandwidth provided by the second network device and the third network device for sending traffic to the target prefix, so as to avoid the bandwidth provided by the second network device for sending traffic to the target prefix being insufficient to carry the traffic with the destination prefix as the destination received by itself, thereby effectively avoiding service traffic packet loss.
[0119] As can be seen from the previous description of Figures 1a, 1b, and 1d, in conventional technology, the first network device will send traffic with the destination prefix as the destination to the second network device, but will not send traffic with the destination prefix as the destination to the fourth network device with which it is in a mutually equivalent load sharing relationship. In an example of the present application, when the method shown in Figure 2 is applied to the application scenario shown in Figure 1a, 1b, or 1d, the first network device sends traffic with the destination prefix as the destination to the third network device through the fourth network device. That is, the first network device can send part of the traffic to the fourth network device with which it is in a mutually equivalent load sharing relationship. It is precisely because the first network device sends traffic with the destination prefix as the destination to the third network device through the fourth network device that the weight of the traffic with the destination prefix as the destination sent by the first network device to the third network device refers to the weight of the traffic with the destination prefix as the destination sent by the first network device to the fourth network device. Among them, when the method shown in Figure 2 is applied to the application scenario shown in Figure 1a, the fourth network device can be an RTD. When the method shown in FIG2 is applied to the application scenario shown in FIG1b, the fourth network device may be RTF. When the method shown in FIG2 is applied to the application scenario shown in FIG1d, the fourth network device may be RTD.
[0120] Next, the specific implementation of S103 is introduced.
[0121] For the convenience of description, in the following description, "traffic with the aforementioned target prefix as the destination" is referred to as "traffic".
[0122] When the method shown in FIG2 is applied to the application scenario shown in FIG1a or FIG1d, the weight of sending traffic with the destination prefix as the destination to the second network device can be determined as: And determine the weight of sending traffic with the destination prefix as the destination to the third network device as: Where: m is the first bandwidth value, and n is the second bandwidth value. When the method shown in Figure 2 is applied to the application scenario shown in Figure 1a, it can be understood in conjunction with Figure 4a, which is a schematic diagram of an exemplary application scenario provided by an embodiment of the present application. When the method shown in Figure 2 is applied to the application scenario shown in Figure 1d, it can be understood in conjunction with Figure 4b, which is a schematic diagram of an exemplary application scenario provided by an embodiment of the present application.
[0123] As shown in Figures 4a and 4b, RTC and RTD are equal-cost load-sharing nodes. The traffic received by RTC from network domain G is X, and the traffic received by RTD from network domain G is also X. Correspondingly, the traffic received by RTB from RTD is X. Assuming that a portion (Y) of the traffic X received by RTC is forwarded to RTB through RTD, then: the weight of sending traffic to the third network device RTB is The weight of sending traffic to the second network device RTA is:
[0124] If RTC sends traffic Y to RTD, then the traffic transmitted by the link RTC-RTA is XY, and the traffic transmitted by the link RTD-RTB is X+Y. That is, the traffic received by RTA is XY, and the traffic received by RTB is X+Y. In order to ensure that the traffic forwarded by RTA and RTB matches the bandwidth of the forwarded traffic they provide, the following formula (1) should be satisfied:
[0125] Transforming formula (1) yields the following formula (2): (nm)*X=(n+m)*Y Formula (2)
[0126] Furthermore, by transforming formula (2), we can obtain formula (3):
[0127] According to formula (3), the weight of sending traffic to the third network device can be obtained as Further, the weight of sending traffic to the second network device is determined to be In one example, considering that the link bandwidth between the first network device and the fourth network device is limited, when determining the weight of sending traffic to the third network device, the bandwidth of the link between the first network device and the fourth network device may also be considered, thereby avoiding sending too much traffic to the fourth network device and causing packet loss when the traffic is transmitted between the first network device and the fourth network device.
[0128] As a specific example, assuming that the bandwidth of the link between the first network device and the fourth network device is j, and the bandwidth of the link between the first network device and the second network device is k, then if the This indicates that the weight of diverting traffic to the fourth network device is reasonable, so the weight of sending traffic to the third network device can be determined to be Determine the weight for sending traffic to the second network device as If the This means that the weight of the traffic diverted to the fourth network device is too large, so the weight of sending traffic to the third network device can be determined to be Determine the weight for sending traffic to the second network device as
[0129] In one example, before executing S103, the first network device may further determine whether a first traffic optimization condition is met. If the first traffic optimization condition is met, S103 is then executed. The first traffic optimization condition refers to a condition where continued equal-cost load balancing will result in severe packet loss. In one example, when the first bandwidth value is less than the second bandwidth value, the first bandwidth value is not zero, and the difference between the first bandwidth value and the second bandwidth value is large, continuing to use the traditional equal-cost load balancing solution will result in severe packet loss on link RTA-RT1. Therefore, in one example, the first traffic optimization condition may be: the first bandwidth value is less than the second bandwidth value, the first bandwidth value is not zero, and the difference between the first bandwidth value and the second bandwidth value is greater than or equal to a first bandwidth threshold. In other words, the first network device may execute S103 if it determines that the first bandwidth value is less than the second bandwidth value, the first bandwidth value is not zero, and the difference between the first bandwidth value and the second bandwidth value is greater than or equal to the first bandwidth threshold.
[0130] The embodiment of the present application does not specifically limit the first bandwidth threshold. The first bandwidth threshold can be determined according to actual conditions. For example, the first bandwidth threshold can be 0.4 times the second bandwidth value, that is, first bandwidth value < second bandwidth value * 0.6.
[0131] In a specific example, after executing S103, the first network device may also save in the forwarding table the weights of sending traffic with the destination prefix as the destination to the second network device and the third network device respectively, so that in the traffic forwarding stage, the weights of sending traffic to the second network device and the third network device are determined based on the forwarding table entries, so as to forward the received traffic based on the weights.
[0132] When the method shown in FIG2 is applied to the application scenario shown in FIG1b, in addition to receiving the aforementioned first bandwidth value and second bandwidth value, the first network device may also receive a third bandwidth value sent by a fifth network device and a fourth bandwidth value sent by a sixth network device. The third bandwidth value indicates the bandwidth of traffic sent by the fifth network device to the destination prefix, and the fourth bandwidth value indicates the bandwidth of traffic sent by the sixth network device to the destination prefix.
[0133] The specific implementation of the first network device receiving the third and fourth bandwidth values is based on the same principles as the first network device receiving the first bandwidth value. Therefore, for the specific implementation of the first network device receiving the third and fourth bandwidth values, please refer to the description of the first network device receiving the first bandwidth value above and will not be repeated here.
[0134] Wherein: the fifth network device and the aforementioned second network device are both connected to the first network device, and the fifth network device and the second network device are load sharing devices. In other words, the traffic received by the first network device can be load shared to the second network device and the fifth network device for forwarding. The third network device and the sixth network device are both connected to the fourth network device, and the third network device and the sixth network device can be load sharing devices for forwarding. In other words, the traffic received by the fourth network device can be load shared to the third network device and the sixth network device for forwarding. In the scenario shown in Figure 1b, the first network device, the second network device, the third network device, the fourth network device, the fifth network device and the sixth network device can correspond to: RTE, RTA, RTB, RTF, RTC and RTD respectively.
[0135] Accordingly, during the specific implementation of S103, the weight of sending traffic with the destination prefix as the destination to the second network device, the fifth network device, and the fourth network device can be determined based on the first bandwidth value, the second bandwidth value, the third bandwidth value, and the fourth bandwidth value. That is, the traffic originally load-shared by the second network device and the fifth network device is now load-shared by the second network device, the fifth network device, and the fourth network device, thereby reducing the traffic received by the second network device. Accordingly, severe packet loss caused by the bandwidth value provided by the second network device being insufficient to carry the traffic received by the second network device is avoided.
[0136] In one example, before executing S103, the first network device may further determine whether a second traffic optimization condition is met. If the second traffic optimization condition is met, S103 is then executed. The second traffic optimization condition refers to a condition where continued equal-cost load balancing will result in severe packet loss. In one example, when the first total bandwidth provided by the first network device is less than the second total bandwidth provided by the fourth network device, the first total bandwidth is not equal to zero, and the difference between the first total bandwidth and the second total bandwidth is greater than or equal to a second bandwidth threshold, continued use of the traditional equal-cost load balancing solution will result in severe packet loss on link RTA-RT1. The first total bandwidth is the sum of the first bandwidth value and the third bandwidth value, and the second total bandwidth is the sum of the second bandwidth value and the fourth bandwidth value. Therefore, in one example, the second traffic optimization condition may be: the first total bandwidth provided by the first network device is less than the second total bandwidth provided by the fourth network device, the first total bandwidth is not equal to zero, and the difference between the first total bandwidth and the second total bandwidth is greater than or equal to the second bandwidth threshold. In other words, the first network device may execute S103 again if it is determined that the first total bandwidth provided by the first network device is less than the second total bandwidth provided by the fourth network device, the first total bandwidth is not equal to 0, and the difference between the first total bandwidth and the second total bandwidth is greater than or equal to the second bandwidth threshold.
[0137] The embodiment of the present application does not specifically limit the second bandwidth threshold. The second bandwidth threshold can be determined according to actual conditions. For example, the second bandwidth threshold can be 0.4 times the second total bandwidth, that is, the first total bandwidth < the second total bandwidth * 0.6.
[0138] In a specific example, “determining, based on the first bandwidth value, the second bandwidth value, the third bandwidth value, and the fourth bandwidth value, a weight for sending traffic with the destination prefix as a destination to the second network device, the fifth network device, and the fourth network device” may include:
[0139] Determine the weight for sending traffic with the destination prefix as the destination to the fourth network device as follows:
[0140] Determine the weight for sending traffic with the destination prefix as the destination to the second network device as follows:
[0141] Determine the weight for sending traffic with the destination prefix as the destination to the fifth network device as follows: in:
[0142] a is the first bandwidth value, b is the second bandwidth value, c is the third bandwidth value, and d is the fourth bandwidth value.
[0143] This can be understood in conjunction with Figure 4c, which is a schematic diagram of an exemplary application scenario provided in an embodiment of the present application.
[0144] As shown in Figure 4c, the link RTG-RTE and the link RTH-RTF are equal-cost load-sharing links. The traffic received by RTE via the link RTG-RTE is X, and the traffic received by RTF via the link RTH-RTF is also X. Assume that a portion (Y) of the traffic X received by RTE is forwarded to RTF, which then forwards it to the destination of the traffic via RTB and RTD. Then: The weight of sending traffic to the first network device RTF is The weight of sending traffic to the second network device RTA is: The weight of sending traffic to the fifth network device RTC is:
[0145] If RTE sends traffic Y to RTF, then the traffic transmitted by links RTE-RTA and RTE-RTC is: XY, and the traffic transmitted by links RTF-RTB and RTF-RTD is: X+Y. In order to ensure that the traffic forwarded by RTA, RTB, RTC, and RTD matches the bandwidth of the forwarded traffic they provide, the following formula (4) should be satisfied:
[0146] Transforming formula (4) yields the following formula (5): (b+dac)*X=(a+b+c+d)*Y Formula (5)
[0147] Furthermore, by transforming formula (5), we can obtain formula (6):
[0148] According to formula (6), the weight of sending traffic to the fourth network device is Further, the weight of sending traffic to the second network device is determined to be The weight for sending traffic to the fourth network device is determined as:
[0149] In one example, considering that the link bandwidth between the first network device and the fourth network device is limited, when determining the weight of sending traffic to the fourth network device, the bandwidth of the link between the first network device and the fourth network device may also be considered, thereby avoiding sending too much traffic to the fourth network device and causing packet loss when the traffic is transmitted between the first network device and the fourth network device.
[0150] As a specific example, assuming that the bandwidth of the link between the first network device and the fourth network device is e, and the bandwidth of the link between the first network device and the second network device is f, then if the This indicates that the weight of diverting traffic to the fourth network device is reasonable, so the weight of sending traffic to the fourth network device can be determined to be Determine the weight for sending traffic to the second network device as And determine the weight of sending traffic to the fifth network device as If the This means that the weight of the traffic diverted to the fourth network device is too large, so the weight of sending traffic to the fourth network device can be determined to be Determine the weight for sending traffic with the destination prefix as the destination to the second network device as follows: Determine the weight for sending traffic with the destination prefix as the destination to the fifth network device as follows:
[0151] When the method shown in Figure 2 is applied to the application scenario shown in Figure 1c, the second network device and the third network device are respectively connected to the first network device. In addition, the first network device may also be connected to the seventh network device. The second network device, the third network device, and the seventh network device may serve as load balancing devices. Traffic received by the first network device may be load-shared and forwarded among the second, third, and seventh network devices. The first, second, third, and seventh network devices may correspond to RTG, RTA, RTC, and RTE, respectively, in the scenario shown in Figure 1c.
[0152] In this case, in addition to receiving the aforementioned first and second bandwidth values, the first network device may also receive a fifth bandwidth value sent by a seventh network device. The fifth bandwidth value indicates the bandwidth at which the seventh network device sends traffic to the destination prefix. The implementation principle for the first network device receiving the fifth bandwidth value is the same as the implementation principle for the first network device receiving the first bandwidth value. Therefore, for the specific implementation of the first network device receiving the fifth bandwidth value, please refer to the description of the first network device receiving the first bandwidth value above and will not be repeated here.
[0153] Accordingly, in this scenario, when S103 is specifically implemented, the weights of sending traffic with the destination prefix as the destination to the second network device, the third network device, and the seventh network device, respectively, can be determined based on the first bandwidth value, the second bandwidth value, and the fifth bandwidth value. That is, when the traffic received by the first network device can be load-shared and forwarded to three network devices (the second network device, the third network device, and the seventh network device), the weights of sending traffic to the three network devices can be determined based on the bandwidth values provided by the three network devices, so that the bandwidth actually provided by the three network devices matches the traffic actually carried by them, thereby avoiding traffic packet loss.
[0154] In a specific example, the sum of the first bandwidth value, the second bandwidth value and the fifth bandwidth value is called the third total bandwidth. In order to match the bandwidth actually provided by the above three network devices with the traffic actually carried by them, the weight of sending traffic with the target prefix as the destination to the second network device can be determined as: the ratio of the first bandwidth value and the third total bandwidth, the weight of sending traffic with the target prefix as the destination to the third network device can be determined as: the ratio of the second bandwidth value and the third total bandwidth; and the weight of sending traffic with the target prefix as the destination to the seventh network device can be determined as: the ratio of the fifth bandwidth value and the third total bandwidth.
[0155] In a specific example, after executing S103, the first network device may also save in the forwarding table the weights of sending traffic with the destination prefix as the destination to the second network device, the third network device, and the seventh network device, respectively, so that in the traffic forwarding stage, the weights of sending traffic to the second network device, the third network device, and the seventh network device are determined based on the forwarding table entries, so as to forward the received traffic based on the weights.
[0156] Based on the information processing methods provided in the above embodiments, embodiments of the present application also provide corresponding devices. See FIG5 , which is a schematic diagram of the structure of an information processing device provided in an embodiment of the present application. The information processing device 500 shown in FIG5 can be applied to a first network device to execute the information processing method provided in the above method embodiments by the first network device. The information processing device 500 may include a receiving unit 501 and a processing unit 502.
[0157] The receiving unit 501 is configured to receive a first bandwidth value sent by a second network device, where the first bandwidth value indicates a bandwidth for the second network device to send traffic to a destination prefix; and receive a second bandwidth value sent by a third network device, where the second bandwidth value indicates a bandwidth for the third network device to send traffic to the destination prefix.
[0158] The processing unit 502 is configured to determine, based on the first bandwidth value and the second bandwidth value, weights for sending traffic with the destination prefix as a destination to the second network device and the third network device, respectively.
[0159] In a possible implementation, the first network device, the second network device, and the third network device all belong to a first network domain, and the second network device and the third network device are boundary devices connected to a second network domain.
[0160] In a possible implementation, the first network device sends traffic with the destination prefix as the destination to the third network device through the fourth network device, and the first network device and the fourth network device are equal-cost load sharing devices.
[0161] In a possible implementation, the processing unit 502 is configured to determine a weight for sending traffic with the destination prefix as the destination to the second network device as follows: Determine the weight for sending traffic with the destination prefix as the destination to the third network device as follows: Wherein: determine that m is the first bandwidth value, and n is the second bandwidth value.
[0162] In a possible implementation, the processing unit 502 is configured to send, to the second network device, a weight of the destination traffic with the destination prefix as: The weight for sending traffic with the destination prefix as the destination to the third network device is: Wherein: k is the bandwidth of the link between the first network device and the second network device, and j is the bandwidth of the link between the first network device and the fourth network device.
[0163] In one possible implementation: the processing unit 502 is further used to determine that the first bandwidth value is less than the second bandwidth value, the first bandwidth value is not 0, and the difference between the first bandwidth value and the second bandwidth value is greater than or equal to a first bandwidth threshold before determining the weight of sending the traffic with the destination prefix as the destination to the second network device and the third network device respectively.
[0164] In a possible implementation, the receiving unit 501 is further configured to receive a third bandwidth value sent by a fifth network device, where the third bandwidth value indicates a bandwidth for the fifth network device to send traffic to a destination prefix; and receive a fourth bandwidth value sent by a sixth network device, where the fourth bandwidth value indicates a bandwidth for the sixth network device to send traffic to the destination prefix; and the processing unit 502 is configured to determine, based on the first bandwidth value, the second bandwidth value, the third bandwidth value, and the fourth bandwidth value, a weight for sending traffic with the destination prefix as a destination to the second network device, the fifth network device, and the fourth network device, respectively; wherein: the second network device and the fifth network device are respectively connected to the first network device, the third network device and the sixth network device are respectively connected to the fourth network device, and the traffic with the destination prefix as a destination received by the fourth network device is forwarded via the third network device and the sixth network device.
[0165] In one possible implementation, the processing unit 502 is further configured to determine, before determining the weights for sending traffic with the destination prefix as the destination to the second network device, the fifth network device, and the fourth network device, respectively, that a first total bandwidth provided by the first network device is less than a second total bandwidth provided by the fourth network device, and that the first total bandwidth is not equal to 0, and that a difference between the first total bandwidth and the second total bandwidth is greater than or equal to a second bandwidth threshold, wherein the first total bandwidth is the sum of the first bandwidth value and the third bandwidth value, and the second total bandwidth is the sum of the second bandwidth value and the fourth bandwidth value.
[0166] In a possible implementation, the processing unit 502 is configured to determine a weight for sending traffic with the destination prefix as a destination to the fourth network device as follows: Determine the weight for sending traffic with the destination prefix as the destination to the second network device as follows: Determine the weight for sending traffic with the destination prefix as the destination to the fifth network device as follows: Wherein: a is the first bandwidth value, b is the second bandwidth value, c is the third bandwidth value, and d is the fourth bandwidth value.
[0167] In a possible implementation, the processing unit 502 is configured to determine a weight for sending traffic with the destination prefix as a destination to the fourth network device as follows: Determine the weight for sending traffic with the destination prefix as the destination to the second network device as follows: Determine the weight for sending traffic with the destination prefix as the destination to the fifth network device as follows: Wherein: f is the sum of the bandwidth of the link between the first network device and the second network device and the bandwidth of the link between the first network device and the fifth network device, and e is the bandwidth of the link between the first network device and the fourth network device.
[0168] In one possible implementation, the second network device and the third network device are respectively connected to the first network device, and the first network device is also connected to a seventh network device. The receiving unit 501 is further configured to receive a fifth bandwidth value sent by the seventh network device, where the fifth bandwidth value indicates a bandwidth for the seventh network device to send traffic to a destination prefix. The processing unit 502 is configured to determine, based on the first bandwidth value, the second bandwidth value, and the fifth bandwidth value, weights for sending traffic with the destination prefix as a destination to the second network device, the third network device, and the seventh network device, respectively.
[0169] In one possible implementation, according to processing unit 502, it is used to: determine the weight of sending traffic with the target prefix as the destination to the second network device as: the ratio of the first bandwidth value to the third total bandwidth, where the third total bandwidth is the sum of the first bandwidth value, the second bandwidth value and the fifth bandwidth value; determine the weight of sending traffic with the target prefix as the destination to the third network device as: the ratio of the second bandwidth value to the third total bandwidth; determine the weight of sending traffic with the target prefix as the destination to the seventh network device as: the ratio of the fifth bandwidth value to the third total bandwidth.
[0170] In a possible implementation, the receiving unit 501 is configured to receive an Intermediate System to Intermediate System (IS-IS) message advertised by the second network device, where the IS-IS message includes the first bandwidth value.
[0171] In a possible implementation, the IS-IS message includes a prefix type length value TLV, the prefix TLV includes a first sub-TLV, and the first sub-TLV includes the first bandwidth value.
[0172] In a possible implementation, the receiving unit 501 is configured to receive an Open Shortest Path First (OSPF) message advertised by the second network device, where the OSPF message includes the first bandwidth value.
[0173] In a possible implementation, the OSPF message includes a prefix type length value TLV, the prefix TLV includes a second sub-TLV, and the second sub-TLV includes the first bandwidth value.
[0174] In a possible implementation, the processing unit 502 is further configured to: store, in a forwarding table entry, weights for sending traffic with the destination prefix as the destination to the second network device and the third network device, respectively.
[0175] It should be noted that the hardware structure of the aforementioned information processing device may be the structure shown in FIG6 , which is a schematic diagram of the structure of a device provided in an embodiment of the present application.
[0176] As shown in Figure 6 , device 600 includes a processor 610, a communication interface 620, and a memory 630. While the number of processors 610 in device 600 may be one or more, Figure 6 illustrates a single processor. In this embodiment of the present application, processor 610, communication interface 620, and memory 630 may be connected via a bus system or other means, with Figure 6 illustrating a connection via bus system 640 as an example.
[0177] Processor 610 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. Processor 610 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0178] Memory 630 may include volatile memory, such as random-access memory (RAM); non-volatile memory, such as flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); or a combination of the aforementioned types of memory. Memory 630 may, for example, store weights for sending traffic with the destination prefix as a destination to the second network device and the third network device, respectively.
[0179] Optionally, the memory 630 stores an operating system and programs, executable modules or data structures, or subsets thereof, or extended sets thereof, wherein the programs may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic services and processing hardware-based tasks. The processor 610 can read the programs in the memory 630 to implement the information processing method provided in the embodiments of the present application.
[0180] Bus system 640 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. Bus system 640 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, FIG6 shows only one thick line, but this does not mean that there is only one bus or only one type of bus.
[0181] An embodiment of the present application further provides a computer-readable storage medium, including instructions or a computer program, which, when executed on a computer, enables the computer to execute the information processing method provided in the above embodiment.
[0182] An embodiment of the present application further provides a computer program product comprising instructions or a computer program, which, when executed on a computer, enables the computer to execute the information processing method provided in the above embodiment.
[0183] The terms "first," "second," "third," "fourth," and the like (if any) in the specification and claims of this application and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or sequential sequence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusions, e.g., a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0184] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0185] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical business division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0186] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0187] In addition, each business unit in each embodiment of the present application can be integrated into a processing unit, each unit can exist physically separately, or two or more units can be integrated into a single unit. The above-mentioned integrated units can be implemented in the form of hardware or software business units.
[0188] If the integrated unit is implemented in the form of a software business unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0189] Those skilled in the art will appreciate that, in one or more of the above examples, the services described herein can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these services can be stored on a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, including any medium that facilitates the transmission of computer programs from one location to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0190] The above specific implementation methods further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention.
[0191] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. An information processing method, characterized in that: Applied to a first network device, the method comprises: Receiving a first bandwidth value sent by a second network device, where the first bandwidth value indicates a bandwidth for the second network device to send traffic to a destination prefix; receiving a second bandwidth value sent by a third network device, where the second bandwidth value indicates a bandwidth at which the third network device sends traffic to the destination prefix; According to the first bandwidth value and the second bandwidth value, weights for sending traffic with the destination prefix as a destination to the second network device and the third network device respectively are determined.
2. The method according to claim 1, characterized in that The first network device, the second network device and the third network device all belong to a first network domain, and the second network device and the third network device are boundary devices connected to a second network domain.
3. The method according to claim 1 or 2, characterized in that: The first network device sends traffic with the destination prefix as the destination to the third network device through the fourth network device, and the first network device and the fourth network device are equal-cost load sharing devices.
4. The method according to claim 3, characterized in that Determining, according to the first bandwidth value and the second bandwidth value, weights for sending traffic with the destination prefix as a destination to the second network device and the third network device, respectively, includes: Determine the weight for sending the traffic with the destination prefix as the destination to the second network device as follows: Determine the weight for sending the traffic with the destination prefix as the destination to the third network device as follows: in: Determine that m is the first bandwidth value, and n is the second bandwidth value.
5. The method according to claim 3, characterized in that: Determining, according to the first bandwidth value and the second bandwidth value, weights for sending traffic with the destination prefix as a destination to the second network device and the third network device, respectively, includes: The weight for sending the destination traffic with the destination prefix as the destination to the second network device is: The weight for sending the destination traffic with the destination prefix as the destination to the third network device is: in: The k is the bandwidth of the link between the first network device and the second network device, and the j is the bandwidth of the link between the first network device and the fourth network device.
6. The method according to claim 4 or 5, characterized in that: Before determining the weights for sending traffic with the destination prefix as the destination to the second network device and the third network device respectively, the method further includes: It is determined that the first bandwidth value is less than the second bandwidth value, the first bandwidth value is not 0, and a difference between the first bandwidth value and the second bandwidth value is greater than or equal to a first bandwidth threshold.
7. The method according to claim 3, characterized in that The method further comprises: receiving a third bandwidth value sent by a fifth network device, wherein the third bandwidth value indicates a bandwidth for sending traffic by the fifth network device to a destination prefix; receiving a fourth bandwidth value sent by a sixth network device, wherein the fourth bandwidth value indicates a bandwidth for the sixth network device to send traffic to the destination prefix; Determining, according to the first bandwidth value and the second bandwidth value, weights for sending traffic with the destination prefix as a destination to the second network device and the third network device, respectively, includes: Determine, according to the first bandwidth value, the second bandwidth value, the third bandwidth value, and the fourth bandwidth value, weights for sending traffic with the destination prefix as a destination to the second network device, the fifth network device, and the fourth network device, respectively; in: The second network device and the fifth network device are connected to the first network device respectively, the third network device and the sixth network device are connected to the fourth network device respectively, and the traffic with the target prefix as the destination received by the fourth network device is forwarded via the third network device and the sixth network device.
8. The method according to claim 7, characterized in that Before determining the weights of sending traffic with the destination prefix as the destination to the second network device, the fifth network device, and the fourth network device respectively, the method further includes: Determine that a first total bandwidth provided by the first network device is less than a second total bandwidth provided by the fourth network device, and that the first total bandwidth is not equal to 0, and that a difference between the first total bandwidth and the second total bandwidth is greater than or equal to a second bandwidth threshold, wherein: The first total bandwidth is the sum of the first bandwidth value and the third bandwidth value, and the second total bandwidth is the sum of the second bandwidth value and the fourth bandwidth value.
9. The method according to claim 7 or 8, characterized in that: Determining weights for sending traffic with the destination prefix as a destination to the second network device, the fifth network device, and the fourth network device, respectively, includes: Determine the weight of sending traffic with the destination prefix as the destination to the fourth network device as: Determine the weight of sending traffic with the destination prefix as the destination to the second network device as follows: Determine the weight of sending traffic with the destination prefix as the destination to the fifth network device as follows: in: a is the first bandwidth value, b is the second bandwidth value, c is the third bandwidth value, and d is the fourth bandwidth value.
10. The method according to claim 7 or 8, characterized in that: Determining weights for sending traffic with the destination prefix as a destination to the second network device, the fifth network device, and the fourth network device, respectively, includes: Determine the weight of sending traffic with the destination prefix as the destination to the fourth network device as: Determine the weight of sending traffic with the destination prefix as the destination to the second network device as follows: Determine the weight of sending traffic with the destination prefix as the destination to the fifth network device as follows: in: The f is the sum of the bandwidth of the link between the first network device and the second network device and the bandwidth of the link between the first network device and the fifth network device, and the e is the bandwidth of the link between the first network device and the fourth network device.
11. The method according to claim 1 or 2, characterized in that: The second network device and the third network device are connected to the first network device respectively, the first network device is also connected to a seventh network device, and the method further includes: receiving a fifth bandwidth value sent by the seventh network device, wherein the fifth bandwidth value indicates a bandwidth for the seventh network device to send traffic to a destination prefix; The determining, according to the first bandwidth value and the second bandwidth value, the weight of sending the traffic with the destination prefix as the destination to the second network device and the third network device respectively includes: According to the first bandwidth value, the second bandwidth value, and the fifth bandwidth value, weights for sending traffic with the destination prefix as a destination to the second network device, the third network device, and the seventh network device, respectively, are determined.
12. The method according to claim 11, characterized in that Determining, according to the first bandwidth value, the second bandwidth value, and the fifth bandwidth value, weights for sending traffic with the destination prefix as a destination to the second network device, the third network device, and the seventh network device, respectively, includes: Determine a weight for sending traffic with the target prefix as a destination to the second network device as: a ratio of the first bandwidth value to a third total bandwidth, where the third total bandwidth is a sum of the first bandwidth value, the second bandwidth value, and the fifth bandwidth value; Determine a weight for sending traffic with the target prefix as a destination to the third network device as: a ratio of the second bandwidth value to a third total bandwidth; The weight for sending traffic with the target prefix as a destination to the seventh network device is determined to be: a ratio of the fifth bandwidth value to the third total bandwidth.
13. The method according to any one of claims 1 to 12, characterized in that: Receiving a first bandwidth value sent by a second network device includes: An Intermediate System to Intermediate System (IS-IS) message announced by the second network device is received, where the IS-IS message includes the first bandwidth value.
14. The method according to claim 13, characterized in that The IS-IS message includes a prefix type length value TLV, the prefix TLV includes a first sub-TLV, and the first sub-TLV includes the first bandwidth value.
15. The method according to any one of claims 1 to 13, characterized in that: Receiving a first bandwidth value sent by a second network device includes: An Open Shortest Path First (OSPF) message announced by the second network device is received, where the OSPF message includes the first bandwidth value.
16. The method according to claim 15, characterized in that The OSPF message includes a prefix type length value TLV, the prefix TLV includes a second sub-TLV, and the second sub-TLV includes the first bandwidth value.
17. The method according to any one of claims 1 to 16, characterized in that: The method further comprises: The weights of sending the traffic with the destination prefix as the destination to the second network device and the third network device respectively are stored in the forwarding table entry.
18. An information processing device, characterized in that: Applied to a first network device, the apparatus comprises: A receiving unit, configured to receive a first bandwidth value sent by a second network device, the first bandwidth value indicating a bandwidth for the second network device to send traffic to a destination prefix; and receive a second bandwidth value sent by a third network device, the second bandwidth value indicating a bandwidth for the third network device to send traffic to the destination prefix; A processing unit is used to determine, according to the first bandwidth value and the second bandwidth value, a weight for sending traffic with the destination prefix as a destination to the second network device and the third network device respectively.
19. A device, characterized in that include: Processor and memory; The memory is used to store instructions or computer programs; The processor is used to execute the instructions or computer programs to perform the method according to any one of claims 1 to 17.
20. A computer-readable storage medium, characterized in that: The method comprises instructions or computer programs, which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 17.
21. A computer program product, characterized in that The invention comprises a computer program which, when executed on a processor, executes the method according to any one of claims 1 to 17.
Citation Information
Patent Citations
Information processing method and device
CN119906659A
Flow distribution method and network devices
CN104092628A
Load sharing method and device
CN113452620A
Method, device and system for forwarding message
CN114157600A
Using available bandwidths of an IP fabric to intelligently distribute data
US9807035B1