Packet forwarding method and device, network equipment and storage medium

By using virtual containers as the smallest unit for transmission between network devices, the problem of unbalanced traffic scheduling under the ECMP mechanism is solved, achieving load balancing and overall network performance improvement.

CN119155249BActive Publication Date: 2026-01-06CHINA MOBILE COMM LTD RES INST +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310708960.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-14
Publication Date
2026-01-06
Estimated Expiration
2043-06-14

AI Technical Summary

Technical Problem

The equal cost multipath routing (ECMP) mechanism, which operates on a per-flow basis, leads to uneven traffic scheduling, resulting in the inability to improve overall network performance.

Method used

By transmitting packets between network devices using fixed-length virtual containers as the smallest unit, per-packet load balancing is achieved. This ensures that all packets within the same virtual container are transmitted through the same physical link, while packets in different virtual containers are transmitted through different physical links, thereby improving the average link utilization efficiency.

Benefits of technology

It achieves load balancing among network devices and improves the overall packet forwarding performance of the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119155249B_ABST
    Figure CN119155249B_ABST
Patent Text Reader

Abstract

The application discloses a message forwarding method and device, network equipment and a storage medium. The method comprises the following steps: a first network equipment of a first network sends a virtual container to a second network equipment according to first information and / or second information; the first information represents a selection strategy of an out interface of the first network equipment; the second information represents information for guiding the forwarding of the virtual container; the second network equipment represents a next-hop device of the first network equipment; the maximum capacity of the virtual container is a set value, and all first messages in the same virtual container are sent from the same entry routing device of the first network to the same virtual queue of a destination exit routing device, and one virtual queue corresponds to one out interface of the destination exit routing device and / or corresponds to a priority.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a message forwarding method, apparatus, network device, and storage medium. Background Technology

[0002] Equal-Cost Multi-Path (ECMP) is a single-flow, single-path traffic scheduling mechanism that forwards packets belonging to the same data flow through the same equal-cost link. This traffic scheduling method can easily lead to severely uneven load distribution across each equal-cost link, resulting in stagnant overall network performance. Summary of the Invention

[0003] To address the related technical issues, embodiments of this application provide a message forwarding method, apparatus, network device, and storage medium.

[0004] The technical solution of this application embodiment is implemented as follows:

[0005] This application provides a message forwarding method, applied to a first network device in a first network, the method comprising:

[0006] Based on the first information and / or the second information, a virtual container is sent to the second network device; wherein...

[0007] The first information represents the selection strategy of the outgoing interface of the first network device; the second information represents the information guiding the forwarding of the virtual container; the second network device represents the next-hop device of the first network device; the maximum capacity of the virtual container is a set value, and all first packets in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device. A virtual queue corresponds to an outgoing interface of the destination egress routing device and / or a corresponding priority.

[0008] In the above scheme, sending the virtual container to the second network device based on the first information and / or the second information includes:

[0009] Based on the first information and / or the second information, determine the first outgoing interface of the virtual container corresponding to the first network device;

[0010] The first message is sent to the second network device corresponding to the first outgoing interface using a virtual container.

[0011] In the above scheme, each first message in the virtual container carries third information, which includes at least one of the following:

[0012] The first identifier is used to select the outgoing interface of the virtual container on the first network device;

[0013] The second identifier is used to sort different virtual containers;

[0014] The third identifier is used to indicate the first or last message in the virtual container.

[0015] In the above scheme, the second information includes at least one of the following:

[0016] The first packet in the virtual container carries a first identifier, which is used to select the outgoing interface of the virtual container on the first network device.

[0017] The destination address carried by the first message in the virtual container;

[0018] A first data table is used to indicate the correspondence between the virtual container and the outgoing interface of the first network device;

[0019] The first hash value is determined by the first identifier carried by the first message in the virtual container.

[0020] The method in the above scheme further includes:

[0021] The system receives a virtual container sent by a third network device, which represents the upstream device of the first network device.

[0022] In the above scheme, the first network device represents the source routing device or the source network interface card, and the method further includes:

[0023] Receive the second message sent by the first computing node;

[0024] Add the third information to the second message to obtain the first message.

[0025] In the above scheme, the first network device represents the source routing device or source network interface card, and the method for determining that the virtual container is before the first outgoing interface corresponding to the first network device further includes:

[0026] Based on the number of bytes in the first message and the number of available bytes in the virtual container, determine the virtual container to which the first message belongs; where,

[0027] The number of available bytes in the virtual container is determined based on the fourth and fifth information, wherein the fourth information represents the maximum capacity or threshold of the virtual container, and the fifth information represents the total number of bytes of all first messages sent through the same virtual container at different times.

[0028] In the above scheme, determining the virtual container to which the first message belongs based on the number of bytes in the first message and the number of available bytes in the virtual container includes one of the following:

[0029] If the number of bytes in the first message is less than or equal to the number of available bytes in the first virtual container, then the first message belongs to the first virtual container.

[0030] A second virtual container is created if at least one of the following conditions is met, and the first message is determined to belong to the second virtual container:

[0031] The number of bytes in the first message is greater than the number of available bytes in the first virtual container;

[0032] The time to live of the first virtual container.

[0033] The method in the above scheme further includes:

[0034] Record at least one of the following:

[0035] The fifth piece of information;

[0036] The identifier of the virtual container to which the first message belongs;

[0037] The destination address carried in the first message of the virtual container.

[0038] In the above scheme, the first network device represents the source routing device or the source network interface card, and the method further includes:

[0039] Release the virtual container when its lifespan has expired.

[0040] This application embodiment also provides a message forwarding method, applied to a second network device in a first network, the method comprising:

[0041] Receives a virtual container sent by the first network device; wherein,

[0042] The maximum capacity of the virtual container is a set value, and all first packets in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device. A virtual queue corresponds to an egress interface of the destination egress routing device and / or a corresponding priority.

[0043] In the above scheme, each first message in the virtual container carries third information, which includes at least one of the following:

[0044] The first identifier is used to select the outgoing interface of the virtual container on the first network device;

[0045] The second identifier is used to sort different virtual containers;

[0046] The third identifier is used to indicate the first or last message in the virtual container.

[0047] In the above scheme, the second network device represents the last-hop network device of the first network, and the method further includes at least one of the following:

[0048] The third information carried by the first message in the virtual container is discarded, the second message is obtained, and the second message is sent to the second computing node;

[0049] The different virtual containers are sorted, and the first message from the sorted virtual containers is sent to the second computing node.

[0050] This application also provides a message forwarding device, including:

[0051] The first sending unit is configured to send a virtual container to the second network device based on first information and / or second information; wherein,

[0052] The first information represents the selection strategy of the outgoing interface of the first network device; the second information represents the information guiding the forwarding of the virtual container; the second network device represents the next-hop device of the first network device; the maximum capacity of the virtual container is a set value, and all first packets in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device. A virtual queue corresponds to an outgoing interface of the destination egress routing device and / or a corresponding priority.

[0053] This application also provides a message forwarding device, including:

[0054] The first receiving unit is configured to receive a virtual container sent by the first network device; wherein,

