Traffic forwarding method and device, electronic equipment and storage medium

By obtaining and utilizing the network-wide topology information and mapping relationships in the Spine-Leaf network, the traffic forwarding path for load balancing is determined, which solves the problems of load imbalance and network congestion in the intelligent computing data center, and improves the forwarding performance of Spine devices.

CN119854202AActive Publication Date: 2025-04-18NEW H3C TECH CO LTD

Patent Information

Application Number
CN202411795692.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-04-18
Estimated Expiration
2044-12-06

AI Technical Summary

Technical Problem

In the Spine-Leaf network of smart computing data center, the switches perform hash routing forwarding based on calculation factors such as five-tuple traffic, resulting in load imbalance and network congestion.

Method used

By obtaining the mapping relationship between the whole network topology information, host ARP information and the equivalent routing group built on the Spine device, the initial overhead value of the link is defined, and the target path is determined based on the source destination information of the task to be trained to achieve load-balanced traffic forwarding.

Benefits of technology

It effectively reduces the ACL resource usage of Spine devices, improves the forwarding performance of Spine devices, and reduces the configuration interaction between the controller and Spine devices, solving the problems of network congestion and load imbalance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854202A_ABST
    Figure CN119854202A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent calculation centers, in particular to a traffic forwarding method and device, electronic equipment and a storage medium. The method is applied to Spine equipment in a Spine-Leaf network, each ingress port, connected to first Leaf equipment, of the Spine equipment forms a port group, and a mapping relation between each ingress port and each equivalent route included in each equivalent route group is constructed on the Spine equipment; the method comprises the following steps: receiving a message sent by first Leaf equipment; determining a target ingress port for receiving the message, and determining a target equivalent routing group which can be used for routing and forwarding the message based on the destination address of the message; determining a target equivalent route corresponding to the target ingress port from the target equivalent route group according to the target ingress port and the mapping relationship between each ingress port and each equivalent route included in the target equivalent route group; and forwarding the message based on the target equivalent route.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of intelligent computing centers, and in particular to a traffic forwarding method, device, electronic device and storage medium. Background Art

[0002] In the intelligent computing data center network, the upstream and downstream bandwidth is 1:1, and there will be many equal-cost routing (ECMP, Equal-Cost Multi-Path routing) links in the network. In the case of flow-by-flow forwarding, the switch will perform hash routing forwarding based on the five-tuple of the traffic and other calculation factors to achieve load balancing in the network. The traffic from multiple entrances is hashed ECMP to the same exit. There is no traffic on other exits, resulting in unbalanced load sharing and network congestion. In other words, in the intelligent computing data center network, the switch equipment hashes or loads unevenly, resulting in network traffic congestion that cannot be solved. Summary of the invention

[0003] The present application provides a traffic forwarding method, device, electronic device and storage medium.

[0004] In a first aspect, the present application provides a traffic forwarding method, which is applied to a controller in a Spine-Leaf network, and the method includes:

[0005] Obtain the network topology information of the entire network, the host ARP information, and the mapping relationship between each ingress port included in each port group constructed on the Spine device and each equal-cost route included in each equal-cost route group, wherein the network topology information of the entire network includes each link relationship and the ingress and egress interface information included in each link;

[0006] Defining an initial cost value of each link included in the network topology information of the entire network, wherein the size of the initial cost value of a link is inversely proportional to the maximum bandwidth value of the link;

[0007] According to the source and destination information of the task to be trained, the host ARP information, the mapping relationship between each ingress port included in each port group constructed on each Spine device and each equivalent-cost route included in each equivalent-cost route group, and the cost value of each link included in the network topology information of the entire network, determine the target path for transmitting the message of the task to be trained, wherein the cost value of each target link included in the target path is less than or equal to a preset value;

[0008] A forwarding flow table is issued to each Leaf device included in the target path, so that each target Leaf device forwards the task message to be trained based on the forwarding flow table. When the target Spine device included in the target path receives the task message to be trained, the target equivalent-cost route group corresponding to the destination address of the task message to be trained and the mapping relationship between each ingress port included in each port group constructed on the target Spine device and each equivalent-cost route included in each equivalent-cost route group determines the target equivalent-cost route corresponding to the target ingress port from the target equivalent-cost route group, and forwards the task message to be trained based on the target equivalent-cost route.

[0009] Preferably, according to the source destination information of the task to be trained, the host ARP information, the mapping relationship between each ingress port included in each port group constructed on each Spine device and each equal-cost route included in each equal-cost route group, and the cost value of each link included in the network topology information of the whole network, the step of determining the target path for transmitting the message of the task to be trained includes:

[0010] Determine the first Leaf device connected to the source end and the second Leaf device connected to the destination end according to the source destination end information and the host ARP information;

[0011] Determine at least one path between the first Leaf device and the second Leaf device according to the network topology information of the entire network and the mapping relationship between the equal-cost routes included in the target equal-cost routing group corresponding to the destination address and the ingress ports accessing the first Leaf device constructed on each Spine device;

[0012] Calculate the path cost value of the at least one path respectively according to the cost value of each link included in the network topology information of the whole network;

[0013] According to the path cost value of the at least one path, a path whose path cost value is less than or equal to a preset value is determined as a target path for transmitting the task message to be trained.

[0014] Preferably, the controller maintains a current cost value of each link; after determining a target path for transmitting the task message to be trained, the method further comprises:

