Forwarding path determination method and communication device

By virtualizing the communication devices of different networks into a single virtual communication device, the problem of low efficiency in traditional load balancing algorithms is solved, achieving efficient global load balancing.

CN122053511APending Publication Date: 2026-05-15HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2024-11-13
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

In network transmission, especially in scenarios with a small number of data streams and a large volume of traffic, using traditional hash algorithms for load balancing can easily lead to load imbalance. Furthermore, global load balancing algorithms need to send path information to each network device, resulting in low efficiency.

Method used

By virtualizing communication devices between different networks into a single virtual communication device, the network topology is simplified. Only the path of the service flow to the virtual communication device is sent, avoiding the sending of path information between different networks and network devices at different levels.

Benefits of technology

It improves load balancing efficiency, simplifies the load balancing algorithm, and achieves efficient global load balancing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122053511A_ABST
    Figure CN122053511A_ABST
Patent Text Reader

Abstract

The invention provides a forwarding path determination method and a communication device, and relates to the technical field of communication. The method comprises the following steps: acquiring a first network topology of a network system, wherein a first communication device and a second communication device in the first network topology serve as a virtual communication device; acquiring an address of a service flow of a network system; and determining a forwarding path of the service flow based on the service flow information and the first network topology, wherein the forwarding path comprises a path of the service flow uplink to the virtual communication device. Therefore, a transmission path of the flow among different networks does not need to be issued, and only a path of uplink service flow to the virtual communication device needs to be issued, so that the load balancing efficiency is improved.
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 forwarding path determination method and communication device. Background Technology

[0002] In scenarios with a small number of data streams but high traffic volume, using traditional hash algorithms for load balancing can easily lead to uneven load distribution. Global load balancing (GLB) algorithms involve interaction between the network controller and the end-user application framework. After obtaining global traffic information, the controller performs global routing calculations, distributing all traffic paths within the network to ensure congestion-free operation. Once global routing is complete, the controller then distributes the path information to each network device.

[0003] Load balancing in scenarios involving two or more interconnected networks requires global load balancing across these networks, allocating traffic paths between them. Therefore, the controller needs to send path information to network devices at all levels of each network to indicate the transmission path of traffic between different networks, resulting in relatively low load balancing efficiency. Summary of the Invention

[0004] This application provides a forwarding path determination method and communication device to solve the problem of low global load balancing efficiency in scenarios where different networks are interconnected.

[0005] Firstly, a forwarding path determination method is provided. This method includes: acquiring a first network topology; using a first communication device and a second communication device in the first network topology as a virtual communication device; acquiring the addresses of service flows in the network system; and determining the forwarding path of the service flows based on the addresses of the service flows and the first network topology, wherein the forwarding path includes the path for the service flows to travel uplink to the virtual communication device.

[0006] This forwarding path determination method can be applied to a network system, which includes a control device, a first network, and a second network. A first communication device in the first network and a second communication device in the second network are communicatively connected. The method is executed by the control device. The first and second communication devices can be indirectly connected via gateways or other communication devices, or they can be directly connected. The control device can be a network controller, a network control engine (NCE), a network interface card (NIC) or other device with network control functions, or the control plane of any network device.

[0007] Based on the aforementioned forwarding path determination method, the communication device interconnecting the first and second networks is treated as a virtual communication device in the network topology, simplifying the network topology. Therefore, compared to determining the forwarding path based on the first network topology of the network system, which requires sending path information to network devices at each level of each network to indicate the transmission path of traffic between different networks, the forwarding path determination method of this application does not require sending the transmission path of traffic between different networks, nor does it require sending the transmission path of traffic between network devices at different levels. It only needs to send the path of the service flow uplink to the virtual communication device, thus improving load balancing efficiency.

[0008] In conjunction with the forwarding path determination method provided in the first aspect, as a possible implementation, this forwarding path determination method further includes: obtaining a second network topology of the network system; in the second network topology, the first communication device and the second communication device are communicatively connected. Next, obtaining the first network topology of the network system includes: determining the first network topology based on the second network topology.

[0009] In conjunction with the forwarding path determination method provided in the first aspect, as a possible implementation, the method for obtaining the second network topology of the network system includes: obtaining the third network topology of the network system; and determining the second network topology based on the third network topology. Specifically, in the third network topology, the third communication device and the second communication device of the first network are communicatively connected; in the second network topology, the first communication device of the first network is communicatively connected to the second communication device; and the fourth communication device of the first network is communicatively connected to communication devices other than the second communication device in the second network. The first and fourth communication devices are virtually obtained from the third communication device.

[0010] Based on the above implementation, the first communication device in the second network topology can be obtained by splitting the third communication device in the third network topology. When different networks in the network system contain different numbers of cross-network interconnected communication devices, the communication devices in the network with fewer cross-network interconnected communication devices can be split in the network topology, ensuring that different networks contain the same and equivalent number of cross-network interconnected communication devices. In this way, the load balancing algorithm for centralized routing across all networks in the network system is simpler and more efficient.

[0011] Combining the forwarding path determination method provided in the first aspect, as a possible implementation, the first network is the first data center (DC) network, and the second network is the second data center network.

[0012] Based on the forwarding path determination method provided in the first aspect, as one possible implementation, the first and second networks are a fat-tree architecture. In this scenario, the first and second communication devices are spine switches within the fat-tree architecture. For example, if the fat-tree architecture is a standard Layer 2 fat-tree architecture, where all spine switches in one network are communicatively connected to spine switches in another network, then the first or second communication device can be any set of cross-network interconnected spine switches within the fat-tree architecture.

[0013] Based on the above implementation method, the cross-network topology is transformed into a standard two-layer fat tree architecture network topology, so that a global load balancing algorithm can be used to perform global routing on the cross-network network system, and achieve global load balancing efficiently.

[0014] Secondly, a forwarding path determination method is provided. This method includes: receiving data packets of a first service flow through a first port of a first port group; the communication device corresponding to the destination address of the data packet belongs to a second network; and forwarding the data packet through at least one second port corresponding to the first port.

[0015] This forwarding path determination method can be applied to a network system, which includes a first network and a second network. A first communication device in the first network is connected to a second communication device in the second network via at least one port. The method is executed by the first communication device. The first and second communication devices can be connected indirectly through other communication devices such as gateways, or they can be connected directly.

[0016] Based on the aforementioned forwarding path determination method, a first port group is configured in the first communication device for forwarding traffic within the network. A correspondence exists indicating that at least one port in the first port group is used to forward the target service flow received by the corresponding port in the first port group. The communication device corresponding to the destination address of the target service flow belongs to the second network. In other words, at least one port in the first port group is used to forward service flows received by the corresponding port in the first port group whose destination address corresponds to a communication device belonging to the second network. Thus, traffic balancing is achieved for cross-network traffic using the correspondence between port groups.

