Flow forwarding method and device
By receiving and parsing the routing information of remote leaf nodes, determining and selecting the appropriate next hop, and generating forwarding entries for traffic forwarding, it solves the problem of traffic congestion in the AI large model network and achieves reasonable distribution and forwarding of traffic.
Patent Information
- Application Number
- CN202410853226.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-06-27
AI Technical Summary
Due to periodic fluctuations in traffic in AI large model networks, traffic collisions and congestion are prone to occur, leading to traffic congestion.
By receiving the routing information published by the remote leaf node, the next hop list of the computing power node is determined, and the target next hop is selected according to the routing policy index, and a forwarding table entry is generated for traffic forwarding to ensure the same computing power of different leaf nodes. The target next hops of nodes are the same, and the target next hops of nodes with different computing power on the same leaf node are different to avoid traffic congestion on the downlink port of the Spine node.
It effectively reduces the probability of traffic congestion in the AI large model network, ensures reasonable forwarding of traffic, and avoids traffic congestion on the downlink port of the Spine node.
Smart Images

Figure CN118784573A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of AI (artificial intelligence) large models and network communication technology, and in particular to a traffic forwarding method and device. Background Art
[0002] AI large model network refers to the computing and communication infrastructure that supports the training and operation of large-scale artificial intelligence models.
[0003] The AI large model network has the characteristics of periodic fluctuations in traffic and large data traffic. Therefore, traffic collisions are prone to occur in actual networking.
[0004] For example, when multiple computing nodes send traffic to the computing nodes under the same Leaf node at the same time, traffic collision is likely to occur at the downstream port where the Spine node connects to the Leaf node, causing traffic congestion.
[0005] How to reduce the probability of traffic congestion in large AI model networks has become a technical problem that needs to be solved urgently. Summary of the invention
[0006] The present invention provides a traffic forwarding method and device to solve the problem of traffic congestion that is prone to occur in existing AI large model networks.
[0007] According to a first aspect of an embodiment of the present invention, a traffic forwarding method is provided, including:
[0008] Receive routing information published by a remote leaf node; wherein the routing information includes the host route of the computing node connected to the remote leaf node and the routing strategy index of the computing node;
[0009] Determine the next hop list corresponding to the computing node connected to the remote leaf node based on the received routing information;
[0010] For any computing power node connected to the remote leaf node, select the target next hop from the next hop list corresponding to the computing power node according to the routing strategy index of the computing power node; wherein, for different leaf nodes, the target next hop corresponding to the same computing power node connected to the same remote leaf node is the same; for the same leaf node, the target next hop corresponding to different computing power nodes connected to the same remote leaf node is different;
[0011] Based on the host route of the computing power node and the target next hop corresponding to the computing power node, a forwarding table entry of the computing power node is generated, and the traffic sent to the computing power node is forwarded based on the forwarding table entry.
[0012] According to a second aspect of an embodiment of the present invention, a traffic forwarding device is provided, including:
[0013] A receiving unit, configured to receive routing information published by a remote leaf node; wherein the routing information includes a host route of a computing node to which the remote leaf node is connected and a routing strategy index of the computing node;
[0014] A determination unit, configured to determine, based on the received routing information, a next hop list corresponding to the computing power node to which the remote leaf node is connected;
[0015] A selection unit is used to select a target next hop from a next hop list corresponding to any computing power node connected to the remote leaf node according to the routing strategy index of the computing power node; wherein, for different leaf nodes, the target next hop corresponding to the same computing power node connected to the same remote leaf node is the same; for the same leaf node, the target next hops corresponding to different computing power nodes connected to the same remote leaf node are different;
[0016] A forwarding control unit is used to generate a forwarding table entry for the computing power node based on the host route of the computing power node and the target next hop corresponding to the computing power node, and forward the traffic sent to the computing power node based on the forwarding table entry.
[0017] By applying the technical solution disclosed in the present invention, by receiving the routing information published by the remote leaf node, the next hop list corresponding to the computing power node connected to the remote leaf node is determined according to the received routing information. For any computing power node connected to the remote leaf node, the target next hop is selected from the next hop list corresponding to the computing power node according to the routing policy index of the computing power node, and the forwarding table entry of the computing power node is generated according to the host route of the computing power node and the target next hop corresponding to the computing power node. Then, the traffic sent to the computing power node can be forwarded according to the forwarding table entry. By setting the routing policy index for the computing power node and selecting the target next hop for the computing power node according to the routing policy index, for different leaf nodes, the target next hop corresponding to the same computing power node connected to the same remote leaf node is the same, and the target next hops corresponding to different computing power nodes connected under the same remote leaf node are different, thereby reducing the probability of traffic congestion in the AI large model network. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a flow chart of a traffic forwarding method provided by an embodiment of the present invention;
[0019] Figure 2 is a schematic diagram of a specific application scenario provided by an embodiment of the present invention;
[0020] Figure 3 This is a schematic diagram of the entire network topology information maintained by a Leaf node provided in an embodiment of the present invention;
[0021] Figure 4 This is a flow forwarding schematic diagram provided by an embodiment of the present invention;
[0022] Figure 5 It is a structural schematic diagram of a traffic forwarding device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention and to make the above-mentioned purposes, features and advantages of the embodiments of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings.
[0024] See also Figure 1 , which is a flow chart of a traffic forwarding method provided in an embodiment of the present invention, wherein the traffic forwarding method can be applied to leaf nodes in an AI large model network based on a Leaf-Spine network architecture, such as Figure 1 As shown, the traffic forwarding method may include the following steps:
[0025] Step 101: Receive routing information published by a remote leaf node; wherein the routing information includes the host route of the computing node connected to the remote leaf node and the routing strategy index of the computing node.
[0026] In an embodiment of the present invention, when a Leaf node learns the host routing information of a locally connected computing node, it can publish the host routing information of the computing node to a remote Leaf node.
[0027] In an embodiment of the present invention, in order to more reasonably select the traffic forwarding link, a routing policy index (also called an extended policy index) can be set for any computing power node connected to any Leaf node. The routing policy index is used to assist in selecting the forwarding link for the traffic sent to the computing power node.
[0028] When a leaf node advertises the host route of a computing node to a remote leaf node, it can also advertise the routing policy index of the computing node to the remote leaf node.
[0029] Step 102: Determine the next hop list corresponding to the computing node connected to the remote leaf node based on the received routing information.
[0030] In an embodiment of the present invention, the Leaf node can obtain the host route of the computing power node connected to the remote Leaf node, the routing policy index of the computing power node, and the next hop list corresponding to the computing power node through routing resolution based on the routing information published by the received remote Leaf node.
[0031] Step 103: For any computing node connected to a remote leaf node, select a target next hop from the next hop list corresponding to the computing node based on the routing strategy index of the computing node; wherein, for different leaf nodes, the target next hop corresponding to the same computing node connected to the same remote leaf node is the same; for the same leaf node, the target next hop corresponding to different computing nodes connected to the same remote leaf node is different.
[0032] In an embodiment of the present invention, in order to reduce the probability of traffic congestion in the AI large model network, when selecting the next hop (which can be called the target next hop) for the computing power node connected to the remote Leaf node, the selection can be made based on the routing strategy index of the computing power node, and the next hop can be selected based on the principle that for different Leaf nodes, the target next hop corresponding to the same computing power node connected to the same remote Leaf node is the same; for the same leaf node, the target next hops corresponding to different computing power nodes connected to the same remote Leaf node are different.
[0033] Because for AI large model networks, usually there will not be multiple computing nodes accessing the same computing node under the same remote Leaf node at the same time, therefore, for different Leaf nodes, the target next hop corresponding to the same computing node connected to the same remote Leaf node is the same; for the same leaf node, the target next hop corresponding to different computing nodes connected to the same remote Leaf node is different, the traffic congestion of the downstream port of the Spine node can be effectively avoided.
[0034] Step 104: Generate a forwarding table entry for the computing power node based on the host route of the computing power node and the target next hop corresponding to the computing power node, and forward the traffic sent to the computing power node based on the forwarding table entry.
[0035] In an embodiment of the present invention, when a target next hop is selected for a computing power node in the above manner, a forwarding table entry of the computing power node can be generated based on the host route of the computing power node and the target next hop corresponding to the computing power node.
[0036] When a forwarding table entry of the computing power node is generated, the traffic sent to the computing power node can be forwarded according to the forwarding table entry.
[0037] For example, the forwarding table entry may be sent to a forwarding engine, which forwards the traffic sent to the computing power node based on the forwarding table entry.
[0038] It can be seen that in Figure 1In the method flow shown, by receiving the routing information published by the remote leaf node, the next hop list corresponding to the computing power node connected to the remote leaf node is determined based on the received routing information. For any computing power node connected to the remote leaf node, the target next hop is selected from the next hop list corresponding to the computing power node based on the routing policy index of the computing power node, and the forwarding table entry of the computing power node is generated based on the host route of the computing power node and the target next hop corresponding to the computing power node. Then, the traffic sent to the computing power node can be forwarded based on the forwarding table entry. By setting the routing policy index for the computing power node and selecting the target next hop for the computing power node based on the routing policy index, for different leaf nodes, the target next hop corresponding to the same computing power node connected to the same remote leaf node is the same, and the target next hops corresponding to different computing power nodes connected under the same remote leaf node are different, thereby reducing the probability of traffic congestion in the AI large model network.
[0039] In order to enable those skilled in the art to better understand the technical solution provided by the embodiment of the present invention, the technical solution provided by the embodiment of the present invention is described below in conjunction with specific application scenarios.
[0040] See also Figure 2 , which is a schematic diagram of a specific application scenario provided by an embodiment of the present invention, such as Figure 2 As shown, in this application scenario, Spine nodes 201-203 are connected through different ports (not in Figure 2 ) is connected to Leaf nodes 301 to 304, and Leaf nodes 301 to 304 are connected through different ports (not shown in Figure 2 As shown in the figure, it is connected to Spine nodes 201 to 203, and each Leaf node is connected to multiple computing nodes through different ports.
[0041] For example, Figure 2 As shown, Leaf node 301 is connected to computing nodes 3011-3013 through different ports, Leaf node 302 is connected to computing nodes 3021-3023 through different ports, and Leaf node 303 is connected to computing nodes 3031-3033 through different ports.
[0042] In this embodiment, the computing power node can be represented by a GPU (Graphics Processing Unit).
[0043] In this embodiment, according to the host route corresponding to the destination GPU, a unique global downstream port can be allocated to the traffic from the entire network to each GPU on the spine node.
[0044] To achieve the above functions, for the Leaf node, it generates the corresponding host route based on the ARP corresponding to the local GPU. When publishing the route, the routing policy index of the local GPU can be carried in the published routing information.
[0045] Exemplarily, the routing strategy index may include a main index and a sub-index.
[0046] The sub-index is used to identify the target port, and the main index is used to identify the Leaf node.
[0047] Optionally, the primary index may be the device number of the entire network (the number of the Leaf node), for example, the number of Leaf node 301 may be 1, the number of Leaf node 302 may be 2, and the number of Leaf node 3 may be 3. The sub-index may be the port number of the GPU connected to the Leaf node. For example, for Leaf node 301, the port numbers of its ports connected to GPUs 3011 to 3013 may be 1 to 3 in sequence; for Leaf node 302, the port numbers of its ports connected to GPUs 3021 to 3023 may be 1 to 3 in sequence; for Leaf node 303, the port numbers of its ports connected to GPUs 3031 to 3033 may be 1 to 3 in sequence; for Leaf node 304, the port numbers of its ports connected to GPUs 3041 to 3043 may be 1 to 3 in sequence.
[0048] It should be noted that the GPU routing strategy index can also be manually configured.
[0049] The host routes and routing policy indexes of GPUs 3011 - 3013 connected to leaf node 301 may be as shown in Table 1-1.
[0050] Table 1-1
[0051]
[0052]
[0053] The host routes and routing policy indexes of the GPUs 3021 - 3023 connected to the leaf node 302 may be as shown in Table 1-2.
[0054] Table 1-2
[0055] Route Prefix Route Mask Routing strategy index 20.0.0.1 32 2:1 20.0.0.2 32 2:2 20.0.0.3 32 2:3
[0056] The host routes and path selection policy indexes of GPUs 3031 - 3033 connected to leaf node 303 are shown in Table 1-3.
[0057] Table 1-3
[0058] Route Prefix Route Mask Routing strategy index 30.0.0.1 32 3:1 30.0.0.2 32 3:2 30.0.0.3 32 3:3
[0059] The host routes and path selection policy indexes of GPUs 3041 - 3043 connected to leaf node 304 are shown in Table 1-4.
[0060] Table 1-4
[0061] Route Prefix Route Mask Routing strategy index 40.0.0.1 32 4:1 40.0.0.2 32 4:2 40.0.0.3 32 4:3
[0062] In Tables 1-1 to 1-4, the routing strategy index indicates the leaf node port to which each GPU is connected. A routing index of 2:1 indicates that GPU 3021 is connected to port 2 of leaf node 302.
[0063] When leaf nodes 301-304 publish BGP (Border Gateway Protocol) routes, they can carry the GPU routing policy index through the BGP private extended community.
[0064] Leaf nodes 301-304 publish OSPF (Open Shortest Path First) routes and can carry the GPU routing policy index through extended TLV.
[0065] The Leaf node receives the routing information published by the remote Leaf node, parses the received routing information, and obtains the host route, routing policy index, and next hop list of the computing power node connected to the remote Leaf node.
[0066] The information of the route parsed by the leaf node 301 is shown in Table 2.
[0067] Table 2
[0068] Route Prefix Route Mask Routing strategy index Next hop list 20.0.0.1 32 2:1 2.0.0.1,2.0.0.2,2.0.0.3 20.0.0.2 32 2:2 2.0.0.1,2.0.0.2,2.0.0.3 20.0.0.3 32 2:3 2.0.0.1,2.0.0.2,2.0.0.3 30.0.0.1 32 3:1 2.0.0.1,2.0.0.2,2.0.0.3 30.0.0.2 32 3:2 2.0.0.1,2.0.0.2,2.0.0.3 30.0.0.3 32 3:3 2.0.0.1,2.0.0.2,2.0.0.3 40.0.0.1 32 4:1 2.0.0.1,2.0.0.2,2.0.0.3 40.0.0.2 32 4:2 2.0.0.1,2.0.0.2,2.0.0.3 40.0.0.3 32 4:3 2.0.0.1,2.0.0.2,2.0.0.3
[0069] Among them, 30.0.0.1 to 30.0.0.3 are the host routes of GPUs 3031 to 3033 connected to Leaf node 303, and the routing policy index is 3:X, indicating that the GPU is connected through the port numbered X (such as 1, 2 or 3) on Leaf node numbered 3 (that is, the above Leaf node 303), that is, GPU 3031, GPU 3032 or GPU 3033. The next hops 2.0.0.1, 2.0.0.2, and 2.0.0.3 correspond to Spine nodes 201 to 203, respectively.
[0070] In this embodiment, in addition to maintaining the above routing information, the Leaf node also maintains the directly connected neighbor information locally.
[0071] For example, taking Leaf node 301 as an example, the directly connected neighbor information may be as shown in Table 3.
[0072] Table 3
[0073] Neighbor route id Neighbor Next Hop 1 2.0.0.1 2 2.0.0.2 3 2.0.0.3
[0074] In this embodiment, based on the routing protocol, the Leaf node also maintains the entire network topology information.
[0075] For example, the entire network topology information maintained by the Leaf node can be as follows: Figure 3 As shown, the dotted line indicates that the link does not exist or is faulty.
[0076] like Figure 3 As shown, there is a fault in the link between the spine node 201 and the leaf node 302.
[0077] In this embodiment, when selecting a route for a GPU, Leaf nodes 301 - 304 select a route in the network that reaches a GPU connected to a remote Leaf node based on the same routing strategy.
[0078] For example, taking Leaf node 301 as an example, assuming that Leaf node 301 receives the route of 20.0.0.2, the routing information includes prefix 20.0.0.2, mask 32, policy index 1:2, Leaf1 neighbor list is 2.0.0.1, 2.0.0.2, 2.0.0.3, and the next hop list sorted according to the preset sorting strategy (taking sorting from small to large as an example) is 2.0.0.1, 2.0.0.2, 2.0.0.3, the sub-index of the policy index is 2, and the corresponding routing strategy is to select the second IP address (2.0.0.2) in the sorted neighbor next hop. If the neighbor IP address exists in the next hop list, it is selected as the target next hop, and a forwarding table entry is generated and sent to the forwarding engine; if the neighbor IP address does not exist in the next hop list, the backup target next hop is selected for forwarding, and the route calculation is completed and the relevant table entries are sent to the forwarding engine.
[0079] It should be noted that for the scenario where the port number of the port connected to the computing node on the Leaf node exceeds the number of neighbor next hops, for example, the number of ports connected to the computing node on the Leaf node exceeds the number of neighbor next hops, the sorting and sub-index matching may include: taking the sub-index modulo the number of neighbor next hops, and the sorting is the same as the modulo result; wherein, when the result of taking the sub-index modulo the number of neighbor next hops is 0, the modulo result is set to the sub-index itself.
[0080] In addition, for any computing power node, when the target neighbor next hop is determined in the above manner, if the target neighbor next hop is not included in the next hop list corresponding to the computing power node, the backup target neighbor next hop can be determined and used as the backup target next hop. The specific implementation method can be found in the relevant description of the abnormal situation of the target next hop below, and the embodiments of the present invention will not be repeated here.
[0081] In this embodiment, based on Figure 2 In the network shown, taking Leaf node 301 as an example, the target next hop information may be as shown in Table 4:
[0082] Table 4
[0083] Route Prefix Route Mask Routing strategy index Next hop 20.0.0.1 32 2:1 2.0.0.1 20.0.0.2 32 2:2 2.0.0.2 20.0.0.3 32 2:3 2.0.0.3 30.0.0.1 32 3:1 2.0.0.1 30.0.0.2 32 3:2 2.0.0.2 30.0.0.3 32 3:3 2.0.0.3 40.0.0.1 32 4:1 2.0.0.1 40.0.0.2 32 4:2 2.0.0.2 40.0.0.3 32 4:3 2.0.0.3
[0084] As shown in Table 4, for the same Leaf node, the target next hops corresponding to the GPUs connected to the ports with the same port number under different remote Leaf nodes are the same. For example, the target next hop corresponding to the GPU connected to the port with port number 1 on Leaf node 302 (i.e., GPU3021), the target next hop corresponding to the GPU connected to the port with port number 1 on Leaf node 303 (i.e., GPU3031), and the target next hop corresponding to the GPU connected to the port with port number 1 on Leaf node 304 (i.e., GPU3041) are the same, which is 2.0.0.1.
[0085] The GPUs connected to the ports with the same port number on the same remote Leaf node have different target next hops. For example, the GPU (i.e., GPU 3021) connected to the port with port number 1 on Leaf node 302 has a target next hop of 2.0.0.1, and the GPU (i.e., GPU 3022) connected to the port with port number 2 on Leaf node 302 has a target next hop of 2.0.0.2.
[0086] based on Figure 2 In the network shown, taking Leaf node 302 as an example, for remote Leaf node 303, the target next hop information may be as shown in Table 5:
[0087] Table 5
[0088] Route Prefix Route Mask Routing strategy index Next hop 30.0.0.1 32 3:1 2.0.0.1 30.0.0.2 32 3:2 2.0.0.2 30.0.0.3 32 3:3 2.0.0.3
[0089] As shown in Tables 4 and 5, for different Leaf nodes, the target next hop corresponding to the same GPU connected to the same remote Leaf node is the same.
[0090] For example, for Leaf node 301, Leaf node 302, and Leaf node 304, the target next hop corresponding to GPU 3031 connected to Leaf node 303 is 2.0.0.1.
[0091] For Leaf node 301 , Leaf node 302 , and Leaf node 304 , the target next hop corresponding to GPU 3032 connected to Leaf node 303 is 2.0.0.2.
[0092] For Leaf node 301 , Leaf node 302 , and Leaf node 304 , the target next hop corresponding to GPU 3032 connected to Leaf node 303 is 2.0.0.2.
[0093] For Leaf node 301, Leaf node 302, and Leaf node 304, the target next hop corresponding to GPU 3033 connected to Leaf node 303 is 2.0.0.3.
[0094] Based on the above routing strategy, different computing nodes under the same Leaf node have different target next hops corresponding to each remote Leaf node. However, in the AI large model network, usually multiple computing nodes do not access the same computing node under the same remote Leaf node at the same time. Therefore, the target next hop sent by GPUs under different Leaf nodes to the same GPU connected to the same remote Leaf node can be set to the same.
[0095] Through the above implementation method, the probability of traffic congestion at the spine node can be effectively reduced.
[0096] For example, Figure 2 Taking the network shown as an example, assuming that at a certain moment, GPU3011 connected to Leaf node 301 sends traffic to GPU3031 connected to Leaf303 at line speed, and GPU3022 connected to Leaf node 302 sends traffic to GPU3032 connected to Leaf303 at line speed, then according to the above routing strategy, the next hop of the traffic sent from GPU3011 to GPU3031 is 2.0.0.1 (corresponding to Spine node 201), and the next hop of the traffic sent from GPU3022 to GPU3032 is 2.0.0.2 (corresponding to Spine node 202), that is, the traffic of different GPUs of the same Leaf node accessed by different remote Leaf nodes can be forwarded through different Spine nodes, which effectively reduces the probability of traffic congestion at the downstream port of the Spine node (the port connected to the Leaf node). The traffic forwarding diagram can be shown as follows Figure 4 shown.
[0097] Among them, Figure 4As shown, the forwarding path of the traffic sent from GPU3011 to GPU3031 can be shown as the solid arrow in the figure; the forwarding path of the traffic sent from GPU3022 to GPU3032 can be shown as the dotted arrow in the figure.
[0098] In this embodiment, when a link failure occurs, a backup link can be switched.
[0099] Among them, the sub-index and main index corresponding to the computing power node can be used to select the backup target next hop from the next hop list corresponding to the computing power node.
[0100] Assuming that the link connecting Leaf node 301 to Spine node 201 fails, the traffic sent by Leaf node 301 to the GPUs (such as GPU3021, GPU3031, GPU3041) connected to the port numbered 1 on each remote Leaf node needs to be switched to a backup link.
[0101] When performing backup link switching, if the traffic sent by Leaf node 301 to the GPU connected to the port numbered 1 on each remote Leaf node is all switched to the same backup link, for example, the next hop is all switched to the next hop corresponding to Spine node 202, it is easy to cause the traffic sent by Leaf node 301 to the GPU connected to the port numbered 1 on each remote Leaf node to be congested with the traffic sent by Leaf node 301 to the GPU connected to the port numbered 2 on each remote Leaf node (such as GPU3022, GPU3032, GPU3042) in the upstream. Therefore, it is necessary to disperse the traffic sent by Leaf node 301 to the GPU connected to the port numbered 1 on each remote Leaf node as much as possible.
[0102] Optionally, for the same Leaf node, the computing nodes connected to the ports with the same port number on different remote Leaf nodes have different corresponding backup target next hops.
[0103] When the number of optional backup next hops is greater than or equal to the number of computing nodes connected to a single Leaf node, for the same Leaf node, the computing nodes connected to the ports with the same port numbers on different remote Leaf nodes have different corresponding backup target next hops.
[0104] In this embodiment, in the event of a link failure connecting Leaf node 301 to Spine node 201, the backup target next hop can be determined based on the main index and sub-index in the routing strategy index corresponding to the GPU connected to the port numbered 1 on each remote Leaf node.
[0105] Optionally, a new index may be obtained by adding the main index and the sub-index in the routing policy index, and the backup target next hop may be determined based on the new index.
[0106] Taking the link failure between Leaf node 301 and Spine node 201 as an example, for Leaf node 301, the information of the GPU of the corresponding remote Leaf node (that is, the GPU of Spine node 201 corresponding to the target next hop) can be shown in Table 6:
[0107] Table 6
[0108] Route Prefix Route Mask Routing strategy index Next hop list 20.0.0.1 32 2:1 2.0.0.2,2.0.0.3 30.0.0.1 32 3:1 2.0.0.2,2.0.0.3 40.0.0.1 32 4:1 2.0.0.2,2.0.0.3
[0109] The directly connected neighbor information maintained by the leaf node 301 may be as shown in Table 3.
[0110] For the routing prefix 20.0.0.1, the neighbor next hop (i.e., 2.0.0.3) that matches the sum of the main index and the sub-index (1+2=3) can be selected from the sorted neighbor next hops according to the main index (2) and the sub-index (1) of the routing policy index as the backup target neighbor next hop. Since the backup target neighbor next hop exists in the next hop list, the backup target neighbor next hop can be used as the backup target next hop.
[0111] For the routing prefix 30.0.0.1, the neighbor next hop that matches the sum of the main index and the sub-index (1) of the routing policy index can be selected from the sorted neighbor next hops as the backup target neighbor next hop. Since 4>3 (the number of neighbor next hops), the backup target neighbor next hop can be selected from the sorted neighbor next hops based on the result of 4 modulo 3 (i.e. 1), and the neighbor next hop 2.0.0.1 is obtained. This neighbor next hop is the same as the target next hop. The next neighbor next hop of this neighbor next hop (i.e. 2.0.0.2) is determined as the backup target neighbor next hop. Since this backup target neighbor next hop exists in the next hop list, the backup target neighbor next hop can be used as the backup target next hop.
[0112] For the routing prefix 30.0.0.1, the neighbor next hop that matches the sum of the main index and the sub-index (1) of the routing policy index can be selected from the sorted neighbor next hops as the backup target neighbor next hop. Since 5>3 (the number of neighbor next hops), the backup target neighbor next hop can be selected from the sorted neighbor next hops based on the result of 5 modulo 3 (i.e., 2), and the neighbor next hop 2.0.0.2 is obtained. Since the backup target neighbor next hop exists in the next hop list, the backup target neighbor next hop can be used as the backup target next hop.
[0113] Correspondingly, for the Leaf node 301, the backup target next hop corresponding to the GPU connected to the port numbered 1 on each remote Leaf node can be as shown in Table 7:
[0114] Table 7
[0115] Route Prefix Route Mask Routing strategy index Next hop 20.0.0.1 32 2:1 2.0.0.1→2.0.0.3 30.0.0.1 32 3:1 2.0.0.1→2.0.0.2 40.0.0.1 32 4:1 2.0.0.1→2.0.0.2
[0116] It should be noted that, in an embodiment of the present invention, when selecting a backup target neighbor next hop, if the selected backup target neighbor next hop is the same as the selected target neighbor next hop (the neighbor next hop corresponding to the abnormal target next hop), the backup target neighbor next hop can be reselected, for example, the next neighbor next hop of the currently selected backup target neighbor next hop can be used as the backup target neighbor next hop.
[0117] In addition, when the backup target neighbor next hop is determined in the above manner and the backup target neighbor next hop is not included in the next hop list corresponding to the computing power node, the backup target neighbor next hop can be reselected. For example, the next neighbor next hop of the backup target neighbor next hop among the neighbor next hops sorted according to the preset sorting strategy can be used as the backup target neighbor next hop.
[0118] In this embodiment, for any GPU, when the target next hop corresponding to the GPU recovers abnormally, the next hop switching back process can be performed.
[0119] Still taking Leaf node 301 as an example, assuming that the link between Leaf node 301 and Spine 201 is restored after failure, then after failure recovery, for Leaf node 301, the target next hop corresponding to the GPU connected to the port numbered 1 on each remote Leaf node can be as shown in Table 8:
[0120] Table 8
[0121] Route Prefix Route Mask Routing strategy index Next hop 20.0.0.1 32 2:1 2.0.0.1←2.0.0.3 30.0.0.1 32 3:1 2.0.0.1←2.0.0.2 40.0.0.1 32 4:1 2.0.0.1←2.0.0.2
[0122] See also Figure 5 , is a schematic diagram of the structure of a traffic forwarding device provided in an embodiment of the present invention, wherein the traffic forwarding device can be deployed in a leaf node in an AI large model network based on a leaf-spine network architecture, such as Figure 5 As shown, the traffic forwarding device may include:
[0123] The receiving unit 510 is used to receive the routing information published by the remote leaf node; wherein the routing information includes the host route of the computing node connected to the remote leaf node and the routing strategy index of the computing node;
[0124] A determination unit 520, configured to determine a next hop list corresponding to a computing node to which a remote leaf node is connected based on the received routing information;
[0125] The selection unit 530 is used to select a target next hop from the next hop list corresponding to the computing power node for any computing power node connected to the remote leaf node according to the routing strategy index of the computing power node; wherein, for different leaf nodes, the target next hop corresponding to the same computing power node connected to the same remote leaf node is the same; for the same leaf node, the target next hop corresponding to different computing power nodes connected to the same remote leaf node is different;
[0126] The forwarding control unit 540 is used to generate a forwarding table entry of the computing power node based on the host route of the computing power node and the target next hop corresponding to the computing power node, and forward the traffic sent to the computing power node based on the forwarding table entry.
[0127] In some embodiments, for any computing power node, the routing strategy index corresponding to the computing power node includes a sub-index for identifying a target port, where the target port is a port on a target leaf node connected to the computing power node, and the target leaf node is a leaf node connected to the computing power node;
[0128] The selection unit 530 selects a target next hop from a next hop list corresponding to the computing power node according to the routing strategy index of the computing power node, including:
[0129] According to the sub-index corresponding to the computing power node, select the target neighbor next hop whose sorting matches the sub-index from the neighbor next hops sorted according to the preset sorting strategy;
[0130] When the next hop list corresponding to the computing power node includes the target neighbor next hop, the target neighbor next hop is determined as the target next hop;
[0131] Among them, for the same leaf node, the computing nodes connected to the ports with the same port number on different remote leaf nodes have the same corresponding target neighbor next hop.
[0132] In some embodiments, the sub-index is the port number of the target port.
[0133] In some embodiments, for any computing power node, the routing strategy index corresponding to the computing power node includes a primary index for identifying a target leaf node;
[0134] The selection unit 530 is further configured to select a backup target next hop from the next hop list corresponding to the computing power node according to the sub-index and main index corresponding to the computing power node for any computing power node when an abnormality occurs in the target next hop corresponding to the computing power node; wherein, for the same leaf node, the computing power nodes connected to the ports with the same port numbers on different remote leaf nodes have different corresponding backup target next hops;
[0135] The forwarding control unit 540 is also used to generate a backup forwarding table entry for the computing power node based on the host route of the computing power node and the backup target next hop corresponding to the computing power node, and forward the traffic sent to the computing power node based on the backup forwarding table entry.
[0136] In some embodiments, the selection unit 530 selects a backup target next hop from the next hop list corresponding to the computing power node according to the sub-index and the main index corresponding to the computing power node, including:
[0137] According to the sub-index and main index corresponding to the computing power node, select a backup target neighbor next hop whose sorting matches the sum of the sub-index and the main index from the neighbor next hops sorted according to the preset sorting strategy;
[0138] When the next hop list corresponding to the computing power node includes the backup target neighbor next hop, the backup target neighbor next hop is determined as the backup target next hop.
[0139] In some embodiments, the forwarding control unit 540 is also used to generate a forwarding table entry for any computing power node based on the host route of the computing power node and the target next hop corresponding to the computing power node when the target next hop corresponding to the computing power node is abnormally recovered, and forward the traffic sent to the computing power node based on the forwarding table entry.
[0140] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0141] As for the device embodiment, since it basically corresponds to the method embodiment, the relevant parts may refer to the partial description of the method embodiment.
Claims
1. A traffic forwarding method, characterized in that: include: Receive routing information published by a remote leaf node; wherein the routing information includes the host route of the computing node connected to the remote leaf node and the routing strategy index of the computing node; Determine the next hop list corresponding to the computing node connected to the remote leaf node based on the received routing information; For any computing power node connected to the remote leaf node, select the target next hop from the next hop list corresponding to the computing power node according to the routing strategy index of the computing power node; wherein, for different leaf nodes, the target next hop corresponding to the same computing power node connected to the same remote leaf node is the same; for the same leaf node, the target next hop corresponding to different computing power nodes connected to the same remote leaf node is different; Based on the host route of the computing power node and the target next hop corresponding to the computing power node, a forwarding table entry of the computing power node is generated, and the traffic sent to the computing power node is forwarded based on the forwarding table entry.
2. The method according to claim 1, characterized in that For any computing power node, the routing strategy index corresponding to the computing power node includes a sub-index for identifying a target port, where the target port is a port on a target leaf node connected to the computing power node, and the target leaf node is a leaf node connected to the computing power node; The step of selecting a target next hop from a next hop list corresponding to the computing power node according to the routing strategy index of the computing power node includes: According to the sub-index corresponding to the computing power node, select the target neighbor next hop whose sorting matches the sub-index from the neighbor next hops sorted according to the preset sorting strategy; When the next hop list corresponding to the computing power node includes the target neighbor next hop, determining the target neighbor next hop as the target next hop; Among them, for the same leaf node, the computing nodes connected to the ports with the same port number on different remote leaf nodes have the same corresponding target neighbor next hop.
3. The method according to claim 2, characterized in that The sub-index is the port number of the target port.
4. The method according to claim 2, characterized in that: For any computing power node, the routing strategy index corresponding to the computing power node includes a primary index for identifying a target leaf node; The method further comprises: For any computing power node, if the target next hop corresponding to the computing power node is abnormal, a backup target next hop is selected from the next hop list corresponding to the computing power node according to the sub-index and main index corresponding to the computing power node; wherein, for the same leaf node, the computing power nodes connected to the ports with the same port number on different remote leaf nodes have different corresponding backup target next hops; Based on the host route of the computing power node and the next hop of the backup target corresponding to the computing power node, a backup forwarding table entry of the computing power node is generated, and the traffic sent to the computing power node is forwarded based on the backup forwarding table entry.
5. The method according to claim 4, characterized in that The selecting a backup target next hop from a next hop list corresponding to the computing power node according to the sub-index and the main index corresponding to the computing power node includes: According to the sub-index and main index corresponding to the computing power node, select a backup target neighbor next hop whose sorting matches the sum of the sub-index and the main index from the neighbor next hops sorted according to the preset sorting strategy; When the next hop list corresponding to the computing power node includes the backup target neighbor next hop, the backup target neighbor next hop is determined as the backup target next hop.
6. The method according to claim 4, characterized in that The method further comprises: For any computing power node, when the target next hop corresponding to the computing power node recovers abnormally, a forwarding table entry of the computing power node is generated based on the host route of the computing power node and the target next hop corresponding to the computing power node, and the traffic sent to the computing power node is forwarded based on the forwarding table entry.
7. A traffic forwarding device, characterized in that: include: A receiving unit, configured to receive routing information published by a remote leaf node; wherein the routing information includes a host route of a computing node to which the remote leaf node is connected and a routing strategy index of the computing node; A determination unit, configured to determine, based on the received routing information, a next hop list corresponding to the computing power node to which the remote leaf node is connected; A selection unit is used to select a target next hop from a next hop list corresponding to any computing power node connected to the remote leaf node according to the routing strategy index of the computing power node; wherein, for different leaf nodes, the target next hop corresponding to the same computing power node connected to the same remote leaf node is the same; for the same leaf node, the target next hops corresponding to different computing power nodes connected to the same remote leaf node are different; A forwarding control unit is used to generate a forwarding table entry for the computing power node based on the host route of the computing power node and the target next hop corresponding to the computing power node, and forward the traffic sent to the computing power node based on the forwarding table entry.
8. The device according to claim 7, characterized in that For any computing power node, the routing strategy index corresponding to the computing power node includes a sub-index for identifying a target port, where the target port is a port on a target leaf node connected to the computing power node, and the target leaf node is a leaf node connected to the computing power node; The selection unit selects a target next hop from a next hop list corresponding to the computing power node according to the routing strategy index of the computing power node, including: According to the sub-index corresponding to the computing power node, select the target neighbor next hop whose sorting matches the sub-index from the neighbor next hops sorted according to the preset sorting strategy; When the next hop list corresponding to the computing power node includes the target neighbor next hop, determining the target neighbor next hop as the target next hop; Among them, for the same leaf node, the computing nodes connected to the ports with the same port number on different remote leaf nodes have the same corresponding target neighbor next hop; The sub-index is the port number of the target port.
9. The device according to claim 8, characterized in that For any computing power node, the routing strategy index corresponding to the computing power node includes a primary index for identifying a target leaf node; The selection unit is further configured to select a backup target next hop from the next hop list corresponding to the computing power node according to the sub-index and main index corresponding to the computing power node for any computing power node when an abnormality occurs in the target next hop corresponding to the computing power node; wherein, for the same leaf node, the computing power nodes connected to the ports with the same port numbers on different remote leaf nodes have different corresponding backup target next hops; The forwarding control unit is also used to generate a backup forwarding table entry of the computing power node based on the host route of the computing power node and the backup target next hop corresponding to the computing power node, and forward the traffic sent to the computing power node based on the backup forwarding table entry.
10. The device according to claim 9, characterized in that The selection unit selects a backup target next hop from a next hop list corresponding to the computing power node according to the sub-index and the main index corresponding to the computing power node, including: According to the sub-index and main index corresponding to the computing power node, select a backup target neighbor next hop whose sorting matches the sum of the sub-index and the main index from the neighbor next hops sorted according to the preset sorting strategy; In a case where the next hop list corresponding to the computing power node includes the backup target neighbor next hop, determining the backup target neighbor next hop as the backup target next hop; and / or, The forwarding control unit is also used to generate a forwarding table entry for any computing power node based on the host route of the computing power node and the target next hop corresponding to the computing power node, and forward the traffic sent to the computing power node based on the forwarding table entry when the target next hop corresponding to the computing power node is abnormally recovered.
Citation Information
Patent Citations
Packet forwarding method, device, and Leaf equipment
CN108600099A
Multi-hop routing path selection method based on genetic algorithm
CN111526555A
Forwarding path determination method and device
CN116094987A
Managing split-brain scenario in multi-homed environment
US11323392B1
Methods and Apparatuses for Non-Blocking IP Multicast Delivery of Media Data in a Multi-Spine Network
US20200028774A1
