Forwarding path determination method, and communication apparatus
By virtualizing communication devices in different networks into a single virtual communication device, the network topology is simplified, solving the problem of low efficiency in traditional load balancing algorithms and achieving high-efficiency load balancing, which is suitable for data center networks with fat tree architecture.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2025-07-01
- Publication Date
- 2026-05-21
AI Technical Summary
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.
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 needs to be sent, avoiding the need to send path information between different networks and network devices at different levels. Traffic balancing is achieved by using port group correspondence.
It improves load balancing efficiency, simplifies network topology, and achieves efficient global load balancing, making it suitable for data center networks with fat-tree architecture.
Smart Images

Figure CN2025106495_21052026_PF_FP_ABST
Abstract
Description
Forwarding path determination method and communication device
[0001] This application claims priority to Chinese patent application filed on November 13, 2024, with application number 202411621921.X and entitled "Method and Communication Device for Determining Forwarding Path", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of communication technology, and in particular to a forwarding path determination method and communication device. Background Technology
[0003] 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.
[0004] 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
[0005] 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.
[0006] 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.
[0007] 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.
[0008] 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.
[0009] 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.
[0010] 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.
[0011] 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.
[0012] 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.
[0013] 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.
[0014] 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.
[0015] 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.
[0016] 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.
[0017] 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.
[0018] 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.
[0019] 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.
[0020] 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.
[0021] 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.
[0022] 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.
[0023] 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.
[0024] 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.
[0025] 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.
[0026] 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.
[0027] 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.
[0028] 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.
[0029] 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.
[0030] 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.
[0031] 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
[0032] Figure 1 is a schematic diagram of the structure of a network system provided in this application;
[0033] Figure 2 is a flowchart illustrating a forwarding path determination method provided in this application.
[0034] Figure 3 is a schematic diagram of the topology of a split communication device provided in this application;
[0035] Figure 4 is a schematic diagram of a first network topology provided in this application;
[0036] Figure 5 is a schematic diagram of a first network topology provided in this application;
[0037] Figure 6 is a schematic diagram of a network system including an egress gateway device provided in this application;
[0038] Figure 7a is a schematic diagram of the internal path of a virtual communication device provided in this application;
[0039] Figure 7b is a routing diagram of a core switch provided in this application;
[0040] Figure 8 is a flowchart illustrating a forwarding path determination method provided in this application (II).
[0041] Figure 9 is a schematic diagram of load balancing for long-distance links based on port mapping provided in this application;
[0042] Figure 10 is a schematic diagram of a forwarding path determination device provided in this application;
[0043] Figure 11 is a schematic diagram of another forwarding path determination device provided in this application;
[0044] Figure 12 is a schematic diagram of the structure of a communication device provided in this application. Detailed Implementation
[0045] 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.
[0046] 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.
[0047] 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.
[0048] 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.
[0049] 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.
[0050] Network topology is the arrangement of communication network elements (links, nodes, etc.).
[0051] 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.
[0052] 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.
[0053] 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.
[0054] 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.
[0055] 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.
[0056] 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.
[0057] 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.
[0058] To address the aforementioned issues, the application scenarios of the embodiments of this application will be described below with reference to the accompanying drawings.
[0059] Figure 1 is a schematic diagram of the structure of a network system provided in this application. 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 protocol of the network system can be remote direct memory access (RDMA) protocol, transmission control protocol (TCP), such as InfiniBand and RoCEv2 (RDMA over Converged Ethernet version 2) RDMA protocols.
[0060] 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.
[0061] Computing nodes are used to support high-performance services with different communication requirements, such as AI training, AI inference, and storage. As shown in Figure 1, network system 100 includes multiple networks (only networks 101 and 102 are shown in Figure 1, but it is not limited to two networks), and each network includes one or more computing nodes (only eight computing nodes are shown in Figure 1, but it is not limited to eight computing nodes). For example, network 101 includes computing nodes 103-110, and network 102 includes computing nodes 111-118.
[0062] 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.).
[0063] Network nodes are used to enable data exchange between computing nodes. As shown in Figure 1, each network in network system 100 includes multiple network nodes (only two network nodes are shown in Figure 1, but it is not limited to two network nodes). For example, network 101 includes network nodes 119-124, and network 102 includes network nodes 125-130. Network nodes can be located 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, and network nodes 123, 124, 129, and 130 can be spine switches in the aggregation layer.
[0064] The connection methods of each node in the network system 100 will be illustrated below.
[0065] 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.
[0066] 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.
[0067] 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.
[0068] 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 is connected to one or more of the multiple network nodes (Figure 1 shows an example of a connection between control node 131 and network nodes 123, 124, 129, and 130 represented by dashed lines). Control node 131 can also be connected to one or more of the multiple computing nodes.
[0069] 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.
[0070] 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.
[0071] It should be understood that Figure 1 is a simplified schematic 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, which are not shown in Figure 1.
[0072] It should be understood that Figure 1 only shows a network architecture with two-layer network devices. 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 connected to the core switch in network 102 through the core layer switch. The core switch in network 102 is connected to network nodes 129 and 130 respectively.
[0073] 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, the specific steps of the forwarding path determination method will be explained using the control device in the network system 100 in Figure 1, such as the control node 131, as an example.
[0074] Figure 2 is a flowchart illustrating a forwarding path determination method provided in this application. Referring to Figure 2, this forwarding path determination method may include the following steps S201-S203.
[0075] S201, The control device acquires the first network topology of the network system.
[0076] 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.
[0077] 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.
[0078] Network topology information includes the connection relationships between nodes in the network system, device attributes, and link status.
[0079] 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.
[0080] 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.
[0081] 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 models the network nodes in network system 100 using the primitives of network nodes shown in Figure 1, the primitives of computing nodes shown in Figure 1, and the primitives of control nodes shown in Figure 1, which represent control node 131. Furthermore, lines are used to represent the communication connections between the nodes, thus obtaining a second network topology corresponding to the physical topology of network system 100. In the 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. The specific topology of the second network topology in this case is shown in Figure 1, and will not be elaborated further here.
[0082] 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.
[0083] As shown in Figure 3, based on the nodes included in network system 100, network 101 includes two Spine switches, such as network nodes 123 and 124, which are communicatively connected to network 102. Network 102 includes three Spine switches, such as network nodes 129, 130, and 132 (not shown in Figure 1), 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 to obtain a third network topology corresponding to the physical topology of network system 100. In the third network topology, network node 123 is communicatively connected to network nodes 129 and 132, 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.
[0084] 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.
[0085] 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. Taking the splitting of network node 123 in Figure 3 as an example, network node 123' is communicatively connected to each access layer switching node, and network node 123" is communicatively connected to each access layer switching node, where each access layer switching node includes network nodes 119-122.
[0086] 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.
[0087] After acquiring the second network topology, the control device determines the first network topology based on the second network topology.
[0088] 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.
[0089] Taking the second network topology corresponding to the physical topology of network system 100 as an example, in the first network topology shown in Figure 4, 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.
[0090] Taking the second network topology of the third network topology conversion of network system 100 as an example, in the first network topology shown in Figure 5, the control node 131 virtualizes network node 123' and network node 129 in the second network topology as virtual network node 133, virtualizes network node 124 and network node 130 as virtual network node 134, and virtualizes network node 123' and network node 132 as virtual network node 135.
[0091] S202, The control device obtains the address of the service flow of the network system.
[0092] 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).
[0093] 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.
[0094] Taking the first network topology shown in Figure 4 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.
[0095] 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.
[0096] 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.
[0097] Continuing with the first network topology shown in Figure 4 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.
[0098] Continuing with the first network topology shown in Figure 4 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 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 the 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.
[0099] 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. For details on the specific implementation of port mapping, please refer to the relevant description in Figure 9, which will not be elaborated upon here.
[0100] 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.
[0101] 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.
[0102] 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.
[0103] 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.
[0104] 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.
[0105] The preceding text used networks 101 and 102, including Layer 2 switching devices, as examples to provide 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 will not be forwarded through the egress gateway device, but cross-network service flows will be forwarded through it. The following section uses the network topology shown in Figure 6 as an example to detail the implementation of the forwarding path determination method provided in this application in a network containing an egress gateway device.
[0106] As shown in Figure 6, 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.
[0107] In each of Networks 1, 2, and 3, each spine switch communicates with each leaf switch, each core switch communicates with each spine switch, and a core switch in one network communicates with a core switch in another network. The specific connection method is shown in Figure 6.
[0108] When the forwarding path determination method provided in this application is applied to networks 1-3 shown in Figure 6, networks 1 and 2 in network 1, network 2, and network 3 can be regarded as the first network and the second network in Figure 2. The spine switch in each network can be regarded as the first communication device and the second communication device in Figure 2. The control device executes the above-described S201-S203 to determine the forwarding path. The control device can communicate with each level of switch in Figure 6, but due to the complexity of the wiring, it is not shown in Figure 6.
[0109] The difference between this embodiment and S201-S203 shown in Figure 2 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 and switch 29, which are split into one of two switches, and switch 43, which is split into one of four switches.
[0110] The difference between this embodiment and S201-S203 shown in Figure 2 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.
[0111] Please refer to Figure 7a, which is a schematic diagram of the internal path of a virtual communication device provided in this application. 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 the 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.
[0112] Please refer to Figure 7b, which is a routing diagram of a core switch provided in this application. 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, and each core switch is allocated 10 / 2 = 5 service flows.
[0113] 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.
[0114] 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.
[0115] 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.
[0116] 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 the relevant description in Figure 9, which will not be elaborated here.
[0117] Based on the methods shown in Figures 6 and 7, a forwarding path determination method is implemented in networks with egress gateway devices, improving its applicability. 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. Instead, the newly added spine switches or leaf switches only need to be connected to the egress gateway device, simplifying the expansion operation.
[0118] 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.
[0119] The routing method of the above-mentioned communication device will be described in detail below with reference to Figure 8. Please refer to Figure 8, which is a schematic flowchart of a forwarding path determination method provided in this application. The following description takes the first communication device in Figure 2 executing the forwarding path determination method as an example.
[0120] 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.
[0121] 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.
[0122] 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.
[0123] 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.
[0124] S801, the first communication device receives data packets of the first service flow through the first port of the first port group.
[0125] Taking network node 123 in Figure 1 as an example, the first communication device 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.
[0126] S802, the first communication device forwards data packets through a second port corresponding to the first port in at least one of the ports.
[0127] Continuing with the example that 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 the second port corresponding to the first port group in at least one port, thereby sending the first service flow to the second communication device, such as network node 130 in Figure 1, through the second port, so that the second communication device, i.e., network node 130, sends the first service flow down to computing node 118.
[0128] 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.
[0129] 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.
[0130] The correspondence between the first port group and at least one port can be implemented based on port mapping. The load balancing of long-distance links based on port mapping will be explained next with reference to Figure 9.
[0131] Please refer to Figure 9, which is a schematic diagram of load balancing for long-distance links based on port mapping provided in this application.
[0132] 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.
[0133] 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.
[0134] To complement the forwarding path determination method provided in the embodiments of this application, this application also provides a forwarding path determination device 1000, which is used to execute the forwarding path determination method shown in FIG2. As shown in FIG10, the forwarding path determination device 1000 includes a transceiver module 1010 and a processing module 1020.
[0135] For example, the forwarding path determination device 1000 can implement the functions of the control device in FIG2.
[0136] 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.
[0137] The transceiver module 1010 is used to obtain the address of the service flow of the network system.
[0138] 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.
[0139] 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.
[0140] 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.
[0141] 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.
[0142] As one possible implementation, the first network is a first data center network, and the second network is a second data center network.
[0143] As one possible implementation, the first network and the second network are fat tree architectures.
[0144] As one possible implementation, the first communication device and the second communication device are spine switches in the fat tree architecture.
[0145] 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.
[0146] To complement the forwarding path determination method provided in the embodiments of this application, this application also provides a forwarding path determination device 1100, which is used to execute the forwarding path determination method shown in FIG8. As shown in FIG11, the forwarding path determination device 1100 includes a receiving module 1110 and a forwarding module 1120.
[0147] For example, the forwarding path determination device 1100 can implement the functions of the first communication device in FIG8.
[0148] 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.
[0149] 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.
[0150] 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.
[0151] It should be understood that the devices provided in Figures 10 or 11 are only illustrated by the division of the above-described functional modules when realizing their functions. 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. In addition, the devices and methods provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0152] Figure 12 is a schematic diagram of a communication device provided in this application. As shown in Figure 12, 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.
[0153] 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.
[0154] 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.
[0155] In a possible embodiment, communication device 1200 may refer to processor 1210.
[0156] The communication interface 1240 is used to enable communication between the communication device 1200 and external devices or components. In this embodiment, when the communication device 1200 is used to implement the function of any of the control devices in FIG2, the communication interface 1240 is used as a physical port for sending and receiving data packets.
[0157] 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, control bus, and status signal bus. However, for clarity, all buses are labeled as bus 1220 in Figure 12. Bus 1220 may be a peripheral component interconnect express (PCIe) bus, or an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a compute express link (CXL), a cache coherent interconnect for accelerators (CCIX), etc. Bus 1220 can be divided into address bus, data bus, control bus, etc.
[0158] 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).
[0159] It is worth noting that Figure 12 only shows the example of a communication device 1200 including a processor 1210 and a memory 1230. Here, 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 needs.
[0160] 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).
[0161] 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.
[0162] 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.
[0163] 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 corresponding subject executing the method according to FIG2 or FIG8. The above and other operations and / or functions of each module in the forwarding path determination device 1000 or the forwarding path determination device 1100 are respectively for implementing the corresponding process of the method in FIG2 or FIG8. For the sake of brevity, they will not be described in detail here.
[0164] 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 execute the method steps in the embodiment shown in FIG2, and the first communication device is used to execute the method steps in the embodiment shown in FIG8.
[0165] 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.
[0166] 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.
[0167] 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.
[0168] 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.
[0169] 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.
[0170] 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.
[0171] 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.