[0015] The current cost value of each target link included in the target path is accumulated by 1.

[0016] Preferably, the method further comprises:

[0017] When it is detected that the training of the task to be trained is completed and the target path is released, the current cost value of each target link included in the target path is cumulatively reduced by 1.

[0018] In a second aspect, the present application provides a traffic forwarding method, which is applied to a Spine device in a Spine-Leaf network, wherein each ingress port on the Spine device connected to a first Leaf device constitutes a port group, and a mapping relationship between each ingress port and each equal-cost route included in each equal-cost route group is respectively constructed on the Spine device; the method comprises:

[0019] receiving a message sent by the first Leaf device;

[0020] Determine a target ingress port for receiving the message, and determine a target equal-cost routing group that can be used for routing and forwarding the message based on the destination address of the message;

[0021] According to the mapping relationship between the target ingress port, each ingress port and each equal-cost route included in the target equal-cost route group, determine the target equal-cost route corresponding to the target ingress port from the target equal-cost route group;

[0022] The message is forwarded based on the target equal-cost route.

[0023] In a third aspect, an embodiment of the present application provides a traffic forwarding device, which is applied to a controller in a Spine-Leaf network, and the device includes:

[0024] An acquisition unit is used to acquire network topology information of the entire network, host ARP information, and a mapping relationship between each ingress port included in each port group constructed on the Spine device and each equal-cost route included in each equal-cost route group, wherein the network topology information of the entire network includes each link relationship and the ingress and egress interface information included in each link;

[0025] A definition unit, used to define an initial cost value of each link included in the network topology information of the entire network, wherein the size of the initial cost value of a link is inversely proportional to the maximum bandwidth value of the link;

[0026] A determination unit is used to determine a target path for transmitting the message of the task to be trained according to the source destination information of the task to be trained, the host ARP information, the mapping relationship between each ingress port included in each port group constructed on each Spine device and each equivalent-cost route included in each equivalent-cost route group, and the cost value of each link included in the network topology information of the entire network, wherein the cost value of each target link included in the target path is less than or equal to a preset value;

[0027] A sending unit is used to send a forwarding flow table to each Leaf device included in the target path, so that each target Leaf device forwards the task message to be trained based on the forwarding flow table, wherein, when the target Spine device included in the target path receives the task message to be trained, according to the target ingress port for receiving the task message to be trained, the target equivalent-cost routing group corresponding to the destination address of the task message to be trained, and the mapping relationship between each ingress port included in each port group constructed on the target Spine device and each equivalent-cost route included in each equivalent-cost routing group, determine the target equivalent-cost route corresponding to the target ingress port from the target equivalent-cost routing group, and forward the task message to be trained based on the target equivalent-cost route.

[0028] Preferably, when determining the target path for transmitting the task message to be trained according to the source destination information of the task to be trained, the host ARP information, the mapping relationship between each ingress port included in each port group constructed on each Spine device and each equal-cost route included in each equal-cost route group, and the cost value of each link included in the network topology information of the entire network, the determination unit is specifically used to:

[0029] Determine the first Leaf device connected to the source end and the second Leaf device connected to the destination end according to the source destination end information and the host ARP information;

[0030] Determine at least one path between the first Leaf device and the second Leaf device according to the network topology information of the entire network and the mapping relationship between the equal-cost routes included in the target equal-cost routing group corresponding to the destination address and the ingress ports accessing the first Leaf device constructed on each Spine device;

[0031] Calculate the path cost value of the at least one path respectively according to the cost value of each link included in the network topology information of the whole network;

[0032] According to the path cost value of the at least one path, a path whose path cost value is less than or equal to a preset value is determined as a target path for transmitting the task message to be trained.

[0033] Preferably, the controller maintains the current cost value of each link; after determining the target path for transmitting the task message to be trained, the device further comprises:

[0034] An updating unit is used to accumulate 1 the current cost value of each target link included in the target path.

[0035] Preferably, the updating unit is further used for:

[0036] When it is detected that the training of the task to be trained is completed and the target path is released, the current cost value of each target link included in the target path is cumulatively reduced by 1.

[0037] In a fourth aspect, an embodiment of the present application provides a traffic forwarding device, which is applied to a Spine device in a Spine-Leaf network, wherein each ingress port on the Spine device connected to a first Leaf device constitutes a port group, and a mapping relationship between each ingress port and each equal-cost route included in each equal-cost route group is respectively constructed on the Spine device; the device comprises:

[0038] A receiving unit, configured to receive a message sent by the first Leaf device;

[0039] A determination unit, configured to determine a target ingress port for receiving the message, and based on a destination address of the message, determine a target equal-cost routing group that can be used for routing and forwarding the message;

[0040] The determining unit is further configured to determine, according to a mapping relationship between the target ingress port, each ingress port and each equivalent-cost route included in the target equivalent-cost route group, a target equivalent-cost route corresponding to the target ingress port from the target equivalent-cost route group;

[0041] A forwarding unit is used to forward the message based on the target equal-cost route.

[0042] In a fifth aspect, an embodiment of the present application provides an electronic device, the electronic device comprising:

[0043] A memory for storing program instructions;

[0044] The processor is used to call the program instructions stored in the memory, and execute the steps of the method as described in any one of the first aspects above according to the obtained program instructions.