[0017] In conjunction with the forwarding path determination method provided in the second aspect, as a possible implementation, the forwarding path determination method further includes adding the port on the first communication device that is connected to the access communication device in the first network to the first port group.

[0018] Thirdly, a forwarding path determination apparatus is provided, comprising a transceiver module and a processing module. The transceiver module is used to acquire a first network topology of a network system; in the first network topology, a first communication device and a second communication device constitute a virtual communication device. The transceiver module is also used to acquire the addresses of service flows in the network system. The processing module is used to determine the forwarding path of the service flows based on the addresses of the service flows and the first network topology, the forwarding path including the path for the service flows to travel upstream to the virtual communication device.

[0019] As one possible implementation, the aforementioned forwarding path determination apparatus may further include other modules that perform the operational steps of the forwarding path determination method described in the first aspect.

[0020] As one possible implementation, the beneficial effects of the forwarding path determination device provided in the third aspect can be referred to the description in the forwarding path determination method provided in the first aspect, and will not be repeated here.

[0021] Fourthly, a forwarding path determination apparatus is provided, comprising a receiving module and a forwarding module. The receiving module receives data packets of a first service flow through a first port of a first port group; the communication device corresponding to the destination address of the data packets belongs to a second network. The forwarding module forwards the data packets through at least one second port corresponding to the first port.

[0022] As one possible implementation, the aforementioned forwarding path determination apparatus may further include other modules that perform the operational steps of the forwarding path determination method described in the second aspect.

[0023] As one possible implementation, the beneficial effects of the forwarding path determination device provided in the fourth aspect can be referred to the description in the forwarding path determination method provided in the second aspect, and will not be repeated here.

[0024] Fifthly, a control device is provided, comprising a processor and a memory, the processor being configured to execute instructions stored in the memory to cause the control device to perform the forwarding path determination method described in any possible implementation of the first aspect above.

[0025] In a sixth aspect, a communication device is provided, the communication device including a processor and a memory, the processor being configured to execute instructions stored in the memory to cause the communication device to perform the forwarding path determination method described in any possible implementation of the second aspect above.

[0026] In a seventh aspect, a chip is provided, including a processor for retrieving and executing instructions stored in a memory, such that a communication device on which the chip is mounted performs the forwarding path determination method described in any possible implementation of the first or second aspect above.

[0027] Eighthly, another chip is provided, comprising: an input interface, an output interface, a processor, and a memory, wherein the input interface, the output interface, the processor, and the memory are connected via an internal connection path, and the processor is used to execute code in the memory, wherein when the code is executed, the processor is used to execute the forwarding path determination method described in any possible implementation of the first or second aspect above.

[0028] Ninth aspect, a network system is provided, including a plurality of network devices that are communicatively connected to each other, the plurality of network devices including the control device described in the fifth aspect and the communication device described in the sixth aspect.

[0029] In a tenth aspect, a computer program (product) is provided, the computer program (product) comprising: computer program code, which, when executed by a computer or communication device, causes the computer or communication device to perform the forwarding path determination method described in any possible implementation of the first or second aspect.

[0030] Eleventhly, a computer-readable storage medium is provided, wherein at least one instruction is stored therein, the instruction being loaded and executed by a processor to implement the forwarding path determination method described in any possible implementation of the first or second aspect above. Attached Figure Description

[0031] Figure 1 A schematic diagram of the structure of a network system provided in this application;

[0032] Figure 2 A flowchart illustrating a forwarding path determination method provided in this application. Figure 1 ;

[0033] Figure 3 A schematic diagram of the topology of a split communication device provided in this application;

[0034] Figure 4 A schematic diagram of a first network topology provided in this application Figure 1 ;

[0035] Figure 5 A schematic diagram of a first network topology provided in this application Figure 2 ;

[0036] Figure 6 This application provides a schematic diagram of the structure of a network system including an egress gateway device;

[0037] Figure 7a This application provides an internal path diagram of a virtual communication device;

[0038] Figure 7b A routing diagram of a core switch provided in this application;

[0039] Figure 8 A flowchart illustrating a forwarding path determination method provided in this application. Figure 2 ;

[0040] Figure 9 A schematic diagram of load balancing for long-distance links based on port mapping is provided for this application;

[0041] Figure 10 A schematic diagram of a forwarding path determination device provided in this application;

[0042] Figure 11 A schematic diagram of another forwarding path determination device provided in this application;

[0043] Figure 12 This is a schematic diagram of the structure of a communication device provided in this application. Detailed Implementation

[0044] This application provides a forwarding path determination method applied to a network system. The network system includes a control device, a first network, and a second network. A first communication device in the first network and a second communication device in the second network are communicatively connected. The method is executed by the control device. In the flow of the forwarding path determination method, the control device acquires a first network topology of the network system, where the first and second communication devices in the first network topology serve as a virtual communication device. Then, the control device acquires the addresses of service flows in the network system and determines the forwarding path of the service flows based on the service flow addresses and the first network topology. The forwarding path includes the path for the service flow to travel uplink to the virtual communication device.

[0045] Based on the aforementioned forwarding path determination method, the communication device interconnecting the first and second networks is treated as a virtual communication device in the network topology, simplifying the network topology. Therefore, compared to determining the forwarding path based on the first network topology of the network system, which requires sending path information to network devices at each level of each network to indicate the transmission path of traffic between different networks, the forwarding path determination method of this application does not require sending the transmission path of traffic between different networks, nor does it require sending the transmission path of traffic between network devices at different levels. It only needs to send the path of the service flow uplink to the virtual communication device, thus improving load balancing efficiency.

[0046] This application also provides a forwarding path determination method applied to a network system, which includes a first network and a second network. A first communication device in the first network is communicatively connected to a second communication device in the second network via at least one port. The method is executed by the first communication device. In the forwarding path determination method, the first communication device receives data packets of a first service flow through a first port of a first port group. The communication device corresponding to the destination address of the data packet belongs to the second network. Then, the data packet is forwarded through the second port of the at least one port that corresponds to the first port. There is a correspondence between the ports in the first port group and the ports in the at least one port group. This correspondence indicates that the ports in the at least one port group are used to forward the target service flow received by the corresponding port in the first port group, and the communication device corresponding to the destination address of the target service flow belongs to the second network.

[0047] Based on the aforementioned forwarding path determination method, a first port group is configured in the first communication device for forwarding traffic within the network. Specifically, at least one port in the first port group is used to forward service flows from the second network whose destination address corresponds to the traffic received by the corresponding port in the first port group. In this way, traffic balancing is achieved by using the correspondence between port groups for cross-network traffic.

[0048] The technical solutions involved in this application may be applied not only to current communication technologies or communication devices, but also to future communication technologies or communication devices, or to communication systems and network systems that include communication devices. The terminology used in the embodiments section of this application is only for explaining specific embodiments of this application and is not intended to limit this application. A brief introduction to some concepts that may be involved in this application is given below.