[0055] The maximum capacity of the virtual container is a set value, and all first packets in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device. A virtual queue corresponds to an egress interface of the destination egress routing device and / or a corresponding priority.

[0056] This application embodiment also provides a first network device, including a first processor and a first communication interface, wherein,

[0057] The first communication interface is used to send a virtual container to the second network device according to first information and / or second information; wherein, the first information represents the selection strategy of the outgoing interface of the first network device; the second information represents the information guiding the forwarding of the virtual container; the second network device represents the next-hop device of the first network device; the maximum capacity of the virtual container is a set value, and all first packets in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device, and a virtual queue corresponds to an outgoing interface of the destination egress routing device and / or a corresponding priority.

[0058] This application embodiment also provides a second network device, including a second processor and a second communication interface, wherein...

[0059] The second communication interface is used to receive virtual containers sent by the first network device; wherein the maximum capacity of the virtual container is a set value, and all first messages in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device, and a virtual queue corresponds to an egress interface of the destination egress routing device and / or a corresponding priority.

[0060] This application also provides a network device, including a processor and a memory for storing computer programs that can run on the processor.

[0061] When the processor runs the computer program, it executes the steps of any of the methods described above on the first network device side, or executes the steps of any of the methods described above on the second network device side.

[0062] This application embodiment also provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of any of the methods described above for the first network device side, or implements the steps of any of the methods described above for the second network device side.

[0063] The packet forwarding method, apparatus, network device, and storage medium provided in this application embodiment involve a first network device in a first network sending a virtual container to a second network device in the first network based on first information and / or second information; the second network device receiving the virtual container sent by the first network device. The first information represents the selection strategy of the first network device's outgoing interface; the second information represents information guiding the forwarding of the virtual container; the second network device represents the next-hop device of the first network device; the maximum capacity of the virtual container is a set value, and all first packets within the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device. Each virtual queue corresponds to one outgoing interface and / or priority of the destination egress routing device. As can be seen from the embodiments of this application, in the first network, network devices transmit data using fixed-length virtual containers as the smallest unit, enabling the first network to support per-packet load balancing. The port traffic of different network devices is basically balanced, and the traffic on each physical link is also balanced. In addition, all first packets in the same virtual container are transmitted through the same physical link, and first packets in different virtual containers can be transmitted through different physical links. This allows packets of the same data stream to be carried in different virtual containers and sent through different forwarding paths, improving the average link utilization efficiency and thus improving the overall network performance, such as the overall network packet forwarding performance. Attached Figure Description

[0064] Figure 1 This is a schematic diagram illustrating the implementation process of a message forwarding method according to an embodiment of this application;

[0065] Figure 2 This is an example diagram illustrating the forwarding of virtual containers between network devices according to an embodiment of this application;

[0066] Figure 3 This is an example diagram of a virtual container in an embodiment of this application;

[0067] Figure 4 This is a schematic diagram illustrating the implementation process of a message forwarding method according to an embodiment of this application;

[0068] Figure 5 This is a schematic diagram of the interaction flow of a message forwarding method according to an embodiment of this application;

[0069] Figure 6 This is a schematic diagram of a message forwarding device according to an embodiment of this application;

[0070] Figure 7 This is a schematic diagram of a message forwarding device according to an embodiment of this application;

[0071] Figure 8 This is a schematic diagram of the structure of the first network device according to an embodiment of this application;

[0072] Figure 9 This is a schematic diagram of the structure of the second network device according to an embodiment of this application. Detailed Implementation

[0073] Intelligent computing centers are dedicated data computing centers serving artificial intelligence (AI), acting as the infrastructure for intelligent computing power. Data flows in intelligent computing centers are characterized by large volumes and long durations; a data flow refers to a group of data packets with identical characteristic fields. If an intelligent computing center uses a flow-based ECMP mechanism for traffic scheduling, it may lead to severe traffic congestion, hindering high throughput and resulting in low overall network performance. The specific reasons are as follows: While flow-based ECMP is simple in principle, it does not consider whether the path itself is congested; although flow hashes are uniform in actual business operations, flow-based ECMP can easily cause severe uneven load distribution on each equivalent link, leading to traffic congestion and preventing improvements in overall network performance.

[0074] Based on this, in various embodiments of this application, a first network device of a first network sends a virtual container to a second network device of the first network according to first information and / or second information; the second network device receives the virtual container sent by the first network device. Wherein, the first information represents the selection strategy of the first network device's outgoing interface; the second information represents information guiding the forwarding of the virtual container; the second network device represents the next-hop device of the first network device; the maximum capacity of the virtual container is a set value, and all first packets in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device, with one virtual queue corresponding to one outgoing interface and / or corresponding priority of the destination egress routing device. As can be seen from the embodiments of this application, in the first network, network devices transmit data using fixed-length virtual containers as the smallest unit, enabling the first network to support per-packet load balancing. The port traffic of different network devices is basically balanced, and the traffic on each physical link is also balanced. In addition, all first packets in the same virtual container are transmitted through the same physical link, and first packets in different virtual containers can be transmitted through different physical links. This allows packets of the same data stream to be carried in different virtual containers and sent through different forwarding paths, improving the average link utilization efficiency and thus improving the overall network performance, such as the overall network packet forwarding performance.

[0075] The present application will now be described in further detail with reference to the accompanying drawings and embodiments.

[0076] This application provides a message forwarding method applied to a first network device in a first network, where the first network represents a message forwarding network or a switching network, such as a distributed forwarding network or a distributed switching network. Figure 1 As shown, the method includes:

[0077] Step 101: Send the virtual container to the second network device based on the first information and / or the second information.

[0078] Wherein, the first information represents the selection strategy of the outgoing interface of the first network device; the second information represents the information guiding the forwarding of the virtual container; the second network device represents the next-hop device of the first network device; the maximum capacity of the virtual container is a set value, and all first packets in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device, and a virtual queue corresponds to an outgoing interface of the destination egress routing device and / or a corresponding priority.

[0079] Here, the first network device acquires first information and / or second information; based on the first information and / or second information, it sends a virtual container to the second network device. The virtual container can be understood as a logically constructed virtual container based on packets, and can be called a packet container (PKTC) or a virtual packet container, etc. The maximum capacity of the virtual container can be set according to the length of the longest service packet. All virtual containers have the same maximum capacity, which can be understood as the maximum length or total number of bytes. A virtual container can hold at least one of the longest service packets, and the maximum capacity of the virtual container should be as small as possible within the limits of the network device's forwarding and de-ordering capabilities, in order to achieve fine-grained data stream segmentation and fully improve instantaneous load balancing.

[0080] The first information can be understood as a routing strategy, used to select the outgoing interface of the first network device to send virtual containers; the first information can be pre-configured in the first network device, or it can be sent by electronic devices such as the controller or server of the first network.

