A method, apparatus, and system for flow distribution
Patent Information
- Application Number
- CN202510573012.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2026-10-30
AI Technical Summary
在通常的对称拓扑组网下,packet spray有优秀的负载均衡效果,然而在链路故障场景下,拓扑对称性被破坏,故障交换机上可用链路少于其他同层级交换机,流量涌入剩余链路,无法保证负载均衡,会产生高负载链路,高负载链路拥塞将影响网络性能
Smart Images

Figure CN123020472A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communications, and more particularly to a traffic allocation method, apparatus, and system. Background Technology
[0002] In data center network topologies, multiple reachable paths often exist between two points. To ensure load balancing of traffic on these paths, equal cost multiple path (ECMP) technology is generally used. ECMP is a hop-by-hop, flow-based load balancing method that uses hash values to randomly assign different flows arriving at the same destination switch to different paths, thereby achieving multi-path load balancing.
[0003] In cases of hash imbalance, ECMP cannot adequately guarantee load balancing. Packet spray, a packet-based load balancing method, is unaffected by hash randomness and achieves better uniformity by distributing different packets evenly across different paths compared to ECMP. In typical symmetrical network topologies, packet spray exhibits excellent load balancing performance. However, in link failure scenarios, topology symmetry is disrupted, and fewer links are available on the failed switch compared to other switches at the same level. Traffic floods the remaining links, failing to guarantee load balancing and creating high-load links. Congestion on these high-load links negatively impacts network performance. Summary of the Invention
[0004] This application provides a traffic allocation method, apparatus, and system that can effectively avoid high-load link congestion in scenarios with link failures, thus facilitating load balancing.
[0005] Firstly, this application provides a traffic allocation method applied to a multi-layer network system. In a multi-layer network system, traffic transmitted between any two communication devices located at layer N is forwarded through at least one communication device located at layer N+1, where N is a positive integer. The first, second, and third communication devices are located at layer N of the multi-layer network system. The method is applied to the first communication device located at layer N. Specifically, in the path where the second communication device sends a message to the third communication device through layer N+1, if the link between the second communication device and the communication device located at layer N+1 fails, the second communication device can notify other communication devices located at layer N+1 of the first failed link and forward the notification to the first communication device. That is, the first communication device receives first notification information indicating the first failed link, and then determines the traffic of multiple links for sending messages to the third communication device based on the first notification information.
[0006] For example, the first communication device may be as follows:Figure 3 , Figure 8 or Figure 9 The second communication device in the TOR switch 3 shown can be as follows: Figure 3 , Figure 8 or Figure 9 The TOR switch 1 shown in the diagram, the third communication device can be as follows: Figure 3 , Figure 8 or Figure 9 The TOR switch 2 shown in the image.
[0007] It can be seen that in the path where the second communication device sends a message to the third communication device through layer N+1, a link failure between the second communication device and a communication device at layer N+1 will lead to an unbalanced load on the links between the communication devices at layer N+1 and the third communication device at layer N. Some links will have more remaining bandwidth, such as the link between the communication device at layer N+1 associated with the first failed link and the third communication device, while other links will have less remaining bandwidth. In scenarios where the first communication device also needs to send information to the third communication device, the first communication device learns of the first failed link based on the received first notification information and analyzes the links with more remaining bandwidth between the communication devices at layer N+1 and the third communication device at layer N. Therefore, the first communication device can allocate more of the traffic sent to the third communication device to the links with more remaining bandwidth to avoid high-load link congestion and achieve load balancing.
[0008] In some possible implementations, the first notification information includes the total traffic sent by the second communication device to the third communication device. This allows the first communication device to more reasonably calculate the traffic of each uplink connected to it, thereby ensuring a more balanced downlink load between each communication device at layer N+1 and the third communication device. The total traffic can also be referred to as total throughput. For example, if the second communication device sends messages to the third communication device through multiple paths, the sum of the traffic from these multiple paths is the total traffic from the second communication device to the third communication device.
[0009] In some possible implementations, the first communication device determining the traffic of multiple links sending messages to the third communication device based on the first notification information includes: the first communication device determining the traffic of multiple links sending messages to the third communication device based on the total traffic and the topology information of the multi-layer network system. Specifically, the first communication device can pre-configure the topology information of the multi-layer network system locally. By combining the total traffic and the topology information of the multi-layer network system, the first communication device can more accurately calculate the remaining bandwidth of the relevant links, thereby achieving better load balancing by adjusting traffic allocation.
[0010] In some possible implementations, the first notification information is sent from a fourth communication device located at layer N+1 to the first communication device. The fourth communication device is at least one communication device at layer N+1, excluding the communication device associated with the first faulty link, so that the fourth communication device can receive feedback from the second communication device regarding the first faulty link, thereby ensuring that the first communication device can receive the first notification information. For example, the fourth communication device may be as follows: Figure 3 , Figure 8 or Figure 9 At least one of the spine switches 2, spine switch 3 and spine switch 4 shown.
[0011] In some possible implementations, the first notification information includes an identifier of a first failed link; and / or, the first notification information includes an identifier of a second communication device and an identifier of a fifth communication device located at layer N+1, wherein the first failed link is a link between the second communication device and the fifth communication device. Various methods for indicating a first failed link are provided herein, enriching the implementations of this application. For example, the fifth communication device may be as follows: Figure 3 , Figure 8 or Figure 9 The Spine switch 1 shown is shown.
[0012] In some possible implementations, the first notification information includes the identifier of the third communication device. The first communication device, by combining the identifier of the third communication device in the first notification information, can determine that the second communication device is sending a message to the third communication device. Therefore, the first communication device only needs to adjust the traffic on the multiple links sending messages to the third communication device. Meanwhile, all paths from the first communication device to other communication devices at Layer N are unaffected by the first failed link, and the first communication device does not need to adjust the traffic on the multiple links sending messages to other communication devices at Layer N, thus avoiding disruption of the existing load balancing.
[0013] In some possible implementations, the first notification information is carried via a control message or a data message. It should be noted that, considering that the communication device at layer N+1 may not be sending data messages to the first communication device every moment, carrying the first notification information via a control message ensures that the first communication device receives the first notification information promptly, improving the real-time nature of the notification. If the communication device at layer N+1 happens to be sending a data message to the first communication device, carrying the first notification information via a data message eliminates the need to construct a separate control message carrying the first notification information, thus reducing implementation costs.
[0014] In some possible implementations, the method further includes: a first communication device receiving second notification information, the second notification information being used to indicate a second faulted link in a multi-layer network system, the second faulted link being a link between the second communication device and the N+1th layer. That is, the traffic allocation method provided in this application is also applicable to uplink multi-link failure scenarios of the same communication device, thus having wider applicability.
[0015] And / or,
[0016] The method further includes: a first communication device receiving third notification information, the third notification information being used to indicate a third faulty link in a multi-layer network system, the third faulty link being a link between a sixth communication device located at layer N and layer N+1, and the sixth communication device sending traffic to the third communication device through layer N+1. In other words, the traffic allocation method provided in this application is also applicable to uplink multi-link fault scenarios involving different communication devices, thus having wider applicability. For example, the sixth communication device can be as follows: Figure 3 , Figure 8 or Figure 9 The TOR switch 4 shown is illustrated.
[0017] In some possible implementations, the method further includes: the first communication device determining the traffic allocation ratio of multiple links for sending messages to the third communication device based on the first notification information. The traffic allocation ratio of the multiple links can also be referred to as the traffic splitting ratio of the multiple links, and determining the splitting ratio facilitates the configuration of the forwarding flow table.
[0018] In some possible implementations, the method further includes: the first communication device adjusting the number of entries in the flow table according to the traffic allocation ratio. For example, the number of entries in the flow table is reduced by operations such as merging or reshaping, thereby saving storage resources.
[0019] In some possible implementations, in a multi-layer network system, the communication device at layer N is a top-of-rack (TOR) switch, and the communication device at layer N+1 is a spine switch.
[0020] Secondly, this application provides a traffic allocation method applied to a multi-layer network system. In the multi-layer network system, traffic transmitted between any two communication devices located at layer N is forwarded through at least one communication device located at layer N+1, where N is a positive integer. Specifically, the first, second, and third communication devices are located at layer N of the multi-layer network system, and the fourth communication device is located at layer N+1. The method is applied to the fourth communication device. Specifically, in the path where the second communication device sends a message to the third communication device through layer N+1, a link failure occurs between the second communication device and the communication device located at layer N+1. The fourth communication device receives a first notification message sent by the second communication device and sends a second notification message to the first communication device based on the first notification message. Both the first and second notification messages are used to indicate the first faulty link, enabling the first communication device to determine the traffic of multiple links for sending messages to the third communication device based on the second notification message.
[0021] For example, the first communication device may be as follows: Figure 3 , Figure 8 or Figure 9 The second communication device in the TOR switch 3 shown can be as follows: Figure 3 , Figure 8 or Figure 9 The TOR switch 1 shown in the diagram, the third communication device can be as follows: Figure 3 , Figure 8 or Figure 9 The TOR switch 2 shown is a fourth communication device, which can be, for example, a TOR switch 2. Figure 3 , Figure 8 or Figure 9 At least one of the spine switches 2, spine switch 3 and spine switch 4 shown.
[0022] In some possible implementations, both the first and second notification information include the total traffic sent by the second communication device to the third communication device, so that the first communication device can combine the total traffic to more reasonably calculate the traffic of each uplink connected to the first communication device, thereby ensuring that the downlink load between each communication device in the N+1 layer and the third communication device is more balanced as much as possible.
[0023] In some possible implementations, both the first and second notification information include an identifier of the first faulty link. And / or, both the first and second notification information include an identifier of the second communication device and an identifier of the fifth communication device located at layer N+1, where the first faulty link is the link between the second and fifth communication devices. Various methods for indicating the first faulty link are provided herein, enriching the implementations of this application. Exemplarily, the fifth communication device may be as follows: Figure 3 , Figure 8 or Figure 9 The Spine switch 1 shown is shown.
[0024] In some possible implementations, both the first and second notification messages are carried via control messages, and both include the identifier of the third communication device. That is, the first and second notification messages contain the same content, which is equivalent to the fourth communication device directly forwarding the received notification information to the first communication device, simplifying the operation of the fourth communication device.
[0025] In some possible implementations, both the first and second notification information are carried in data packets, with the second notification information including the identifier of the third communication device. That is, since the second communication device sends data packets to the fourth communication device, and the fourth communication device sends data packets to the first communication device, carrying the first and second notification information in data packets eliminates the need to separately construct control messages carrying both information, resulting in lower implementation costs.
[0026] In some possible implementations, the first notification information is carried via a data packet, and the second notification information is carried via a control message. The second notification information includes the identifier of the third communication device. That is, the second communication device may send data packets to the fourth communication device, but the fourth communication device may not send any data packets to the first communication device. Since the data packets themselves carry a destination address, which essentially indicates that the data packets are destined for the third communication device, the first notification information may not include the identifier of the third communication device, while the second notification information must include the identifier of the third communication device. Considering that the fourth communication device may not send data packets to the first communication device every moment, sending a control message carrying the second notification information to the first communication device allows the first communication device to receive the second notification information in a timely manner, improving the real-time nature of the notification.
[0027] In some possible implementations, the method further includes: a fourth communication device receiving a third notification message sent by a second communication device, and sending a fourth notification message to a first communication device based on the third notification message. Both the third and fourth notification messages are used to indicate a second faulty link in the multi-layer network system, where the second faulty link is the link between the second communication device and the N+1 layer. In other words, the traffic allocation method provided in this application is also applicable to uplink multi-link failure scenarios of the same communication device, thus having wider applicability.
[0028] And / or,
[0029] The method further includes: a fourth communication device receiving a fifth notification message sent by a second communication device, and sending a sixth notification message to a first communication device based on the fifth notification message. Both the fifth and sixth notification messages are used to indicate a third faulty link in the multi-layer network system. The third faulty link is the link between the sixth communication device at layer N and layer N+1, and the sixth communication device sends traffic to the third communication device through layer N+1. In other words, the traffic allocation method provided in this application is also applicable to uplink multi-link fault scenarios involving different communication devices, thus having wider applicability. For example, the sixth communication device can be as follows: Figure 3 , Figure 8 or Figure 9 The TOR switch 4 shown is illustrated.
[0030] In some possible implementations, in a multi-layer network system, the communication device at layer N is a TOR switch, and the communication device at layer N+1 is a spine switch.
[0031] Thirdly, this application provides a communication device, which includes a transceiver unit and a processing unit. This communication device may be referred to as a first communication device. In a multi-layer network system, the first communication device, the second communication device, and the third communication device are located at layer N of the multi-layer network system, where N is a positive integer. The transceiver unit is used to receive first notification information, which indicates a first faulty link in the multi-layer network system. The first faulty link is a link between the second communication device and layer N+1 of the multi-layer network system, through which the second communication device sends traffic to the third communication device. The processing unit is used to determine the traffic of multiple links sending messages to the third communication device based on the first notification information.
[0032] For example, the first communication device may be as follows: Figure 3 , Figure 8 or Figure 9 The second communication device in the TOR switch 3 shown can be as follows: Figure 3 , Figure 8 or Figure 9 The TOR switch 1 shown in the diagram, the third communication device can be as follows: Figure 3 , Figure 8 or Figure 9 The TOR switch 2 shown in the image.
[0033] In some possible implementations, the first notification information includes the total traffic sent from the second communication device to the third communication device.
[0034] In some possible implementations, the processing unit is specifically configured to determine the traffic of multiple links that send messages to the third communication device based on the total traffic and the topology information of the multi-layer network system.
[0035] In some possible implementations, the first notification information is sent from a fourth communication device located at layer N+1 to the communication device. For example, the fourth communication device may be as follows: Figure 3 , Figure 8 or Figure 9 At least one of the spine switches 2, spine switch 3 and spine switch 4 shown.
[0036] In some possible implementations, the first notification information includes an identifier of a first failed link; and / or, the first notification information includes an identifier of a second communication device and an identifier of a fifth communication device located at layer N+1, wherein the first failed link is a link between the second communication device and the fifth communication device. For example, the fifth communication device may be as follows: Figure 3 , Figure 8 or Figure 9 The Spine switch 1 shown is shown.
[0037] In some possible implementations, the first notification information includes the identifier of the third communication device.
[0038] In some possible implementations, the first notification information is carried via a control message or a data message.
[0039] In some possible implementations, the transceiver unit is further configured to receive second notification information, which is used to indicate a second faulty link in the multilayer network system, the second faulty link being the link between the second communication device and the N+1th layer.
[0040] And / or,
[0041] The transceiver unit is also configured to receive third notification information, which indicates a third faulty link in the multi-layer network system. The third faulty link is a link between the sixth communication device at layer N and layer N+1, through which the sixth communication device sends traffic to the third communication device. For example, the sixth communication device may be as follows: Figure 3 , Figure 8 or Figure 9The TOR switch 4 shown is illustrated.
[0042] In some possible implementations, the processing unit is further configured to determine the traffic allocation ratio of multiple links that send messages to the third communication device based on the first notification information.
[0043] In some possible implementations, the processing unit is also configured to adjust the number of entries in the flow table according to the flow allocation ratio.
[0044] In some possible implementations, in a multi-layer network system, the communication device at layer N is a TOR switch, and the communication device at layer N+1 is a spine switch.
[0045] Fourthly, this application provides a communication device including a transceiver unit, which may be referred to as a fourth communication device. In a multi-layer network system, a first communication device, a second communication device, and a third communication device are located at layer N of the multi-layer network system, and the fourth communication device is located at layer N+1 of the multi-layer network system, where N is a positive integer. The transceiver unit is configured to: receive first notification information sent by the second communication device, the first notification information indicating a first faulty link in the multi-layer network system, the first faulty link being a link between the second communication device and layer N+1, through which the second communication device sends traffic to the third communication device; and send second notification information to the first communication device based on the first notification information, so that the first communication device determines the traffic of multiple links sending messages to the third device based on the second notification information, the second notification information indicating the first faulty link.
[0046] For example, the first communication device may be as follows: Figure 3 , Figure 8 or Figure 9 The second communication device in the TOR switch 3 shown can be as follows: Figure 3 , Figure 8 or Figure 9 The TOR switch 1 shown in the diagram, the third communication device can be as follows: Figure 3 , Figure 8 or Figure 9 The TOR switch 2 shown is a fourth communication device, which can be, for example, a TOR switch 2. Figure 3 , Figure 8 or Figure 9 At least one of the spine switches 2, spine switch 3 and spine switch 4 shown.
[0047] In some possible implementations, both the first and second notification information include the total traffic sent from the second communication device to the third communication device.
[0048] In some possible implementations, both the first and second notification information include an identifier of the first faulty link; and / or, both the first and second notification information include an identifier of the second communication device and an identifier of the fifth communication device located at layer N+1, wherein the first faulty link is the link between the second and fifth communication devices. For example, the fifth communication device may be as follows: Figure 3 , Figure 8 or Figure 9 The Spine switch 1 shown is shown.
[0049] In some possible implementations, both the first and second notification messages are carried via control messages, and both the first and second notification messages include the identifier of the third communication device.
[0050] In some possible implementations, both the first and second notification information are carried in data packets, and the second notification information includes the identifier of the third communication device.
[0051] In some possible implementations, the first notification information is carried via a data packet, and the second notification information is carried via a control message. The second notification information includes the identifier of the third communication device.
[0052] In some possible implementations, the transceiver unit is further configured to receive a third notification message sent by the second communication device and send a fourth notification message to the first communication device based on the third notification message. Both the third and fourth notification messages are used to indicate a second faulty link in the multilayer network system. The second faulty link is the link between the second communication device and the N+1 layer.
[0053] And / or,
[0054] The transceiver unit is further configured to receive a fifth notification message sent by the second communication device, and to send a sixth notification message to the first communication device based on the fifth notification message. Both the fifth and sixth notification messages are used to indicate a third faulty link in the multi-layer network system. The third faulty link is a link between the sixth communication device located at layer N and layer N+1, through which the sixth communication device sends traffic to the third communication device. For example, the sixth communication device may be as follows: Figure 3 , Figure 8 or Figure 9 The TOR switch 4 shown is illustrated.
[0055] In some possible implementations, in a multi-layer network system, the communication device at layer N is a TOR switch, and the communication device at layer N+1 is a spine switch.
[0056] Fifthly, this application provides a communication device for performing the method described in any embodiment of the first or second aspect.
[0057] In some possible implementations, when the communication device is a chip, the chip is used to perform some or all of the operations as described in any of the first or second aspects.
[0058] In a sixth aspect, embodiments of this application provide a communication device, which includes a control circuit and an interface circuit. The interface circuit is used to transmit and receive signals, and the control circuit is used to perform the method described in any of the embodiments of the first or second aspect.
[0059] In a seventh aspect, embodiments of this application provide a communication system, which includes a communication device for performing the method as described in any embodiment of the first aspect and a communication device for performing the method as described in any embodiment of the second aspect.
[0060] Eighthly, this application provides a computer-readable storage medium storing instructions that, when executed by a computer, cause the method described in any embodiment of the first or second aspect to be implemented.
[0061] Ninthly, this application provides a computer program product including program instructions that, when executed, implement the method described in any of the embodiments of the first or second aspect above. Attached Figure Description
[0062] Figure 1 This is a schematic diagram of a two-layer Clos topology;
[0063] Figure 2 This is a schematic diagram of a 3-layer Fat-Tree topology;
[0064] Figure 3 This is a schematic diagram illustrating a scenario where a link failure occurs in a network topology.
[0065] Figure 4 This is a flowchart illustrating a traffic allocation method in an embodiment of this application;
[0066] Figure 5 This is a schematic diagram illustrating a scenario of compressing the number of flow table entries in an embodiment of this application;
[0067] Figure 6 This is a schematic diagram illustrating another scenario of compressing the number of flow table entries in an embodiment of this application;
[0068] Figure 7 This is a schematic diagram illustrating another scenario of compressing the number of flow table entries in an embodiment of this application;
[0069] Figure 8 This is a schematic diagram illustrating a scenario where a link failure occurs in another network topology.
[0070] Figure 9 This is a schematic diagram illustrating a scenario where a link failure occurs in another network topology;
[0071] Figure 10 This is a schematic diagram of the structure of a communication device in an embodiment of this application;
[0072] Figure 11 This is a schematic diagram of another structure of the communication device in the embodiments of this application. Detailed Implementation
[0073] This application provides a traffic allocation method, apparatus, and system that can effectively avoid high-load link congestion in scenarios with link failures, thus facilitating load balancing.
[0074] To facilitate understanding of the embodiments of this application, the following points are made:
[0075] First, unless otherwise specified or there is a logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced by each other. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.
[0076] Second, "at least one" means one or more, and "more than one" means two or more (including two). "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. In the textual description of this application, the character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c can mean: a, or, b, or, c, or, a and b, or, a and c, or, b and c, or, a, b, and c. Here, a, b, and c can be single or multiple.
[0077] Third, the terms "first," "second," and various numerical designations (e.g., #1, #2) are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application. For example, they can be used to distinguish different indication information.
[0078] Fourth, the terms “comprising” and “having” and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product or device.
[0079] Fifth, "for indicating" or "indication" can include both direct and indirect indication, or in other words, "for indicating" or "indication" can be explicit and / or implicit. For example, when describing information as indicating information I, it can include whether the information directly indicates I or indirectly indicates I, without implying that the information necessarily carries I. As another example, implicit indication can be based on the location and / or resources used for transmission; explicit indication can be based on one or more parameters, and / or one or more indices, and / or one or more bit patterns they represent.
[0080] The embodiments of this application can be applied to data center scenarios. Data centers can adopt a variety of different network topologies, such as a 2-layer Clos topology or a 3-layer Fat-Tree topology.
[0081] Figure 1 This is a schematic diagram of a two-layer Clos topology. (Example) Figure 1 As shown, the Clos topology consists of two layers. Layer 1 includes at least one top-of-rack (TOR) switch, and Layer 2 includes at least one spine switch. The downlink ports of the TOR switches connect to hosts, which can be servers or network interface cards (NICs), while the uplink ports connect to the spine switches. Information transmitted between any two TOR switches is forwarded through at least one spine switch. In the Clos topology, any TOR switch has a link with one or more spine switches; for example, any TOR switch has a link with any spine switch.
[0082] Figure 2 This is a schematic diagram of a 3-layer Fat-Tree topology. (Example) Figure 2As shown, the Fat-Tree topology consists of three layers. Layer 1 includes at least one TOR switch, Layer 2 includes at least one leaf switch, and Layer 3 includes at least one spine switch. The downlink ports of the TOR switches connect to hosts, which can be servers or network interface cards (NICs). The uplink ports of the TOR switches connect to leaf switches, and the uplink ports of the leaf switches connect to spine switches. In the Fat-Tree topology, any TOR switch has a link with one or more leaf switches, and any leaf switch has a link with one or more spine switches.
[0083] For any network topology used in a data center, in a link failure scenario, topological symmetry is disrupted. The number of available links on the failed switch is less than other switches at the same layer, causing traffic to flood the remaining links. This makes load balancing impossible, resulting in high-load links. Congestion on these high-load links will impact network performance. It should be understood that a failed link can occur between any two layers of the topology. Figure 1 There is a faulty link between the TOR switch and the spine switch, for example, Figure 2 There is a faulty link between the TOR switch and the leaf switch, for example, Figure 2 There is a faulty link between the leaf switch and the spine switch.
[0084] Figure 3 This is a schematic diagram illustrating a scenario where a link failure occurs in a network topology. For example... Figure 3 As shown, taking a Layer 2 Clos topology as an example, TOR switch 1 sends traffic to TOR switch 2. There are four paths for TOR switch 1 to send packets to TOR switch 2: Path 1: TOR switch 1 → Spine switch 1 → TOR switch 2; Path 2: TOR switch 1 → Spine switch 2 → TOR switch 2; Path 3: TOR switch 1 → Spine switch 3 → TOR switch 2; Path 4: TOR switch 1 → Spine switch 4 → TOR switch 2.
[0085] like Figure 3 As shown, a link failure between TOR switch 1 and spine switch 2 means that TOR switch 1 cannot send packets to TOR switch 2 via path 1. This will result in high load on paths 2, 3, and 4, leading to load imbalance. In other words, the downlink between spine switch 2 and TOR switch 2, the downlink between spine switch 3 and TOR switch 2, and the downlink between spine switch 4 and TOR switch 2 will have high load, while the downlink between spine switch 1 and TOR switch 2 will have low load.
[0086] To address the load imbalance caused by link failures, one existing solution is as follows: Spine switches 2, 3, and 4, upon detecting a high-load downlink, send an adaptive routing notification (ARN) to TOR switch 3 to inform it of the high-load link. Since TOR switch 3 is sending traffic to TOR switch 2, it can adjust the traffic distribution across the four uplinks, increasing the traffic allocated to the uplink between TOR switch 3 and Spine switch 1, and decreasing the traffic allocated to the uplink between TOR switch 3 and the other Spine switches. This results in a more balanced load across the four downlinks between the four Spine switches and TOR switch 2.
[0087] Assuming that TOR switch 3 is also sending traffic to TOR switch 4, and all paths for sending packets from TOR switch 3 to TOR switch 4 are normal, essentially load-balanced and unaffected by the aforementioned faulty link. If TOR switch 3 adjusts the traffic distribution on the four uplinks according to the existing technical solution, although this makes the load on the four downlinks between the four spine switches and TOR switch 2 more balanced, it will lead to an imbalance in the load on the four downlinks between the four spine switches and TOR switch 2. In other words, the existing technical solution may cause load imbalance on other links that are unaffected by the faulty link.
[0088] Therefore, this application provides a traffic allocation method that can effectively avoid high-load link congestion in scenarios with link failures, thus facilitating load balancing. Specifically, the traffic allocation method provided in this application is mainly applied to Layer 2 topologies experiencing link failures. These Layer 2 topologies can be any two layers in a multi-layer topology architecture, and are not specifically limited here.
[0089] For ease of explanation, the following description uses a link failure between a TOR switch and a spine switch in a Clos topology as an example. Those skilled in the art can, within the scope of the technology disclosed in this application, make simple modifications to obtain traffic distribution methods applicable to other Layer 2 topologies experiencing link failures.
[0090] Figure 4 This is a flowchart illustrating a traffic allocation method according to an embodiment of this application. Wherein, Figure 4 The illustrated embodiment is applied to Figure 3 The link failure scenario shown is as follows: Figure 4The switch numbers in the illustrated embodiment (e.g., TOR switch 1 to TOR switch 4 and spine switch 1 to spine switch 4) can be referenced. Figure 3 The scenario shown. It should be understood that, Figure 4 The illustrated embodiment is merely one application of... Figure 3 The illustrated possible embodiments of the link failure scenario, in practical applications, can be adapted by those skilled in the art based on changes in factors such as topology, link failure location, and / or traffic flow. Figure 4 The illustrated embodiments are modified to obtain embodiments applicable to other link failure scenarios.
[0091] 101. TOR switch 1 detects faulty link 1.
[0092] by Figure 3 Taking the scenario shown as an example, TOR switch 1 needs to send a message to TOR switch 2. TOR switch 1 is connected to four spine switches via four links, meaning TOR switch 1 can send messages through these four links, and the messages are then forwarded to TOR switch 2 by the four spine switches. If a link between TOR switch 1 and any of the spine switches fails, TOR switch 1 can detect the faulty link. In this embodiment, TOR switch 1 detecting a link failure between itself and spine switch 1 is used as an example, denoted as faulty link 1.
[0093] 102. TOR switch 1 sends notification information 1 to spine switch 2.
[0094] After detecting a faulty link 1, TOR switch 1 can generate announcement message 1, which is used to indicate the faulty link 1. The announcement message can also be named in other ways, such as "fault announcement message," etc., which is not limited here.
[0095] It should be noted that, with Figure 3 Taking the scenario shown as an example, the links between TOR switch 1 and spine switch 2, spine switch 3 and spine switch 4 are all normal. In fact, TOR switch 1 can send announcement information 1 to at least one of the spine switches 2, spine switch 3 and spine switch 4. For ease of introduction, this application embodiment only takes the example of TOR switch 1 sending announcement information 1 to spine switch 2.
[0096] In one example, each link has a corresponding link ID. The announcement information 1 includes the identifier of the faulty link 1, which is equivalent to indicating the faulty link 1 through the identifier of the faulty link 1.
[0097] In one example, each TOR switch and each spine switch has a corresponding identifier. The announcement information 1 includes the identifier of TOR switch 1 and the identifier of spine switch 1, which is equivalent to indicating the faulty link 1 between TOR switch 1 and spine switch 1 through the identifiers of TOR switch 1 and spine switch 1.
[0098] In one possible scenario, announcement information 1 also includes the total traffic of packets sent from TOR switch 1 to TOR switch 2, where total traffic can also be referred to as total throughput. For example, if the total traffic of packets sent from TOR switch 1 to TOR switch 2 is 200 gigabits per second (Gbps), and all four links connected to TOR switch 1 are functioning normally, the traffic of packets sent by each of the four links is 50 Gbps; if link 1 fails, the traffic of packets sent by each of the remaining three links is 66.7 Gbps.
[0099] It should be noted that notification information 1 can be carried through either data packets or control packets; the specific method is not limited here. Data packets are packets used to transmit data in the data plane, while control packets are packets used to transmit control signaling in the control plane; control packets can also be referred to as control signaling.
[0100] In one example, announcement information 1 is carried in a data packet, which can be included in the header of the data packet. For example, announcement information 1 can be carried in the option field of the header. Table 1 below provides a list of fields that announcement information 1 may include and the length of each field. As shown in Table 1, announcement information 1 includes the following fields: identifier of TOR switch 1, identifier of spine switch 1, and total traffic. The "identifier of TOR switch 1" and "identifier of spine switch 1" fields indicate the faulty link 1. Alternatively, announcement information 1 can also include the "identifier of faulty link 1" field, which also indicates the faulty link 1. Since the data packet itself carries the destination address, it is equivalent to indicating that the data packet is sent to TOR switch 2, and the "total traffic" field indicates the total traffic of packets sent from TOR switch 1 to TOR switch 2.
[0101] Table 1
[0102] Serial Number Field Name Field length 1 TOR switch 1 identifier 2 bytes 2 Spine Switch 1 Identification 2 bytes 3 Total flow 4 bytes
[0103] In one example, announcement information 1 is carried via a control message. Table 2 below provides a list of fields that announcement information 1 may include and the length of each field. Unlike announcement information 1 carried via data packets, as shown in Table 2, announcement information 1 carried via a control message requires the addition of a "Destination TOR Switch Identifier" field, where the destination TOR switch is TOR switch 2, to indicate that TOR switch 1 is sending packets to TOR switch 2. The "Total Traffic" field indicates the total traffic of packets sent from TOR switch 1 to TOR switch 2.
[0104] Table 2
[0105]
[0106]
[0107] 103. Spine switch 2 sends notification information 2 to TOR switch 3.
[0108] by Figure 3 In the scenario shown, TOR switch 3 also needs to send messages to TOR switch 2. Spine switch 2 can also announce the information obtained through announcement information 1 to TOR switch 3 so that TOR switch 3 can adjust the traffic distribution of multiple uplinks.
[0109] In one possible implementation, the announcement information 1 received by Spine Switch 2 contains the same content as the announcement information 2 sent by Spine Switch 2, which is equivalent to Spine Switch 2 forwarding the announcement information 1 received to TOR Switch 3. For example, both announcement information 1 and announcement information 2 are carried in control messages, and Spine Switch 2 forwards the control message carrying announcement information 1 to TOR Switch 3. Both announcement information 1 and announcement information 2 can adopt the format shown in Table 2.
[0110] In another possible implementation, the content of the announcement information 1 received by Spine switch 2 is not entirely the same as that of the announcement information 2 sent by Spine switch 2. For example, announcement information 1 is carried in a data packet, while announcement information 2 is carried in a control packet. Announcement information 1 can use the format shown in Table 1, and announcement information 2 can use the format shown in Table 2. Alternatively, both announcement information 1 and announcement information 2 can be carried in data packets, but the destination address of the data packet carrying announcement information 1 is TOR switch 2, while the destination address of the data packet carrying announcement information 2 is TOR switch 3. Announcement information 1 can use the format shown in Table 1, and announcement information 2 can use the format shown in Table 2. Announcement information 2 should include the identifier of TOR switch 2, and together with the "Total Traffic" field, indicate the total traffic of packets sent by TOR switch 1 to TOR switch 2.
[0111] It should be noted that, considering that Spine Switch 2 may not be sending data packets to TOR Switch 3 every moment, sending a control message carrying announcement information 2 from Spine Switch 2 to TOR Switch 3 ensures that TOR Switch 3 receives the announcement information 2 in a timely manner, improving the real-time performance of the announcement. If Spine Switch 2 happens to be sending data packets to TOR Switch 3, it can carry the announcement information 2 in the data packets, eliminating the need to construct a separate control message carrying the announcement information 2, thus reducing implementation costs.
[0112] 104. TOR switch 3 allocates traffic according to announcement information 2.
[0113] Specifically, TOR switch 3 determines the traffic of multiple links sending packets to TOR switch 2 based on announcement information 2. For example, TOR switch 3 can be pre-configured locally as follows: Figure 3 The network topology shown indicates that TOR switch 3, based on notification information 2, learns of the faulty link 1, and combines this with... Figure 3 The network topology shown reveals that the downlink load between Spine Switch 2 and TOR Switch 2, Spine Switch 3 and TOR Switch 2, and Spine Switch 4 and TOR Switch 2 is high, while the downlink load between Spine Switch 1 and TOR Switch 2 is low. Therefore, in scenarios where TOR Switch 3 sends packets to TOR Switch 2, TOR Switch 3 can increase the uplink traffic share between TOR Switch 3 and Spine Switch 1, and decrease the uplink traffic share between TOR Switch 3 and Spine Switch 2, between TOR Switch 3 and Spine Switch 2, and between TOR Switch 3 and Spine Switch 4. This results in a more balanced load distribution on the four downlinks between the four Spine Switches and TOR Switch 2, preventing high-load link congestion.
[0114] In one possible implementation, the notification information 2 includes the total traffic of packets sent from TOR switch 1 to TOR switch 2, so that TOR switch 3 can more reasonably calculate the traffic of each of the four uplinks connected to TOR switch 3 based on this total traffic, thereby ensuring a more balanced load on the four downlinks between the four spine switches and TOR switch 2. A possible calculation method is provided below.
[0115] The throughput of any one of the remaining three normal uplinks connected to TOR switch 1 can be denoted as throughput. fail(i), where different values of i can correspond to the remaining 3 normal uplinks connected to TOR switch 1.
[0116] throughput fail (i) = throughput fail ×spray_ratio fail (i).
[0117] Among them, throughput fail The `spray_ratio` represents the total throughput of packets sent from TOR switch 1 to TOR switch 2. fail (i) represents the traffic splitting ratio of any one of the remaining three normal uplinks connected to TOR switch 1. For example, throughput fail =200Gbps, the splitting ratio (spray_ratio) of any of the above uplinks fail (i) = 1 / 3, then the throughput of any of the above uplinks is... fail (i) = 66.7 Gbps.
[0118] The remaining bandwidth of the four downlinks between the four Spine switches and TOR switch 2 is denoted as "remain". i The different values of i can correspond to the four downlinks between the four spine switches and the TOR switch 2.
[0119]
[0120] Among them, bandwidth i This represents the total available bandwidth of any one of the four downlinks mentioned above. This represents the current total throughput of any one of the four downlinks mentioned above. For example, bandwidth. i =100Gbps, currently only traffic is being sent from TOR switch 1 to TOR switch 2, the current total downlink throughput between spine switch 1 and TOR switch 2. The current total downlink throughput of the three remaining Spine switches (excluding Spine switch 1) and TOR switch 2 is as follows. The remaining bandwidth of the downlink between Spine switch 1 and TOR switch 2 is... i =100Gbps, the remaining downlink bandwidth between the three remaining spine switches (excluding spine switch 1) and TOR switch 2 is 100Gbps. i = 33.3Gbps.
[0121] TOR switch 3 can then maintain the bandwidth of any one of the four downlinks mentioned above. i Calculate the traffic distribution ratio of the four uplinks connected to TOR switch 3, also known as the traffic splitting ratio, denoted as spray_ratio. x (i).
[0122]
[0123] in, This represents the sum of the remaining bandwidth of the above four downlinks, for example, The uplink traffic share between TOR switch 3 and spine switch 1 is 1 / 2, and the uplink traffic share between TOR switch 3 and spine switches 2, 3, and 4 is 1 / 6 each. This means the traffic splitting ratio for the four uplinks from TOR switch 3 to TOR switch 4 is 3:1:1:1. Combining this with the total throughput of messages sent from TOR switch 3 to TOR switch 2, the traffic on each link sending messages to TOR switch 2 can be calculated.
[0124] In one possible implementation, the notification information 2 includes the identifier of TOR switch 2, used to instruct TOR switch 1 to send a message to TOR switch 2. Therefore, as... Figure 3 As shown, if TOR switch 3 sends messages to both TOR switch 2 and TOR switch 4, then TOR switch 3 only needs to adjust the traffic on the multiple links sending messages to TOR switch 2 according to announcement information 2. All paths from TOR switch 3 to TOR switch 4 are unaffected by the aforementioned faulty link 1. TOR switch 3 does not need to adjust the traffic on the multiple links sending messages to TOR switch 4 according to announcement information 2. The traffic splitting ratio of the four uplinks from TOR switch 3 to TOR switch 4 is 1:1:1:1, ensuring load balancing.
[0125] In some possible scenarios, the TOR switch 3 can also adjust the number of flow table entries based on a predetermined traffic allocation ratio, thereby saving the number of flow table entries and conserving storage resources. Some possible examples are introduced below.
[0126] Figure 5 This is a schematic diagram illustrating a scenario of compressing the number of flow table entries in an embodiment of this application. For example... Figure 5As shown, the group ID is used to distinguish scenarios where the same TOR switch sends messages to different TOR switches. Taking TOR switch 3 sending messages to TOR switch 2 and TOR switch 4 as an example, TOR switch 3 sends messages to TOR switch 2 through four output ports (denoted as P1 to P4), and the group ID corresponding to these four output ports is G1. Similarly, TOR switch 3 sends messages to TOR switch 4 through four output ports (denoted as P1 to P4), and the group ID corresponding to these four output ports is G2. Figure 5 For example, the splitting ratio of the four output ports corresponding to group identifier G1 is 3:1:1:1, occupying 6 flow table entries. The splitting ratio of the four output ports corresponding to group identifier G2 is also 3:1:1:1, occupying 6 flow table entries. In scenarios where TOR switch 3 sends packets to different destinations with the same splitting ratio, the number of flow table entries can be compressed proportionally, effectively merging some flow table entries and reducing the total number of flow table entries from 12 to 6.
[0127] Figure 6 This is a schematic diagram illustrating another scenario for compressing the number of flow table entries in an embodiment of this application. For example... Figure 6 As shown, taking the example of TOR switch 3 sending messages to TOR switch 2, TOR switch 3 sends messages to TOR switch 2 through four output ports (denoted as P1 to P4), and the group identifier corresponding to the four output ports is G1. Figure 6 For example, the flow ratio of the four output ports corresponding to group identifier G1 is 8:3:7:4, which occupies a total of 22 flow table entries. For irreducible ratios such as 8:3 and 7:4, they can be approximated as 2:1, thus reducing the number of flow table entries from 22 to 6.
[0128] Figure 7 This is a schematic diagram illustrating another scenario for compressing the number of flow table entries in an embodiment of this application. For example... Figure 7 As shown, taking TOR switch 3 sending messages to TOR switch 2 and TOR switch 4 respectively as an example, TOR switch 3 sends messages to TOR switch 2 through four output ports (denoted as P1 to P4), and the group identifier corresponding to the four output ports is G1. TOR switch 3 also sends messages to TOR switch 4 through four output ports (denoted as P1 to P4), and the group identifier corresponding to the four output ports is G2. Figure 7For example, the flow splitting ratio of the four output ports corresponding to group identifier G1 is 8:3:1:1, occupying 13 flow table entries. The flow splitting ratio of the four output ports corresponding to group identifier G2 is 7:4:1:1, also occupying 13 flow table entries. First, considering that the output traffic of ports P3 and P4 corresponding to group identifier G1 is relatively small, we can first delete the flow table entries for ports P3 and P4 corresponding to group identifier G1, reducing the number of flow table entries for group identifier G1 from 13 to 11. Similarly, considering that the output traffic of ports P1 and P2 corresponding to group identifier G2 is relatively small, we can first delete the flow table entries for ports P1 and P2 corresponding to group identifier G2, reducing the number of flow table entries for group identifier G2 from 13 to 11. The second step involves approximating an irreducible ratio like 8:3 by dividing it into a ratio of 2:1, thus reducing the number of flow table entries corresponding to group identifier G1 from 11 to 3. Similarly, for an irreducible ratio like 7:4, this ratio can be reduced to 2:1, further reducing the number of flow table entries corresponding to group identifier G2 from 11 to 3. In this way, these two steps reduce the total number of flow table entries from 26 to 6.
[0129] It should be noted that the above Figure 4 The illustrated embodiment is applied to Figure 3 The single-link failure scenario shown in this application illustrates that the traffic allocation method provided in this application can also be applied to multi-link failure scenarios. Several possible multi-link failure scenarios are introduced below.
[0130] Figure 8 This is a schematic diagram illustrating a scenario where a link failure occurs in another network topology. For example... Figure 8 As shown, taking a 2-layer Clos topology as an example, in addition to the above... Figure 3 In addition to the faulty link 1 between TOR switch 1 and spine switch 1, there is also a faulty link 2 between TOR switch 1 and spine switch 3. It can be seen that... Figure 8 The scenario shown is an uplink multi-link failure within the same TOR switch. Figure 8 The scenario shown is just an example; in real-world applications, it could also be a link failure between TOR switch 1 and spine switch 4, etc. The specific scenario is not limited here. It should be noted that... Figure 4 The flow distribution method shown can also be applied to... Figure 8 The scene shown.
[0131] Specifically, TOR switch 1 can detect faulty link 1 and faulty link 2. TOR switch 1 sends announcement message 1 to spine switch 2 to indicate faulty link 1, and spine switch 2 sends announcement message 2 to TOR switch 3 to indicate faulty link 1. Considering that faulty link 1 and faulty link 2 usually occur sequentially, TOR switch 1 also sends announcement message 3 to spine switch 2 to indicate faulty link 2, and spine switch 2 also sends announcement message 4 to TOR switch 3 to indicate faulty link 2. In one possible scenario, announcement messages 1, 2, 3, and 4 also include the total traffic of packets sent from TOR switch 1 to TOR switch 2. It should be understood that... Figure 8 In the scenario shown, the specific content of announcement information 3 and announcement information 4, as well as the specific methods of carrying announcement information 3 and announcement information 4, are similar to those of announcement information 1 and announcement information 2. For details, please refer to [link / reference needed]. Figure 4 The relevant descriptions of notification information 1 and notification information 2 in the illustrated embodiment will not be repeated here.
[0132] because Figure 8 The link failure scenario shown is different from the one described above. Figure 3 In the link failure scenario shown, the traffic allocation results of TOR switch 3 based on advertisement information 2 and advertisement information 4 are also different. TOR switch 3 combines advertisement information 2, advertisement information 4, and... Figure 8 The network topology shown indicates that the downlink load between Spine Switch 2 and TOR Switch 2, and between Spine Switch 4 and TOR Switch 2, is high, while the downlink load between Spine Switch 1 and TOR Switch 2, and between Spine Switch 3 and TOR Switch 2, is low. Therefore, in scenarios where TOR Switch 3 sends packets to TOR Switch 2, TOR Switch 3 can increase the uplink traffic share between TOR Switch 3 and Spine Switch 1, and between TOR Switch 3 and Spine Switch 3, while decreasing the uplink traffic share between TOR Switch 3 and Spine Switch 2, and between TOR Switch 3 and Spine Switch 4. This results in a more balanced load distribution on the four downlinks between the four Spine Switches and TOR Switch 2, preventing high-load link congestion. Specifically, for Figure 8 In the scenario shown, the method by which TOR switch 3 calculates the traffic of the four connected uplinks is different from... Figure 4 The calculation method described in step 104 of the illustrated embodiment is similar and will not be repeated here.
[0133] Figure 9This is a schematic diagram illustrating a scenario where a link failure occurs in another network topology. For example... Figure 9 As shown, taking a Layer 2 Clos topology as an example, both TOR switch 1 and TOR switch 4 send traffic to TOR switch 2. Besides the above... Figure 3 In addition to the faulty link 1 between TOR switch 1 and spine switch 1, there is also a faulty link 3 between TOR switch 4 and spine switch 4. It can be seen that... Figure 9 The scenario shown is an uplink multi-link failure across different TOR switches. Figure 9 The scenario shown is just an example; in real-world applications, it could also be a link failure between TOR switch 4 and spine switch 1, etc. The specific scenario is not limited here. It should be noted that... Figure 4 The flow distribution method shown can also be applied to... Figure 9 The scene shown.
[0134] Specifically, TOR switch 1 can detect faulty link 1, and TOR switch 4 can detect faulty link 1 and faulty link 3. TOR switch 1 sends announcement message 1 to spine switch 2 to indicate faulty link 1, and spine switch 2 sends announcement message 2 to TOR switch 3 to indicate faulty link 1. Considering that faulty link 1 and faulty link 3 usually occur sequentially, TOR switch 4 also sends announcement message 5 to spine switch 2 to indicate faulty link 3, and spine switch 2 also sends announcement message 6 to TOR switch 3 to indicate faulty link 3. In one possible scenario, announcement messages 1 and 2 also include the total traffic of packets sent by TOR switch 1 to TOR switch 2, and announcement messages 5 and 6 also include the total traffic of packets sent by TOR switch 4 to TOR switch 2. It should be understood that... Figure 9 In the scenario shown, the specific content of announcement information 5 and announcement information 6, as well as the specific methods of carrying announcement information 5 and announcement information 6, are similar to those of announcement information 1 and announcement information 2. For details, please refer to [link / reference needed]. Figure 4 The relevant descriptions of notification information 1 and notification information 2 in the illustrated embodiment will not be repeated here.
[0135] because Figure 9 The link failure scenario shown is different from the one described above. Figure 3 In the link failure scenario shown, the traffic allocation results of TOR switch 3 based on advertisement information 2 and advertisement information 6 are also different. TOR switch 3 combines advertisement information 2, advertisement information 6, and... Figure 9The network topology shown indicates that the downlink load between Spine Switch 2 and TOR Switch 2, and between Spine Switch 3 and TOR Switch 2, is high, while the downlink load between Spine Switch 1 and TOR Switch 2, and between Spine Switch 4 and TOR Switch 2, is low. Therefore, in scenarios where TOR Switch 3 sends packets to TOR Switch 2, TOR Switch 3 can increase the uplink traffic share between TOR Switch 3 and Spine Switch 1, and between TOR Switch 3 and Spine Switch 4, while decreasing the uplink traffic share between TOR Switch 3 and Spine Switch 2, and between TOR Switch 3 and Spine Switch 2. This results in a more balanced load distribution on the four downlinks between the four Spine Switches and TOR Switch 2, preventing high-load link congestion. Specifically, for Figure 9 In the scenario shown, the method by which TOR switch 3 calculates the traffic of the four connected uplinks is different from... Figure 4 The calculation method described in step 104 of the illustrated embodiment is similar and will not be repeated here.
[0136] It should be noted that in practical applications, there may be, for example... Figure 8 The uplink multi-link fault shown in the diagram of the TOR switch also includes, for example... Figure 9 The uplink multi-link failures shown are for different TOR switches. For details, please refer to... Figure 8 and Figure 9 To understand the scenario shown, Figure 4 The flow distribution method shown can also be applied to, for example... Figure 8 and Figure 9 The specific scenarios for combining these elements will not be elaborated upon here.
[0137] Figure 10 This is a schematic diagram of a communication device according to an embodiment of this application. Figure 10 As shown, the communication device includes a transceiver unit 201 and a processing unit 202.
[0138] In one possible implementation, the communication device is a communication device located at Layer N in a multi-layer network system; for example, the communication device is a TOR switch in a Clos topology. In one example, the communication device is used to perform... Figure 4 In the corresponding method 100, the TOR switch 3, the transceiver unit 201 is used to execute step 103 of method 100, and the processing unit 202 is used to execute step 104 of method 100.
[0139] In another possible implementation, the communication device is a communication device located at layer N+1 of a multi-layer network system; for example, the communication device is a spine switch in a Clos topology. In one example, the communication device is used to perform... Figure 4 In the corresponding method 100, the Pine switch 2 has a transceiver unit 201 for executing steps 102 and 103 of method 100, and a processing unit 202 for executing other operations of the Pine switch 2 besides signal transmission and reception. For example, the processing unit 202 is used to generate announcement information 2 based on announcement information 1.
[0140] Figure 11 This is a schematic diagram of another structure of the communication device in an embodiment of this application. For example... Figure 11 As shown, the communication device includes an interface circuit 301 and a control circuit 302. It should be understood that the interface circuit 301 may be a transceiver or an input / output interface. The interface circuit 301 is used to receive signals from other devices outside the communication device and transmit them to the control circuit 302, or to send signals from the control circuit 302 to other devices outside the communication device. Optionally, the communication device may also include a memory 303, wherein the memory 303 is used to store program instructions and data.
[0141] In one possible implementation, the communication device is a communication device located at Layer N in a multi-layer network system; for example, the communication device is a TOR switch in a Clos topology. In one example, the communication device is used to perform... Figure 4 In the corresponding method 100, the TOR switch 3 has an interface circuit 301 for performing signal transmission and reception operations, and a control circuit 302 for performing other operations besides signal transmission and reception. For example, the interface circuit 301 includes, for instance, the following... Figure 10 The transceiver unit 201 shown, and the control circuit 302 include, as follows: Figure 10 The processing unit 202 shown.
[0142] In another possible implementation, the communication device is a communication device located at layer N+1 of a multi-layer network system; for example, the communication device is a spine switch in a Clos topology. In one example, the communication device is used to perform... Figure 4 In the corresponding method 100, the Spine switch 2 has an interface circuit 301 for performing signal transmission and reception operations, and a control circuit 302 for performing other operations besides signal transmission and reception. For example, the interface circuit 301 includes, for instance, the interface circuit 301... Figure 10 The transceiver unit 201 shown, and the control circuit 302 include, as follows: Figure 10 The processing unit 202 shown.
[0143] This application also provides a chip. This chip integrates circuitry for implementing the functions of the processing unit 202 or control circuit 302 described above, and one or more interfaces. As an example, the chip integrates a memory. As another example, when the chip does not integrate a memory, it can be connected to an external memory via the interface. This chip can perform the method steps of any one or more of the foregoing embodiments. Alternatively, the chip can implement the actions in the foregoing embodiments based on program code stored in the memory.
[0144] As an example, the chip in the embodiments of this application can be a central processing unit (CPU), or it can be other general-purpose processors, DSPs, ASICs, field-programmable gate arrays (FPGAs), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A general-purpose processor can be a microprocessor, any conventional processor, or a processing circuit that implements a specific function.
[0145] This application also provides a computer-readable storage medium including a program or instructions that, when run on a computer, cause the method performed as described in the above method embodiments to be implemented.
[0146] It should be understood that the circuitry in the aforementioned communication device can be implemented in hardware or software. When implemented in hardware, the circuit can be a logic circuit, an integrated circuit, etc. When implemented in software, the circuit can be a general-purpose processor that reads software code stored in memory. The memory can be independent and connected to the circuitry, or it can be integrated with the control circuitry.
[0147] As an example, the circuitry in the aforementioned communication device can be a CPU, or other general-purpose processors, DSPs, ASICs, FPGAs, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A general-purpose processor can be a microprocessor, any conventional processor, or a processing circuit that implements a specific function.
[0148] In embodiments of this application, the memory may be random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium may also be a component of the processor. The processor and storage medium may reside in an ASIC. Additionally, the ASIC may reside in a network device or a terminal device. Alternatively, the processor and storage medium may exist as discrete components in the network device or terminal device.
[0149] In the above embodiments, it can be implemented entirely or partially by software, hardware, firmware, or any combination thereof.
[0150] When implemented in hardware, the data processing method provided in this application embodiment may be implemented without reading software code or instructions. For example, it may be implemented by CPU, DSP, ASIC, FPGA, other programmable logic devices, transistor logic devices, hardware components, or any combination thereof.
[0151] When implemented using software, it can be implemented entirely or partially in the form of a computer program product. A computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, all or part of the processes or functions of the embodiments of this application are performed. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a terminal device, or other programmable device. The computer program or instructions can be stored in or transmitted through a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server integrating one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a Digital Versatile Disc (DVD); or it can be a semiconductor medium, such as a solid-state disk (SSD).
[0152] Finally, it should be noted that the above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A flow allocation method, characterized in that, The method is applied to a multi-layer network system, wherein the first communication device, the second communication device, and the third communication device are located at the Nth layer of the multi-layer network system, where N is a positive integer; the method includes: The first communication device receives a first notification information, which is used to indicate a first faulty link in the multi-layer network system. The first faulty link is the link between the second communication device and the N+1 layer of the multi-layer network system. The second communication device sends traffic to the third communication device through the N+1 layer. The first communication device determines the traffic of multiple links that send messages to the third communication device based on the first notification information.
2. The method according to claim 1, characterized in that, The first notification information includes the total traffic sent by the second communication device to the third communication device.
3. The method according to claim 2, characterized in that, The traffic of the multiple links that the first communication device determines to send messages to the third communication device based on the first notification information includes: The first communication device determines the traffic of multiple links that send messages to the third communication device based on the total traffic and the topology information of the multi-layer network system.
4. The method according to any one of claims 1 to 3, characterized in that, The first notification information is sent from the fourth communication device located at the N+1th layer to the first communication device.
5. The method according to any one of claims 1 to 4, characterized in that, The first notification information includes the identifier of the first faulty link; and / or, the first notification information includes the identifier of the second communication device and the identifier of the fifth communication device located at the N+1 layer, wherein the first faulty link is the link between the second communication device and the fifth communication device.
6. The method according to any one of claims 1 to 5, characterized in that, The first notification information includes the identifier of the third communication device.
7. The method according to any one of claims 1 to 6, characterized in that, The first notification information is carried via a control message or a data message.
8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: The first communication device receives a second notification message, which is used to indicate a second faulty link in the multilayer network system. The second faulty link is the link between the second communication device and the N+1th layer. And / or, The method further includes: The first communication device receives a third notification message, which is used to indicate a third faulty link in the multi-layer network system. The third faulty link is a link between the sixth communication device located at the Nth layer and the N+1th layer, and the sixth communication device sends traffic to the third communication device through the N+1th layer.
9. The method according to any one of claims 1 to 8, characterized in that, The method further includes: The first communication device determines the traffic allocation ratio of multiple links that send messages to the third communication device based on the first notification information.
10. The method according to claim 9, characterized in that, The method further includes: The first communication device adjusts the number of entries in the flow table according to the flow allocation ratio.
11. The method according to any one of claims 1 to 10, characterized in that, In the multi-layer network system, the communication device located at the Nth layer is a rack-top TOR switch, and the communication device located at the N+1th layer is a spine switch.
12. A flow allocation method, characterized in that, The method is applied to a multi-layer network system, wherein the first communication device, the second communication device, and the third communication device are located at the Nth layer of the multi-layer network system, and the fourth communication device is located at the (N+1)th layer of the multi-layer network system, where N is a positive integer; the method includes: The fourth communication device receives a first notification message sent by the second communication device. The first notification message is used to indicate a first faulty link in the multilayer network system. The first faulty link is the link between the second communication device and the N+1 layer. The second communication device sends traffic to the third communication device through the N+1 layer. The fourth communication device sends a second notification to the first communication device based on the first notification information, so that the first communication device determines the traffic of multiple links that send messages to the third communication device based on the second notification information, and the second notification information is used to indicate the first faulty link.
13. The method according to claim 12, characterized in that, Both the first notification information and the second notification information include the total traffic sent by the second communication device to the third communication device.
14. The method according to claim 12 or 13, characterized in that, Both the first notification information and the second notification information include the identifier of the first faulty link; and / or, both the first notification information and the second notification information include the identifier of the second communication device and the identifier of the fifth communication device located at the N+1 layer, wherein the first faulty link is the link between the second communication device and the fifth communication device.
15. The method according to any one of claims 12 to 14, characterized in that, Both the first and second notification messages are carried via control messages, and both include the identifier of the third communication device.
16. The method according to any one of claims 12 to 14, characterized in that, Both the first and second notification information are carried via data packets, and the second notification information includes the identifier of the third communication device.
17. The method according to any one of claims 12 to 14, characterized in that, The first notification information is carried via a data packet, and the second notification information is carried via a control packet. The second notification information includes the identifier of the third communication device.
18. The method according to any one of claims 12 to 17, characterized in that, The method further includes: The fourth communication device receives the third notification information sent by the second communication device, and sends the fourth notification information to the first communication device according to the third notification information. Both the third notification information and the fourth notification information are used to indicate the second fault link in the multilayer network system. The second fault link is the link between the second communication device and the N+1 layer. And / or, The method further includes: The fourth communication device receives the fifth notification information sent by the second communication device and sends the sixth notification information to the first communication device according to the fifth notification information. Both the fifth and sixth notification information are used to indicate the third fault link in the multi-layer network system. The third fault link is the link between the sixth communication device located at the Nth layer and the N+1th layer. The sixth communication device sends traffic to the third communication device through the N+1th layer.
19. The method according to any one of claims 12 to 18, characterized in that, In the multi-layer network system, the communication device located at the Nth layer is a rack-top TOR switch, and the communication device located at the N+1th layer is a spine switch.
20. A communication device, characterized in that, The communication device is used to perform the method as described in any one of claims 1 to 19.
21. A communication system, characterized in that, The communication system includes a communication device for performing the method as described in any one of claims 1 to 11 and a communication device for performing the method as described in any one of claims 12 to 19.
22. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed by a computer, cause the method as described in any one of claims 1 to 19 to be implemented.
23. A computer program product, characterized in that, The computer program product includes program instructions that, when executed, cause the method as described in any one of claims 1 to 19 to be implemented.