[0049] Network topology is the arrangement of communication network elements (links, nodes, etc.).

[0050] Equal-cost multi-path (ECMP) routing refers to routing where multiple equally priced links lead to the same destination. Traffic is distributed evenly across these links, regardless of differences in link bandwidth. An equally priced link is one that offers the same cost to reach its destination.

[0051] Load balancing is a technique that distributes workloads (such as network traffic, data requests, computing tasks, etc.) across multiple computing resources (such as servers, virtual machines, containers, etc.) to optimize performance, improve reliability, and increase scalability.

[0052] Fat-tree architecture (also known as fat-tree networking, fat-tree structure, fat-tree topology, etc.) is a typical improvement on tree structure. In fat-tree architecture, the network topology can be two-layer or three-layer, namely aggregation layer and access layer, or core layer, aggregation layer, and access layer. Unlike tree architecture, fat-tree architecture allows a single intermediate node to have multiple parent nodes, thus increasing the number of links between upper and lower layer switches, as well as between aggregation layer switches and core switches.

[0053] To make the objectives, technical solutions, and advantages of this application clearer, the application will now be described in further detail with reference to the accompanying drawings.

[0054] In the following description, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0055] Furthermore, in this application, directional terms such as "upper" and "lower" are defined relative to the orientation of the components shown in the accompanying drawings. It should be understood that these directional terms are relative concepts, used for relative description and clarification, and can change accordingly depending on the orientation of the components in the accompanying drawings.

[0056] In artificial intelligence (AI) training scenarios, the scale of training clusters is gradually expanding. Due to limitations in the construction and power supply of a single data center (DC), large-scale AI tasks require networking and coordinating two or more data centers located hundreds or even thousands of kilometers apart for collaborative training. In AI large-scale model training, characterized by high traffic volume, high synchronization, and strong timeliness, load balancing is the primary issue for AI cluster networks. When data centers use equal-cost multi-path load balancing, uneven load distribution and network congestion can easily occur when the number of flows is relatively small but the traffic volume is large. If the controller performs global path calculation on the cross-network system composed of data centers and then distributes the path information to each network device, in the case of multiple interconnected data centers, the controller needs to distribute path information to network devices at all levels of each network to indicate the transmission path of traffic between different networks, resulting in low load balancing efficiency.

[0057] To address the aforementioned issues, the application scenarios of the embodiments of this application will be described below with reference to the accompanying drawings.

[0058] Figure 1This application provides a schematic diagram of a network system structure. This network system can belong to a data center network topology, an interconnection between multiple data centers, or a wide area network (WAN). The service scenarios of the network system can be high-performance service scenarios such as distributed machine learning training, distributed storage, high-performance computing, and containerization. The communication protocols of the network system can be remote direct memory access (RDMA) protocols, transmission control protocols (TCP), such as InfiniBand and RoCEv2 (RDMA over Converged Ethernet version 2).

[0059] Network system 100 may include a control node and multiple networks (or groups, etc.), each network including multiple network nodes. Each network may also include multiple computing nodes, or communicate with computing nodes outside the network. For example, computing nodes in each network establish a full-mesh relationship through multiple network nodes within the network, and computing nodes in different networks establish a full-mesh relationship through interconnected network nodes. That is, each pair of networks is connected using one or more links, and each network node within a network is directly interconnected with other network nodes within the network, and can simultaneously connect to other networks and computing nodes.