[0045] In a sixth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute the steps of the method described in any one of the above-mentioned first aspects.

[0046] In a seventh aspect, an embodiment of the present application provides an electronic device, the electronic device comprising:

[0047] A memory for storing program instructions;

[0048] The processor is used to call the program instructions stored in the memory and execute the steps of the method as described in any one of the second aspects according to the obtained program instructions.

[0049] In an eighth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute the steps of the method described in any one of the second aspects above.

[0050] In summary, the traffic forwarding method provided in the embodiment of the present application is applied to the controller in the Spine-Leaf network, and the method includes: obtaining the network topology information of the whole network, the host ARP information and the mapping relationship between each ingress port included in each port group constructed on the Spine device and each equivalent-cost route included in each equivalent-cost route group, wherein the network topology information of the whole network includes each link relationship and the ingress and egress interface information included in each link; defining the initial cost value of each link included in the network topology information of the whole network, wherein the size of the initial cost value of a link is inversely proportional to the maximum bandwidth value of the link; according to the source and destination information of the task to be trained, the host ARP information, the mapping relationship between each ingress port included in each port group constructed on each Spine device and each equivalent-cost route included in each equivalent-cost route group and the cost value of each link included in the network topology information of the whole network, Determine a target path for transmitting the task message to be trained, wherein the sum of the cost values ​​of each target link included in the target path is less than or equal to a preset value; send a forwarding flow table to each Leaf device included in the target path, so that each target Leaf device forwards the task message to be trained based on the forwarding flow table, wherein, when the target Spine device included in the target path receives the task message to be trained, according to the target ingress port for receiving the task message to be trained, the target equivalent-cost routing group corresponding to the destination address of the task message to be trained, and the mapping relationship between each ingress port included in each port group constructed on the target Spine device and each equivalent-cost route included in each equivalent-cost routing group, determine the target equivalent-cost route corresponding to the target ingress port from the target equivalent-cost routing group, and forward the task message to be trained based on the target equivalent-cost route.

[0051] By adopting the traffic forwarding method provided in the embodiment of the present application, a mapping relationship between the ingress port group accessing the same Leaf device and the equivalent routes included in each equivalent route group on the Spine device is configured on the Spine device. After the controller determines the path for forwarding the traffic to be trained, it only needs to send a high-priority forwarding flow table to the Leaf device included in the path, without sending a high-priority forwarding flow table to the Spine device. The Spine device determines the target forwarding route for forwarding the message based on the ingress port of the received message and the destination address of the message, and forwards based on the target forwarding route, which greatly reduces the ACL resources of the Spine device, improves the forwarding performance of the Spine device, and greatly reduces the configuration interaction between the controller and the Spine device. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments of the present application or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings of the embodiments of the present application.

[0053] Figure 1 Traffic forwarding diagram provided for related technologies;

[0054] Figure 2 A detailed flow chart of a traffic forwarding method provided in an embodiment of the present application;

[0055] Figure 3 A schematic diagram of a Spine device port provided in an embodiment of the present application;

[0056] Figure 4 A detailed flow chart of another traffic forwarding method provided in an embodiment of the present application;

[0057] Figure 5 A schematic diagram of a traffic forwarding process provided in an embodiment of the present application;

[0058] Figure 6 Another flow forwarding process schematic diagram provided for an embodiment of the present application;

[0059] Figure 7 A schematic diagram of the structure of a traffic forwarding device provided in an embodiment of the present application;

[0060] Figure 8 A schematic diagram of the structure of a traffic forwarding device provided in an embodiment of the present application;

[0061] Fig. 9 A schematic diagram of the hardware architecture of an electronic device provided in an embodiment of the present application;

[0062] Fig.10 A schematic diagram of the structure of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0063] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, rather than limiting the present application. The singular forms of "a", "said" and "the" used in the present application and claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to any or all possible combinations of one or more associated listed items.

[0064] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in the embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, in addition, the word "if" used may be interpreted as "at..." or "when..." or "in response to determination".

[0065] At present, in order to solve the problem in the background technology that traffic from multiple entrances is hashed ECMP to the same exit, while there is no traffic on other exits, resulting in unbalanced load sharing and network congestion, the controller can allocate the traffic path of the entire network from a global perspective, realize the load balancing capability of the entire network, and reduce congestion.

[0066] For example, see Figure 1 As shown in the figure, it is a traffic forwarding diagram provided by the related technology; the controller manages all devices, and can draw the topology normally through the LLDP protocol controller while recording the link relationship and ingress and egress interface information. The controller needs to make a baseline for this topology, that is, save the link information and ARP information in the memory, so that the controller has the topology relationship and host ARP information from a global perspective. Before starting the training task, the platform can call the controller interface to import the five-tuple information such as the source and destination of the training task. The controller selects the path based on the link information and ARP information. The controller selects the entire path cost and the smallest path based on the overall link information of the network and the link cost value. After the selection is successful, the memory information is updated to increase the cost value of each link by +1, and the devices in the selected path are guided to forward according to the source and destination host IP.

[0067] against Figure 1 In the case of Spine downstream congestion shown in the figure, in the new solution, the controller selects the route based on the cost value of the current route. For the forwarding path from node4 to node3, the red route will not be selected. According to the new solution's route selection criteria, the route marked with green or blue dotted lines may be selected because the controller will calculate the minimum cost value of this link, and the original red route cost value will be 1 greater than the green and blue dotted route cost value in this case. This effectively avoids congestion on the link from spine1 to leaf2.

