Message forwarding method and device, storage medium and computer program product
By adopting a message-by-message distribution mechanism in the message forwarding method of the intelligent computing center, and selecting multi-path forwarding based on container and device identification information, the problem of low network utilization in the intelligent computing center is solved, and efficient network resource utilization is achieved.
Patent Information
- Application Number
- CN202411354603.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2044-09-26
AI Technical Summary
In existing technologies, the network utilization rate of intelligent computing centers is low, especially when east-west and north-south traffic is mixed. The standard Ethernet flow-based ECMP scheme leads to some links being congested and others being idle, resulting in low network utilization.
The method of message-by-message distribution is adopted. East-west traffic is routed and forwarded using GSE header information. North-south traffic is still distributed message-by-message. By adding container identifier and device identifier information to the message header, different forwarding devices are selected to achieve multiple forwarding paths for a single data flow.
It improved network utilization, ensured efficient use of network resources, avoided link congestion, and increased network bandwidth for AI computing power.
Smart Images

Figure CN119316384B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of network, and particularly relates to a message forwarding method and device, a storage medium and a computer program product. BACKGROUND
[0002] In the related art, there are two schemes for east-west traffic in an intelligent computing center, one is a standard-based equal-cost multi-path (ECMP) scheme, and the other is a per-packet spraying scheme; and a standard ECMP scheme is adopted for north-south traffic in the intelligent computing center. However, for an intelligent computing center in which both east-west traffic and north-south traffic exist, a mainstream scheme adopts a per-flow ECMP scheme.
[0003] However, the standard Ethernet-based ECMP scheme, the flow feature of AI training is that the number of flows is small but the bandwidth of a single flow is large, and per-flow forwarding is extremely easy to cause multiple flows to be hashed to the same link, causing part of the link to be congested and part of the link to be idle, and the network utilization is low. SUMMARY
[0004] Therefore, the present application provides a message forwarding method and device, a storage medium and a computer program product, which can improve the utilization of the network.
[0005] The technical scheme of the present application is implemented as follows:
[0006] In a first aspect, the present application provides a message forwarding method applied to a first device, and the method comprises the following steps:
[0007] Based on the received first message, first information is determined, wherein the first information comprises container identification information of the first message and second device identification information of a destination device corresponding to the first message;
[0008] Based on the second device identification information, one or more message forwarding devices are determined;
[0009] Based on the first device identification information and the container identification information of the first device, a target forwarding device is determined from the one or more message forwarding devices;
[0010] The first information and the first device identification information are added to the first message to obtain a second message, and the second message is forwarded to the target forwarding device, so that the target forwarding device forwards the second message to the destination device.
[0011] In a second aspect, the present application provides a message forwarding method applied to a target forwarding device, and the method comprises the following steps:
[0012] receive a second packet sent by the first device, wherein the second packet is obtained by adding, by the first device, first information and first device identification information of the first device to the received first packet, the first information including container identification information of the first packet and second device identification information of a destination device corresponding to the first packet;
[0013] forward the second packet to the destination device.
[0014] In a third aspect, a first device is provided, and the first device includes:
[0015] a determining unit configured to determine first information based on the received first packet, wherein the first information includes container identification information of the first packet and second device identification information of a destination device corresponding to the first packet;
[0016] the determining unit is further configured to determine one or more packet forwarding devices based on the second device identification information;
[0017] the determining unit is further configured to determine a target forwarding device from the one or more packet forwarding devices based on the first device identification information of the first device and the container identification information;
[0018] a first forwarding unit configured to add the first information and the first device identification information to the first packet to obtain a second packet, and forward the second packet to the target forwarding device, so that the target forwarding device forwards the second packet to the destination device.
[0019] In a fourth aspect, a target forwarding device is provided, and the target forwarding device includes:
[0020] a receiving unit configured to receive a second packet sent by the first device, wherein the second packet is obtained by adding, by the first device, first information and first device identification information of the first device to the received first packet, the first information including container identification information of the first packet and second device identification information of a destination device corresponding to the first packet;
[0021] a second forwarding unit configured to forward the second packet to the destination device.
[0022] In a fifth aspect, a first device is provided, and the first device includes a first processor and a first memory, and the first processor implements the packet forwarding method on the first device side when executing a running program stored in the first memory.
[0023] In a sixth aspect, a target forwarding device is provided, and the target forwarding device includes a second processor and a second memory, and the second processor implements the packet forwarding method on the target forwarding device side when executing a running program stored in the second memory.
[0024] In a seventh aspect, the present application provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the packet forwarding method on the first device side or the packet forwarding method on the target forwarding device side.
[0025] In an eighth aspect, the present application provides a computer program product comprising a computer program, which, when executed by a processor, implements the packet forwarding method on the first device side or the packet forwarding method on the target forwarding device side.
[0026] The present application provides a packet forwarding method, device, storage medium and computer program product. The method comprises: determining, by a first device, first information based on a received first packet, wherein the first information comprises container identification information of the first packet and second device identification information of a target device corresponding to the first packet; determining one or more packet forwarding devices based on the second device identification information; determining a target forwarding device from the one or more packet forwarding devices based on first device identification information of the first device and the container identification information; adding the first information and the first device identification information to the first packet to obtain a second packet; and forwarding the second packet to the target forwarding device, so that the target forwarding device forwards the second packet to the target device. The target forwarding device receives the second packet sent by the first device, wherein the second packet is obtained by adding the first information and the first device identification information of the first device to the received first packet, and the first information comprises the container identification information of the first packet and the second device identification information of the target device corresponding to the first packet. The second packet is forwarded to the target device. In the above implementation scheme, when the first device receives the first packet, the packet header information corresponding to the first packet is determined first. The second device identification information and the container identification information are contained in the packet header information. In the process of packet forwarding, the target device to which the packet is forwarded can be determined according to the second device identification information. The packet forwarding device corresponding to the packet can be selected according to the first device identification information of the first device and the container identification information. Therefore, in the case that the first device identification information and the container information are different, the selected packet forwarding devices are different. Therefore, multiple packets of a data stream can be forwarded to the same target device through different forwarding devices, the data stream can be forwarded through multiple paths, and the utilization rate of the network can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0027] Figure 1 A packet forwarding method flowchart provided by an embodiment of the present application Figure One ;
[0028] Figure 2An exemplary schematic diagram of a topology relationship between network devices is provided for the embodiments of the present application.
[0029] Figure 3 A message forwarding method flowchart is provided for the embodiments of the present application Figure Two ;
[0030] Figure 4 A schematic diagram of a component structure of a first device is provided for the embodiments of the present application Figure One ;
[0031] Figure 5 A schematic diagram of a component structure of a first device is provided for the embodiments of the present application Figure Two ;
[0032] Figure 6 A schematic diagram of a component structure of a target forwarding device is provided for the embodiments of the present application Figure One ;
[0033] Figure 7 A schematic diagram of a component structure of a target forwarding device is provided for the embodiments of the present application Figure Two . DETAILED DESCRIPTION
[0034] In order to enable a person skilled in the art to better understand the features and technical contents of the embodiments of the present application, the technical solutions of the present application are further described in detail below with reference to the accompanying drawings and specific embodiments of the present application. The accompanying drawings are only used for reference and are not intended to limit the embodiments of the present application.
[0035] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by a person skilled in the art to which the present application belongs. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0036] In the following description, "some embodiments" are described, which describe a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict. It should be noted that the term "first / second / third" involved in the embodiments of the present application is only used to distinguish similar objects, and does not represent a specific order of the objects. It can be understood that "first / second / third" can be interchanged with a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0037] The development trend of large model technology still generally follows the scaling law (expressed in English as ScalingLaw), which has parameters that have reached the trillion or even the hundred trillion scale. The evolution of a ten-thousand-card-level Graphics Processing Unit (GPU) cluster subnetwork is inevitable. Due to infrastructure constraints, especially power resources, it may be difficult for a single node to meet the ten-thousand-card-level scale, and building a large cluster through long-distance interconnection is an inevitable trend. At the same time, due to the phenomenon of regional, time period, and stage construction of intelligent computing centers, multiple computing resource islands are formed, and resource integration through network capabilities is also a trend.
[0038] In the related art, there are two solutions for east-west traffic in an intelligent computing center: one is a standard-based ECMP solution, and the other is a per-packet spraying solution. The north-south traffic of the intelligent computing center adopts a standard-based ECMP solution.
[0039] For a situation where an intelligent computing center has both east-west traffic and north-south traffic, the main solution adopts an ECMP solution.
[0040] However, in the related art, the standard Ethernet flow-based ECMP solution has the following problems: the flow characteristics of Artificial Intelligence (AI) training are that the number of flows is small but the bandwidth of a single flow is large. If a per-flow forwarding method is used, it is easy to cause multiple flows to hash to the same link, causing some links to be congested and some to be idle, resulting in low network utilization and an inability to handle sudden network traffic.
[0041] To solve the above problems, the embodiments of the present application mainly solve the problem of using per-packet distribution for east-west traffic in an intelligent computing center and still using per-packet distribution for north-south traffic, so as to maximize network utilization.
[0042] The detailed solution of the routing and forwarding method for different flow types in a Data Center (DC) proposed by the embodiments of the present application is as follows:
[0043] The embodiments of the present application provide a packet forwarding method, as shown in Figure 1 The method can include the following steps:
[0044] S101, determining first information based on a received first packet.
[0045] The first information includes container identification information of the first packet and second device identification information of a destination device corresponding to the first packet.
[0046] In the embodiments of the present application, the first device is a global scheduling processor (GSP) device (or GSP node).
[0047] It should be noted that the first device can also be referred to as a source GSP (i.e., SGSP) in the following embodiments.
[0048] In the embodiments of the present application, the first message received by the GSP device can be an Internet Protocol (IP) message sent by the GPU device.
[0049] In the embodiments of the present application, the destination device can be a GSP device or a data center gateway (DC GW) device.
[0050] It should be noted that the specific type of the destination device can be determined according to the direction of the data flow. If it is east-west traffic, the destination device is a GSP device, and if it is north-south traffic, the destination device is a DC GW device.
[0051] In the embodiments of the present application, based on the received first message, the first information is determined, which can be implemented in the following manner:
[0052] Based on the destination address carried by the first message, the traffic direction of the first message is determined. In the case where the traffic direction is the first traffic direction, the device identifier information of the destination device found according to the destination address is obtained, and the device identifier information of the destination device is determined as the second device identifier information. In the case where the traffic direction is the second traffic direction, the device identifier information of the data center gateway device is obtained, and the device identifier information of the data center gateway device is determined as the second device identifier information.
[0053] In the embodiments of the present application, the destination address is a destination IP address (i.e., DIP) carried by the first message.
[0054] In the embodiments of the present application, the traffic direction includes a first traffic direction and a second traffic direction, wherein the first traffic direction is east-west traffic, and the second traffic direction is north-south traffic.
[0055] In the embodiments of the present application, based on the destination address carried by the first message, the traffic direction of the first message is determined, which can be implemented in the following manner:
[0056] Based on the destination address, the destination device corresponding to the destination address is found in a preset routing table. In the case where the destination device is found, it is determined that the traffic direction of the first message is the first traffic direction. Or, in the case where the destination device is not found, it is determined that the traffic direction of the first message is the second traffic direction.
[0057] In the embodiment of the present application, if the GSP1 device receives the IP packet sent by the GPU-A device, the DIP carried in the IP packet is used to search the routing table. If the IP packet corresponds to east-west traffic, the DGSP device corresponding to the IP address can be found. For example, if the GPU-A device accesses the GPU-B device, the GSP device under the GPU-B device, i.e., the DGSP device, can be found according to the routing table. If the IP packet corresponds to north-south traffic, the DGSP device corresponding to the IP address cannot be found. Therefore, the destination device corresponding to the IP packet can be found according to the destination address carried in the IP packet, so as to determine the traffic direction of the IP packet.
[0058] In the embodiment of the present application, if the DGSP device is found according to the DIP carried in the IP packet in the routing table, it is determined that the traffic direction of the IP packet is east-west traffic.
[0059] In the embodiment of the present application, if the DGSP device is not found according to the DIP carried in the IP packet in the routing table, it is determined that the traffic direction of the IP packet is north-south traffic.
[0060] In the embodiment of the present application, if it is determined that the traffic direction of the IP packet is east-west traffic, the device identifier information (i.e., DGSP-ID) of the found DGSP device is obtained, and the DGSP-ID information is determined as the second device identifier information corresponding to the destination device.
[0061] In the embodiment of the present application, if it is determined that the traffic direction of the IP packet is north-south traffic, the DGSP device cannot be found, and the default route to the DC GW gateway device is needed. Therefore, the device identifier information of the DC GW gateway device is obtained, and the device identifier information of the DC GW gateway device is used as the second device identifier information.
[0062] It should be noted that the DC GW gateway device at this time can be equivalent to the DGSP device.
[0063] In the embodiment of the present application, after the GSP device receives the IP packet, the second device identifier information of the DGSP device is obtained, and the port information and the priority information of the DGSP device are also obtained. Similarly, after the second device identifier information of the DC GW gateway device is obtained, the port information and the priority information of the DC GW gateway device are also obtained.
[0064] In the embodiment of the present application, the ID in the second device identifier information (i.e., DGSP-ID) of the DC GW gateway device is all F, and the port information is all 0.
[0065] In the embodiment of the present application, the GSP device allocates a container ID (i.e. container identification information) to the received first packet. Specifically, there are two cases. One case is for east-west traffic. Specifically, the GSP device (e.g. a source GSP device) can construct the granularity of the container based on a device level, a port level or a dynamic global queue level, and allocate a container ID (Container-ID) to the IP packet according to the container construction granularity (i.e. the device level, the port level or the dynamic global queue level) and allocation principles (e.g. the length of a container is 32 kb, if the container reaches 32 kb, it means that the container has reached the upper limit, and the next container can be allocated to the IP packet). The dynamic global scheduling queue (DGSQ) includes DGSP-ID information, port information and priority information of the DGSP device determined according to the first packet, or the DGSQ includes DGSP-ID information, port information and priority information of the DC GW gateway device determined according to the first packet.
[0066] The other case is for north-south traffic. Specifically, the GSP device (e.g. a source GSP device) can construct the granularity of the container based on a device level, and allocate a container ID to the IP packet according to the container construction granularity (i.e. the device level) and allocation principles.
[0067] In the embodiment of the present application, based on the second device identification information, one or more packet forwarding devices can be determined in the following manner:
[0068] In the embodiment of the present application, based on the second device identification information, one or more packet forwarding devices can be determined in the following manner:
[0069] Based on the second device identification information and the obtained inter-device topology connection relationship, one or more packet forwarding devices are determined.
[0070] In the embodiment of the present application, the inter-device topology connection relationship can be sent to the first device by a global scheduling operating system (GSOS), and the GSOS needs to determine the inter-device topology connection relationship before sending the inter-device topology connection relationship.
[0071] In the embodiment of the present application, the GSOS can determine the inter-device topology connection relationship in the following manner:
[0072] For example, the inter-device topology connection relationship is determined by the GSOS in the following manner: Figure 2 For example, the inter-device topology connection relationship is determined by the GSOS in the following manner: Figure 2After the connection of the network devices (i.e. including GSP devices, GSF devices, DC GW gateway devices, etc.), the network devices discover their respective adjacent network devices through a Link Layer Discovery Protocol (LLDP), and send all acquired adjacent network device neighbor information (including each connected device, physical connection relationship, etc. such as which interface of GSP1 connects GSF1 and which interface of GSP1 connects GSF2) to the GSOS, and the GSOS acquires device information and interconnection interface information of all connected network devices.
[0073] Further, the GSOS aggregates all global GSP devices (also referred to as GSP nodes) and port information (such as port information between GSP devices and GSF devices, GPU-A devices), and allocates corresponding device ID information for all devices, wherein a special GSP-ID value is allocated for the DC GW gateway device (also understood as a virtual device of two GWs), such as all F, i.e. GSP-F, and the device ID information of all devices is synchronized to all GSP devices, GSF devices, DC GW gateway devices, etc.
[0074] In this way, the GSOS device sends the topology connection relationship to the destination GSP (i.e. DGSP) to all devices in the form of a next hop link family based on the acquired information. For example, the following table 1 can be sent to GSP1 as the next hop link family, and table 1 is as follows:
[0075] Table 1
[0076]
[0077] As can be seen from table 1, if the DGSP is GSP4, i.e. when the GSP1 device sends an IP packet to GSP4, the next hop device of the GSP1 device can be GSF1 or GSF2; if the DGSP is GSPF, i.e. when the GSP1 device sends an IP packet to the GSPF device, the next hop device of the GSP1 device can be GSF1 or GSF2.
[0078] In the embodiments of the present application, since the GSOS sends the inter-device topology relationship to the GSP, the GSP device can find the corresponding next hop device (i.e. packet forwarding device) according to the second device identifier information of the destination device of the IP packet (such as the second device identifier information of the destination device of the IP packet is GSP4) in the inter-device topology relationship.
[0079] It should be noted that according to the actual inter-device topology relationship, the number of packet forwarding devices can be one or more.
[0080] S103, determining, from the one or more message forwarding devices, the target forwarding device based on the first device identifier information of the first device and the container identifier information.
[0081] In the embodiment of the present application, after the first message is assigned with the corresponding container ID, the first device can select the target forwarding device according to the identifier information (i.e. SGSP-ID) of the first device and the Container-ID, because the first device stores the first device identifier information itself.
[0082] In the embodiment of the present application, when the SGSP-ID is determined, the load balancing is performed based on the message container when the target forwarding device is selected, and the interface (for example, the out interface of GSP1 connected with GSF1) is selected according to the load balancing mechanism (such as round robin, random or based on congestion awareness) of the message container, and the target forwarding device corresponding to the first device is determined after the out interface is determined.
[0083] It should be noted that the selected out interface is the same when the SGSP-ID and the Container-ID are the same, for example, a data stream contains IP message 1 and IP message 2, the SGSP-ID and the Container-ID of the IP message 1 and the IP message 2 are the same, and if the IP message 1 selects GSF1, the IP message 2 also corresponds to GSF1.
[0084] If a data stream contains IP message 1 and IP message 2, the SGSP-ID and the Container-ID of the IP message 1 and the IP message 2 are different, and if the IP message selects GSF1, the IP message 2 can select GSF2.
[0085] S104, adding the first information and the first device identifier information to the first message to obtain a second message, and forwarding the second message to the target forwarding device, so that the target forwarding device forwards the second message to the destination device.
[0086] In the embodiment of the present application, after the first device determines the target forwarding device, the GSE header information is encapsulated between MAC and IP, wherein the GSE header information includes the second device identifier information (i.e. DGSP-ID), the container identifier information (i.e. Container-ID), and the first device identifier information (i.e. SGSP-ID).
[0087] It should be noted that, in addition to the DGSP-ID, the Container-ID and the SGSP-ID, the GSE header information can also include Dport (i.e. destination port), Pri (i.e. priority), container start and end identifier bit, data message information and the like.
[0088] It should be noted that, for the north-south flow, the corresponding DGSP-ID is a special value, such as all F, that is, DGSP-F, and Dport is all 0.
[0089] In the embodiment of the present application, the first message is encapsulated with GSE header information to obtain a second message, and the second message is sent to the selected target forwarding device, and further, the target forwarding device forwards the second message to the destination device for further processing.
[0090] It can be understood that, in the message forwarding method provided in the embodiment of the present application, when the first device receives the first message, the message header information corresponding to the first message is determined first. Since the second device identification information and the container identification information are contained in the message header information, in the process of message forwarding, the destination device to which the message is forwarded can be determined according to the second device identification information, and the message forwarding device corresponding to the message can be selected according to the first device identification information and the container identification information of the first device. Therefore, in the case that the first device identification information and the container information are different, the selected message forwarding device is different, so that multiple messages of a data flow can be forwarded to the same destination device through different forwarding devices, the multi-path forwarding of a data flow is realized, and the utilization rate of the network is improved.
[0091] The embodiment of the present application also provides a message forwarding method, as shown in Figure 3 The method can include the following steps.
[0092] S301, receiving a second message sent by a first device.
[0093] The second message is obtained by adding the first information and the first device identification information of the first device to the received first message, and the first information includes the container identification information of the first message and the second device identification information of the destination device corresponding to the first message.
[0094] In the embodiment of the present application, the target forwarding device can be a GSF device.
[0095] In the embodiment of the present application, the first device is a GSP device, such as a source GSP (i.e., SGSP) device.
[0096] In the embodiment of the present application, the first message is an IP message, and the second message is obtained by adding GSE header information to the IP message. The GSE header information contains Container-ID, DGSP-ID, SGSP-ID, etc.
[0097] S302, forwarding the second message to the destination device.
[0098] In the embodiments of the present application, the GSF device forwards the received second packet to the corresponding destination device, which can be implemented in the following manner:
[0099] Based on the second device identification information, the traffic direction of the second packet is determined; in the case that the traffic direction is the second traffic direction, the second packet is forwarded to the destination device based on the quintuple information carried by the second packet; or, the next hop device of the packet forwarding device is determined based on the first device identification and the container identification information, and the second packet is sent to the next hop device, until the next hop device forwards the second packet to the destination device based on the quintuple information carried by the second packet; or, in the case that the traffic direction is the first traffic direction, the second packet is sent to the destination device; or, the next hop device of the packet forwarding device is determined based on the first device identification and the container identification information, and the second packet is sent to the next hop device, until the next hop device forwards the second packet to the destination device.
[0100] In the embodiments of the present application, when the second packet arrives at the GSF device, the processing manner of the GSF device is as follows:
[0101] The GSF device checks the GSE header information of the second packet, and determines the corresponding traffic direction of the second packet according to the DGSP-ID in the GSE header information.
[0102] If it is determined that the DGSP-ID is all F, it is determined that the traffic direction of the second packet is the north-south traffic, then the GSF performs routing according to the quintuple information of the second packet, in order to ensure that the same quintuple information can be forwarded to the same DC GW gateway device, the GSF needs to be consistent based on the quintuple hash (i.e. hash) algorithm and the routing principle, for example, all the second packets corresponding to hash1 are forwarded to DC GW1, and the out-interface is selected as the out-interface of GSF1 corresponding to DC GW1; GSF2 is the same, if the forwarding is through GSF2, then the out-interface of the second packet corresponding to hash1 is the out-interface from GSF2 to DC GW1.
[0103] The above process is only described by taking Figure 2 as an example, but in the actual environment, there may also be multiple layers of GSF devices, such as adding multiple layers of GSF devices on the basis of the GSF1 device and the GSF2 device in Figure 2 In this case, the next hop device of the current GSF device needs to be further selected according to the Container-ID and the SGSP-ID, and the second packet is further forwarded to the next hop device, and so on, until the final next hop device is selected, and the final next hop device finally forwards the second packet to the corresponding DC GW gateway device through the quintuple information.
[0104] If it is determined that the DGSP-ID is not full F, and it is determined that the traffic direction of the second packet is east-west traffic, the second packet is directly forwarded to the destination device (such as GSP4).
[0105] The above process of directly forwarding the second packet to the destination device is only described by taking Figure 2 as an example, but in actual environment, there can be multiple layers of GSF devices, such as adding multiple layers of GSF devices on the basis of the GSF1 device and the GSF2 device of Figure 2 , in which case, further routing needs to be performed according to the GSE header information, and the routing principle is round-robin, random, or based on congestion awareness. That is, the next-hop device of the current GSF is selected through the GSE header information, and the second packet is sent to the next-hop device, and so on, until the final next-hop device is selected, and the second packet is forwarded to the destination device (such as GSP4) through the final next-hop device.
[0106] It can be understood that in the packet forwarding method provided by the embodiments of the present application, when the target forwarding device receives the second packet, because the second device identification information and the container identification information are contained in the packet header information of the second packet, in the process of packet forwarding, the destination device to which the packet is specifically forwarded can be determined according to the second device identification information, and the next-hop packet forwarding device corresponding to the packet can be selected according to the first device identification information and the container identification information. Therefore, in the case where the first device identification information and the container information are different, the selected packet forwarding device is different, so that multiple packets of a data stream can be forwarded to the same destination device through different packet forwarding devices, the data stream is forwarded through multiple paths, and the utilization rate of the network can be improved.
[0107] In an embodiment of the present application, the destination GSP (i.e. DGSP) device can also perform the following processing when receiving the second packet.
[0108] The DGSP device (such as GSP4 or DC GW1) receives the second packet sent by the GSF device, finds that the DMAC is the local address, and identifies whether it is a packet carrying GSE header information according to the value of the Ether Type. If it is, the container identification information carried in the GSE header information is sorted, and then the GSE header information is stripped, and then corresponding forwarding is performed.
[0109] It should be noted that because the problem of out-of-order may occur in the process of packet transmission, sorting is needed.
[0110] Based on the above embodiments, the embodiments of the present application can mainly include the following points:
[0111] (1) The SGSP device distinguishes whether the traffic is east-west traffic or north-south traffic according to whether the DIP can find corresponding DGSP information.
[0112] (2) The SGSP supports different container construction granularities according to different traffic direction types, supports allocating container IDs based on device level for north-south traffic, and supports allocating container IDs based on device level, port level, and DGSQ level for east-west traffic.
[0113] (3) The GSF device supports selecting different hash algorithms according to different traffic types, supports performing hash based on the GSE header for east-west traffic, and supports performing hash based on the five-tuple for north-south traffic, that is, different hash algorithms are supported according to different ports.
[0114] (4) The interfaces of different GSF devices connected to the DC GW need to support the same hash principle, such as selecting the same outgoing interface for the same key value, to ensure that the same five-tuple packet reaches the same DC GW device.
[0115] (5) The destination GSP device includes the DC GW gateway device, supports container inter-ordering based on the GSE header information, and supports stripping the GSE header information.
[0116] The above technical solutions have the following technical advantages:
[0117] The embodiment of the present application is based on the characteristics of the AI large model business traffic feature, the small number of streams, and the large bandwidth of single stream, and the new demand of cluster cross-DC intercommunication, and proposes a routing and forwarding mechanism for different flow direction traffic types, that is, for east-west traffic, the entire DC network adopts GSE header information for routing and forwarding to ensure that the per-packet container load balancing mechanism takes effect, realizes single-flow multi-path, and improves network utilization; and for north-south traffic, still based on GSE header forwarding, but the GSF device directly connected to the DC GW needs to select the path based on the five-tuple, and ensure that different GSF devices send the same five-tuple packet to the same DC GW, that is, it can guarantee that the north-south traffic adopts per-packet distribution to realize full-path spraying, and ensure that the same business flow reaches the same DC GW, without affecting cross-DC traffic intercommunication. In the related art, both north-south and east-west traffic in the DC are forwarded per stream, which cannot realize single-flow multi-path, has low network utilization, the effective bandwidth is less than the physical bandwidth, and affects the AI computing power.
[0118] Based on the above embodiment, in another embodiment of the present application, a first device 1 is provided, as shown in Figure 4 The first device 1 includes:
[0119] The determining unit 10 is configured to determine first information based on the received first packet, wherein the first information comprises container identification information of the first packet and second device identification information of a destination device corresponding to the first packet.
[0120] The determining unit 10 is further configured to determine one or more packet forwarding devices based on the second device identification information.
[0121] The determining unit 10 is further configured to determine a target forwarding device from the one or more packet forwarding devices based on the first device identification information of the first device and the container identification information.
[0122] The first forwarding unit 11 is configured to add the first information and the first device identification information to the first packet to obtain a second packet, and forward the second packet to the target forwarding device, so that the target forwarding device forwards the second packet to the destination device.
[0123] In an embodiment, the determining unit 10 is further configured to determine the one or more packet forwarding devices based on the second device identification information and the obtained inter-device topology connection relationship.
[0124] In an embodiment, the determining unit 10 is further configured to determine a traffic direction of the first packet based on a destination address carried by the first packet.
[0125] The determining unit 10 is further configured to, in a case where the traffic direction is a first traffic direction, obtain device identification information of the destination device found according to the destination address, and determine the device identification information of the destination device as the second device identification information.
[0126] The determining unit 10 is further configured to, in a case where the traffic direction is a second traffic direction, obtain device identification information of a data center gateway device, and determine the device identification information of the data center gateway device as the second device identification information.
[0127] In an embodiment, the first device 1 can further include a finding unit.
[0128] The finding unit is configured to find a destination device corresponding to a destination address in a preset routing table based on the destination address.
[0129] The determining unit 10 is further configured to determine that the traffic direction of the first packet is the first traffic direction in a case where the destination device is found, or determine that the traffic direction of the first packet is the second traffic direction in a case where the destination device is not found.
[0130] The embodiment of the present application provides a first device. The first device determines first information based on a received first packet, wherein the first information comprises container identification information of the first packet and second device identification information of a destination device corresponding to the first packet; determines one or more packet forwarding devices based on the second device identification information; determines a target forwarding device from the one or more packet forwarding devices based on first device identification information of the first device and the container identification information; adds the first information and the first device identification information to the first packet to obtain a second packet; and forwards the second packet to the target forwarding device, so that the target forwarding device forwards the second packet to the destination device. It can be seen that the first device provided by the embodiment of the present application, when the first device receives the first packet, first determines packet header information corresponding to the first packet. The second device identification information and the container identification information are contained in the packet header information. In the process of packet forwarding, the destination device to which the packet is forwarded can be determined according to the second device identification information. According to the first device identification information of the first device and the container identification information, a packet forwarding device corresponding to the packet can be selected. Therefore, in the case that the first device identification information and the container information are different, the selected packet forwarding device is different, so that multiple packets of a data stream can be forwarded to the same destination device through different forwarding devices, the data stream is forwarded through multiple paths, and the utilization rate of the network can be improved.
[0131] Figure 5 A schematic diagram of the composition structure of the first device 1 provided by the embodiment of the present application is shown in the actual application. Based on the same disclosure concept of the above embodiment, as shown in the figure, Figure 5 the first device 1 of the embodiment of the present application comprises a first processor 12, a first memory 13 and a first communication bus 14.
[0132] In the specific embodiment process, the above-mentioned determining unit 10, the first forwarding unit 11 and the searching unit can be implemented by a first processor 12 located on the first device 1. The first processor 12 can be at least one of an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a CPU, a controller, a microcontroller, or a microprocessor. It can be understood that, for different devices, the electronic device used to implement the above-mentioned processor function can also be other, and the embodiments of the present application do not make specific limitations.
[0133] In the embodiments of the present application, the first communication bus 14 is used to realize the connection communication between the first processor 12 and the first memory 13; and the first processor 12 realizes the packet forwarding method as follows when executing the running program stored in the first memory 13:
[0134] Based on the received first packet, first information is determined, wherein the first information includes container identification information of the first packet and second device identification information of a destination device corresponding to the first packet; based on the second device identification information, one or more packet forwarding devices are determined; based on the first device identification information of the first device and the container identification information, a target forwarding device is determined from the one or more packet forwarding devices; the first information and the first device identification information are added to the first packet to obtain a second packet; and the second packet is forwarded to the target forwarding device, so that the target forwarding device forwards the second packet to the destination device.
[0135] In an embodiment, the first processor 12 is further configured to determine the one or more packet forwarding devices based on the second device identification information and the obtained inter-device topology connection relationship.
[0136] In an embodiment, the first processor 12 is further configured to determine a traffic direction of the first packet based on a destination address carried by the first packet; in a case where the traffic direction is a first traffic direction, device identification information of a destination device found according to the destination address is obtained, and the device identification information of the destination device is determined as the second device identification information; in a case where the traffic direction is a second traffic direction, device identification information of a data center gateway device is obtained, and the device identification information of the data center gateway device is determined as the second device identification information.
[0137] In an embodiment, the first processor 12 is further configured to, based on the destination address, search the preset routing table for a destination device corresponding to the destination address; in a case where the destination device is found, determine that the traffic direction of the first packet is the first traffic direction; or in a case where the destination device is not found, determine that the traffic direction of the first packet is the second traffic direction.
[0138] Based on the above embodiment, in another embodiment of the present application, a target forwarding device 2 is provided, as shown in the figure, the target forwarding device 2 comprises: Figure 6
[0139] A receiving unit 20 configured to receive a second packet sent by a first device, wherein the second packet is obtained by the first device adding first information and first device identification information of the first device to the received first packet, and the first information comprises container identification information of the first packet and second device identification information of a destination device corresponding to the first packet.
[0140] A second forwarding unit 21 configured to forward the second packet to the destination device.
[0141] In an embodiment, the target forwarding device 2 can further comprise a determining unit.
[0142] The determining unit is configured to determine the traffic direction of the second packet based on the second device identification information.
[0143] The second forwarding unit 21 is further configured to, in a case where the traffic direction is the second traffic direction, forward the second packet to the destination device based on five-tuple information carried by the second packet; or determine a next-hop device of a packet forwarding device based on the first device identification and the container identification information, and send the second packet to the next-hop device until the next-hop device forwards the second packet to the destination device based on the five-tuple information carried by the second packet.
[0144] The second forwarding unit 21 is further configured to, in a case where the traffic direction is the first traffic direction, send the second packet to the destination device; or determine a next-hop device of a packet forwarding device based on the first device identification and the container identification information, and send the second packet to the next-hop device until the next-hop device forwards the second packet to the destination device.
[0145] The embodiment of the present application provides a target forwarding device, receives a second packet sent by a first device, wherein the second packet is obtained by adding first information and first device identification information of the first device to a received first packet, the first information comprises container identification information of the first packet and second device identification information of a destination device corresponding to the first packet; and forwards the second packet to the destination device. It can be seen that the embodiment of the present application provides a target forwarding device, when the target forwarding device receives the second packet, the second device identification information and the container identification information are contained in the packet header information of the second packet, in the process of packet forwarding, the destination device to which the packet is forwarded can be determined according to the second device identification information, and the next-hop packet forwarding device corresponding to the packet can be selected according to the first device identification information and the container identification information. Therefore, in the case that the first device identification information and the container information are different, the selected packet forwarding device is different, so that multiple packets of a data stream can be forwarded to the same destination device through different packet forwarding devices, the data stream is forwarded through multiple paths, and the utilization rate of the network can be improved.
[0146] Figure 7 A schematic diagram of a component structure of a target forwarding device 2 provided by the embodiment of the present application is shown in the figure, and the target forwarding device 2 of the embodiment of the present application comprises a second processor 22, a second memory 23 and a second communication bus 24. Figure 7
[0147] In the specific embodiment process, the receiving unit 20, the second forwarding unit 21 and the determining unit can be realized by the second processor 22 located on the target forwarding device 2, and the second processor 22 can be at least one of an ASIC, a DSP, a DSPD, a PLD, a FPGA, a CPU, a controller, a microcontroller and a microprocessor. It can be understood that for different devices, the electronic device used to realize the function of the processor can also be other devices, and the embodiment of the present application does not make specific limitation.
[0148] In the embodiment of the present application, the second communication bus 24 is used to realize the connection and communication between the second processor 22 and the second memory 23; and the second processor 22 realizes the following packet forwarding method when executing the running program stored in the second memory 23.
[0149] The receiving unit 20 receives a second packet sent by a first device, wherein the second packet is obtained by adding first information and first device identification information of the first device to a received first packet, the first information comprises container identification information of the first packet and second device identification information of a destination device corresponding to the first packet; and the second forwarding unit 21 forwards the second packet to the destination device.
[0150] In an embodiment, the second processor 22 is further configured to determine a traffic direction of the second packet based on the second device identification information; in a case that the traffic direction is the second traffic direction, forward the second packet to the destination device based on the quintuple information carried by the second packet; or determine a next hop device of the packet forwarding device based on the first device identification and the container identification information, and send the second packet to the next hop device until the next hop device forwards the second packet to the destination device based on the quintuple information carried by the second packet; in a case that the traffic direction is the first traffic direction, send the second packet to the destination device; or determine a next hop device of the packet forwarding device based on the first device identification and the container identification information, and send the second packet to the next hop device until the next hop device forwards the second packet to the destination device.
[0151] Based on the above embodiments, an embodiment of the present application provides a storage medium having a computer program stored thereon, the computer readable storage medium stores one or more programs, the one or more programs are executable by one or more processors, and are applied to a first device or a target forwarding device, and the computer program implements the packet forwarding method as described above.
[0152] Based on the above embodiments, an embodiment of the present application provides a computer program product comprising a computer program, the computer program is executable by one or more processors, and is applied to a first device or a target forwarding device, and the computer program implements the packet forwarding method as described above.
[0153] It should be noted that, in the embodiments of the present application, the terms "comprising", "containing" or any other variants thereof are intended to cover non-exclusive containing, so that the processes, methods, articles or devices including a series of elements not only include those elements, but also include other elements not explicitly listed or inherent to such processes, methods, articles or devices. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of another identical element in the process, method, article or device including the element.
[0154] Those skilled in the art can clearly understand the above-mentioned embodiment method can be realized by means of software and the necessary general hardware platform, of course, can also be through hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes a plurality of instructions for causing an image display device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in various embodiments of the present application.
[0155] The above merely describes the specific embodiments of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A packet forwarding method, characterized by, The method applied to a first device comprises: determining first information based on a received first packet, wherein the first information comprises container identification information of the first packet and second device identification information of a destination device corresponding to the first packet; determining one or more packet forwarding devices based on the second device identification information; determining a target forwarding device from the one or more packet forwarding devices based on first device identification information of the first device and the container identification information; adding the first information and the first device identification information to the first packet to obtain a second packet, and forwarding the second packet to the target forwarding device so that the target forwarding device forwards the second packet to the destination device.
2. The method of claim 1, wherein, The determining one or more packet forwarding devices based on the second device identification information comprises: determining the one or more packet forwarding devices based on the second device identification information and acquired inter-device topology connection relationship.
3. The method of claim 1, wherein, The determining first information based on a received first packet comprises: determining a traffic direction of the first packet based on a destination address carried by the first packet; in a case where the traffic direction is a first traffic direction, acquiring device identification information of a destination device found according to the destination address, and determining the device identification information of the destination device as the second device identification information; in a case where the traffic direction is a second traffic direction, acquiring device identification information of a data center gateway device, and determining the device identification information of the data center gateway device as the second device identification information.
4. The method of claim 3, wherein, The determining a traffic direction of the first packet based on a destination address carried by the first packet comprises: finding a destination device corresponding to the destination address in a preset routing table based on the destination address; in a case where the destination device is found, determining that the traffic direction of the first packet is a first traffic direction; or, in a case where the destination device is not found, determining that the traffic direction of the first packet is a second traffic direction.
5. A method of forwarding a packet, the method comprising: The method applied to a target forwarding device comprises: receiving a second packet sent by a first device, wherein the second packet is obtained by the first device by adding first information and first device identification information of the first device to a received first packet, the first information comprising container identification information of the first packet and second device identification information of a destination device corresponding to the first packet; forwarding the second packet to the destination device.
6. The method of claim 5, wherein, The forwarding the second packet to the destination device comprises: determining a traffic direction of the second packet based on the second device identification information; In a case where the traffic direction is the second traffic direction, the second packet is forwarded to the destination device based on five-tuple information carried by the second packet; or, a next-hop device of the packet forwarding device is determined based on the first device identifier and the container identifier information, and the second packet is sent to the next-hop device, until the next-hop device forwards the second packet to the destination device based on five-tuple information carried by the second packet. In a case where the traffic direction is the first traffic direction, the second packet is sent to the destination device; or, a next-hop device of the packet forwarding device is determined based on the first device identifier and the container identifier information, and the second packet is sent to the next-hop device, until the next-hop device forwards the second packet to the destination device.
7. A first device, comprising: The device comprises: a determination unit configured to determine first information based on the received first packet, wherein the first information comprises container identifier information of the first packet and second device identifier information of a destination device corresponding to the first packet; the determination unit is further configured to determine one or more packet forwarding devices based on the second device identifier information; the determination unit is further configured to determine a target forwarding device from the one or more packet forwarding devices based on first device identifier information of the first device and the container identifier information; a first forwarding unit configured to add the first information and the first device identifier information to the first packet to obtain a second packet, and forward the second packet to the target forwarding device, so that the target forwarding device forwards the second packet to the destination device.
8. A target forwarding device, characterized in that, The device comprises: a receiving unit configured to receive a second packet sent by a first device, wherein the second packet is obtained by adding first information and first device identifier information of the first device to a received first packet, the first information comprising container identifier information of the first packet and second device identifier information of a destination device corresponding to the first packet; a second forwarding unit configured to forward the second packet to the destination device.
9. A first device, comprising: The first device comprises a first processor and a first memory; the first processor implements the method in any one of claims 1 to 4 when executing a running program stored in the first memory.
10. A target forwarding device, characterized in that, The device comprises a second processor and a second memory; the second processor implements the method in any one of claims 5 to 6 when executing a running program stored in the second memory.
11. A storage medium having stored thereon a computer program, characterized in that The computer program is executed by a processor to implement the method in any one of claims 1 to 4, or the computer program is executed by a processor to implement the method in any one of claims 5 to 6.
12. A computer program product comprising a computer program, characterized in that, The computer program is executed by a processor to implement the method in any one of claims 1 to 4, or the computer program is executed by a processor to implement the method in any one of claims 5 to 6.
Citation Information
Patent Citations
Method, device and system for forwarding message
CN114157600A
Method for sending and processing message, ingress node and network system
CN114726660A