[0081] The second information can be carried in the first packet within the virtual container or stored locally. For example, it could be the queue depth of the virtual queue corresponding to the outgoing interface of the second network device within the first network device. Alternatively, the second information can be sent by the second network device itself. For instance, it could be the queue depth of the virtual queue corresponding to the outgoing interface of the destination egress routing device within the second network device, the link load level of the outgoing interface of the second network device, and / or port occupancy. A virtual queue corresponds to an outgoing interface of the network device and / or the priority of that outgoing interface. The virtual queue can be a Dynamic Global Scheduling Queue (DGSQ) or a Virtual Output Queue (VOQ). The outgoing interface of the destination egress routing device and the outgoing interface of the second network device are determined based on the destination address carried in the first packet within the virtual container. The destination egress routing device, also called the destination routing device, can be understood as the last-hop routing device of the first network determined by the destination address carried in the first packet within the packet container. For example, the destination routing device is the routing device to which the outgoing interface (final outgoing interface) corresponding to the destination address in the forwarding table belongs. An ingress routing device is also called a source routing device. A source routing device can be understood as the first-hop routing device of the first network.

[0082] It should be noted that sending a virtual container to the second network device can be understood as sending a first message to the second network device in the form of a virtual container. The first message refers to any message within the virtual container, or any message sent in the form of a virtual container. For example... Figure 2 As shown, the first network device can send different first packets through the same virtual container at different times; that is, when the first network device detects a first packet, it sends the first packet to the second network device through a virtual container, instead of storing multiple first packets in the virtual container before sending. The first packet is generated by the first network device (source routing device, source network card) based on the received original packet, and the virtual container is generated or created by the network device that generated the first packet; the virtual container is forwarded between different network devices. When the total number of bytes of the first packets sent through the same virtual container at different times approaches or equals the maximum capacity of the virtual container, the state of the virtual container switches from available to unavailable. At this time, a new virtual container needs to be created to send the first packet.

[0083] The first network device includes at least one of the following: a source routing device, a source network interface card (NIC), a destination routing device, a destination NIC, and intermediate routing devices between the source and destination routing devices. Routing devices include routers and / or switches. The upstream device of the source NIC is the computing node that sends the packet, and the next-hop device of the source NIC is the source routing device; the upstream device of the destination NIC is the destination routing device, and the next-hop device of the destination NIC is the computing node that receives the packet. A computing node can be understood as a node with computing capabilities, such as a computing card, server, or terminal. The computing card and NIC can be separately configured in different devices or combined in the same device. Intermediate routing devices can be spine switches or aggregation switches. When the network architecture of the first network is a leaf-spine network architecture, the source and destination routing devices can be leaf switches, and the intermediate routing devices are spine switches.

[0084] For example, when the first network device is the source network card, since there is usually only one forwarding path between a source network card and a source routing device, that is, the source network card has only one outgoing interface connected to the source routing device, the first network device sends the virtual container to the second network device according to the second information.

[0085] For example, when the first network device is a source routing device, and the same source routing device connects to at least two second network devices, the first network device sends a virtual container to the second network devices based on first information and / or second information. Specifically, when the first packet is the first packet of the virtual container, the first network device sends the virtual container to the second network device using both the first and second information. Since all first packets within the same virtual container are forwarded through the same forwarding path, when the first packet is not the first packet of the virtual container, it is not necessary to select the outgoing interface of the first network device based on the first information and send the virtual container to the second network device based on the second information. It should be noted that the forwarding of all first packets within the same virtual container through the same forwarding path can be understood as: all first packets within the same virtual container are load-balanced to a single path within the first network for forwarding. This ensures that different packets within the same virtual container are no longer out of order, reducing the de-ordering pressure on the destination routing device or destination network interface card. De-ordering can be understood as reassembling received packets from out-of-order.

[0086] For example, when the first network device is an intermediate routing device, and the same intermediate routing device is connected to at least two next-hop routing devices, the first network device sends a virtual container to the second network device based on the first information and / or the second information. When the first network device is a destination routing device, and one outgoing interface of the same destination routing device is connected to a destination network interface card or compute node, the first network device sends a virtual container to the second network device based on the second information. When the first network device is a destination routing device, and different outgoing interfaces of the same destination routing device are connected to the same compute node, the first network device can send a virtual container to the second network device based on the first information.

[0087] To facilitate the first network device in selecting the outgoing interface of the virtual container, and to facilitate the destination routing device or destination network card in reordering the received virtual containers, in one embodiment, each first packet in the virtual container carries third information, which includes at least one of the following:

[0088] The first identifier is used to select the outgoing interface of the virtual container on the first network device;

[0089] The second identifier is used to sort different virtual containers;

[0090] The third identifier is used to indicate the first or last message in the virtual container.

[0091] Here, the third information can be carried in the header of the first message. This header can be understood as a virtual container header or a message container header, and a virtual container can be understood as a message carrying a virtual container header or a message container header. The first identifier can be the identifier or number of the virtual container, used to instruct the first network device to select the outgoing interface of the virtual container; the second identifier can be understood as the sequence number of the virtual container, used by the destination routing device or destination network card to sort the different received virtual containers so as to send the first messages in different virtual containers in the correct order. Different virtual containers have different sequence numbers; the third identifier can be described or represented by two bits, for example, 10 represents the first message in the virtual container, and 01 represents the last message in the virtual container. The third identifier is used by the destination routing device or destination network card to determine whether all the first messages sent through the same virtual container have been received.

[0092] It should be noted that all first messages within the same virtual container carry the same third information. The third information may also include the identifier of the data stream corresponding to the first message (stream identifier).

[0093] In one embodiment, where the first message in the virtual container carries third information, the first network device represents the source routing device or the source network interface card, and the method further includes:

[0094] Receive the second message sent by the first computing node;

[0095] Add the third information to the second message to obtain the first message.

[0096] Here, adding third information to the second message to obtain the first message can be understood as loading the second message into a virtual container. The second message generally refers to the received original message, which can be an Ethernet message. The third information is carried in the header of the second message, which can be called the virtual container header. This header can be a standard extension header added outside the second message, or it can be the Media Access Control (MAC) header in the second message. This header can also be located after the MAC header or the Internet Protocol (IP) header of the second message.

[0097] All first messages within the same virtual container have the same third information in their headers, such as... Figure 3 As shown, first messages with the same third information logically form a virtual container. The first identifier and second identifier contained in the third information carried by first messages in different virtual containers are different.

[0098] When the first network device is an intermediate routing device, a destination routing device, or a destination network interface card (NIC), it needs to receive the virtual container sent by the previous-hop device before sending the virtual container. Therefore, in one embodiment, the virtual container sent by a third network device is received, where the third network device represents the previous-hop device of the first network device.

[0099] Here, network devices transmit data in virtual containers as the smallest unit. At the same time, the same virtual container carries a first packet, enabling the first network to support per-packet load balancing.

[0100] In one embodiment, sending the virtual container to the second network device based on the first information and / or the second information includes:

[0101] Based on the first information and / or the second information, determine the first outgoing interface of the virtual container corresponding to the first network device;

[0102] The first message is sent to the second network device corresponding to the first outgoing interface using a virtual container.