[0060] Compute nodes are used to support high-performance services with different communication requirements, such as AI training, AI inference, and storage. Figure 1 As shown, network system 100 includes multiple networks ( Figure 1 Only networks 101 and 102 are shown in the image, but the number of networks is not limited to two. Each network includes one or more computing nodes. Figure 1 (Only 8 compute nodes are shown, but it is not limited to 8 compute nodes). For example, network 101 includes compute nodes 103-110, and network 102 includes compute nodes 111-118.

[0061] The computing node in this application can be a server, or a processor in the server (such as a neural network processing unit (NPU), central processing unit (CPU), graphics processing unit (GPU), etc.).

[0062] Network nodes are used to enable data exchange between computing nodes. For example... Figure 1As shown, each network in network system 100 includes multiple network nodes. Figure 1 Each network shown in the diagram has only two network nodes, but is not limited to two. For example, network 101 includes network nodes 119-124, and network 102 includes network nodes 125-130. Network nodes can be at different levels in network system 100. For example, if network system 100 is a fat-tree architecture, network nodes 119-122 and 125-128 can be leaf switches in the access layer, while network nodes 123, 124, 129, and 130 can be spine switches in the aggregation layer.

[0063] The connection methods of each node in the network system 100 will be illustrated below.

[0064] In network 101, computing nodes 103 and 104 are communicatively connected to network node 119, computing nodes 105 and 106 are communicatively connected to network node 120, computing nodes 107 and 108 are communicatively connected to network node 121, computing nodes 109 and 110 are communicatively connected to network node 122, network node 123 is communicatively connected to network nodes 119 and 122, and network node 124 is communicatively connected to network nodes 119 and 122.

[0065] In network 102, computing nodes 111 and 112 are communicatively connected to network node 125, computing nodes 113 and 114 are communicatively connected to network node 126, computing nodes 115 and 116 are communicatively connected to network node 127, computing nodes 117 and 118 are communicatively connected to network node 128, network node 129 is communicatively connected to network nodes 125-128, and network node 130 is communicatively connected to network nodes 125-128.

[0066] Between network 101 and network 102, network node 123 is communicatively connected to network node 129, and network node 124 is communicatively connected to network node 130.

[0067] Control node 131 is responsible for the centralized control and management of the entire network system 100, enabling centralized configuration, monitoring, and management of each node in the network system 100. For example, control node 131 may be a network controller or network control engine. Control node 131 has communication connections with one or more of the multiple network nodes. Figure 1(For example, the connection between control node 131 and network nodes 123, 124, 129, and 130 is represented by dashed lines.) Control node 131 can also communicate with one or more of the multiple computing nodes.

[0068] If control node 131 in network system 100 uses a global load balancing algorithm to load balance network nodes, issuing forwarding paths for service flows to network nodes 119-112 in network 101 and network nodes 125-128 in network 102 respectively, network nodes 123 and 124 cannot perceive the network topology information of network 102, and network nodes 129 and 130 cannot perceive the network topology information of network 101, thus failing to achieve global load balancing. If global load balancing is still required under these conditions, control node 131 needs to issue forwarding paths for cross-network service flows between network 101 and network 102 to network nodes 123, 124, 129, and 130, resulting in low load balancing efficiency.

[0069] In the embodiments of this application, both network nodes and computing nodes in the network system 100 can be referred to as communication devices. Communication devices can also be components of the network nodes and computing nodes in the network system 100, such as processors in servers (e.g., neural network processing units (NPUs), central processing units (CPUs), graphics processing units (GPUs), etc.), network interface cards (NICs) in servers, switching chips in network devices, or CPUs in network devices, etc. This application does not limit these specific applications.

[0070] It should be understood that Figure 1 This is a simplified diagram for ease of understanding only. The network system 100 may also include other network devices, servers, and / or other devices, and the connection relationships between nodes may also vary. Figure 1 It was not drawn in the middle.

[0071] It should be understood that Figure 1Only a network architecture with two-layer network devices is shown. In possible embodiments of this application, the layer and number of network devices are not limited. For example, embodiments of this application can also be applied to a network architecture with three-layer network devices. In this case, the network system 100 may also include a core switch of the core layer. Network nodes 123 and 124 in network 101 are communicatively connected to the core switch in network 102 through the core layer switch. The core switch in network 102 is communicatively connected to network nodes 129 and 130, respectively.

[0072] Next, the forwarding path determination method provided in the embodiments of this application will be described in detail with reference to the accompanying drawings. Here, we will refer to... Figure 1 Taking the control device in the network system 100, such as the control node 131 executing the forwarding path determination method as an example, the specific steps of the forwarding path determination method are explained.

[0073] Figure 2 A flowchart illustrating a forwarding path determination method provided in this application. Figure 1 Please refer to this. Figure 2 The forwarding path determination method may include the following S201-S203.

[0074] S201, The control device acquires the first network topology of the network system.

[0075] The control device obtains network topology information of the network system by interacting with each node in the network system, processes the network topology information to obtain a second network topology, and virtualizes the communication devices that connect different networks in the second network topology as a virtual communication device to obtain a first network topology.

[0076] The control device obtains network topology information of the network system by interacting with each node in the network system, and processes the network topology information to obtain a second network topology.

[0077] Network topology information includes the connection relationships between nodes in the network system, device attributes, and link status.

[0078] As one possible implementation, if the number of network nodes in the first network of the network system that are communicatively connected to the second network of the network system is the same as the number of network nodes in the second network of the network system that are communicatively connected to the first network of the network system, the control device, after acquiring the network topology information of the network system, models the network topology to obtain the second network topology. In the second network topology, the first communication device of the first network and the second communication device of the second network are communicatively connected.

[0079] Optionally, the control device models the network topology information, which can be done by using primitives to represent each node in the network topology information and the connection relationships between them. For example, different types of points can be used to represent nodes with different device attributes in the network system, and lines between points can be used to represent the connection relationships between the nodes.

[0080] Taking network system 100 as an example, network 101 includes two Spine switches, such as network node 123 and network node 124, which are communicatively connected to network 102. Network 102 includes two Spine switches, such as network node 129 and network node 130, which are communicatively connected to network 101. After obtaining the network topology information of network system 100, control node 131 performs modeling based on the network topology information, such as... Figure 1 The primitives of the network nodes shown represent network nodes in network system 100, such as... Figure 1 The primitives of the computing nodes shown represent the computing nodes in the network system 100, such as... Figure 1 The primitives of the control node shown represent control node 131, and the communication connections between the nodes are represented by lines, resulting in a second network topology corresponding to the physical topology of network system 100. In this second network topology, network node 123 is communicatively connected to network node 129, and network node 124 is communicatively connected to network node 130. If network 101 is the first network and network 102 is the second network, then when network node 123 is the first communication device, network node 129, which is communicatively connected to network node 123, is called the second communication device; and when network node 124 is the first communication device, network node 130, which is communicatively connected to network node 124, is called the second communication device. In this case, the specific topological structure of the above-mentioned second network topology is as follows: Figure 1 As shown, it will not be elaborated further here.

[0081] As another possible implementation, if the number of network nodes in the first network of the network system that are communicatively connected to the second network is less than the number of network nodes in the second network that are communicatively connected to the first network, the control device, after acquiring the network topology information of the network system, models a third network topology based on the network topology information. In this third network topology, the third communication device of the first network is communicatively connected to the second communication device of the second network. Then, the control device splits the network nodes of the first network in the third network topology so that the number of network nodes in the first network that are communicatively connected to the second network is equal to the number of network nodes in the second network that are communicatively connected to the first network, thus obtaining the second network topology. For example, in the second network topology, the third communication device is virtually split into a first communication device and a fourth communication device; the first communication device is communicatively connected to the second communication device, and the fourth communication device is communicatively connected to all communication devices except the second communication device.

[0082] like Figure 3 As shown, based on the nodes included in network system 100, network 101 includes two spine switches, such as network node 123 and network node 124, which are communicatively connected to network 102. Network 102 includes three spine switches, such as network node 129, network node 130, and network node 132, which are communicatively connected to network 101. Figure 1 (Not shown in the diagram), after obtaining the network topology information of the network system 100, the control node 131 models the network topology information to obtain a third network topology corresponding to the physical topology of the network system 100. In the third network topology, network node 123 is communicatively connected to network node 129 and network node 132, respectively, and network node 124 is communicatively connected to network node 130. If network 101 is the first network and network 102 is the second network, then when network node 123 is the third communication device, network node 129, which is communicatively connected to network node 123, is called the second communication device; when network node 124 is the third communication device, network node 130, which is communicatively connected to network node 124, is called the second communication device.

[0083] Based on the aforementioned third network topology, control node 131 virtually divides network node 123 into network node 123' and network node 123'". Network node 123' is communicatively connected to network node 129, and network node 123' is communicatively connected to network node 132. Among them, network node 123' can be referred to as the first communication device, and network node 123' can be referred to as the fourth communication device.

[0084] Optionally, the constraint for the control device to split the network nodes of the first network in the third network topology is that each network node obtained after splitting is communicatively connected to an access communication device in the first network. Here, the access communication device is a communication device that generates data packets for service flows, and one or more access layer switching nodes in the first network. Figure 3 Taking the splitting of network node 123 as an example, network node 123' communicates with each access layer switching node, and network node 123" communicates with each access layer switching node. Each access layer switching node includes network node 119 to network node 122.

[0085] When the control device splits network nodes, the access communication devices between multiple networks are of the same model or have the same uplink port. In networks with fewer cross-network connected communication devices, there are more links (connections) between each access communication device and the cross-network connected communication devices. Conversely, in networks with more cross-network connected communication devices, there are fewer links (connections) between each access communication device and the cross-network connected communication devices, and the number of connections is inversely proportional to the number of cross-network connected communication devices. Thus, after the network nodes in each network are split, the connections between each split communication device and each access communication device can also be evenly distributed, making all split communication devices equivalent.

[0086] After acquiring the second network topology, the control device determines the first network topology based on the second network topology.

[0087] The control device virtualizes the communication devices that connect different networks in the second network topology to each other, i.e., the cross-network interconnection communication devices, into a single virtual communication device, thus obtaining the first network topology.

[0088] Taking the second network topology corresponding to the physical topology of network system 100 as an example, such as Figure 4 In the first network topology shown, the control node 131 virtualizes network nodes 123 and 129 in the second network topology as virtual network node 133, and virtualizes network nodes 124 and 130 as virtual network node 134.

[0089] Taking the second network topology transformed from the third network topology of network system 100 as an example, such as Figure 5 In the first network topology shown, the control node 131 virtualizes network nodes 123' and 129 in the second network topology as virtual network node 133, virtualizes network nodes 124 and 130 as virtual network node 134, and virtualizes network nodes 123' and 132 as virtual network node 135.

[0090] S202, The control device obtains the address of the service flow of the network system.

[0091] The service flow can be an AI service flow within an artificial intelligence (AI) training scenario within a collective communication context. Its traffic behavior is controlled by framework layers such as DeepSpeed / Megatron, and this control is completely consistent across each iteration. Therefore, the control device can obtain the sender and receiver of all AI service flows—that is, the addresses of the service flows—through the framework layer before the training task begins. These addresses include the source address (the sender's address) and the destination address (the receiver's address).

[0092] As one possible implementation, the service flow of a network system can be a cross-network service flow or a service flow within the network.

[0093] by Figure 4 Taking the first network topology shown as an example, control node 131 obtains the addresses of service flows in network system 100 and identifies service flow 1 sent from computing node 103 to computing node 106, and service flow 2 sent from computing node 105 to computing node 118. Here, the first network (network 101) and the second network (network 102) can be different data centers. Computing node 103 and computing node 106 belong to the same network, and their traffic does not need to leave network 101. Computing node 105 and computing node 118 belong to different networks, and their traffic needs to leave network 101. Therefore, service flow 1 is an intra-network service flow, also known as a short-distance service flow. Service flow 2 is a cross-network service flow, also known as a long-distance service flow.

[0094] S203. The control device determines the forwarding path of the service flow based on the address of the service flow and the first network topology.

[0095] The control device determines the forwarding path of the service flow based on the address of the service flow and the first network topology, that is, the path of the service flow to the virtual communication device.

[0096] Continue with Figure 4 Taking the first network topology shown as an example, for service flow 1, the source address and destination address of service flow 1 are within the same network, i.e., network 101. Therefore, the physical path of service flow 1 will only pass through network nodes within network 101. For example, the compute node 103 corresponding to the source address of service flow 1 is directly connected to network node 119, and the compute node 106 corresponding to the destination address of service flow 1 is directly connected to network node 120. Network node 119 communicates with network node 120 through network node 123. When control node 131 determines that service flow 1 is upstream to virtual network node 133, it determines the forwarding path of service flow 1 from network node 119 to virtual network node 133, i.e., the forwarding path of service flow 1 from network node 119 to network node 123. Then, network node 123 looks up the route based on the address of service flow 1 to determine the forwarding path of service flow 1 from network node 123 to network node 120. This does not involve the traffic forwarding of the long-distance link between network node 123 and network node 129.

[0097] Continue with Figure 4Taking the first network topology shown as an example, for service flow 2, the source address and destination address of service flow 2 are in different networks, namely network 101 and network 102. Therefore, the physical path of service flow 2 will pass through the network nodes of network 101 and network 102. For example, the computing node 105 corresponding to the source address of service flow 2 is connected to the virtual network node 133 through network node 120, and the computing node 118 corresponding to the destination address of service flow 2 is connected to the virtual network node 133 through network node 128. When the control node 131 determines that service flow 2 is going up to the virtual network node 133, it determines the forwarding path of service flow 2 from network node 120 to virtual network node 133, that is, the forwarding path of service flow 2 from network node 120 to network node 123. Then, network node 123 determines the forwarding path of service flow 2 from network node 123 to network node 129 by looking up the route based on the address of service flow 2, and network node 124 determines the forwarding path of service flow 2 from network node 129 to network node 128 by looking up the route based on the address of service flow 2, which involves the forwarding of traffic on the long-distance link between network node 123 and network node 129.

[0098] As one possible implementation, traffic forwarding between long-distance links can be achieved through port mapping for load balancing. Network nodes can also select the outgoing port (i.e., the link corresponding to the outgoing port) for long-distance traffic based on port mapping. Please refer to [link name] for details on port mapping implementation. Figure 9 The relevant descriptions will not be repeated here.

[0099] The aforementioned network nodes determine the forwarding path of a service flow by looking up the route based on the address of the service flow. This can be done through route forwarding, and the routing table used for route lookup can be obtained through route learning, which will not be elaborated further here.

[0100] In the above embodiments, the control device determines the first network topology and then the virtual communication device based on the second network topology. In other possible embodiments, computing nodes such as computing node 103, leaf nodes such as network node 119, spine nodes such as network node 123, and any communication device outside the control device in the network system 100 can obtain the second network topology, determine the first network topology based on the second network topology, and announce the first network topology to the control device so that the control device can determine the forwarding path of the service flow based on the first network topology. For example, the communication device sends an announcement information to the control device. The announcement information includes at least one set of virtual communication device information. Each set of virtual communication device information includes the identifier of the virtual communication device obtained by virtualization and the identifiers of the corresponding communication devices before the virtual communication device was virtualized.

[0101] The forwarding path determination method provided in this application does not limit the number of networks in the network system or the number of communication devices corresponding to the virtual communication device. If the network system includes 3, 4 or more networks, the virtual communication device can be obtained virtually from 3, 4 or more Spine exchange nodes.

[0102] Based on the aforementioned forwarding path determination method, the communication device interconnecting the first and second networks is treated as a virtual communication device in the network topology, simplifying the network topology. Therefore, compared to determining the forwarding path based on the first network topology of the network system, which requires sending path information to network devices at each level of each network to indicate the transmission path of traffic between different networks, the forwarding path determination method of this application does not require sending the transmission path of traffic between different networks, nor does it require sending the transmission path of traffic between network devices at different levels. It only needs to send the path of the service flow uplink to the virtual communication device, thus improving load balancing efficiency.

[0103] In this scenario, if the first and second networks are fat-tree architectures, the cross-network topology is transformed into a standard two-layer fat-tree architecture. This allows network-level load balancing algorithms to be used directly in cross-network communication systems to perform global routing calculations without requiring complex adjustments to the network-level load balancing algorithm. This simplifies the load balancing algorithm and achieves global load balancing efficiently.

[0104] The preceding text, using networks 101 and 102 including Layer 2 switching devices as examples, provided an overall description of the forwarding path determination method provided in this application. In some possible scenarios, data center networks may include egress gateway devices, such as egress switches, routers, and firewalls. Service flows within a single network are not forwarded through the egress gateway device; however, cross-network service flows are forwarded through the egress gateway device. The following section will use... Figure 6 Using the network topology shown as an example, this paper provides a detailed explanation of the implementation of the forwarding path determination method provided in this application in a network containing an egress gateway device.

[0105] like Figure 6As shown, Network 1 includes 2 core switches, 8 spine switches, and 16 leaf switches. The 2 core switches include switch 1 and switch 2, the 8 spine switches include switches 3-10, and the 16 leaf switches include switches 11-26. Network 2 includes 2 core switches, 4 spine switches, and 8 leaf switches. The 2 core switches include switches 27 and 28, the 4 spine switches include switches 29-32, and the 8 leaf switches include switches 33-40. Network 3 includes 2 core switches, 2 spine switches, and 4 leaf switches. The 2 core switches include switches 41 and 42, the 2 spine switches include switches 43-44, and the 4 leaf switches include switches 45-48.

[0106] Within each of Networks 1, 2, and 3, each spine switch communicates with each leaf switch, and each core switch communicates with each spine switch. A core switch in one network communicates with a core switch in another network. The specific connection methods are as follows: Figure 6 As shown.

[0107] The forwarding path determination method provided in this application is applied to... Figure 6 In the network 1-network 3 shown, network 1 and network 2 in network 1, network 2 and network 3 can be regarded as Figure 2 The first and second networks in the diagram, with the spine switches within each network considered as... Figure 2 The first communication device and the second communication device in the system, and the control device execute the above-described S201-S203 to determine the forwarding path. The control device can be connected to... Figure 6 The switches at each level are connected for communication, resulting in complex wiring. Figure 6 Not shown in the image.

[0108] This embodiment and Figure 2 The difference between S201-S203 shown is that a third network, namely network 3, is added, and the virtual communication device is obtained by virtualizing three communication devices. For example, the first communication device is switch 3, the second communication device is switch 29, and the third communication device is switch 43. The first virtual communication device is obtained by virtualizing switch 3, switch 29 (which is split into one of two switches), and switch 43 (which is split into one of four switches).

[0109] This embodiment and Figure 2The difference between S201-S203 is that in S203, long-distance link routing can be achieved uniformly through simple port mapping, but in this embodiment, routing of the core switch is required.

[0110] Please refer to Figure 7a , Figure 7a This application provides an internal path diagram for a virtual communication device. A spine switch, such as switch 3, sends service flows to core switches in other networks, such as switches 27 and 28, through core switches in its own network, such as switches 1 and 2. Switches 27 and 28 then forward the service flows to a spine switch in its own network, such as switch 29. Due to the symmetry of the network topology, each spine switch and its egress gateway device have the same number of connections. Therefore, when routing through core switches, for a spine switch, the service flows destined for each network need to be evenly distributed across all core switches in its own network.

[0111] Please refer to Figure 7b , Figure 7b This application provides a routing diagram for a core switch. After the control device calculates and determines the forwarding path of the service flows, there are 10 service flows from switch 3 to switch 29, and 6 service flows from switch 3 to switch 43. There are two core switches, such as switch 1 and switch 2, between switch 3 and switch 29, each allocated 10 / 2 = 5 service flows.

[0112] If the number of links from switch 3 to switch 1 or the number of links from switch 3 to switch 2 are both greater than or equal to 5, the control device can select 5 links from them.

[0113] If the number of links from switch 3 to switch 1 or from switch 3 to switch 2 is less than 5, the control device needs to distribute the 5 service flows as evenly as possible across the links. For example, the control device can achieve even distribution of service flows through a round-robin method, that is, the first flow is assigned to the first link, the second flow is assigned to the second link, the third flow is assigned to the first link again, and so on, finally resulting in 3 service flows on the two links and 2 service flows on the other two links.

[0114] For the 6 service flows between switch 3 and switch 43, each core switch is allocated 6 / 2 = 3 service flows, and the specific allocation method is the same as above.

[0115] As one possible implementation, routing between egress gateway devices of different networks, such as core switches, can be achieved using port mapping. For details on port mapping, please refer to [link / reference needed]. Figure 9 The relevant descriptions will not be repeated here.

[0116] Based on the above Figure 6 The method shown in Figure 7 implements the forwarding path determination method in networks with egress gateway devices, improving the applicability of the forwarding path determination method. Furthermore, when a network with an egress gateway device needs expansion, such as adding spine switches or leaf switches, it is not necessary to redesign the connections between the spine switches and other network spine switches to rebuild the network. Only the newly added spine switches or leaf switches need to be connected to the egress gateway device, simplifying the expansion operation.

[0117] The foregoing described the application of the forwarding path determination method provided in this application in different network scenarios. In different network scenarios, long-distance links between two or more communication devices (i.e., virtual communication devices) connected to one network and another can be routed using port mapping. Therefore, the communication device can determine the forwarding path of the service flow based on whether the service flow is an intra-network service flow or a cross-network service flow, and combine this with port mapping to route long-distance service flows.

[0118] Next, combine Figure 8 For a detailed explanation of the routing method of the above communication device, please refer to [link / reference]. Figure 8 , Figure 8 A flowchart illustrating a forwarding path determination method provided in this application. Figure 2 The following is an example. Figure 2 The method of determining the forwarding path is illustrated using the first communication device in the middle as an example.

[0119] First, the division of port groups is explained. The first communication device communicates with the access communication devices in the first network through the first port group, and communicates with the second communication device through at least one port. There is a correspondence between the ports in the first port group and the ports in the at least one port. The correspondence indicates that the at least one port is used to forward the target service flow received by the corresponding port in the first port group. The communication device corresponding to the destination address of the target service flow belongs to the second network.

[0120] The specific method for dividing the port group of the first communication device may include: adding the ports on the first communication device that are connected to the access communication devices in the first network to the first port group.

[0121] In other possible embodiments, at least one port of the communication connection between the first communication device and the second communication device may also be grouped into a port group. For example, at least one port on the first communication device that is connected to the second communication device may be added to the second port group.

[0122] After completing the division of the first port group, when the first communication device receives a data packet of the service flow through the port of the first port group, it executes the forwarding path determination method as follows S801-S802.

[0123] S801, the first communication device receives data packets of the first service flow through the first port of the first port group.

[0124] Using the first communication device as Figure 1 Taking network node 123 as an example, network node 123 receives data packets of the first service flow through the first port of the first port group, i.e., the link between network node 120 and network node 123. The first service flow can be the service flow sent from computing node 105 to computing node 118.

[0125] S802, the first communication device forwards data packets through a second port corresponding to the first port in at least one of the ports.

[0126] Continuing with the example where the first service flow can be a service flow sent from computing node 105 to computing node 118, the first communication device forwards the data packets of the first service flow through a second port corresponding to the first port group in at least one port, thereby sending the first service flow to the second communication device through the second port. Figure 1 The network node 130 in the middle enables the second communication device, i.e., network node 130, to send the first service flow to the computing node 118.

[0127] In another possible embodiment, when the first communication device receives a service flow forwarded internally by the first network, the first communication device can determine the port for forwarding the service flow in the first port group based on the address of the service flow to find the route.

[0128] For example, when the first communication device receives a data packet of a service flow through a port of the first port group, it determines whether the data packet belongs to short-range or long-range traffic based on the address of the data packet (such as source address, destination address, etc.). If the data packet belongs to short-range traffic, the first communication device looks up the route based on the address of the service flow to determine the port in the first port group used to forward the service flow, and forwards the data packet through that port. If the data packet belongs to long-range traffic, the above-described S802 is executed.

[0129] The correspondence between the first port group and at least one port can be implemented based on port mapping. The following will combine... Figure 9 This section explains load balancing for long-distance links based on port mapping.

[0130] Please refer to Figure 9 , Figure 9 This application provides a schematic diagram of load balancing for long-distance links based on port mapping.

[0131] Taking the example of the first communication device communicating with the access communication device in the first network through four input ports, the first communication device configures an identifier (such as index) for each input port. Then, when routing the service flow from the first communication device to the second communication device, the value of the identifier is modulo the number of links from the first communication device to the second communication device to determine the output port, i.e., the link, corresponding to each input port.

[0132] For example, the four ingress ports are identified as 4, 5, 6, and 7. There are four links (equivalent paths) between the first and second communication devices. Taking the modulo of 4 for 4 yields 0, 1, 2, and 3, respectively. Therefore, the outgress ports corresponding to at least one of the four links are identified as 0, 1, 2, and 3. Thus, the service flow from the ingress port identified as 4 is forwarded from the outgress port identified as 0, the service flow from the ingress port identified as 5 is forwarded from the outgress port identified as 1, the service flow from the ingress port identified as 6 is forwarded from the outgress port identified as 2, and the service flow from the ingress port identified as 7 is forwarded from the outgress port identified as 3. This ensures that the four service flows corresponding to the four ingress ports are forwarded through the corresponding links in the four links, achieving load balancing on long-distance links.

[0133] To complement the forwarding path determination method provided in the embodiments of this application, the embodiments of this application also provide a forwarding path determination device 1000, which is used to perform the above-described forwarding path determination method. Figure 2 The method for determining the forwarding path is shown. For example... Figure 10 As shown, the forwarding path determination device 1000 includes a transceiver module 1010 and a processing module 1020.

[0134] For example, the forwarding path determination device 1000 can implement Figure 2 The function of the central control device.

[0135] The transceiver module 1010 is used to obtain the first network topology of the network system; in the first network topology, the first communication device and the second communication device are a virtual communication device.

[0136] The transceiver module 1010 is used to obtain the address of the service flow of the network system.

[0137] The processing module 1020 is used to determine the forwarding path of the service flow based on the address of the service flow and the first network topology, wherein the forwarding path includes the path for the service flow to travel up to the virtual communication device.

[0138] As one possible implementation, the transceiver module 1010 is specifically used to: acquire the second network topology of the network system. The processing module 1020 is specifically used to: determine the first network topology based on the second network topology.

[0139] As one possible implementation, the transceiver module 1010 is specifically used to: acquire a third network topology of the network system; in the third network topology, a third communication device of the first network and a second communication device are communicatively connected; the processing module 1020 is used to determine a second network topology based on the third network topology; in the second network topology, a first communication device of the first network and a second communication device are communicatively connected, a fourth communication device of the first network and a communication device other than the second communication device in the second network are communicatively connected, and the first communication device and the fourth communication device are virtually obtained from the third communication device.

[0140] In one possible implementation, the first communication device and the fourth communication device are respectively connected to the access communication device in the first network; the access communication device is the access layer switching node of the communication device that generates data packets for service flows in the first network.

[0141] As one possible implementation, the first network is a first data center network, and the second network is a second data center network.

[0142] As one possible implementation, the first network and the second network are fat tree architectures.

[0143] As one possible implementation, the first communication device and the second communication device are spine switches in the fat tree architecture.

[0144] As one possible implementation, the first communication device and the second communication device are connected through a gateway, or the first communication device and the second communication device are directly connected.

[0145] To complement the forwarding path determination method provided in the embodiments of this application, the embodiments of this application also provide a forwarding path determination device 1100, which is used to perform the above-described forwarding path determination method. Figure 8 The method for determining the forwarding path is shown. For example... Figure 11 As shown, the forwarding path determination device 1100 includes a receiving module 1110 and a forwarding module 1120.

[0146] For example, the forwarding path determination device 1100 can implement Figure 8 The function of the first communication device in China.

[0147] The receiving module 1110 is used to receive data packets of the first service flow through the first port of the first port group; the communication device corresponding to the destination address of the data packet belongs to the second network.

[0148] The forwarding module 1120 is used to forward the data packet through the second port corresponding to the first port in the at least one port.

[0149] As one possible implementation, the forwarding path determination device 1100 further includes a topology module for adding ports on the first communication device that are connected to access communication devices in the first network to the first port group.

[0150] It should be understood that the above Figure 10 or Figure 11 The provided device, in implementing its functions, is only illustrated by the division of the above-described functional modules. In practical applications, the functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the device and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation processes are detailed in the method embodiments, and will not be repeated here.

[0151] Figure 12 This is a schematic diagram of the structure of a communication device provided in this application. Figure 12 As shown, the communication device 1200 includes a processor 1210, a bus 1220, a memory 1230, a communication interface 1240, and a memory unit 1250 (also referred to as a main memory unit). The processor 1210, memory 1230, memory unit 1250, and communication interface 1240 are connected via the bus 1220.

[0152] It should be understood that in this embodiment, the processor 1210 may be a CPU, but it may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0153] The processor may also be a graphics processing unit (GPU), a neural network processing unit (NPU), a microprocessor, or one or more integrated circuits used to control the execution of the program in this application.

