A traffic forwarding method and apparatus, an electronic device, and a storage medium

By constructing a mapping relationship between ports and equal-cost routing groups and link cost values ​​in the intelligent computing data center network, determining the target path and issuing forwarding flow tables, the problems of load imbalance and network congestion in the intelligent computing data center network are solved, and the forwarding performance of Spine devices and the overall network load balancing capability are improved.

CN119854202BActive Publication Date: 2025-11-07NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In intelligent computing data center networks, the hash routing of equal-cost routing links leads to problems of load imbalance and network congestion, which existing technologies cannot effectively solve.

Method used

By acquiring network topology information and host ARP information, a mapping relationship between ports and equal-cost routing groups is constructed, link cost values ​​are defined, and the target path is determined based on this information. Forwarding flow tables are then sent to Leaf devices to achieve load balancing of traffic.

Benefits of technology

This reduces the ACL resource consumption of Spine devices, improves forwarding performance, and reduces configuration interaction between the controller and Spine devices, thus achieving network-wide load balancing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854202B_ABST
    Figure CN119854202B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of intelligent computing centers, in particular to a traffic forwarding method and device, electronic equipment and a storage medium. The method is applied to a Spine device in a Spine-Leaf network, port groups are formed by respective ingress ports of a first Leaf device connected to the Spine device, and mapping relationships between the respective ingress ports and respective equal-cost routing groups included in the respective equal-cost routing groups are respectively constructed on the Spine device; the method comprises the following steps: receiving a message sent by the first Leaf device; determining a target ingress port of the received message, and determining a target equal-cost routing group available for routing and forwarding the message based on a destination address of the message; determining a target equal-cost routing corresponding to the target ingress port from the target equal-cost routing group according to the target ingress port and the mapping relationship between the respective ingress ports and the respective equal-cost routing included in the target equal-cost routing group; and forwarding the message based on the target equal-cost routing.
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 and device, electronic equipment and a storage medium. BACKGROUND

[0002] In an intelligent computing data center network, the uplink and downlink bandwidth is 1:1, and there are many Equal-Cost Multi-Path routing (ECMP) links in the network. In the case of per-flow forwarding, the switch forwards the traffic according to the five-tuple and other calculation factors to achieve load balancing in the network. The traffic of multiple entries is hashed ECMP to the same exit. In the case that there is no traffic on other exits, the load sharing is unbalanced and the network is congested. That is, in the intelligent computing data center network, the hash or load of the switch device is uneven, which causes network traffic congestion and cannot be solved. SUMMARY

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

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

[0005] obtaining network topology information of the whole network, host ARP information, and a mapping relationship between each ingress port included in each port group constructed on a Spine device and each ECMP included in each ECMP group, wherein the network topology information of the whole network includes each link relationship and ingress / egress interface information included in each link;

[0006] defining an 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;

[0007] determining a target path for transmitting a to-be-trained task packet according to source / destination information of the to-be-trained task, host ARP information, a mapping relationship between each ingress port included in each port group constructed on each Spine device and each ECMP included in each ECMP group, and a 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;

[0008] distributing a forwarding flow table to each Leaf device included in the target path, so that each target Leaf device forwards the to-be-trained task packet based on the forwarding flow table, wherein when receiving the to-be-trained task packet, a target Spine device included in the target path determines a target equal-cost route corresponding to a target ingress port receiving the to-be-trained task packet, a target equal-cost route group corresponding to a destination address of the to-be-trained task packet, and a mapping relationship between each ingress port included in each port group constructed on the target Spine device and each equal-cost route included in each equal-cost route group, and forwards the to-be-trained task packet based on the target equal-cost route.

[0009] Preferably, according to source and destination information of the to-be-trained task, host ARP information, a 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 an expense value of each link included in the whole-network network topology information, the step of determining the target path for transmitting the to-be-trained task packet comprises:

[0010] determining a first Leaf device accessed by a source end and a second Leaf device accessed by a destination end according to the source and destination information and the host ARP information;

[0011] determining at least one path between the first Leaf device and the second Leaf device according to the whole-network network topology information and a mapping relationship between each ingress port accessing the first Leaf device and each equal-cost route included in a target equal-cost route group corresponding to the destination address on each Spine device;

[0012] respectively calculating path expense values of the at least one path according to the expense value of each link included in the whole-network network topology information;

[0013] determining a path with a path expense value less than or equal to a preset value as the target path for transmitting the to-be-trained task packet according to the path expense values of the at least one path.

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

[0015] adding 1 to a current expense value of each target link included in the target path.

[0016] Preferably, the method further comprises:

[0017] when detecting that the to-be-trained task is trained and the target path is released, decreasing 1 from a current expense value of each target link included in the target path.

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

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