[0068] However, in the existing solution, the traffic matrix delivery on the spine device occupies a large amount of ACL resources, consumes a large amount of switch resources, and there is a lot of interaction between the controller and the spine switch in the configuration delivery. The traffic-matric configuration is delivered and deleted every time a business flow is reported and deleted.

[0069] The embodiment of the present application provides a method for implementing the mapping relationship between the inbound port and the outbound port of the equal-cost routing group by sending the inbound port LBN (Load Balance Network) rail group configuration on the Spine device. The controller can clearly know the mapping relationship between each inbound port and outbound port through the implementation principle of LBN, and then select the shortest path based on the mapping relationship and cost value. At this time, only the traffic matrix needs to be sent to the leaf side, and the relevant configuration does not need to be sent to the spine device to complete the forwarding.

[0070] For example, see Figure 2 As shown, it is a detailed flow chart of a traffic forwarding method provided in an embodiment of the present application. The method is applied to a controller in a Spine-Leaf network. The method includes the following steps:

[0071] Step 200: Obtain the network topology information of the entire network, the host ARP information, and the mapping relationship between each ingress port included in each port group constructed on the Spine device and each equal-cost route included in each equal-cost route group.

[0072] The network topology information of the entire network includes the relationship between each link and the ingress and egress interface information of each link;

[0073] In the embodiment of the present application, a port group is pre-configured on each Spine device, that is, a port group is constructed by connecting the Spine device to multiple ports of the same Leaf. For example, see Figure 3 As shown, a schematic diagram of a Spine device port provided in an embodiment of the present application; Port1, Port2 and Port3 are three inlet ports connected to the same Leaf device. At this time, Port1, Port2 and Port3 can be added to rail group A. Next, an LBN value is set for each inlet port in rail group A, and each equivalent route group forms a mapping relationship with each rail group A. For example, the mapping relationship between each inlet port included in rail group A and each equivalent route (egress port) included in equivalent route group 1, and the mapping relationship between each inlet port included in rail group A and each equivalent route (egress port) included in equivalent route group B.

[0074] Specifically, the mapping process is as follows: the LBN value of the inbound port in each rail group is mapped to the outbound port in each equal-cost routing group in turn, forming a mapping relationship between each inbound port and outbound port. For example, the LBN value of Port 1 is 0, and there are 3 outbound ports in equal-cost routing group A. The LBN value of 0 modulo 3 is 0, so the traffic outbound port corresponding to Port 1 is Port 4 numbered 0.

[0075] In an embodiment of the present application, the controller manages network devices in the entire network. Through the Link Layer Discovery Protocol (LLDP), the controller can normally obtain the network topology of the entire network and the host ARP (Address Resolution Protocol) information, while recording the link relationship and input and output interface information of each link included in the network topology of the entire network. The controller can perform a baseline processing on this topology, that is, save the link information (link relationship, input and output interface information of each link) and the host ARP information in the memory. In this way, the controller has a global perspective of the topology relationship and host ARP information.

[0076] Furthermore, the controller can also obtain the mapping relationship between each ingress port included in each port group constructed on each Spine device and each equal-cost route included in each equal-cost route group.

[0077] In actual applications, the controller can obtain information about the specific access device interface to which the server (node, such as a network card of a server) is connected through the host ARP information. The training task traffic refers to the traffic between two nodes (such as node1->node2). In this way, the access device to which node1 is connected (a specific interface of the access device) and the specific interface of the access device to which node2 is connected can be obtained based on the host ARP information.

[0078] Step 210: define the initial cost value of each link included in the network topology information of the entire network.

[0079] The initial cost value of a link is inversely proportional to the maximum bandwidth value of the link.

[0080] In the embodiment of the present application, the Spine-Leaf two-layer network architecture is used as an example for explanation. The network includes Spine1, Spine2, Leaf-1, Leaf-2 and Leaf-3, where:

[0081] Uplink interface 1 of Leaf-1 is connected to downlink interface 1 of Spine1, uplink interface 2 is connected to downlink interface 2 of Spine1, uplink interface 3 of Leaf-1 is connected to downlink interface 1 of Spine2, and uplink interface 4 is connected to downlink interface 1 of Spine2.

[0082] Uplink interface 1 of Leaf-2 is connected to downlink interface 3 of Spine1, uplink interface 2 is connected to downlink interface 4 of Spine1, uplink interface 3 of Leaf-2 is connected to downlink interface 3 of Spine2, and uplink interface 4 is connected to downlink interface 4 of Spine2;

[0083] Uplink interface 1 of Leaf-3 is connected to downstream interface 5 of Spine1, and upstream interface 2 is connected to downstream interface 6 of Spine1. Uplink interface 3 of Leaf-3 is connected to downstream interface 5 of Spine2, and upstream interface 4 is connected to downstream interface 6 of Spine2.

[0084] The connections between the upstream interfaces of the leaf devices and the downstream interfaces of the spine devices are defined as links.

[0085] When the network is initialized, the cost value of the link needs to be defined according to the link quality of each link (e.g., the maximum available bandwidth of the link). Preferably, if the maximum available bandwidth of each link is the same, the cost value of each link can be defined as equal (e.g., defined as 1). That is, the cost value (current cost value) of each link maintained in the memory of the controller is 1.