[0154] In a possible embodiment, communication device 1200 may refer to processor 1210.

[0155] The communication interface 1240 is used to enable communication between the communication device 1200 and external devices or components. In this embodiment, the communication device 1200 is used to implement... Figure 2 When any of the control devices is in use, the communication interface 1240 is used as a physical port for sending and receiving data packets.

[0156] Bus 1220 may include a pathway for transmitting information between the aforementioned components (such as processor 1210, memory unit 1250, and memory 1230). In addition to a data bus, bus 1220 may also include a power bus, a control bus, and a status signal bus, etc. However, for clarity, ... Figure 12 In this context, various buses are labeled as Bus 1220. Bus 1220 can be a Peripheral Component Interconnect Express (PCIe) bus, an Extended Industry Standard Architecture (EISA) bus, a Unified Bus (Ubus or UB), a Compute Express Link (CXL) bus, a Cache Coherent Interconnect for Accelerators (CCIX) bus, etc. Bus 1220 can be categorized into address bus, data bus, and control bus.

[0157] As an example, the communication device 1200 may include multiple processors. A processor may be a multi-core (multi-CPU) processor. Here, a processor may refer to one or more devices, circuits, and / or computing units used to process data (e.g., computer program instructions).

[0158] It is worth noting that, Figure 12 Taking the communication device 1200, which includes a processor 1210 and a memory 1230, as an example, the processor 1210 and the memory 1230 are used to indicate a type of device or equipment. In specific embodiments, the number of each type of device or equipment can be determined according to business requirements.