[0020] determining a target ingress port receiving the packet, and determining a target equivalent route group available for routing and forwarding the packet based on a destination address of the packet;

[0021] determining a target equivalent route corresponding to the target ingress port from the target equivalent route group according to the target ingress port, the mapping relationship between each ingress port and each equivalent route included in the target equivalent route group;

[0022] forwarding the packet based on the target equivalent route.

[0023] In a third aspect, the present application provides a traffic forwarding device applied to a controller in a Spine-Leaf network, the device comprising:

[0024] an obtaining unit configured to obtain network topology information of the whole network, host ARP information, and a mapping relationship between each ingress port included in each port group constructed on a Spine device and each equivalent route included in each equivalent route group, wherein the network topology information of the whole network comprises each link relationship and ingress / egress interface information included in each link;

[0025] a defining unit configured to define an 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;

[0026] a determining unit configured to determine a target path for transmitting a to-be-trained task packet according to source / destination information of the to-be-trained task, the host ARP information, the mapping relationship between each ingress port included in each port group constructed on each Spine device and each equivalent route included in each equivalent 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;

[0027] The issuing unit is configured to issue a forwarding flow table to each Leaf device included in the target path, so that each target Leaf device forwards the to-be-trained task packet based on the forwarding flow table, wherein the target Spine device included in the target path, upon receiving the to-be-trained task packet, determines a target equal-cost route corresponding to the target ingress port of the to-be-trained task packet from a target equal-cost route group corresponding to a destination address of the to-be-trained task packet and a mapping relationship between each ingress port included in each port group constructed on the target Spine device and each equal-cost route included in each equal-cost route group, and forwards the to-be-trained task packet based on the target equal-cost route.

[0028] Preferably, when determining the target path for transmitting the to-be-trained task packet according to source and destination information of the to-be-trained task, host ARP information, a 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 an expense value of each link included in the whole-network network topology information, the determining unit is specifically configured to:

[0029] determine a first Leaf device accessed by the source end and a second Leaf device accessed by the destination end according to the source and destination 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 whole-network network topology information and a mapping relationship between each ingress port accessing the first Leaf device and each equal-cost route included in a target equal-cost route group corresponding to the destination address constructed on each Spine device;

[0031] calculate a path expense value of the at least one path respectively according to the expense value of each link included in the whole-network network topology information;

[0032] determine the target path for transmitting the to-be-trained task packet according to the path expense value of the at least one path, wherein the path with a path expense value less than or equal to a preset value is determined as the target path.

[0033] Preferably, the controller maintains a current expense value of each link, and the apparatus further comprises:

[0034] an updating unit configured to add 1 to a current expense value of each target link included in the target path.

[0035] Preferably, the updating unit is further configured to:

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

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

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

[0039] a determining unit, configured to determine a target ingress port receiving the packet, and determine a target equal-cost route group available for routing and forwarding the packet based on a destination address of the packet;

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

[0041] a forwarding unit, configured to forward the packet based on the target equal-cost route.

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

[0043] a memory, configured to store program instructions;

[0044] a processor, configured to invoke the program instructions stored in the memory, and execute steps of the method according to the obtained program instructions.

[0045] In a sixth aspect, an embodiment of the present application further provides a computer readable storage medium, which stores computer executable instructions, and the computer executable instructions are used to make the computer execute steps of the method according to any one of the first aspect.

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

[0047] a memory, configured to store program instructions;

[0048] a processor, configured to invoke the program instructions stored in the memory, and execute steps of the method according to the obtained program instructions.

[0049] In an eighth aspect, the embodiments of the present application further provide a computer readable storage medium storing computer executable instructions for causing a computer to perform the steps of the method of any one of the above second aspects.

[0050] In summary, the flow forwarding method provided by the embodiments of the present application is applied to a controller in a Spine-Leaf spine-leaf network, and the method comprises: obtaining network topology information of the whole network, host ARP information, and a mapping relationship between each ingress port included in each port group constructed on a Spine device and each equivalent route included in each equivalent route group, wherein the network topology information of the whole network comprises each link relationship and ingress / egress interface information included in each link; defining an 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; determining a target path for transmitting a to-be-trained task packet according to source / destination information of the to-be-trained task, the host ARP information, the mapping relationship between each ingress port included in each port group constructed on each Spine device and each equivalent route included in each equivalent route group, and the cost values of each link included in the network topology information of the whole network, wherein the cost values of each target link included in the target path are less than or equal to a preset value; and issuing a forwarding flow table to each Leaf device included in the target path, so that each target Leaf device forwards the to-be-trained task packet based on the forwarding flow table, wherein when receiving the to-be-trained task packet, a target Spine device included in the target path determines a target equivalent route corresponding to a target ingress port from which the to-be-trained task packet is received, a target equivalent route group corresponding to a destination address of the to-be-trained task packet, and the mapping relationship between each ingress port included in each port group constructed on the target Spine device and each equivalent route included in each equivalent route group, and forwards the to-be-trained task packet based on the target equivalent route.