[0086] Step 220: Determine the target path for transmitting the message of the task to be trained based on the source and destination information of the task to be trained, the host ARP information, the mapping relationship between the input ports included in each port group constructed on each Spine device and the equal-cost routes included in each equal-cost route group, and the cost value of each link included in the network topology information of the entire network.

[0087] The sum of the cost values ​​of the target links included in the target path is less than or equal to a preset value.

[0088] In an embodiment of the present application, when determining the target path for transmitting the task message to be trained based on the source destination information of the task to be trained, the host ARP information, the mapping relationship between each ingress port included in each port group constructed on each Spine device and each equivalent-cost route included in each equivalent-cost route group, and the cost value of each link included in the network topology information of the entire network, a preferred implementation method is:

[0089] According to the source-destination information and the host ARP information, a first Leaf device connected to the source end is determined, and a second Leaf device connected to the destination end is determined.

[0090] Based on the network topology information of the entire network and the mapping relationship between the equal-cost routes included in the target equal-cost routing group corresponding to the destination address and the input ports accessing the first Leaf device, at least one path between the first Leaf device and the second Leaf device is determined.

[0091] According to the cost value of each link included in the network topology information of the entire network, the path cost value of the at least one path is calculated respectively.

[0092] According to the path cost value of the at least one path, a path whose path cost value is less than or equal to a preset value is determined as a target path for transmitting the task message to be trained.

[0093] In an embodiment of the present application, before starting a training task, the platform can call the interface of the controller to import five-tuple information such as the source and destination of the training task (source and destination information). In this way, the controller can determine the first Leaf device connected to the source and the second Leaf device connected to the destination through the host ARP information; then, the controller determines at least one forwarding path from the first Leaf device to the second Leaf device (each link included in each forwarding path) based on the mapping relationship between the network topology information and the equivalent routes included in the target equivalent route group corresponding to the input ports connected to the first Leaf device and the destination address; finally, based on the current cost values ​​of each link maintained locally, the controller determines the forwarding path with the smallest total cost value of each link as the target path for transmitting the training task traffic.

[0094] Specifically, suppose the source end is connected to Leaf1, the destination end is connected to Leaf2, Leaf1 has 2 ports connected to Spine1, and Leaf2 also has 2 ports connected to Spine1. Then, the two ports on Spine1 connected to Leaf1 are inbound ports, and the two inbound ports constitute a port group, which includes port 1 and port 2. The two ports on Spine1 connected to Leaf2 are outbound ports (such as port 3 and port 4). The equal-cost route group whose destination address is the source IP address includes equal-cost route 1 and equal-cost route 2. , the egress port of equal-cost route 1 is port 3, the egress port of equal-cost route 2 is port 4, and the mapping relationship between each ingress port (port 1 and port 2) in the port group and each egress port (port 3 and port 4) in the equal-cost route group is port 1->port 3, port 2->port 4. At this time, the determined paths include path 1: Leaf1->port 1 of Spine1->port 3 of Spine1->Leaf2; path 2: Leaf1->port 2 of Spine1->port 4 of Spine1->Leaf2.

[0095] According to the cost values ​​of each link included in path 1 and path 2, the sum of the cost values ​​of path 1 and path 2 is calculated, and the path whose sum of cost values ​​is less than the preset value and whose sum of cost values ​​in path 1 and path 2 is smaller is used as the traffic for transmitting the task to be trained.

[0096] Step 230: Send a forwarding flow table to each Leaf device included in the target path, so that each target Leaf device forwards the task message to be trained based on the forwarding flow table.

[0097] In an embodiment of the present application, when the target Spine device included in the target path receives the task message to be trained, based on the target ingress port for receiving the task message to be trained, the target equivalent-cost routing group corresponding to the destination address of the task message to be trained, and the mapping relationship between each ingress port included in each port group constructed on the target Spine device and each equivalent-cost route included in each equivalent-cost routing group, determines the target equivalent-cost route corresponding to the target ingress port from the target equivalent-cost routing group, and forwards the task message to be trained based on the target equivalent-cost route.

[0098] In the embodiment of the present application, after determining the target path for forwarding the task message to be trained, the controller only sends high-priority forwarding table entries for forwarding the task message to be trained to each Leaf device included in the target path, without sending high-priority forwarding table entries for forwarding the task message to be trained to each Spine device included in the target path. In this way, the occupation of ACL resources on the Spine device is greatly reduced. The forwarding performance of the Spine device is greatly improved.

[0099] The target path includes each Spine device, determines the port group information to which the ingress port that receives the traffic to be trained belongs, and determines the equivalent cost routing group information used to forward the task message to be trained based on the destination address, as well as the mapping relationship between each ingress port included in the port group and each equivalent cost route included in the equivalent cost routing group, determines the target equivalent cost route used to forward the task message to be trained, and forwards the task message to be trained based on the target equivalent cost route.

[0100] Furthermore, in the embodiment of the present application, the controller maintains the current cost value of each link; then, after determining the target path for transmitting the task message to be trained, the method may further include the following steps:

[0101] The current cost value of each target link included in the target path is accumulated by 1.

[0102] Similarly, in the embodiment of the present application, when it is detected that the training of the task to be trained is completed and the target path is released, the current cost value of each target link included in the target path is reduced by 1.