[0103] Here, the first network device determines the next-hop device of the first network device to obtain the second network device. For example, the second network device is determined based on the destination address carried by the first packet in the virtual container, and the number of second network devices is greater than or equal to 1. Based on the first information and / or the second information, among the outgoing interfaces of all the reachable destination addresses of the second network devices, a second outgoing interface that meets the set requirements is determined. Based on the topology of the second network device to which the second outgoing interface belongs and the first network, the outgoing interface of the first network device that connects to the second network device is determined, and the first outgoing interface of the virtual container corresponding to the first network device is obtained. The first packet is sent to the second network device corresponding to the first outgoing interface in the form of a virtual container.

[0104] It should be noted that if there is only one second network device, and that second network device has only one outgoing interface that can reach the destination address, then that outgoing interface is the second outgoing interface. Configuration requirements may include at least one of the following:

[0105] The link status is optimal.

[0106] Maximum available queue depth;

[0107] Minimum queue depth;

[0108] Minimum load;

[0109] The level of congestion is the lowest.

[0110] It should be noted that the second piece of information above can be at least one of the following:

[0111] The queue depth of the virtual queue corresponding to the outgoing interface of the second network device in the first network device;

[0112] The queue depth of the virtual queue corresponding to the outgoing interface of the destination egress routing device in the second network device;

[0113] The link load level and / or port occupancy rate of the outgoing interface of the second network device.

[0114] Correspondingly, the first piece of information can characterize the interface selection strategy as at least one of the following: optimal link state, maximum available queue depth, minimum queue depth, and minimum congestion level.

[0115] Queue depth can be understood as the depth of a virtual queue; the minimum queue depth corresponds to the maximum available queue depth. Available queue depth is determined by the total number of bytes that the virtual queue can cache and the total number of bytes already occupied.

[0116] In this embodiment, the first network device can preferentially send the virtual container to the link with the best link status to reduce the probability of traffic congestion in the second network device.

[0117] In one embodiment, the second information includes at least one of the following:

[0118] The first packet in the virtual container carries a first identifier, which is used to select the outgoing interface of the virtual container on the first network device.

[0119] The destination address carried by the first message in the virtual container;

[0120] A first data table is used to indicate the correspondence between the virtual container and the outgoing interface of the first network device;

[0121] The first hash value is determined by the first identifier carried by the first message in the virtual container.

[0122] Here, the second information is used to select the outgoing interface corresponding to the virtual container on the first network device, and the first data table and the first hash value can be stored in the first network device. The implementation process of selecting the outgoing interface corresponding to the virtual container on the first network device is as follows:

[0123] When the first network device is a source routing device or a source network interface card (NIC), if the first packet is the first packet of a virtual container, then the first network device needs to determine the outgoing interface of the second network device based on the destination address carried in the first packet within the virtual container, thereby determining the outgoing interface corresponding to the virtual container on the first network device. If the first packet is not the first packet of a virtual container, then the first network device determines the virtual container to which the first packet belongs and queries the first data table for the outgoing interface corresponding to the virtual container to which the first packet belongs. The method by which the first network device determines the virtual container to which the first packet belongs can be any of the following:

[0124] Method 1: The first network device determines the virtual container to which the first packet belongs based on the first identifier and / or destination address carried in the first packet. Specifically, this can be achieved by comparing the first identifier carried in the first packet with the first identifier of each virtual container recorded by the first network device, obtaining a comparison result, and determining the virtual container to which the first packet belongs based on the comparison result. Alternatively, the destination address carried in the first packet can be compared with the destination address of the first first packet already sent through the virtual container, and the virtual container to which the first packet belongs can be determined based on the comparison result. The virtual container to which the first packet belongs can be understood as the virtual container corresponding to the first packet, or the virtual container carrying the first packet.

[0125] Method 2: The first network device calculates the second hash value of the first identifier carried in the first packet, compares the second hash value with the first hash value corresponding to the first packet sent through the virtual container, and determines the virtual container to which the first packet belongs based on the comparison result.

[0126] When the first network device is an intermediate routing device, a destination routing device, or a destination network interface card, the first network device directly receives the virtual container. If the first data table stores the correspondence between the first identifier and the outgoing interface, the first network device can query the first data table based on the first identifier carried in the first packet in the received virtual container to obtain the outgoing interface corresponding to the received virtual container. If the first data table stores the correspondence between the first hash value and the outgoing interface, the first network device determines the second hash value of the first identifier carried in the first packet in the received virtual container, and determines the outgoing interface corresponding to the first hash value that is the same as the second hash value in the first data table to obtain the outgoing interface corresponding to the received virtual container.

[0127] Before sending the first packet using a virtual container, it is necessary to determine the virtual container to which the first packet belongs. This ensures that all first packets within the same virtual container are transmitted through the same physical link, preventing out-of-order delivery between different packets within the same virtual container and reducing the de-ordering burden on the destination routing device or destination network interface card (NIC). Based on this, in one embodiment, where the first network device represents the source routing device or source NIC, before determining the virtual container at the first outgoing interface corresponding to the first network device, the method further includes:

[0128] Based on the number of bytes in the first message and the number of available bytes in the virtual container, determine the virtual container to which the first message belongs; where,

[0129] The number of available bytes in the virtual container is determined based on the fourth and fifth information, wherein the fourth information represents the maximum capacity or threshold of the virtual container, and the fifth information represents the total number of bytes of all first messages sent through the same virtual container at different times.

[0130] Here, when the first network device receives the first message, if the virtual container created by the first network device is empty and the first message is the first message of the virtual container, then the first message belongs to the virtual container, and the first network device selects the outgoing interface of the virtual container on the first network device and sends the first message from the selected outgoing interface in the form of a virtual container. If the virtual container created by the first network device is not empty and the first message is not the first message of the virtual container, then the first network device determines the virtual container corresponding to the first message according to method one or method two described above; based on the number of bytes of the first message and the number of available bytes of the virtual container, it determines whether the virtual container can hold the first message; if the virtual container can hold the first message, then the first message belongs to the virtual container; if the virtual container cannot hold the first message, then the first message does not belong to the virtual container, and a new virtual container needs to be created to send the first message.

[0131] It should be noted that the number of bytes in the first message refers to the total number of bytes in the first message. The maximum capacity of the virtual container is measured in bytes (B, Byte), and the number of bytes can be understood as the number of bytes. The threshold is a set value that is less than or equal to the maximum capacity.

[0132] To accurately determine the virtual container to which the first message belongs, in one embodiment, determining the virtual container to which the first message belongs based on the number of bytes in the first message and the number of available bytes in the virtual container includes one of the following:

[0133] If the number of bytes in the first message is less than or equal to the number of available bytes in the first virtual container, then the first message belongs to the first virtual container.

[0134] A second virtual container is created if at least one of the following conditions is met, and the first message is determined to belong to the second virtual container:

[0135] The number of bytes in the first message is greater than the number of available bytes in the first virtual container;

[0136] The time to live of the first virtual container.

[0137] Here, if the number of bytes in the first message is less than or equal to the number of available bytes in the first virtual container, it means that the first virtual container can hold the first message; if the number of bytes in the first message is greater than the number of available bytes in the first virtual container, it means that the first virtual container cannot hold the first message.