[0051] By using the flow forwarding method provided by the embodiments of the present application, the mapping relationship between the ingress port group accessing the same Leaf device and each equivalent route included in each equivalent route group on the Spine device is configured, and after the controller determines the path for forwarding the to-be-trained flow, the controller only needs to issue a high-priority forwarding flow table to the Leaf device included in the path, without the need to issue a high-priority forwarding flow table to the Spine device, and the Spine device determines a target forwarding route for forwarding the packet based on the ingress port of the received packet and the destination address of the packet, and forwards the packet based on the target forwarding route, thereby greatly reducing the ACL resources of the Spine device, improving the forwarding performance of the Spine device, and greatly reducing the configuration interaction between the controller and the Spine device. Attached Figure Description

[0052] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments of this application or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings of the embodiments of this application.

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

[0054] Figure 2 A detailed flowchart of a traffic forwarding method provided in an embodiment of this application;

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

[0056] Figure 4 A detailed flowchart of another traffic forwarding method provided in an embodiment of this application;

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

[0058] Figure 6 This is a schematic diagram of another traffic forwarding process provided in an embodiment of this application;

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

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

[0061] Figure 9 A schematic diagram of the hardware architecture of an electronic device provided in an embodiment of this application;

[0062] Figure 10 This is a schematic diagram of the structure of another electronic device provided in an embodiment of this application. Detailed Implementation

[0063] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the application. The singular forms “a,” “the,” and “the” as used in this application and claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to any and all possible combinations comprising one or more of the associated listed items.

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

[0065] At present, in order to solve the problem that the traffic of multiple entries 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 perform whole network traffic path allocation from a global perspective, realize the ability of whole network load balancing, and reduce congestion.

[0066] For example, referring to Figure 1 As shown in the related art, the controller pipes all the devices, and the controller can normally draw the topology and record the link relationship and ingress / egress interface information through the LLDP protocol. The controller needs to baseline the topology, that is, save the link information and ARP information in the memory, so that the controller has a global perspective of the topology relationship and host ARP information. Before starting the training task, the platform can call the interface of the controller to import the source and destination five-tuple information of the training task. The controller selects the route through the link information and ARP information. The controller selects the path with the minimum cost according to the overall link information and link cost value of the network. After successful selection, the memory information is updated to increase the link cost value by 1, and the devices in the selected path are guided to forward according to the source and destination host IP.

[0067] For Figure 1 As shown in the spine downlink congestion case, in the new scheme, the controller selects the route according to the current routing cost value. The forwarding path from node4 to node3 will not be selected according to the red mark. According to the routing standard of the new scheme, the green or blue dashed line marked routing may be selected, because the controller will calculate the minimum link cost value, and the original red routing cost value will be greater than the green and blue dashed line routing by 1 in this case. This effectively avoids congestion on the spine1 to leaf2 link.

[0068] However, the existing scheme occupies a large number of ACL resources and consumes a large amount of switch resources for traffic matrix distribution on the spine device, and the controller and the spine switch have more configuration distribution interactions, and traffic-matric configuration distribution and deletion are performed each time the service flow is reported and deleted.

[0069] The embodiment of the present application provides a method for distributing an ingress port LBN (Load Balance Network, network-level load balancing) rail group configuration on a spine device to complete the mapping relationship between the ingress port and the equivalent route group egress port. The controller can clearly know the mapping relationship between each ingress port and egress port through the implementation principle of the LBN, then the controller selects the shortest path in combination with the mapping relationship and the cost value, at this time, only the traffic matrix needs to be distributed to the leaf side, and the related configuration does not need to be distributed to the spine device, so that the forwarding can be completed.

[0070] For example, referring to Figure 2 As shown in the figure, a detailed flowchart of a traffic forwarding method provided by the embodiment of the present application is provided, the method is applied to a controller in a Spine-Leaf spine network, and the method comprises the following steps:

[0071] Step 200: obtaining network topology information of the whole network, host ARP information and a mapping relationship between each ingress port included in each port group constructed on the spine device and each equivalent route included in each equivalent route group.

[0072] The network topology information of the whole network comprises link relationships and ingress and egress interface information included in each link.