[0103] By updating the cost value of each link in real time, the target path selected each time is the best path.

[0104] For example, see Figure 4 As shown, it is a detailed flow chart of a traffic forwarding method provided by an embodiment of the present application, the method is applied to a Spine device in a Spine-Leaf network, each ingress port connected to the first Leaf device on the Spine device constitutes a port group, and a mapping relationship between each ingress port and each equivalent-cost route included in each equivalent-cost route group is respectively constructed on the Spine device; the method comprises the following steps:

[0105] Step 400: Receive a message sent by the first Leaf device.

[0106] Step 410: Determine a target ingress port for receiving the message, and based on the destination address of the message, determine a target equal-cost routing group that can be used to route and forward the message.

[0107] Step 420: According to the mapping relationship between the target ingress port, each ingress port and each equal-cost route included in the target equal-cost route group, determine the target equal-cost route corresponding to the target ingress port from the target equal-cost route group.

[0108] Step 430: Forward the message based on the target equal-cost route.

[0109] The following describes in detail the process of the traffic forwarding method provided by the embodiment of the present application in combination with a specific application scenario. Figure 5 As shown in FIG. 1 , a flow forwarding process diagram provided in an embodiment of the present application is provided; after the networking is completed, the controller will form an LBN rail group for the spine device and the inbound interface of each leaf, such as Figure 5 As shown by the green arrow, each red dotted box is a group of inbound ports. After this configuration, the service traffic of each group of inbound ports is confirmed to have an equivalent route outbound interface to the destination IP. That is, if the traffic entering the leaf through the light-colored port is destined for the leaf2 device, then the traffic will be outbound through the light-colored port, and the LBN technology will ensure the port mapping relationship.

[0110] For example, see Figure 6 As shown, it is another flow forwarding process schematic diagram provided by the embodiment of the present application. When the controller selects a route, it will select the forwarding path with the smallest total cost value in combination with the cost value selection rule, store it in the controller memory, and modify the link cost value information at the same time to trigger the distribution of leaf device configuration. For example, Figure 6The green or blue path in the traffic matrix is ​​sent to the leaf device for diversion, and the spine device performs natural forwarding according to the LBN mapping relationship. In this way, the controller can complete path navigation and routing according to the service source and destination. The spine device does not need to send traffic matrix to the spine device, saving the ACL resources of the spine device. And reduce the configuration interaction between the controller and the spine device during the routing process.

[0111] Based on the same inventive concept as the above-mentioned inventive embodiment applied to the controller, for example, refer to Figure 7 As shown, it is a structural schematic diagram of a traffic forwarding device provided in an embodiment of the present application, and the device is applied to a controller in a Spine-Leaf network, and the device includes:

[0112] The acquisition unit 70 is used to acquire the network topology information of the entire network, the host ARP information, and the mapping relationship between each ingress port included in each port group constructed on the spine device and each equal-cost route included in each equal-cost route group, wherein the network topology information of the entire network includes each link relationship and the ingress and egress interface information included in each link;

[0113] A definition unit 71, configured to define an initial cost value of each link included in the network topology information of the entire network, wherein the size of the initial cost value of a link is inversely proportional to the maximum bandwidth value of the link;

[0114] The determination unit 72 is used to determine the target path for transmitting the message of the task to be trained according to the source destination information of the task to be trained, the host ARP information, the mapping relationship between each ingress port included in each port group constructed on each Spine device and each equivalent-cost route included in each equivalent-cost route group, and the cost value of each link included in the network topology information of the whole network, wherein the cost value of each target link included in the target path is less than or equal to a preset value;

[0115] The sending unit 73 is used to send a forwarding flow table to each Leaf device included in the target path, so that each target Leaf device forwards the task message to be trained based on the forwarding flow table. When the target Spine device included in the target path receives the task message to be trained, according to the target ingress port for receiving the task message to be trained, the target equivalent-cost routing group corresponding to the destination address of the task message to be trained, and the mapping relationship between each ingress port included in each port group constructed on the target Spine device and each equivalent-cost route included in each equivalent-cost routing group, the target equivalent-cost route corresponding to the target ingress port is determined from the target equivalent-cost routing group, and the task message to be trained is forwarded based on the target equivalent-cost route.

[0116] Preferably, when determining the target path for transmitting the task message to be trained based on the source destination information of the task to be trained, the host ARP information, the mapping relationship between each ingress port included in each port group constructed on each Spine device and each equal-cost route included in each equal-cost route group, and the cost value of each link included in the network topology information of the entire network, the determining unit 72:

[0117] Determine the first Leaf device connected to the source end and the second Leaf device connected to the destination end according to the source destination end information and the host ARP information;

[0118] Determine at least one path between the first Leaf device and the second Leaf device according to the network topology information of the entire network and the mapping relationship between the equal-cost routes included in the target equal-cost routing group corresponding to the destination address and the ingress ports accessing the first Leaf device constructed on each Spine device;

[0119] Calculate the path cost value of the at least one path respectively according to the cost value of each link included in the network topology information of the whole network;

[0120] According to the path cost value of the at least one path, a path whose path cost value is less than or equal to a preset value is determined as a target path for transmitting the task message to be trained.

[0121] Preferably, the controller maintains the current cost value of each link; after determining the target path for transmitting the task message to be trained, the device further comprises:

[0122] An updating unit is used to accumulate 1 the current cost value of each target link included in the target path.