[0159] Memory cell 1250 may be volatile memory or non-volatile memory, or may include both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory may be random access memory (RAM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0160] The memory 1230 can correspond to the storage medium used to store computer instructions and other information in the above method embodiments, such as a disk, like a mechanical hard disk or a solid-state hard disk.

[0161] The aforementioned communication device 1200 can be a general-purpose device or a special-purpose device. For example, the communication device 1200 can be an edge device (e.g., a box carrying a chip with processing capabilities). Alternatively, the communication device 1200 can also be a chip, network device, server, or other device with computing capabilities.

[0162] It should be understood that the communication device 1200 according to this embodiment may correspond to the forwarding path determination device 1000 or the forwarding path determination device 1100 in this embodiment, and may correspond to the execution of the forwarding path determination device 1200 according to this embodiment. Figure 2 or Figure 8 The corresponding entities in the method, and the above and other operations and / or functions of each module in the forwarding path determination device 1000 or forwarding path determination device 1100 are respectively for the purpose of implementing Figure 2 or Figure 8 For the sake of brevity, the corresponding process of the Chinese method will not be elaborated here.

[0163] This application also provides a communication system, which includes a control device, a first communication device, and a second communication device. As one possible implementation, the control device is used to perform actions such as... Figure 2 The method steps in the illustrated embodiment, wherein the first communication device is used to perform, as shown in the example. Figure 8 The method steps in the illustrated embodiments.