[0073] In the embodiment of the present application, the port groups are configured on each spine device in advance, that is, a plurality of ports connected to the same Leaf are constructed into a port group. For example, referring to Figure 3 As shown in the figure, a Spine device port schematic diagram provided by the embodiment of the present application is provided; Port1, Port2 and Port3 are three ingress ports connected to the same Leaf device, at this time, Port1, Port2 and Port3 can be added to the rail group group A. Then, the LBN value is set for each ingress port in the rail group group A, and each equivalent route group forms a mapping relationship with each rail group group A. For example, a mapping relationship between each ingress port included in the rail group group A and each equivalent route (egress port) included in the equivalent route group 1, and a mapping relationship between each ingress port included in the rail group group A and each equivalent route (egress port) included in the equivalent route group B.

[0074] Specifically, the mapping process is as follows: the LBN value of each ingress port in the rail group is sequentially mapped to each egress port in each equivalent route group, forming a mapping relationship between each ingress port and egress port. For example, the LBN value of Port 1 is 0, and there are 3 egress ports in equivalent route group A. The remainder of 0 is obtained by taking the LBN value 0 modulo 3, so the traffic egress port corresponding to Port 1 is Port 4 numbered 0.

[0075] In the embodiment of the application, the controller is connected to the network devices in the whole network, and through the Link Layer Discovery Protocol (LLDP), the controller can normally obtain the network topology and host ARP (Address Resolution Protocol) information in the whole network, record the link relationship and ingress / egress interface information of each link included in the network topology, and perform a baseline processing on the topology, that is, save the link information (link relationship, ingress / egress interface information of each link) and host ARP information in the memory. In this way, the controller has a global perspective of the topology relationship and host ARP information.

[0076] Further, the controller can also obtain the mapping relationship between each ingress port included in each port group on each Spine device and each equivalent route included in each equivalent route group.

[0077] In actual application, the controller can obtain the information of the server (node, such as a network card of the server) accessing a specific access device interface through the host ARP information. The training task traffic refers to the traffic between two nodes (such as node1->node2), so according to the host ARP information, the access device (specific interface of the access device) accessed by node1 and the specific interface of the access device accessed by node2 can be obtained.

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

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

[0080] In the embodiment of the application, the Spine-Leaf two-layer network architecture is taken as an example for illustration, and the networking includes Spine1, Spine2, Leaf-1, Leaf-2 and Leaf-3, wherein:

[0081] The uplink interface 1 of the Leaf-1 accesses the downlink interface 1 of the Spine1, the uplink interface 2 accesses the downlink interface 2 of the Spine1, the uplink interface 3 of the Leaf-1 accesses the downlink interface 1 of the Spine2, and the uplink interface 4 accesses the downlink interface 1 of the Spine2.

[0082] The uplink interface 1 of the Leaf-2 accesses the downlink interface 3 of the Spine1, the uplink interface 2 accesses the downlink interface 4 of the Spine1, the uplink interface 3 of the Leaf-2 accesses the downlink interface 3 of the Spine2, and the uplink interface 4 accesses the downlink interface 4 of the Spine2.

[0083] The uplink interface 1 of the Leaf-3 accesses the downlink interface 5 of the Spine1, the uplink interface 2 accesses the downlink interface 6 of the Spine1, the uplink interface 3 of the Leaf-3 accesses the downlink interface 5 of the Spine2, and the uplink interface 4 accesses the downlink interface 6 of the Spine2.

[0084] The connection between each uplink interface of the Leaf device and each downlink interface of the Spine device is defined as a link.