[0123] Preferably, the updating unit is further used for:

[0124] When it is detected that the training of the task to be trained is completed and the target path is released, the current cost value of each target link included in the target path is cumulatively reduced by 1.

[0125] Based on the same inventive concept as the above-mentioned inventive embodiment applied to the Spine device, for example, refer to Figure 8 As shown, it is a structural schematic diagram of a traffic forwarding device provided in an embodiment of the present application, the device is applied to a Spine device in a Spine-Leaf network, each ingress port on the Spine device connected to the first Leaf device constitutes a port group, and a mapping relationship between each ingress port and each equal-cost route included in each equal-cost route group is respectively constructed on the Spine device; the device includes:

[0126] A receiving unit 80, configured to receive a message sent by the first Leaf device;

[0127] A determination unit 81, configured to determine a target ingress port for receiving the message, and based on a destination address of the message, determine a target equal-cost routing group that can be used for routing and forwarding the message;

[0128] The determining unit 81 is further configured to determine, according to the mapping relationship between the target ingress port, each ingress port and each equal-cost route included in the target equal-cost route group, a target equal-cost route corresponding to the target ingress port from the target equal-cost route group;

[0129] The forwarding unit 82 is configured to forward the message based on the target equal-cost route.

[0130] The above units may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital signal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a certain unit is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these units may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0131] Furthermore, the electronic device provided in the embodiment of the present application, from the hardware level, the hardware architecture diagram of the electronic device can be seen in Fig. 9 As shown, the electronic device may include: a memory 90 and a processor 91,

[0132] The memory 90 is used to store program instructions; the processor 91 calls the program instructions stored in the memory 90 and executes the above method embodiment applied to the controller according to the obtained program instructions. The specific implementation method and technical effect are similar and will not be repeated here.

[0133] Optionally, the present application also provides a controller, comprising at least one processing element (or chip) for executing the above method embodiment applied to the controller.

[0134] Optionally, the present application also provides a program product, such as a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute the above-mentioned method embodiment applied to the controller.

[0135] Furthermore, the electronic device provided in the embodiment of the present application, from the hardware level, the hardware architecture diagram of the electronic device can be seen in Fig.10 As shown, the electronic device may include: a memory 100 and a processor 110,

[0136] The memory 100 is used to store program instructions; the processor 110 calls the program instructions stored in the memory 100, and executes the above method embodiment applied to the Spine device according to the obtained program instructions. The specific implementation method and technical effect are similar and will not be repeated here.

[0137] Optionally, the present application also provides a network device, comprising at least one processing element (or chip) for executing the above-mentioned method embodiment applied to the Spine device.

[0138] Optionally, the present application also provides a program product, such as a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute the above-mentioned method embodiment applied to the Spine device.

[0139] Here, the machine-readable storage medium may be any electronic, magnetic, optical or other physical storage device that may contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium may be: RAM (RadomAccess Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as CD, DVD, etc.), or similar storage medium, or a combination thereof.

[0140] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.

[0141] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0142] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0143] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0144] Moreover, these computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0145] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0146] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A traffic forwarding method, characterized in that: Applied to a controller in a Spine-Leaf network, the method includes: Obtain the network topology information of the entire network, the host ARP information, and the mapping relationship between each ingress port included in each port group constructed on the Spine device and each equal-cost route included in each equal-cost route group, wherein the network topology information of the entire network includes each link relationship and the ingress and egress interface information included in each link; Defining an initial cost value of each link included in the network topology information of the entire network, wherein the size of the initial cost value of a link is inversely proportional to the maximum bandwidth value of the link; According to the source and destination information of the task to be trained, the host ARP information, the mapping relationship between each ingress port included in each port group constructed on each Spine device and each equivalent-cost route included in each equivalent-cost route group, and the cost value of each link included in the network topology information of the entire network, determine the target path for transmitting the message of the task to be trained, wherein the cost value of each target link included in the target path is less than or equal to a preset value; A forwarding flow table is issued to each Leaf device included in the target path, so that each target Leaf device forwards the task message to be trained based on the forwarding flow table. When the target Spine device included in the target path receives the task message to be trained, the target equivalent-cost route group corresponding to the destination address of the task message to be trained and the mapping relationship between each ingress port included in each port group constructed on the target Spine device and each equivalent-cost route included in each equivalent-cost route group determines the target equivalent-cost route corresponding to the target ingress port from the target equivalent-cost route group, and forwards the task message to be trained based on the target equivalent-cost route.

2. The method according to claim 1, characterized in that According to the source and destination information of the task to be trained, the host ARP information, the mapping relationship between each ingress port included in each port group constructed on each Spine device and each equal-cost route included in each equal-cost route group, and the cost value of each link included in the network topology information of the entire network, the step of determining the target path for transmitting the message of the task to be trained includes: Determine the first Leaf device connected to the source end and the second Leaf device connected to the destination end according to the source destination end information and the host ARP information; Determine at least one path between the first Leaf device and the second Leaf device according to the network topology information of the entire network and the mapping relationship between the equal-cost routes included in the target equal-cost routing group corresponding to the destination address and the ingress ports accessing the first Leaf device constructed on each Spine device; Calculate the path cost value of the at least one path respectively according to the cost value of each link included in the network topology information of the whole network; According to the path cost value of the at least one path, a path whose path cost value is less than or equal to a preset value is determined as a target path for transmitting the task message to be trained.