[0138] To more quickly determine which virtual container the first packet belongs to, thereby improving packet forwarding efficiency, in one embodiment, the method further includes:

[0139] Record at least one of the following:

[0140] The fifth piece of information;

[0141] The identifier of the virtual container to which the first message belongs;

[0142] The destination address carried in the first message of the virtual container.

[0143] Here, the identifier of the virtual container to which the first message belongs is the first identifier mentioned above.

[0144] In one embodiment, the first network device represents a source routing device or a source network interface card (NIC), and the method further includes:

[0145] Release the virtual container when its lifespan has expired.

[0146] Here, when the first network device generates or creates a virtual container, it also sets the virtual container's lifespan. If the virtual container's lifespan is reached or exceeded, the virtual container becomes unusable and is released to conserve the first network device's resources. Releasing a virtual container can also be understood as destroying it. It should be noted that after releasing a virtual container, another virtual container can be created based on actual packet forwarding needs. As long as the first packet and / or the second packet exist in the first network device, the virtual container will always exist in the first network device.

[0147] Based on the description of the above embodiments, correspondingly, this application also provides a message forwarding method applied to a second network device in a first network. (Refer to...) Figure 4 The method includes:

[0148] Step 401: Receive the virtual container sent by the first network device.

[0149] The maximum capacity of the virtual container is a set value, and all first packets in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device. A virtual queue corresponds to an egress interface of the destination egress routing device and / or a corresponding priority.

[0150] Here, all first packets within the same virtual container are transmitted through the same physical link, and different first packets within the same virtual container can arrive in sequence.

[0151] If the second network device is an intermediate routing device, such as a spine switch or aggregation switch, then the second network device acts as the first network device and forwards the virtual container according to the method described above.

[0152] If the second network device is the destination network device or the destination network card, then the second network device decapsulates the first packet in the virtual container to obtain the second packet, and sends the second packet to the second computing node.

[0153] To facilitate the out-of-order reordering of received virtual containers by the destination routing device or destination network interface card, in one embodiment, each first packet in the virtual container carries third information, which includes at least one of the following:

[0154] The first identifier is used to select the outgoing interface of the virtual container on the first network device;

[0155] The second identifier is used to sort different virtual containers;

[0156] The third identifier is used to indicate the first or last message in the virtual container.

[0157] In one embodiment, the second network device represents the last-hop network device of the first network, and the method further includes at least one of the following:

[0158] The third information carried by the first message in the virtual container is discarded, the second message is obtained, and the second message is sent to the second computing node;

[0159] The different virtual containers are sorted, and the first message from the sorted virtual containers is sent to the second computing node.

[0160] Here, when the second network device is the destination network device or the destination network interface card (NIC), since different first packets within the same virtual container can arrive in sequence, the second network device does not need to sort the different first packets within the same virtual container. If the second network device receives different first packets from the same virtual container, it decapsulates the first packet to remove the header carrying the third information and discards the header, thereby discarding the third information carried by the first packet, obtaining the second packet, and sending the second packet to the second computing node.

[0161] If the second network device receives first packets from different virtual containers, it determines whether it has received all first packets sent through the same virtual container based on the third identifier carried in the first packet. If it has received all first packets from each virtual container, it sorts all virtual containers according to the second identifier carried in the first packet to obtain a virtual container sequence. For the first packet in each virtual container in the virtual container sequence, it decapsulates the first packet according to the above method to obtain the corresponding second packet, and sends the second packet to the second computing node.

[0162] The following section uses a distributed switching network with a leaf-spine network architecture as an example to further describe this application in detail, combined with application examples.

[0163] Figure 5 The message forwarding methods shown include:

[0164] Step 1: The first computing node sends the second message to the source switch.

[0165] Here, the source switch is a Leaf switch.

[0166] Step 2: The source switch receives the second message, adds third information to the second message, and obtains the first message.

[0167] In one embodiment, the third information includes at least one of the following:

[0168] The first identifier is used to select the output interface of the virtual container;

[0169] The second identifier is used to sort different virtual containers;

[0170] The third identifier is used to indicate the first or last message in the virtual container.

[0171] Here, all first packets sent through the same virtual container carry the same third information. The maximum capacity of the virtual container is a set value, and all first packets in the same virtual container are sent from the same source switch (leaf switch) of the first network to the same virtual queue of the destination switch (another leaf switch). A virtual queue corresponds to an outgoing interface of the destination switch and / or the priority of the outgoing interface.

[0172] Step 3: The source switch determines the first outgoing interface of the virtual container on the source switch based on the first information and / or the second information.

[0173] Here, the first piece of information represents the selection strategy for the source switch's outgoing interface; the second piece of information represents the information guiding the forwarding of the virtual container. The method for determining the first outgoing interface is described above and will not be repeated here.

[0174] In one embodiment, the second information includes at least one of the following:

[0175] The first message in the virtual container carries a first identifier, which is used to select the outgoing interface of the virtual container;

[0176] The destination address carried by the first message in the virtual container;

[0177] The first data table is used to indicate the correspondence between the virtual container and the outgoing interface of the source switch;

[0178] The first hash value is determined by the first identifier carried by the first message in the virtual container.

[0179] Here, the first identifier is used to select the outgoing interface of the virtual container on the source switch.

[0180] In one embodiment, the source switch determines that the virtual container is located before the first outgoing interface corresponding to the source switch, and the method further includes:

[0181] The source switch determines the virtual container to which the first packet belongs based on the number of bytes in the first packet and the number of available bytes in the virtual container; where,

[0182] The number of available bytes in the virtual container is determined based on the fourth and fifth information, wherein the fourth information represents the maximum capacity or threshold of the virtual container, and the fifth information represents the total number of bytes of all first messages sent through the same virtual container at different times.

[0183] In one embodiment, the source switch determines the virtual container to which the first packet belongs based on the number of bytes in the first packet and the number of available bytes in the virtual container, including one of the following:

[0184] If the number of bytes in the first message is less than or equal to the number of available bytes in the first virtual container, then the first message belongs to the first virtual container.

[0185] A second virtual container is created if at least one of the following conditions is met, and the first message is determined to belong to the second virtual container:

[0186] The number of bytes in the first message is greater than the number of available bytes in the first virtual container;

[0187] The time to live of the first virtual container.

[0188] Step 4: The source switch sends the first packet to the Spine switch corresponding to the first outgoing interface in the form of a virtual container.

[0189] In one embodiment, the source switch records at least one of the following for each first packet sent:

[0190] The fifth piece of information;

[0191] The identifier of the virtual container to which the first message belongs;

[0192] The destination address carried in the first message of the virtual container.

[0193] In one embodiment, the source switch releases the virtual container upon reaching its time-to-live.

[0194] Step 5: The Spine switch receives the virtual container sent by the source switch, and the virtual container carries the first message.

[0195] Step 6: Based on the first information and / or the second information, the Spine switch determines the second outgoing interface of the virtual container on the Spine switch.