[0085] When the network is initialized, the cost value of the link needs to be defined according to the link quality (such as the maximum available bandwidth) of each link. Preferably, if the maximum available bandwidth of each link is the same, the cost value of each link can be defined as the same value (such 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: determining a target path for transmitting the to-be-trained task packet according to the source and destination information of the to-be-trained task, 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 whole-network network topology information.

[0087] The cost value of each target link included in the target path is less than or equal to a preset value.

[0088] In the embodiment of the application, when the target path for transmitting the to-be-trained task packet is determined according to the source and destination information of the to-be-trained task, 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 whole-network network topology information, a preferred implementation manner is as follows:

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

[0090] According to the full-network network topology information and the mapping relationship between each ingress port of the first Leaf device and each equivalent route in the target equivalent route group corresponding to the destination address, at least one path between the first Leaf device and the second Leaf device is determined.

[0091] According to the cost values of each link included in the full-network network topology information, path cost values of the at least one path are respectively calculated.

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

[0093] In the embodiment of the application, before starting a training task, the source and destination five-tuple information (source and destination information) of the training task can be imported by calling the interface of the controller through the platform, so that the controller can determine the first Leaf device accessed by the source end and the second Leaf device accessed by the destination end through the host ARP information; then, the controller determines at least one forwarding path (each forwarding path includes a link) from the first Leaf device to the second Leaf device through the network topology information and the mapping relationship between each ingress port of the first Leaf device and each equivalent route in the target equivalent route group corresponding to the destination address; finally, the controller determines the forwarding path with the minimum total cost value of each link as the target path for transmitting the training task traffic based on the current cost value of each link maintained locally.

[0094] Specifically, assuming that the source end accesses Leaf1 and the destination end accesses Leaf2, Leaf1 has two ports accessing Spine1, and Leaf2 also has two ports accessing Spine1, the two ports of Spine1 accessing Leaf1 are ingress ports, the two ingress ports form a port group, the port group includes port 1 and port 2, the two ports of Spine1 accessing Leaf2 are egress ports (for example, port 3 and port 4), the equivalent route group with the source IP address as the destination address includes equivalent route 1 and equivalent route 2, wherein the egress port of equivalent route 1 is port 3 and the egress port of equivalent route 2 is port 4, 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 equivalent route group is port 1->port 3 and port 2->port 4, at this time, the determined paths include path 1: Leaf1->port 1 of Spine1->port 3 of Spine1->Leaf2 and path 2: Leaf1->port 2 of Spine1->port 4 of Spine1->Leaf2.

[0095] According to the cost values of the links included in the path 1 and the path 2, the sum of the cost values of the path 1 and the path 2 is calculated, the sum of the cost values is less than a preset value, and the path with the smaller sum of the cost values in the path 1 and the path 2 is used to transmit the traffic of the to-be-trained task.

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

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

[0098] In the embodiment of the application, after the controller determines the target path for forwarding the to-be-trained task message, the controller only issues a high-priority forwarding table item for forwarding the to-be-trained task message to each Leaf device included in the target path, without issuing a high-priority forwarding table item for forwarding the to-be-trained task message to each Spine device included in the target path. In this way, the occupation of ACL resources on the Spine device is greatly reduced, and the forwarding performance of the Spine device is greatly improved.

[0099] Each Spine device included in the target path determines the port group information to which the ingress port receiving the to-be-trained traffic belongs, and determines the equal-cost routing group information for forwarding the to-be-trained task message according to the destination address, and determines the target equal-cost route for forwarding the to-be-trained task message according to the mapping relationship between each ingress port included in the port group and each equal-cost route included in the equal-cost routing group, and forwards the to-be-trained task message based on the target equal-cost route.

[0100] Further, in the embodiment of the application, the controller maintains the current cost values of the links; therefore, after determining the target path for transmitting the to-be-trained task message, the above method can further include the following steps:

[0101] The current cost values of each target link included in the target path are added by 1.

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

[0103] The cost value of each link is updated in real time, so that the target path selected each time is the optimal path.

[0104] For example, refer to Figure 4 As shown in the figure, a detailed flowchart of a traffic forwarding method provided by the embodiment of the application is shown, the method is applied to a Spine device in a Spine-Leaf network, the ingress ports of the first Leaf device on the Spine device constitute a port group, and the mapping relationship between the ingress ports and the equal cost routes included in each equal cost route group is respectively constructed on the Spine device; the method comprises the following steps:

[0105] Step 400: receiving a packet sent by the first Leaf device.

[0106] Step 410: determining a target ingress port receiving the packet, and determining a target equal cost route group that can be used to route and forward the packet based on the destination address of the packet.

[0107] Step 420: determining a target equal cost route corresponding to the target ingress port from the target equal cost route group according to the target ingress port, the mapping relationship between the ingress ports and the equal cost routes included in the target equal cost route group.

[0108] Step 430: forwarding the packet based on the target equal cost route.

[0109] The process of the traffic forwarding method provided by the embodiment of the application will be described in detail in combination with a specific application scenario. For example, refer to Figure 5 As shown in the figure, a traffic forwarding process diagram provided by the embodiment of the application is shown; after the networking is completed, the controller will form an LBN rail group with the ingress interfaces of the spine device and each leaf, for example, Figure 5 As shown by the green arrows, each red dashed box is a group of ingress ports. After the configuration, the traffic of each group of ingress ports to the equal cost route egress interface of the destination IP is confirmed. That is, if the traffic of the leaf enters through the light-colored port and the destination is the leaf2 device, the traffic will exit through the light-colored port, and the LBN technology will guarantee the port mapping relationship.

[0110] For example, refer to Figure 6 As shown in the figure, another traffic forwarding process diagram provided by the embodiment of the application is shown. When routing, the controller will select the forwarding path with the minimum cost value according to the cost value routing rule, store it in the controller memory, and modify the link cost value information to trigger the leaf device configuration. For example, Figure 6The green or blue path in the figure is used to guide the traffic on the leaf device, and the spine device is used to forward the traffic according to the LBN mapping relationship. In this way, the controller can complete path navigation routing according to the source and destination of the traffic. The spine device does not need to send the traffic matrix to the spine device, thereby saving the ACL resources of the spine device and reducing the configuration interaction between the controller and the spine device in the routing process.

[0111] Based on the same inventive concept as the above-mentioned application embodiment applied to the controller, an exemplary structure of a traffic forwarding device provided by the embodiment of the application is shown in the figure. The device is applied to a controller in a Spine-Leaf spine network. The device includes: Figure 7 The acquisition unit 70 is configured to acquire network topology information of the whole network, host ARP information, and a mapping relationship between each ingress port included in each port group and each equal-cost route included in each equal-cost route group constructed on the spine device, wherein the network topology information of the whole network includes each link relationship and ingress / egress interface information included in each link;

[0112] The definition unit 71 is configured to define an 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.

[0113] The determination unit 72 is configured to determine a target path for transmitting a to-be-trained task packet according to source and destination information of the to-be-trained task, the host ARP information, the mapping relationship between each ingress port included in each port group and each equal-cost route included in each equal-cost route group constructed on each spine device, 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.

[0114] The delivery unit 73 is configured to deliver a forwarding flow table to each leaf device included in the target path, so that each target leaf device forwards the to-be-trained task packet based on the forwarding flow table. When the target spine device included in the target path receives the to-be-trained task packet, the target spine device determines a target equal-cost route corresponding to a target ingress port from the target equal-cost route group according to the target ingress port receiving the to-be-trained task packet, a target equal-cost route group corresponding to a destination address of the to-be-trained task packet, and the mapping relationship between each ingress port included in each port group and each equal-cost route included in each equal-cost route group constructed on the target spine device, and forwards the to-be-trained task packet based on the target equal-cost route.

[0115]

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

[0117] Based on the source and destination information and host ARP information, determine the first Leaf device accessed by the source end and the second Leaf device accessed by the destination end;

[0118] Based on the network topology information of the entire network and the mapping relationship between each inbound port of the first Leaf device and the target equivalent route group corresponding to the destination address built on each Spine device, at least one path between the first Leaf device and the second Leaf device is determined.

[0119] Based on the cost values ​​of each link included in the network topology information of the entire network, calculate the path cost value of each of the at least one path;

[0120] Based on the path cost value of the at least one path, the path with a path cost value less than or equal to a preset value is determined as the target path for transmitting the training task message.

[0121] Preferably, the controller maintains the current cost values ​​for each link; after determining the target path for transmitting the training task message, the apparatus further includes:

[0122] The update unit is used to increment the current cost value of each target link included in the target path by 1.

[0123] Preferably, the updating unit is further configured to:

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

[0125] Based on the same inventive concept as the above-described embodiments applied to Spine devices, see, for example, the following: Figure 8 The diagram shown is a schematic representation of a traffic forwarding device provided in an embodiment of this application. This device is applied to a Spine device in a Spine-Leaf network. Each ingress port connected to a first Leaf device on the Spine device forms a port group. The Spine device has a mapping relationship between each ingress port and each equal-cost route included in each equal-cost route group. The device includes:

[0126] The receiving unit 80 is configured to receive the packet sent by the first Leaf device.

[0127] The determining unit 81 is configured to determine a target ingress port receiving the packet, and determine a target equal-cost route group available for routing and forwarding the packet based on a destination address of the packet.

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

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

[0130] The above units can be one or more integrated circuits configured to implement the above method, for example, one or more application specific integrated circuits (ASICs), or one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs), etc. For another example, when a certain unit above is implemented in the form of a processing element scheduling code, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor capable of invoking program code. For another example, the units can be integrated together to implement in the form of a system on a chip (SOC).

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