3. The method according to claim 1 or 2, characterized in that The controller maintains a current cost value of each link; After determining the target path for transmitting the task message to be trained, the method further includes: The current cost value of each target link included in the target path is accumulated by 1.

4. The method according to claim 3, characterized in that The method further comprises: When it is detected that the training of the task to be trained is completed and the target path is released, the current cost value of each target link included in the target path is cumulatively reduced by 1.

5. A traffic forwarding method, characterized in that: A Spine device in a Spine-Leaf network is applied, wherein each ingress port on the Spine device connected to a first Leaf device constitutes a port group, and a mapping relationship between each ingress port and each equal-cost route included in each equal-cost route group is respectively constructed on the Spine device; the method comprises: receiving a message sent by the first Leaf device; Determine a target ingress port for receiving the message, and determine a target equal-cost routing group that can be used for routing and forwarding the message based on the destination address of the message; According to the mapping relationship between the target ingress port, each ingress port and each equal-cost route included in the target equal-cost route group, determine the target equal-cost route corresponding to the target ingress port from the target equal-cost route group; The message is forwarded based on the target equal-cost route.

6. A traffic forwarding device, characterized in that: Applicable to a controller in a Spine-Leaf network, the device comprises: An acquisition unit is used to acquire network topology information of the entire network, host ARP information, and a mapping relationship between each ingress port included in each port group constructed on the Spine device and each equal-cost route included in each equal-cost route group, wherein the network topology information of the entire network includes each link relationship and the ingress and egress interface information included in each link; A definition unit, used to define an initial cost value of each link included in the network topology information of the entire network, wherein the size of the initial cost value of a link is inversely proportional to the maximum bandwidth value of the link; A determination unit is used to determine a target path for transmitting the message of the task to be trained according to the source destination information of the task to be trained, the host ARP information, the mapping relationship between each ingress port included in each port group constructed on each Spine device and each equivalent-cost route included in each equivalent-cost route group, and the cost value of each link included in the network topology information of the entire network, wherein the cost value of each target link included in the target path is less than or equal to a preset value; A sending unit is used to send a forwarding flow table to each Leaf device included in the target path, so that each target Leaf device forwards the task message to be trained based on the forwarding flow table, wherein, when the target Spine device included in the target path receives the task message to be trained, according to the target ingress port for receiving the task message to be trained, the target equivalent-cost routing group corresponding to the destination address of the task message to be trained, and the mapping relationship between each ingress port included in each port group constructed on the target Spine device and each equivalent-cost route included in each equivalent-cost routing group, determine the target equivalent-cost route corresponding to the target ingress port from the target equivalent-cost routing group, and forward the task message to be trained based on the target equivalent-cost route.

7. The device according to claim 6, characterized in that When determining the target path for transmitting the task message to be trained according to the source destination information of the task to be trained, the host ARP information, the mapping relationship between each ingress port included in each port group constructed on each Spine device and each equal-cost route included in each equal-cost route group, and the cost value of each link included in the network topology information of the entire network, the determining unit is specifically used to: Determine the first Leaf device connected to the source end and the second Leaf device connected to the destination end according to the source destination end information and the host ARP information; Determine at least one path between the first Leaf device and the second Leaf device according to the network topology information of the entire network and the mapping relationship between the equal-cost routes included in the target equal-cost routing group corresponding to the destination address and the ingress ports accessing the first Leaf device constructed on each Spine device; Calculate the path cost value of the at least one path respectively according to the cost value of each link included in the network topology information of the whole network; According to the path cost value of the at least one path, a path whose path cost value is less than or equal to a preset value is determined as a target path for transmitting the task message to be trained.

8. A traffic forwarding device, characterized in that: A Spine device applied to a Spine-Leaf network, wherein each ingress port on the Spine device connected to a first Leaf device constitutes a port group, and a mapping relationship between each ingress port and each equal-cost route included in each equal-cost route group is respectively constructed on the Spine device; the device comprises: A receiving unit, configured to receive a message sent by the first Leaf device; A determination unit, configured to determine a target ingress port for receiving the message, and based on a destination address of the message, determine a target equal-cost routing group that can be used for routing and forwarding the message; The determining unit is further configured to determine, according to a mapping relationship between the target ingress port, each ingress port and each equivalent-cost route included in the target equivalent-cost route group, a target equivalent-cost route corresponding to the target ingress port from the target equivalent-cost route group; A forwarding unit is used to forward the message based on the target equal-cost route.

9. An electronic device, characterized in that: The electronic device comprises: A memory for storing program instructions; The processor is used to call the program instructions stored in the memory, and execute the steps of the method as described in any one of claims 1-4, or 5 according to the obtained program instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute the steps of the method according to any one of claims 1 to 4 or 5.

Citation Information

Patent Citations

  • Packet forwarding method and packet forwarding device

    CN104022952A

  • Method and device for realizing double control planes

    CN108632122A

  • Data stream forwarding method and device, SDN controller and storage medium

    CN118101565A

  • Network controller deployment

    US11469958B1

  • Route refresh mechanism for border gateway protocol link state

    US20170093641A1

Cited By

  • Equivalent link switching method, device and system

    CN120528861A

  • Message forwarding method and device, electronic equipment and medium

    CN121462492A