[0196] Here, step 6 is similar to step 3; please refer to the relevant description above for the specific implementation process, which will not be repeated here. The first information represents the selection strategy of the Spine switch's outgoing interface; the second information represents the information guiding the forwarding of virtual containers. The second information includes at least one of the following:

[0197] The first identifier carried by the first message in the virtual container;

[0198] The destination address carried by the first message in the virtual container;

[0199] The first data table is used to indicate the correspondence between the virtual container and the outgoing interface of the Spine switch;

[0200] The first hash value is determined by the first identifier carried by the first message in the virtual container.

[0201] Here, the first identifier is used to select the corresponding outgoing interface of the virtual container on the Spine switch.

[0202] Step 7: The Spine switch sends the virtual container to the destination switch corresponding to the second outgoing interface.

[0203] Step 8: The destination switch receives the virtual container sent by the Spine switch and sends the second message to the second compute node.

[0204] Here, the destination switch is a leaf switch. A second message is sent to the second computing node, including at least one of the following:

[0205] The third information carried by the first message in the virtual container is discarded, the second message is obtained, and the second message is sent to the second computing node;

[0206] The different virtual containers are sorted, and the first message from the sorted virtual containers is sent to the second computing node.

[0207] Based on the above embodiments, network devices transmit data using fixed-length virtual containers as the smallest unit, enabling the first network to support per-packet load balancing. The port traffic of different network devices is basically balanced, and the traffic on each physical link is also balanced. In addition, all first packets in the same virtual container are transmitted through the same physical link, while packets in different virtual containers can be transmitted through different physical links. This allows packets of the same data stream to be carried in different virtual containers and sent through different forwarding paths, improving the average link utilization efficiency and thus improving the overall network performance.

[0208] To implement the message forwarding method of this application embodiment, this application embodiment also provides a message forwarding device, which is installed on a first network device of a first network, such as... Figure 6 As shown, the device includes:

[0209] The first sending unit 601 is configured to send a virtual container to a second network device according to first information and / or second information; wherein, the first information represents the selection strategy of the outgoing interface of the first network device; the second information represents information guiding the forwarding of the virtual container; the second network device represents the next-hop device of the first network device; the maximum capacity of the virtual container is a set value, and all first packets in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device, and a virtual queue corresponds to an outgoing interface and / or a corresponding priority of the destination egress routing device.

[0210] In one embodiment, the device further includes:

[0211] The first determining unit is configured to determine the first outgoing interface of the virtual container on the first network device based on the first information and / or the second information.

[0212] The first sending unit 601 is specifically used to send a first message to the second network device corresponding to the first output interface in the form of a virtual container.

[0213] In one embodiment, each first message in the virtual container carries third information, which includes at least one of the following:

[0214] The first identifier is used to select the outgoing interface of the virtual container on the first network device;

[0215] The second identifier is used to sort different virtual containers;

[0216] The third identifier is used to indicate the first or last message in the virtual container.

[0217] In one embodiment, the second information includes at least one of the following:

[0218] The first packet in the virtual container carries a first identifier, which is used to select the outgoing interface of the virtual container on the first network device.

[0219] The destination address carried by the first message in the virtual container;

[0220] A first data table is used to indicate the correspondence between the virtual container and the outgoing interface of the first network device;

[0221] The first hash value is determined by the first identifier carried by the first message in the virtual container.

[0222] In one embodiment, the device further includes:

[0223] The second receiving unit is used to receive a virtual container sent by a third network device, wherein the third network device represents the upstream device of the first network device.

[0224] In one embodiment, the first network device represents a source routing device or a source network interface card (NIC), and the device further includes:

[0225] The third receiving unit is used to receive the second message sent by the first computing node;

[0226] The generation unit is used to add third information to the second message to obtain the first message.

[0227] In one embodiment, the first network device represents a source routing device or a source network interface card (NIC), and the device further includes:

[0228] The second determining unit is used to determine the virtual container to which the first message belongs based on the number of bytes in the first message and the number of available bytes in the virtual container; wherein,

[0229] The number of available bytes in the virtual container is determined based on the fourth and fifth information, wherein the fourth information represents the maximum capacity or threshold of the virtual container, and the fifth information represents the total number of bytes of all first messages sent through the same virtual container at different times.

[0230] In one embodiment, the second determining unit is specifically used for one of the following:

[0231] If the number of bytes in the first message is less than or equal to the number of available bytes in the first virtual container, then the first message belongs to the first virtual container.

[0232] A second virtual container is created if at least one of the following conditions is met, and the first message is determined to belong to the second virtual container:

[0233] The number of bytes in the first message is greater than the number of available bytes in the first virtual container;

[0234] The time to live of the first virtual container.

[0235] In one embodiment, the device further includes:

[0236] A recording unit is used to record at least one of the following:

[0237] The fifth piece of information;

[0238] The identifier of the virtual container to which the first message belongs;

[0239] The destination address carried in the first message of the virtual container.

[0240] In one embodiment, the first network device represents a source routing device or a source network interface card (NIC), and the device further includes:

[0241] The release unit is used to release the virtual container when its time-to-live has expired.

[0242] In practical applications, the first sending unit 601, the second receiving unit, and the third receiving unit can be implemented by a processor combined with a communication interface in the message forwarding device, and the first determining unit, the second determining unit, the generating unit, and the releasing unit can be implemented by a processor in the message forwarding device.

[0243] To implement the message forwarding method of this application embodiment, this application embodiment also provides a message forwarding device, which is installed on a second network device of the first network, such as... Figure 7 As shown, the device includes:

[0244] The first receiving unit 701 is used to receive a virtual container sent by the first network device; wherein,

[0245] The maximum capacity of the virtual container is a set value, and all first packets in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device. A virtual queue corresponds to an egress interface of the destination egress routing device and / or a corresponding priority.

[0246] In one embodiment, each first message in the virtual container carries third information, which includes at least one of the following:

[0247] The first identifier is used to select the outgoing interface of the virtual container on the first network device;

[0248] The second identifier is used to sort different virtual containers;

[0249] The third identifier is used to indicate the first or last message in the virtual container.

[0250] In one embodiment, the second network device represents the last-hop network device of the first network, and the device further includes at least one of the following:

[0251] The forwarding unit is used to discard the third information carried by the first message in the virtual container, obtain the second message, and send the second message to the second computing node;

[0252] The sorting unit is used to sort different virtual containers and send the first message within the sorted virtual containers to the second computing node.

[0253] In practical applications, the first receiving unit 701 and the forwarding unit can be implemented by a processor combined with a communication interface in the message forwarding device, and the sorting unit can be implemented by a processor in the message forwarding device.

[0254] It should be noted that the message forwarding device provided in the above embodiments is only illustrated by the division of the above program modules when performing message forwarding. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the processing described above. In addition, the message forwarding device and the message forwarding method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0255] Based on the hardware implementation of the above program modules, and in order to implement the method on the first network device side of the embodiments of this application, the embodiments of this application also provide a first network device, such as... Figure 8 As shown, the first network device 800 includes:

[0256] The first communication interface 801 is capable of exchanging information with other network nodes;