[0132] The memory 90 is configured to store program instructions, and the processor 91 invokes the program instructions stored in the memory 90 to execute the above-mentioned method embodiments applied to the controller according to the obtained program instructions. The specific implementation and technical effects 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-mentioned method embodiments applied to the controller.

[0134] Optionally, the present application also provides a program product, for example, a computer readable storage medium, which stores computer executable instructions for causing the computer to execute the above method embodiments applied to the controller.

[0135] Further, the electronic device provided by the embodiments of the present application can be seen from the hardware architecture diagram of the electronic device from the hardware level Figure 10 As shown in the figure, the electronic device can include a memory 100 and a processor 110,

[0136] The memory 100 is configured to store program instructions, and the processor 110 invokes the program instructions stored in the memory 100 to execute the above method embodiments applied to the Spine device according to the obtained program instructions. The specific implementation and technical effects 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 method embodiments applied to the Spine device.

[0138] Optionally, the present application also provides a program product, for example, a computer readable storage medium, which stores computer executable instructions for causing the computer to execute the above method embodiments applied to the Spine device.

[0139] Here, the machine readable storage medium can be any electronic, magnetic, optical, or other physical storage apparatus, and can contain or store information such as executable instructions, data, and the like. For example, the machine readable storage medium can be RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard drives), solid state drives, any type of storage disk (such as optical, DVD, etc.), or similar storage media, or a combination thereof.