[0164] The control device can be used to implement the functions of the forwarding path determination device 1000, and the first communication device can be used to implement the functions of the forwarding path determination device 1100. The hardware structure of each device can be referenced from the communication device 1200.

[0165] This application also provides a computer program product containing instructions. This computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any available medium. When the computer program product runs on at least one computing device, it causes the at least one computing device to perform the aforementioned forwarding path determination method.

[0166] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to perform the aforementioned forwarding path determination method.

[0167] This application also provides a chip, including a processor. The processor is used to retrieve and execute instructions stored in a memory, causing a communication device equipped with the chip to perform the aforementioned forwarding path determination method.

[0168] As one possible implementation, the chip also includes an input interface, an output interface, and a memory. The input interface, the output interface, the processor, and the memory are connected via internal interconnection paths. The processor is used to execute code in the memory, and when the code is executed, the processor is used to perform the aforementioned forwarding path determination method.

[0169] The method steps in this embodiment can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory, flash memory, read-only memory, programmable read-only memory, erasable programmable read-only memory, electrically erasable programmable read-only memory, registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and storage medium can reside in an ASIC. Alternatively, the ASIC can reside in an electronic device (such as a network device). Of course, the processor and storage medium can also exist as discrete components in an electronic device.

[0170] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are performed entirely or partially. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user equipment, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a digital video disc (DVD); or it can be a semiconductor medium, such as a solid-state drive (SSD). The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for determining a forwarding path, characterized in that, Applied to a network system, the network system including a control device, a first network, and a second network, wherein a first communication device of the first network and a second communication device of the second network are communicatively connected, the method is executed by the control device, and the method includes: Obtain a first network topology of the network system; in the first network topology, the first communication device and the second communication device are treated as a virtual communication device. Obtain the addresses of the service flows in the network system; The forwarding path of the service flow is determined based on the address of the service flow and the first network topology. The forwarding path includes the path from the service flow to the virtual communication device.