[0257] The first processor 802 is connected to the first communication interface 801 to enable information interaction with other network nodes. When running a computer program, it executes the methods provided by one or more technical solutions on the first network device side. The computer program is stored in the first memory 803.

[0258] Specifically, the first communication interface 801 is used to send a virtual container to the second network device according to the first information and / or the second information; wherein, the first information represents the selection strategy of the outgoing interface of the first network device; the second information represents the information guiding the forwarding of the virtual container; the second network device represents the next-hop device of the first network device; the maximum capacity of the virtual container is a set value, and all first packets in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device, and a virtual queue corresponds to an outgoing interface of the destination egress routing device and / or a corresponding priority.

[0259] In one embodiment, the first processor 802 is configured to determine the first outgoing interface of the virtual container corresponding to the first network device based on the first information and / or the second information;

[0260] The first communication interface 801 is specifically used to send a first message to the second network device corresponding to the first output interface in the form of a virtual container.

[0261] In one embodiment, each first message in the virtual container carries third information, which includes at least one of the following:

[0262] The first identifier is used to select the outgoing interface of the virtual container on the first network device;

[0263] The second identifier is used to sort different virtual containers;

[0264] The third identifier is used to indicate the first or last message in the virtual container.

[0265] In one embodiment, the second information includes at least one of the following:

[0266] The first packet in the virtual container carries a first identifier, which is used to select the outgoing interface of the virtual container on the first network device.

[0267] The destination address carried by the first message in the virtual container;

[0268] A first data table is used to indicate the correspondence between the virtual container and the outgoing interface of the first network device;

[0269] The first hash value is determined by the first identifier carried by the first message in the virtual container.

[0270] In one embodiment, the first communication interface 801 is further configured to receive a virtual container sent by a third network device, the third network device representing the upstream device of the first network device.

[0271] In one embodiment, the first network device represents a source routing device or a source network interface card, and the first communication interface 801 is further configured to receive a second message sent by the first computing node;

[0272] The first processor 802 is also used to add third information to the second message to obtain the first message.

[0273] In one embodiment, the first network device represents a source routing device or a source network interface card (NIC), and the first processor 802 is further configured to determine the virtual container to which the first packet belongs based on the number of bytes in the first packet and the number of available bytes in the virtual container; wherein,

[0274] The number of available bytes in the virtual container is determined based on the fourth and fifth information, wherein the fourth information represents the maximum capacity or threshold of the virtual container, and the fifth information represents the total number of bytes of all first messages sent through the same virtual container at different times.

[0275] In one embodiment, the first processor 802 is specifically used for one of the following:

[0276] If the number of bytes in the first message is less than or equal to the number of available bytes in the first virtual container, then the first message belongs to the first virtual container.

[0277] A second virtual container is created if at least one of the following conditions is met, and the first message is determined to belong to the second virtual container:

[0278] The number of bytes in the first message is greater than the number of available bytes in the first virtual container;

[0279] The time to live of the first virtual container.

[0280] In one embodiment, the first processor 802 is further configured to record at least one of the following:

[0281] The fifth piece of information;

[0282] The identifier of the virtual container to which the first message belongs;

[0283] The destination address carried in the first message of the virtual container.

[0284] In one embodiment, the first network device represents a source routing device or a source network interface card, and the first processor 802 is further configured to release the virtual container upon reaching the virtual container's time-to-live.

[0285] It should be noted that the specific processing procedures of the first processor 802 and the first communication interface 801 can be understood by referring to the above method.

[0286] Of course, in practical applications, the various components in the first network device 800 are coupled together through the bus system 804. It can be understood that the bus system 804 is used to implement communication between these components. In addition to a data bus, the bus system 804 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 8 The general labeled all buses as Bus System 804.

[0287] The first memory 803 in this embodiment is used to store various types of data to support the operation of the first network device 800. Examples of such data include any computer program used to operate on the first network device 800.

[0288] The methods disclosed in the above embodiments of this application can be applied to the first processor 802, or implemented by the first processor 802. The first processor 802 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware or by instructions in the form of software in the first processor 802. The first processor 802 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The first processor 802 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly reflected as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in the first memory 803. The first processor 802 reads the information in the first memory 803 and completes the steps of the aforementioned method in combination with its hardware.

[0289] In an exemplary embodiment, the first network device 800 may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to perform the aforementioned method.

[0290] Based on the hardware implementation of the above program modules, and in order to implement the method on the second network device side of the embodiments of this application, the embodiments of this application also provide a second network device, such as... Figure 9 As shown, the second network device 900 includes:

[0291] The second communication interface 901 is capable of exchanging information with other network nodes;

[0292] The second processor 902 is connected to the second communication interface 901 to enable information interaction with other network nodes. When running a computer program, it executes the methods provided by one or more technical solutions on the second network device side. The computer program is stored in the second memory 903.

[0293] Specifically, the second communication interface 901 is used to receive virtual containers sent by the first network device; wherein, the maximum capacity of the virtual container is a set value, and all first messages in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device, and a virtual queue corresponds to an egress interface of the destination egress routing device and / or a corresponding priority.

[0294] In one embodiment, each first message in the virtual container carries third information, which includes at least one of the following:

[0295] The first identifier is used to select the outgoing interface of the virtual container on the first network device;

[0296] The second identifier is used to sort different virtual containers;

[0297] The third identifier is used to indicate the first or last message in the virtual container.

[0298] In one embodiment, the second network device represents the last-hop network device of the first network.

[0299] The second processor 902 is used to sort different virtual containers, send the sorted first message in the virtual container to the second computing node, and / or discard the third information carried by the first message in the virtual container to obtain the second message;

[0300] The second communication interface 901 is also used to send the second message to the second computing node.

[0301] It should be noted that the specific processing procedures of the second processor 902 and the second communication interface 901 can be understood by referring to the above method.

[0302] Of course, in practical applications, the various components in the second network device 900 are coupled together via a bus system 904. It can be understood that the bus system 904 is used to implement communication between these components. In addition to a data bus, the bus system 904 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 9 The general designated all buses as Bus System 904.

[0303] The second memory 903 in this embodiment is used to store various types of data to support the operation of the second network device 900. Examples of such data include any computer program used to operate on the second network device 900.

[0304] The methods disclosed in the embodiments of this application can be applied to, or implemented by, the second processor 902. The second processor 902 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by the integrated logic circuitry of the hardware or by instructions in the form of software within the second processor 902. The second processor 902 may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The second processor 902 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, specifically a second memory 903. The second processor 902 reads information from the second memory 903 and, in conjunction with its hardware, completes the steps of the aforementioned method.

[0305] In an exemplary embodiment, the second network device 900 may be implemented by one or more ASICs, DSPs, PLDs, CPLDs, FPGAs, general-purpose processors, controllers, MCUs, microprocessors, or other electronic components to perform the aforementioned method.

[0306] It is understood that the memories (first memory 803, second memory 903) in the embodiments of this application can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); magnetic surface memory can be disk storage or magnetic tape storage. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memories described in the embodiments of this application are intended to include, but are not limited to, these and any other suitable types of memories.