[0140] The system, device, module or unit illustrated in the above embodiments can be specifically implemented by a computer chip or entity, or by a product with certain functions. A typical implementation device is a computer, and the specific form of the computer can be 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 device, 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 as various units respectively described in functions. Of course, the functions of each unit can be implemented in the same or more software and / or hardware in the implementation of the present application.

[0142] Those skilled in the art will appreciate that embodiments of the application can be readily used as software, hardware, or a combination of software and hardware. In a software embodiment, the methods can be tangibly embodied in a machine-readable storage medium having stored thereon instructions that can be used to program a computer to perform any of the operations described herein. The software implementation can be for example, in the form of a computer program product. The software implementation can be implemented in a centralized fashion in one computer system or processor, or in a distributed fashion where different elements are spread across several interconnected computer systems or processors.

[0143] The present application is described in reference to the drawings, which are as follows: Figure 1 Figure 1

[0144] Furthermore, these computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the Figure 1 Figure 1

[0145] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the Figure 1 Figure 1

[0146] The above description is embodied in the context of only a few of its many embodiments. The intent is not to limit the present application to these embodiments, but on the contrary, the intent is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the present application.​​​​​​

Claims

1. A traffic forwarding method, characterized by, The method is applied to a controller in a Spine-Leaf network, and the method comprises: obtaining network topology information of the whole network, host ARP information, and a mapping relationship between each ingress port included in each port group constructed on a Spine device and each equal-cost route included in each equal-cost route group, wherein the network topology information of the whole network comprises link relationships and ingress / egress interface information included in each link; defining an 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; determining a target path for transmitting a to-be-trained task packet according to source / destination information of the to-be-trained task, 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, wherein the cost value of each target link included in the target path is less than or equal to a preset value; issuing a forwarding flow table to each Leaf device included in the target path, so that each target Leaf device forwards the to-be-trained task packet based on the forwarding flow table, wherein when receiving the to-be-trained task packet, a target Spine device included in the target path determines a target equal-cost route corresponding to a target ingress port receiving the to-be-trained task packet and a target equal-cost route group corresponding to a destination address of the to-be-trained task packet from the target equal-cost route group according to the target ingress port, the target equal-cost route group, and the mapping relationship between each ingress port included in each port group constructed on the target Spine device and each equal-cost route included in each equal-cost route group, and forwards the to-be-trained task packet based on the target equal-cost route.

2. The method of claim 1, wherein, The step of determining a target path for transmitting the to-be-trained task packet according to source / destination information of the to-be-trained task, 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 comprises: determining a first Leaf device accessed by a source end and a second Leaf device accessed by a destination end according to the source / destination information and the host ARP information; determining at least one path between the first Leaf device and the second Leaf device according to the network topology information of the whole network and the mapping relationship between each ingress port accessing the first Leaf device and each equal-cost route included in a target equal-cost route group corresponding to a destination address on each Spine device; calculating path cost values 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; determining a path with a path cost value less than or equal to a preset value as the target path for transmitting the to-be-trained task packet according to the path cost values of the at least one path.

3. The method of claim 1 or 2, wherein, The controller maintains a current cost value of each link; after determining the target path for transmitting the to-be-trained task packet, the method further comprises: The current cost value of each target link included in the target path is accumulated by 1.

4. The method of claim 3, wherein, The method further comprises: When the target path is released after detecting that the to-be-trained task is trained, the current cost value of each target link included in the target path is decremented by 1.

5. A traffic forwarding method, characterized by, The Spine device in the Spine-Leaf network, the ingress ports of the first Leaf device on the Spine device form a port group, and the mapping relationship between the ingress ports and the equal-cost routes included in the equal-cost route group is constructed on the Spine device; the controller in the Spine-Leaf network obtains the network topology information of the whole network, host ARP information, and the mapping relationship between the ingress ports included in each port group and the equal-cost routes included in each equal-cost route group constructed on the Spine device, wherein the network topology information of the whole network includes link relationships and interface information of ingress and egress interfaces included in each link; the initial cost value of each link included in the network topology information of the whole network is defined, 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 to-be-trained task, the host ARP information, the mapping relationship between the ingress ports included in each port group and the equal-cost routes included in each equal-cost route group constructed on each Spine device, and the cost value of each link included in the network topology information of the whole network, a target path for transmitting a to-be-trained task message is determined, 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 to-be-trained task message based on the forwarding flow table; the method comprises: Receiving a to-be-trained task message sent by the first Leaf device; Determining a target ingress port receiving the to-be-trained task message, and determining a target equal-cost route group that can be used to route and forward the to-be-trained task message based on the destination address of the to-be-trained task message; According to the target ingress port, the mapping relationship between the ingress ports and the equal-cost routes included in the target equal-cost route group, a target equal-cost route corresponding to the target ingress port is determined from the target equal-cost route group. Forwarding the to-be-trained task message based on the target equal-cost route.