2. The method according to claim 1, characterized in that, Before obtaining the first network topology of the network system, the method further includes: Obtain the second network topology of the network system; in the second network topology, the first communication device and the second communication device are communicatively connected; The step of obtaining the first network topology of the network system includes: The first network topology is determined based on the second network topology.

3. The method according to claim 2, characterized in that, The step of obtaining the second network topology of the network system includes: Obtain the third network topology of the network system; in the third network topology, the third communication device of the first network and the second communication device are communicatively connected; The second network topology is determined based on the third network topology; in the second network topology, the first communication device of the first network is connected to the second communication device, and the fourth communication device of the first network is connected to the communication devices other than the second communication device in the second network. The first communication device and the fourth communication device are virtually obtained from the third communication device.

4. The method according to claim 3, characterized in that, The first communication device and the fourth communication device are respectively connected to the access communication device in the first network; the access communication device is the access layer switching node of the communication device that generates data packets for service flows in the first network.

5. The method according to any one of claims 1-4, characterized in that, The first network is a first data center network, and the second network is a second data center network.

6. The method according to any one of claims 1-5, characterized in that, The first network and the second network are fat tree architectures.

7. The method according to claim 6, characterized in that, The first communication device and the second communication device are spine switches in the fat tree architecture.

8. The method according to claim 7, characterized in that, The first communication device and the second communication device are connected through a gateway, or the first communication device and the second communication device are directly connected.

9. A method for determining a forwarding path, characterized in that, The method is applied to a network system, which includes a first network and a second network. A first communication device in the first network is communicatively connected to other communication devices in the first network via a first port group. The first communication device is also communicatively connected to a second communication device in the second network via at least one port. A correspondence exists between the ports in the first port group and the ports in the at least one port, indicating that the at least one port is used to forward a target service flow received by the corresponding port in the first port group. The communication device corresponding to the destination address of the target service flow belongs to the second network. The method is executed by the first communication device and includes: The data packets of the first service flow are received through the first port of the first port group; the communication device corresponding to the destination address of the data packet belongs to the second network. The data packet is forwarded through the second port corresponding to the first port in the at least one port.

10. The method according to claim 9, characterized in that, The method further includes: Add the port on the first communication device that is connected to the access communication device in the first network to the first port group.

11. A chip, characterized in that, The chip includes a processor for retrieving and executing instructions stored in a memory, causing the chip to perform the method as described in any one of claims 1-10.

12. A control device, characterized in that, The control device includes a processor and a memory; The processor is configured to execute instructions stored in the memory to cause the communication device to perform the method as described in any one of claims 1-10.

13. A communication device, characterized in that, The communication device includes a processor and a memory; The processor is configured to execute instructions stored in the memory to cause the communication device to perform the method as described in claim 9 or 10.

14. A network system, characterized in that, The network system includes multiple network devices that are interconnected and communicate with each other. The multiple network devices include the control device as described in claim 12 and the communication device as described in claim 13.

15. A computer program product containing instructions, characterized in that, When the instruction is executed by the communication device, the communication device performs the method as described in any one of claims 1-10.

16. A computer-readable storage medium, characterized in that, It includes computer program instructions, which, when executed by a communication device, cause the communication device to perform the method as described in any one of claims 1-10.