[0307] In an exemplary embodiment, this application also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, such as a first memory 803 storing a computer program, which can be executed by a first processor 802 of a first network device 800 to complete the steps described in the aforementioned first network device-side method. Another example is a second memory 903 storing a computer program, which can be executed by a second processor 902 of a second network device 900 to complete the steps described in the aforementioned second network device-side method. The computer-readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM.

[0308] It should be noted that terms such as "first" and "second" are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0309] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.

[0310] Furthermore, the technical solutions described in the embodiments of this application can be combined arbitrarily without conflict.

[0311] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application.

Claims

1. A packet forwarding method, characterized by, The method applied to a first network device of a first network, comprising: sending a virtual container to a second network device according to first information and / or second information; wherein, the first information represents a selection policy of an out-interface of the first network device; the second information represents information for guiding forwarding of the virtual container; the second network device represents a next-hop device of the first network device; a maximum capacity of the virtual container is a set value, and all first packets in the same virtual container are sent from a same ingress routing device of the first network to a same virtual queue of a destination egress routing device, one virtual queue corresponding to one out-interface of the destination egress routing device and / or corresponding to a priority.

2. The method of claim 1, wherein, The sending of the virtual container to the second network device according to the first information and / or the second information comprises: determining a first out-interface corresponding to the first network device according to the first information and / or the second information; sending a first packet to the second network device corresponding to the first out-interface in the form of a virtual container.

3. The method of claim 1, wherein, Each first packet in the virtual container carries third information, and the third information comprises at least one of: a first identifier used for selecting the virtual container corresponding to the out-interface of the first network device; a second identifier used for sorting between different virtual containers; a third identifier used for indicating a first packet or a last packet in the virtual container.

4. The method according to any one of claims 1 to 3, characterized in that, The second information comprises at least one of: a first identifier carried by the first packet in the virtual container, the first identifier being used for selecting the virtual container corresponding to the out-interface of the first network device; a destination address carried by the first packet in the virtual container; a first data table used for indicating a corresponding relationship between the virtual container and the out-interface of the first network device; a first hash value determined by the first identifier carried by the first packet in the virtual container.

5. The method according to any one of claims 1 to 3, characterized in that, The method further comprises: receiving a virtual container sent by a third network device, the third network device representing a previous-hop device of the first network device.

6. The method of claim 3, wherein, The first network device represents a source routing device or a source network card, and the method further comprises: receiving a second packet sent by a first computing node; adding third information to the second packet to obtain the first packet.

7. The method of claim 2, wherein, The first network device represents a source routing device or a source network card, and before the determining of the first out-interface corresponding to the first network device, the method further comprises: determining a virtual container to which the first packet belongs according to a byte number of the first packet and an available byte number of the virtual container; wherein, the available byte number of the virtual container is determined according to fourth information and fifth information, the fourth information representing a maximum capacity or a threshold of the virtual container, and the fifth information representing a total byte number of all first packets sent through the same virtual container at different time instants.

8. The method of claim 7, wherein, The determining of the virtual container to which the first packet belongs according to the byte number of the first packet and the available byte number of the virtual container comprises one of: in a case where the byte number of the first packet is less than or equal to the available byte number of a first virtual container, determining that the first packet belongs to the first virtual container; In the case of satisfying at least one of the following conditions, a second virtual container is newly established, and it is determined that the first packet belongs to the second virtual container: The number of bytes of the first packet is greater than the available number of bytes of the first virtual container; The time to live of the first virtual container is reached.

9. The method of claim 7, wherein, The method further comprises: Recording at least one of the following: The fifth information; The identification of the virtual container to which the first packet belongs; The destination address carried by the first packet of the virtual container.

10. The method according to any of claims 1 to 3, 6, characterized in that, The first network device represents a source routing device or a source network card, and the method further comprises: In the case of reaching the time to live of the virtual container, releasing the virtual container.

11. A method of forwarding a packet, the method comprising: The second network device applied to the first network, the method comprising: Receiving the virtual container sent by the first network device; wherein, The maximum capacity of the virtual container is a set value, and all first packets in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device, and one virtual queue corresponds to one egress interface of the destination egress routing device and / or corresponds to a priority.

12. The method of claim 11, wherein, Each first packet in the virtual container carries third information, and the third information includes at least one of the following: A first identification, the first identification is used to select the virtual container on the egress interface corresponding to the first network device; A second identification, the second identification is used to sort different virtual containers; A third identification, the third identification is used to indicate the first packet or the last packet in the virtual container.

13. The method of claim 12, wherein, The second network device represents the last hop network device of the first network, and the method further comprises at least one of the following: Discarding the third information carried by the first packet in the virtual container to obtain a second packet, and sending the second packet to a second computing node; Sorting different virtual containers, and sending the first packet in the sorted virtual container to a second computing node.

14. A packet forwarding device, comprising: Comprising: A first sending unit, configured to send a virtual container to a second network device according to first information and / or second information; wherein, The first information represents the selection strategy of the egress interface of the first network device; the second information represents the information guiding the forwarding of the virtual container; the second network device represents the next hop device of the first network device; the maximum capacity of the virtual container is a set value, and all first packets in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device, and one virtual queue corresponds to one egress interface of the destination egress routing device and / or corresponds to a priority.

15. A packet forwarding device, comprising: Comprising: A first receiving unit, configured to receive the virtual container sent by the first network device; wherein, The maximum capacity of the virtual container is a set value, and all first packets in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device, and one virtual queue corresponds to one egress interface of the destination egress routing device and / or corresponds to a priority.

16. A first network device, comprising: Comprising a first processor and a first communication interface, wherein, The first communication interface is configured to send a virtual container to a second network device according to first information and / or second information; wherein, The first information represents a selection policy of an out interface of the first network device; the second information represents information for guiding a forwarding virtual container; the second network device represents a next hop device of the first network device; a maximum capacity of the virtual container is a set value, and all first packets in the same virtual container are sent from a same entry routing device of the first network to a same virtual queue of a destination egress routing device, one virtual queue corresponding to one out interface of the destination egress routing device and / or corresponding to a priority.

17. A second network device, comprising: comprising a second processor and a second communication interface, wherein the second communication interface is configured to receive a virtual container sent by the first network device; and a maximum capacity of the virtual container is a set value, and all first packets in the same virtual container are sent from a same entry routing device of the first network to a same virtual queue of a destination egress routing device, one virtual queue corresponding to one out interface of the destination egress routing device and / or corresponding to a priority.

18. A network device, comprising: comprising a processor and a memory for storing a computer program capable of running on the processor, wherein the processor is configured to execute the computer program to perform the steps of the method of any one of claims 1 to 10, or to perform the steps of the method of any one of claims 11 to 13.

19. A storage medium having stored thereon a computer program, characterized in that the computer program, when executed by the processor, implements the steps of the method of any one of claims 1 to 10, or implements the steps of the method of any one of claims 11 to 13.

Citation Information

Patent Citations

  • Message transmission method and related device

    CN111181871A

  • Message processing method and device, electronic equipment and readable storage medium

    CN114430394A