6. A traffic forwarding device, characterized by The controller in the Spine-Leaf network, the device comprises: An acquisition unit is configured to acquire network topology information of the whole network, host ARP information, and a mapping relationship between ingress ports included in each port group and equal-cost routes included in each equal-cost route group constructed on a Spine device, wherein the network topology information of the whole network includes link relationships and interface information of ingress and egress interfaces included in each link; An definition unit is configured to define an 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; The determining unit is configured to determine a target path for transmitting the to-be-trained task packet according to source and destination information of the to-be-trained task, host ARP information, a mapping relationship between each ingress port included in each port group constructed on each Spine device and each equivalent route included in each equivalent route group, and an expense value of each link included in the whole-network network topology information, wherein the expense value of each target link included in the target path is less than or equal to a preset value. The issuing unit is configured to issue a forwarding flow table to each Leaf device included in the target path, so that each target Leaf device forwards the to-be-trained task packet based on the forwarding flow table. When a target Spine device included in the target path receives the to-be-trained task packet, the target Spine device determines a target equivalent route corresponding to a target ingress port receiving the to-be-trained task packet and a target equivalent route group corresponding to a destination address of the to-be-trained task packet from the target equivalent route group according to the target ingress port, the target equivalent route group, and the mapping relationship between each ingress port included in each port group constructed on the target Spine device and each equivalent route included in each equivalent route group, and forwards the to-be-trained task packet based on the target equivalent route.

7. The apparatus of claim 6, wherein, When determining a target path for transmitting the to-be-trained task packet according to source and destination information of the to-be-trained task, host ARP information, a mapping relationship between each ingress port included in each port group constructed on each Spine device and each equivalent route included in each equivalent route group, and an expense value of each link included in the whole-network network topology information, the determining unit is specifically configured to: determine a first Leaf device accessed by a source end and a second Leaf device accessed by a destination end according to the source and destination information and the host ARP information; determine at least one path between the first Leaf device and the second Leaf device according to the whole-network network topology information and a mapping relationship between each ingress port accessing the first Leaf device and each equivalent route included in a target equivalent route group corresponding to a destination address on each Spine device; calculate a path expense value of the at least one path according to the expense value of each link included in the whole-network network topology information; determine a path with a path expense value less than or equal to a preset value as the target path for transmitting the to-be-trained task packet according to the path expense value of the at least one path.

8. A traffic forwarding device, characterized by The Spine device applied to the Spine-Leaf network, the ingress ports of the Spine device accessing the first Leaf device constitute a port group, and the Spine device respectively constructs a mapping relationship between the ingress ports and the equal cost routes included in the equal cost route group, a controller in the Spine-Leaf network obtains the network topology information of the whole network, host ARP information, and the mapping relationship between the ingress ports included in each port group on the Spine device and the equal cost routes included in each equal cost route group, wherein the network topology information of the whole network includes link relationships and interface information of ingress and egress interfaces included in each link; define 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 to-be-trained task, the host ARP information, the mapping relationship between the ingress ports included in each port group 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 whole network, determine a target path for transmitting a to-be-trained task message, wherein the cost value of each target link included in the target path is less than or equal to a preset value; issue a forwarding flow table to each Leaf device included in the target path, so that each target Leaf device forwards the to-be-trained task message based on the forwarding flow table; the device comprises: A receiving unit configured to receive a to-be-trained task message sent by the first Leaf device; A determining unit configured to determine a target ingress port receiving the to-be-trained task message and determine a target equal cost route group that can be used to route and forward the to-be-trained task message based on a destination address of the to-be-trained task message; The determining unit is further configured to determine a target equal cost route corresponding to the target ingress port from the target equal cost route group according to the target ingress port and the mapping relationship between the ingress ports and the equal cost routes included in the target equal cost route group; A forwarding unit configured to forward the to-be-trained task message based on the target equal cost route.

9. An electronic device, comprising: The electronic device comprises: A memory configured to store program instructions; A processor configured to invoke the program instructions stored in the memory and perform the steps of the method according to any one of claims 1-4 or 5.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing the computer to perform the steps of the method according to any one of claims 1-4 or 5.

Citation Information

Patent Citations

  • Packet forwarding method and packet forwarding device

    CN104022952A

  • Method and device for realizing double control planes

    CN108632122A