Message sending method and related device

By introducing isolation identifiers into messages, using isolation mapping relationships and shared mapping relationships, the packets are controlled to bypass high load paths, solving the problem of load balancing in the data center network and achieving stable load balancing transmission.

WO2025167433A1PCT designated stage Publication Date: 2025-08-14HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/070953
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-02-05
Filing Date
2025-01-07
Publication Date
2025-08-14

AI Technical Summary

Technical Problem

In data center networks, it is difficult for the prior art to effectively control the transmission path of packets to achieve load balancing, especially when there is too high load on the shortest path, traffic cannot be effectively diverted.

Method used

By introducing isolation identifiers into the message, indicating the bypass path, using isolation mapping relationships and shared mapping relationships, the transmission path of the message is controlled, avoiding high-load areas, and load balancing is achieved.

Benefits of technology

It realizes load-balanced packet transmission in the network system, avoids traffic congestion caused by high load links, and improves network accessibility and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025070953_14082025_PF_FP_ABST
    Figure CN2025070953_14082025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of communications, and provides a message sending method and a related device, capable of controlling a transmission path of a message to realize load balancing of a network system. The method comprises: a second node acquires a first isolation identifier, the first isolation identifier being used for indicating a detour path reaching one or more destination addresses; and the second node sends a first message by means of a first path on the basis of the first isolation identifier and a first destination address, the first destination address being a destination address of the first message, and the first path being related to the first isolation identifier and the first destination address.
Need to check novelty before this filing date? Find Prior Art

Description

A message sending method and related equipment

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on February 5, 2024, with application number 202410168543.8 and application name “A message sending method and related equipment”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present application relate to the field of communication technology, and in particular to a message sending method and related equipment. Background Art

[0003] Currently, in data center networks, switch-free networks, and other network systems, multiple transmission paths may exist between any two nodes. For example, the transmission paths between nodes 1 and 4 could be: 1-2-3-4, or 1-5-6-4. However, not all of these paths are suitable for message transmission. In this case, one or more transmission paths must be selected from these multiple paths.

[0004] To select a message transmission path, the shortest path priority principle can be employed. The so-called shortest path is the path with the fewest intermediate nodes among multiple transmission paths with the same source and destination nodes. The so-called shortest path priority principle selects the shortest path among multiple paths as the message transmission path. However, some links along the shortest path, or ports on either side of the link, may be overloaded, making the shortest path unsuitable for message transmission. Therefore, it is necessary to control message transmission along other suitable paths. In other words, a method is needed to control message transmission paths so that messages are transmitted along selected suitable paths.

[0005] Therefore, in the network system, how to control the transmission path of node messages to achieve load balancing is a technical problem that needs to be solved urgently. Summary of the Invention

[0006] The embodiments of the present application provide a message sending method and related equipment, which can control the transmission path of the message and achieve load balancing of the network system.

[0007] The first aspect of the present application provides a method for sending a message, which is executed by a second node, or the method is executed by some components in the second node (such as a processor, a chip or a chip system, etc.), or the method can also be implemented by a logic module or software that can realize all or part of the functions of the second node. In the first aspect and its possible implementation, the method for sending a message is described as being executed by the second node, the second node obtains a first isolation identifier, and the first isolation identifier is used to indicate a detour path to one or more destination addresses; the second node sends a first message through a first path according to the first isolation identifier and the first destination address, the first destination address is the destination address of the first message, and the first path is related to the first isolation identifier and the first destination address, or the second node obtains the first isolation identifier, and the second node determines a detour path to one or more destination addresses according to the first isolation identifier; the second node sends the first message through the first path according to the first isolation identifier and the first destination address, the first destination address is the destination address of the first message, and the first path is related to the first isolation identifier and the first destination address.

[0008] In the above technical solution, since the first path is related to the first isolation identifier and the first destination address, the first isolation identifier and the first destination address can be used to control the second node's selection of the first path. Since the first path is the transmission path of the first message, this solution can control the transmission path of the first message through the first isolation identifier and the first destination address. Furthermore, when the load on some links on a path, or on ports on both sides of the link, is too high, the traffic on the overloaded path can be transferred to the less loaded path by controlling the message transmission path, thereby achieving load balancing.

[0009] In a possible implementation manner of the first aspect, when the one or more destination addresses include the first destination address, the first path is a path in the detour path that reaches the first destination address.

[0010] Based on the above technical solution, the first path is the transmission path of the first message, and the first path is one of the detour paths indicated by the first isolation identifier. Therefore, the controller or source node can indicate the detour path of the first message by setting or specifying the first isolation identifier, thereby enabling the message to be transmitted along the detour path specified by the controller or source node.

[0011] In a possible implementation of the first aspect, the first path is a detour path that matches the first isolation identifier and the first destination address in the isolation mapping relationship, the isolation mapping relationship includes a correspondence between multiple isolation identifiers and multiple first mapping relationships, and the first mapping relationship includes a correspondence between multiple destination addresses and multiple detour paths.

[0012] In one specific design, the second node is located in a distributed system and includes a processor. When the second node is a source node, the processor of the source node can establish a first isolation identifier, an isolation mapping relationship, or a shared mapping relationship. Alternatively, the second node is located in a centralized system and includes a first node and a second node. Optionally, the first node includes a controller or a server, processor, chip, software, etc. for implementing controller functions. For example, the controller can be a control server for a control plane or a management plane. Optionally, the first node can establish a first isolation identifier, an isolation mapping relationship, or a shared mapping relationship.

[0013] In a specific design, the second node can be a source node, and the source node or the first node can measure the network load and determine the location of the high-load area, wherein the high-load area can be one or several specific links, or two ports on both sides of a link. Specifically, the source node or the first node can extract part of the traffic in the network system and analyze the traffic to determine the location of the high-load area. When the source node or the first node performs path planning, it will select a path that can bypass the high-load area. Specifically, according to the shortest path first routing, the source node or the first node will select the shortest path as the transmission path, but if the shortest path passes through the high-load area, then the source node or the first node will select a specific detour path as the transmission path of the message, and the specific detour path does not pass through the high-load area.

[0014] In a specific design, the measurement of the network load may be periodic, for example, measured on a daily, weekly or monthly basis, and high-load areas in the network system may be determined through this measurement.

[0015] In a specific design, the source node or the first node can perform global planning, that is, plan an entire detour path based on the measurement results of the network load. For example, the shortest path is 1-2-3-4, and the shortest path will pass through a high-load area. At this time, the source node or the first node can plan a detour path that bypasses the high-load area. For example, the corresponding detour path can be 1-5-6-4. At this time, the source node is the starting node of the detour path, such as node 1 in this example; the source node or the first node can perform local planning, that is, plan a local detour path. For example, when the shortest path is 1-2-3-4-5, and the 3-4 section of the path will pass through a high-load area, the source node or the first node can use a local detour path, which will not pass through the 3-4 section of the path. For example, the detour path is 3-6-7, and the corresponding complete path is 1-2-3-6-7-5. For this complete path, the source node is the node that starts the detour, such as node 3 in this example.

[0016] In a specific design, after determining the detour path of the message according to the network load conditions, the source node or the first node can determine the destination address of the detour path, the identifier of the intermediate node on the detour path and the identifier of the destination node. The identifier of the intermediate node and the identifier of the destination node are hereinafter referred to as the node identifier. The source node or the first node formulates an isolation identifier for indicating the detour path. Optionally, the isolation identifier can also be used to indicate a detour path set. The source node or the first node uses the destination address and the identifier of the node on the detour path as a first mapping relationship, and uses the correspondence between the first mapping relationship and the isolation identifier as an isolation mapping relationship.

[0017] In a specific design, when there is only a single link between nodes, or there are multiple links between nodes, but these multiple links are bound into one link at the L2 layer, where the link is a physical or logical path connecting the nodes. For example, in the path 1-2-3-4, if only one physical or logical path can be established between node 1 and node 2, then there is only a single link between node 1 and node 2; if only multiple physical or logical paths can be established between node 1 and node 2, then there are multiple links between node 1 and node 2. In this case, in the first mapping relationship, the node identifier is the node address, and the node address includes: the node's Internet Protocol (IP) address or Media Access Control (MAC) address. At this time, the first mapping relationship includes: the correspondence between the destination address and the address of the next node.

[0018] In a specific design, when there are multiple links between nodes and these multiple links are not bound into a single link at the L2 layer, in a first mapping relationship, the node identifier is the node's forwarding port, and the first mapping relationship includes: a correspondence between a destination address and a forwarding port. In a more specific design, in the first mapping relationship, the forwarding port can be identified by its IP address. In this case, the first mapping relationship includes: a correspondence between the destination address and the IP address of the forwarding port.

[0019] In a specific design, the forwarding port may be an egress port of the second node, which is located on one side of the link, and the other side of the link is an ingress port of the next node on the detour path.

[0020] In a specific design, the expression form of the isolation mapping relationship includes: the form of a table or table item, the form of a text description, the form of a function or the form of a set. For the convenience of description, the following is explained by taking the isolation mapping relationship in the form of an isolation table or table item as an example. At this time, the isolation mapping relationship is called an isolation table. When the isolation mapping relationship is an isolation table, the first mapping relationship is one or more forwarding table items corresponding to the first isolation identifier. The forwarding table item includes: the correspondence between the destination address and the identifier of the next node. The next node is the next node of the second node on the first path according to the order of forwarding messages.

[0021] In a specific design, a detour path corresponds to only one first mapping relationship on the same node, and the first mapping relationship has only a correspondence between a destination address and a forwarding port. For example, when the first mapping relationship is a forwarding table entry, the detour path a is 1-2-3-4, and the detour path a corresponds to only one forwarding table entry at node 2, and the forwarding table entry is: the correspondence between the destination address of node 4 and the IP address of a forwarding port of node 3.

[0022] In a specific design, after the source node or the first node formulates the isolation mapping relationship, it can send the isolation mapping relationship to the second node. At this time, the source node or the first node can only send the mapping relationship related to the second node in the isolation mapping relationship to the second node, that is, send the mapping relationship corresponding to the detour path passing through the second node to the second node. For example, when the detour path is 1-2-3-4, 5-6-7-8, since the detour path 1-2-3-4 passes through node 2. The isolation mapping relationship sent by node 1 to node 2 is the mapping relationship corresponding to the detour path 1-2-3-4. The source node or the first node can also send the isolation mapping relationship and the mapping relationship related to the second node, as well as the mapping relationship unrelated to the second node to the second node. Taking the detour paths of 1-2-3-4 and 5-6-7-8 as an example, the isolation mapping relationship sent by node 1 to node 2 includes the mapping relationship corresponding to the detour path 1-2-3-4 and the mapping relationship corresponding to the detour path 5-6-7-8.

[0023] In a specific design, if two or more detour paths start from the intermediate node of the first intersection, and all subsequent detour path intermediate nodes and destination nodes are the same, in order to reduce duplicate table entries, such detour paths can be marked with the same isolation identifier, that is, these detour path sets can be marked with the same isolation identifier.

[0024] It should be noted that "intersecting intermediate nodes" means that multiple detour paths pass through the same intermediate node, for example: path A: 1-2-3-4-5, path B: 6-7-8-4-5, the intermediate node where path A and path B intersect for the first time is node 4.

[0025] In a specific design, after the second node receives the isolation mapping relationship and obtains the first isolation identifier, when the isolation mapping relationship includes: the correspondence between the destination address, the forwarding port, and the isolation identifier, the second node can match the corresponding forwarding port in the isolation mapping relationship according to the first isolation identifier and the destination address. For a single match, the second node matches the forwarding port. For a complete message transmission process, all second nodes on a path will be matched to the corresponding forwarding port, wherein the forwarding port is located on an intermediate node or a destination node. At this time, the source node, the intermediate node where the forwarding port is located, and the destination node where the forwarding port is located together constitute a detour path for the message. It can be seen that for a complete message transmission process, the second node can match the corresponding detour path in the isolation mapping relationship according to the isolation identifier and the destination address.

[0026] In a kind of design specifically, second node is that the first isolation mark safeguards this first mapping relation that is only the first isolation mark exclusive use, has only carried the first isolation mark, could use this first mapping relation, promptly only has carried the first isolation mark in the message, could query this first mapping relation based on the destination address that message carries, thereby mate corresponding forwarding port.In this scheme, can there be a plurality of mapping relations on the second node, can now, distinguish these a plurality of mapping relations according to the difference of corresponding isolation mark.For example, can distinguish the first mapping relation from other mapping relations by the first isolation mark.

[0027] Optionally, in the isolation mapping relationship, the first isolation identifier can be used to mark a detour path or a detour path set. Taking the first mapping relationship as a routing table entry as an example, in the isolation mapping relationship, the first isolation identifier corresponds to the routing table entry, and the routing table entry is used to record the mapping relationship corresponding to the detour path or detour path set that is different from the common shortest path. The node can determine the detour path corresponding to the first isolation identifier by querying the routing table entry corresponding to the first isolation identifier.

[0028] In a possible implementation manner of the first aspect, the second node receives the isolation mapping relationship sent by the first node.

[0029] Based on the above technical solution, on the one hand, the first node can control the message detour path through the isolation mapping relationship. On the other hand, the second node does not need to formulate the isolation mapping relationship by itself, which can save the computing power consumed by the second node in formulating the isolation mapping relationship.

[0030] In a specific design, when the second node is the source node, the source node can formulate the isolation mapping relationship by itself, or the first node can formulate the isolation mapping relationship, and then the source node receives the isolation mapping relationship sent by the first node.

[0031] In a specific design, when the second node is an intermediate node, the intermediate node receives the isolation mapping relationship sent by the source node, or the intermediate node can receive the isolation mapping relationship sent by the controller.

[0032] In a possible implementation of the first aspect, when there is no detour path matching the first isolation identifier or the first destination address in the isolation mapping relationship, the first path is the shortest path to the first destination address.

[0033] Based on the above technical solution, when the isolation mapping relationship fails to match, that is, the corresponding detour path cannot be matched in the isolation mapping relationship, the message is sent through the shortest path, thereby ensuring that the message is reachable and preventing the information carried in the message from being lost.

[0034] In a specific design, the situation in which the isolation mapping relationship cannot match the corresponding detour path includes: the detour path that matches the first isolation identifier and the first destination address has not been recorded in the isolation mapping relationship, or the detour path that matches the first isolation identifier and the first destination address was originally recorded in the isolation mapping relationship, but due to a link failure on the detour path, the second node does not use or cannot use the isolation mapping relationship corresponding to the detour path, wherein the link failure includes: the forwarding port on the detour path is in a faulty state or an unavailable state, and the unavailable state includes: link unavailability or unavailable under management state.

[0035] In a specific design, the detour path that matches the first isolation identifier and the first destination address has not yet been recorded in the isolation mapping relationship includes: the mapping relationship corresponding to the first isolation identifier has not yet been recorded in the isolation mapping relationship; the mapping relationship corresponding to the first destination address has not yet been recorded in the isolation mapping relationship, the destination address corresponding to the first isolation identifier recorded in the isolation mapping relationship does not include the first destination address, and the isolation identifier corresponding to the first destination address recorded in the isolation mapping relationship does not include the first isolation identifier.

[0036] In a specific design, the situation in which the above-mentioned second node cannot use the mapping relationship corresponding to the detour path includes: when a link failure occurs on the detour path recorded in the isolation mapping relationship, the second node or the first node deletes the mapping relationship corresponding to the detour path, resulting in the second node being unable to use the mapping relationship corresponding to the detour path.

[0037] Based on the above technical solution, when the detour path that matches the first isolation identifier and the first destination address has not been recorded in the isolation mapping relationship, and the second node cannot match the detour path corresponding to the first isolation identifier or the first destination address, that is, when the match fails in the isolation mapping relationship, the second node can transmit the message to the destination node through the shortest path, thereby ensuring that the message is reachable and preventing the information carried by the message from being lost. When a link failure occurs, the second node does not use the mapping relationship corresponding to the detour path where the faulty link is located, and thus cannot match or does not match the corresponding detour path, thereby ensuring that the message will not be sent through the detour path where the faulty link is located. It can be seen that this technical solution avoids packet loss caused by sending messages along the detour path where the faulty link is located, and improves the reachability of network forwarding.

[0038] In a possible implementation manner of the first aspect, when the one or more destination addresses do not include the first destination address, the first path is the shortest path to the first destination address.

[0039] Based on the above technical solution, one or more destination addresses do not include the first destination address, indicating that the first message cannot be transmitted based on the detour path indicated by the first isolation identifier. At this time, the message can be sent through the shortest path, thereby ensuring that the message is reachable.

[0040] In a possible implementation manner of the first aspect, the shortest path is obtained by matching the first destination address in a shared mapping relationship.

[0041] In a specific design, the shared mapping relationship includes: the correspondence between multiple destination addresses and multiple shortest paths. Taking the shared mapping relationship as a table item as an example, the shared mapping relationship includes one or more forwarding table items. Optionally, each forwarding table item includes: the correspondence between the destination address and the identifier of the next node on the shortest path. Optionally, the forwarding table item of the shared mapping relationship can be shared by multiple different isolation identifiers. For example, when the second node obtains the first isolation identifier as the isolation identifier, the second node can match the corresponding shortest path in the shared mapping relationship. When the second node obtains the second isolation identifier as the isolation identifier, the second node can still match the corresponding shortest path in the shared mapping relationship, that is, the shared mapping relationship can be shared by the first isolation identifier and the second isolation identifier, rather than being exclusive to the first isolation identifier or the second isolation identifier; optionally, the shared mapping relationship can be generated based on the shortest path first routing algorithm, and the isolation mapping relationship can be generated based on policy routing. Policy routing is a mechanism for performing path selection according to a specified policy. For example, in this solution, the first node can specify to perform path selection based on the result of network load detection. More specifically, the first node may select a detour path for the message by detecting the network load, and then formulate an isolation mapping relationship corresponding to the detour path.

[0042] In a specific design, if one or more forwarding table entries in the first mapping relationship of the detour path on a node are identical to one or more forwarding table entries in the shared mapping relationship, that is, at the node, the detour path corresponding to the first mapping relationship and the shortest path corresponding to the shared mapping relationship have the same destination address and have the same next node. In this case, it is not necessary to set the same forwarding table entry in the isolated mapping relationship at the node, but the forwarding table entry of the shared mapping relationship can be directly reused, thereby reducing duplicate entries.

[0043] In a possible implementation manner of the first aspect, before sending the first message through the first path according to the first isolation identifier and the first destination address, the shared mapping relationship sent by the first node is received.

[0044] Based on the above technical solution, on the one hand, the first node can control the source node to transmit the message along the shortest path through the shared mapping relationship. On the other hand, the second node does not need to formulate the shared mapping relationship by itself, which can save the resources consumed by the first node.

[0045] In a possible implementation manner of the first aspect, the first isolation identifier includes: an identifier of the detour path, and the identifier of the detour path includes: an identifier of a source node.

[0046] In a specific design, there is only one detour path from the same source node to the same destination node. In this case, the identifier of the source node can be used as the identifier of the detour path; there are multiple detour paths from the same source node to the same destination node, and these multiple detour paths will not pass through the same intermediate node. In this case, the identifier of the source node can be used as the identifier of the detour path; there are multiple detour paths from the same source node to the same destination node. If these multiple detour paths will pass through the same intermediate node, but the forwarding ports matched when passing through the same intermediate node are the same, then the identifier of the source node can be used as the identifier of the detour path. There are multiple detour paths from the same source node to the same destination node. If these multiple detour paths pass through the same intermediate node, but the forwarding ports matched when passing through the same intermediate node are different, different identifiers can be assigned to these multiple detour paths. For example, one detour path is: 1-2-3-4, and the other detour path is: 1-2-5-4. These two paths both pass through the same intermediate node, that is, node 2, but the forwarding ports corresponding to node 2 are different. In this case, different detour path identifiers can be assigned to these two paths. For example, the two paths can be identified by A and B respectively.

[0047] In a possible implementation manner of the first aspect, the second node is the source node, and the source node receives the first isolation identifier sent by the first node.

[0048] Based on the above technical solution, on the one hand, the first node can control the message detour path through the first isolation identifier. On the other hand, the second node does not need to formulate the isolation identifier by itself, which can save the computing power consumed by the second node in formulating the isolation mapping relationship.

[0049] Optionally, when the second node is a source node, the way in which the source node obtains the first isolation identifier includes: when the system where the second node is located is a distributed system, the source node formulates the first isolation identifier corresponding to the first path. After the allocation is completed, the intermediate node receives the first message sent by the source node, and the first message encapsulates the first isolation identifier. In a centralized system, the first isolation identifier is formulated by the first node, the source node can receive the first isolation identifier sent by the first node, and the intermediate node receives the first message sent by the source node, and the first message encapsulates the first isolation identifier.

[0050] In a specific design, when the system where the second node is located is a distributed system, the isolation mapping relationship is formulated by the source node. After the formulation is completed, the source node notifies other nodes in the network system of the first isolation identifier assigned by the source node to the first path based on the routing announcement protocol. The distributed routing protocol includes: open shortest path first (OSPF) routing protocol, or intermediate system to intermediate system (ISIS) routing protocol, OSPF traffic engineering (OSPF traffic engineering, OSPF-TE); ISIS traffic engineering (ISIS-TE), border gateway protocol (BGP) or other distributed routing protocols. When the system where the second node is located is a centralized system, the isolation mapping relationship is formulated by the first node, and the isolation mapping relationship is sent to each node in the network system.

[0051] Optionally, when matching the corresponding forwarding port in the isolation mapping relationship, the second node can first determine the first mapping relationship based on the isolation identifier, and then search for the corresponding forwarding port according to the destination address in the first mapping relationship that matches the isolation identifier. Since fewer search conditions need to be set, the forwarding table entries can be recorded and searched in the memory on the second node forwarding chip or in the memory outside the forwarding chip, such as a general SRAM (static random-access memory), DRAM (dynamic random-access memory), etc. The power consumption and cost of looking up the table in the memory are relatively low.

[0052] In a possible implementation manner of the first aspect, the first message encapsulates the first number of first isolation identifiers, and the first number is different from the number of intermediate nodes in the detour path.

[0053] In a specific design, the number of first isolation identifiers encapsulated in the first message is independent of the number of intermediate nodes on the detour path, and the size of the first isolation identifier encapsulated in the first message is fixed.

[0054] In a specific design, the first number defaults to 1.

[0055] In a possible implementation manner of the first aspect, the first isolation identifier is encapsulated into the first message by the source node.

[0056] In a specific design, the source node encapsulates the first isolation identifier into a first message and sends the first message to the intermediate node, and the intermediate node obtains the first isolation identifier encapsulated in the message.

[0057] In a possible implementation manner of the first aspect, the first isolation identifier is encapsulated in a message header of the first message.

[0058] In a specific design, the first isolation identifier is encapsulated in a field defined in the protocol in the message header of the first message.

[0059] Based on the above technical solution, the source node and the like can reuse the existing fields in the message header to encapsulate the first isolation identifier, thereby achieving the encapsulation of the first isolation identifier without changing the structure of the message, and without introducing additional encapsulation overhead, nor causing the message length to become longer and occupying additional bandwidth.

[0060] In a specific design, the protocol is a network protocol, which includes: Internet Protocol Version 6 (IPV6), Transmission Control Protocol (TCP) or Internet Protocol Version 4 (IPV4).

[0061] In a specific design, "the message header has been defined in the protocol" refers to the existing fields in the message header structure specified in the network protocol, that is, this solution reuses the existing fields in the message header to encapsulate the first isolation identifier, rather than adding a new field to encapsulate the first isolation identifier.

[0062] In a specific design, the first isolation identifier carried by the first message does not change before the first message reaches the destination node. Optionally, the first isolation identifier itself and the length, size, and number of the first isolation identifiers do not change. The "first isolation identifier itself does not change" means that the field corresponding to the first isolation identifier does not change. For example, when the first isolation identifier is a numeric field, the numeric value does not change.

[0063] In a specific design, when the first message is a TCP message, the first isolation identifier is encapsulated in the reserved bit field of the first message.

[0064] In a specific design, when the first message is an IPV4 message, the first isolation identifier is encapsulated in the identification bit field of the first message.

[0065] In a specific design, the second node can also encapsulate the first isolation identifier in the payload of the upper layer, or add a new field in the message header of the first message, such as an additional 2 bytes to carry the first isolation identifier. In this scenario, the length of the isolation identifier field remains fixed and will not increase with the increase in the number of hops in the detour path.

[0066] In a possible implementation manner of the first aspect, when the first message is an IPv6 message, the first isolation identifier is encapsulated in a flow label of the first message.

[0067] The second aspect of the present application provides a method for sending an identifier, which is executed by a first node, or the method is executed by some components in the first node (such as a processor, a chip or a chip system, etc.), or the method can also be implemented by a logic module or software that can realize all or part of the functions of the first node. In the second aspect and its possible implementation, the message sending method is described as being executed by the first node. The first node determines a detour path for message transmission of the second node, wherein the message reaches one or more destination addresses through the detour path; the first node determines a first isolation identifier for indicating the detour path; and the first node sends the first isolation identifier to the second node.

[0068] In the above technical solution, on the one hand, the first node sends a first isolation identifier indicating a detour path to the second node. The second node can then determine the message transmission path based on the first isolation identifier, thereby allowing the first node to control the message transmission path of the second node using the first isolation identifier. On the other hand, the second node does not need to independently generate an isolation identifier, which can save resources consumed by the second node.

[0069] In a possible implementation of the second aspect, the first node establishes an isolation mapping relationship, and the first node sends the isolation mapping relationship to the first node. The isolation mapping relationship includes a correspondence between multiple isolation identifiers and multiple first mapping relationships, and the first mapping relationship includes a correspondence between multiple destination addresses and multiple detour paths.

[0070] Based on the above technical solution, on the one hand, the first node can control the message detour path through the isolation mapping relationship, and on the other hand, the second node does not need to formulate the isolation mapping relationship by itself, which can save the resources consumed by the second node.

[0071] In a specific design, after determining the detour path of the message according to the network load conditions, the first node can determine the destination address of the detour path, the identifier of the intermediate node on the detour path and the identifier of the destination node. The identifier of the intermediate node and the identifier of the destination node are hereinafter referred to as the node identifier. The first node formulates an isolation identifier for identifying the detour path. Optionally, the isolation identifier can also be used to identify a detour path set. The first node uses the destination address and the identifier of the node on the detour path as a first mapping relationship, and uses the corresponding relationship between the first mapping relationship and the isolation identifier as an isolation mapping relationship.

[0072] In a specific design, when there is only a single link between nodes, or there are multiple links between nodes, but these multiple links are bound into one link at the L2 layer, where the link is a physical or logical path connecting the nodes. For example, in the path 1-2-3-4, if only one physical or logical path can be established between node 1 and node 2, then there is only a single link between node 1 and node 2; if only multiple physical or logical paths can be established between node 1 and node 2, then there are multiple links between node 1 and node 2. In this case, in the first mapping relationship, the node identifier is the node address, and the node address includes: the node's IP address or MAC address. At this time, the first mapping relationship includes: the destination address, and the corresponding relationship between the node address.

[0073] In a specific design, when there are multiple links between nodes and these multiple links are not bound into a single link at the L2 layer, in a first mapping relationship, the node identifier is the node's forwarding port, and the first mapping relationship includes: a correspondence between a destination address and a forwarding port. In a more specific design, in the first mapping relationship, the forwarding port can be identified by its IP address. In this case, the first mapping relationship includes: a correspondence between the destination address and the IP address of the forwarding port.

[0074] In a specific design, the forwarding port is an egress port of the second node, which is located on one side of the link, and the other side of the link is an ingress port of the next node in the detour path.

[0075] In a specific design, a detour path will only correspond to one first mapping relationship on the same node, and the first mapping relationship has only one correspondence between a destination address and a forwarding port. For example, when the first mapping relationship is a forwarding table entry, the detour path a is 1-2-3-4, and the detour path a corresponds to only one forwarding table entry at node 2, and the forwarding table entry is: the correspondence between the destination address of node 4 and a forwarding port of node 3.

[0076] In a specific design, after the first node formulates the isolation mapping relationship, it can send the isolation mapping relationship to the second node. At this time, the first node can only send the mapping relationship related to the second node in the isolation mapping relationship to the second node, that is, send the mapping relationship corresponding to the detour path passing through the second node to the second node. For example, when the detour path is 1-2-3-4, 5-6-7-8, since only the detour path 1-2-3-4 passes through node 2. The isolation mapping relationship sent by node 1 or the controller to node 2 only includes the mapping relationship corresponding to the detour path 1-2-3-4. The first node can also send all the isolation mapping relationships to the second node. Taking the detour paths of 1-2-3-4 and 5-6-7-8 as an example, the isolation mapping relationship sent by node 1 to node 2 includes the mapping relationship corresponding to the detour path 1-2-3-4 and the mapping relationship corresponding to the detour path 5-6-7-8.

[0077] In a specific design, if the detour path has a first mapping relationship on a certain node, the first mapping relationship includes: a correspondence between a destination address and a forwarding port, and the forwarding port corresponding to the same destination address in the shared mapping relationship of the node is the same as that in the first mapping relationship, and the number of forwarding ports is also the same as that in the first mapping relationship, then the node does not need to maintain the forwarding table entries in the isolated mapping relationship for the detour path, but can directly reuse the forwarding table entries in the shared mapping relationship, thereby reducing duplicate entries.

[0078] In a possible implementation of the second aspect, a second node needs to establish communication with a destination node, a first node determines a shortest path between the second node and the destination node, the first node specifies a shared mapping relationship based on the shortest path, and the first node sends the shared mapping relationship to the first node. The shared mapping relationship includes a correspondence between the shortest path and a destination address, where the destination address is an address of the destination node.

[0079] Based on the above technical solution, on the one hand, the first node can control the source node to transmit the message along the shortest path through the shared mapping relationship. On the other hand, the first node does not need to formulate the shared mapping relationship by itself, which can save the resources consumed by the first node.

[0080] The third aspect of the present application provides an identification encapsulation method, which is executed by a third node, or the method is executed by some components in the third node (such as a processor, chip or chip system, etc.), or the method can also be implemented by a logic module or software that can realize all or part of the functions of the third node. In the third aspect and its possible implementation, the message sending method is described as being executed by the third node. The third node obtains a first isolation identifier; the third node sends a first message based on the first isolation identifier, and the first message encapsulates a first number of first isolation identifiers, and the first number is different from the number of intermediate nodes in the detour path.

[0081] In the above technical solution, the number of isolation identifiers in the first message is different from the number of intermediate nodes in the detour path. Compared with tunnel technologies such as IPinIP, such technologies must encapsulate isolation identifiers that are the same as the number of intermediate nodes. When the number of intermediate nodes is large, a large number of isolation identifiers need to be encapsulated. This solution can encapsulate fewer identifiers than the number of intermediate nodes, which can save the overhead for encapsulating isolation identifiers.

[0082] In a specific design, the number of first isolation identifiers encapsulated in the first message is independent of the number of intermediate nodes on the detour path, and the size of the first isolation identifier encapsulated in the first message is fixed.

[0083] In a specific design, the first number defaults to 1.

[0084] In a possible implementation of the third aspect, the first isolation identifier is used to indicate a detour path to one or more destination addresses, and the third node sends the first message through the first path according to the first isolation identifier and the first destination address. The first destination address is the destination address of the first message, and the first path is related to the first isolation identifier and the first destination address.

[0085] In a possible implementation manner of the third aspect, the first isolation identifier is encapsulated into the first message by the source node.

[0086] In a specific design, the source node encapsulates the first isolation identifier into a first message and sends the first message to the intermediate node, and the intermediate node obtains the first isolation identifier encapsulated in the message.

[0087] In a possible implementation manner of the third aspect, the first isolation identifier is encapsulated in a message header of the first message.

[0088] In a specific design, the first isolation identifier is encapsulated in a field defined in the protocol in the message header of the first message.

[0089] Based on the above technical solution, the source node and the like can reuse the existing fields in the message header to encapsulate the first isolation identifier, thereby achieving the encapsulation of the first isolation identifier without changing the structure of the message, and without introducing additional encapsulation overhead, nor causing the message length to become longer and occupying additional bandwidth.

[0090] In a specific design, the protocol is a network protocol, which includes: IPV6, TCP or IPV4.

[0091] In a specific design, "the message header has been defined in the protocol" refers to the existing fields in the message header structure specified in the network protocol, that is, this solution reuses the existing fields in the message header to encapsulate the first isolation identifier, rather than adding a new field to encapsulate the first isolation identifier.

[0092] In a specific design, the third node can also encapsulate the first isolation identifier in the payload of the upper layer, or add a new field in the message header of the first message, such as an additional 2 bytes to carry the first isolation identifier. In this scenario, the length of the isolation identifier field remains fixed and will not increase with the increase in the number of hops in the detour path.

[0093] In a specific design, the first isolation identifier carried by the first message does not change before the first message reaches the destination node. Optionally, the first isolation identifier itself and the length, size, and number of the first isolation identifiers do not change. The "first isolation identifier itself does not change" means that the field corresponding to the first isolation identifier does not change. For example, when the first isolation identifier is a numeric field, the numeric value does not change.

[0094] In a specific design, when the first message is a TCP message, the first isolation identifier is encapsulated in the reserved bit field of the first message.

[0095] In a specific design, when the first message is an IPV4 message, the first isolation identifier is encapsulated in the identification bit field of the first message.

[0096] In a possible implementation manner of the third aspect, when the first message is an IPv6 message, the first isolation identifier is encapsulated in a flow label of the first message.

[0097] The fourth aspect of the present application provides a communication system, including a first node and a second node, wherein the first node is used to obtain an isolation mapping relationship and send the isolation mapping relationship to the second node; the first node is used to obtain a shared mapping relationship and send the shared mapping relationship to the second node; the first node is used to obtain a first isolation identifier and send the first isolation identifier to the second node; the first node is used to execute the method described in the first aspect and the third aspect, except for any possible implementation method other than the implementation method in the distributed system.

[0098] In a fifth aspect, the present application provides another communication system, including a first node, the first node including: a processor, the processor is used to obtain an isolation mapping relationship; the processor is used to obtain a shared mapping relationship; the processor is used to obtain a first isolation identifier; the first node is used to execute the method described in the first aspect and the third aspect, except for any possible implementation method in a centralized system.

[0099] In a sixth aspect of the present application, a communication device is provided, which includes a transceiver unit and a processing unit, and is used to perform all or part of the operations of the first to third aspects. The communication device can be a network device such as a router or a switch, or a component of a network device for performing related operations, such as a line card, an interface board, etc., or a chip system for performing related operations, and the chip system can include one or more chips. When the communication device is a chip system, the receiving module and the sending module can be, for example, the interface circuit of the chip, and the processing module can be, for example, the processing circuit of the chip.

[0100] For example, when executing the method described in the first aspect, the processing unit is used to obtain a first isolation identifier, which is used to indicate a detour path to one or more destination addresses; the transceiver unit is used to send a first message through a first path according to the first isolation identifier and the first destination address, and the first destination address is the destination address of the first message, and the first path is related to the first isolation identifier and the first destination address.

[0101] In a possible implementation manner of the sixth aspect, when the one or more destination addresses include the first destination address, the first path is a path in the detour path that reaches the first destination address.

[0102] In a possible implementation of the sixth aspect, the first path is a detour path that matches the first isolation identifier and the first destination address in the isolation mapping relationship, the isolation mapping relationship includes a correspondence between multiple isolation identifiers and multiple first mapping relationships, and the first mapping relationship includes a correspondence between multiple destination addresses and multiple detour paths.

[0103] In a possible implementation manner of the sixth aspect, the transceiver unit is further used to: receive the isolation mapping relationship sent by the first node.

[0104] In a possible implementation of the sixth aspect, when there is no detour path matching the first isolation identifier or the first destination address in the isolation mapping relationship, the first path is the shortest path to the first destination address.

[0105] In a possible implementation manner of the sixth aspect, when the one or more destination addresses do not include the first destination address, the first path is the shortest path to the first destination address.

[0106] In a possible implementation manner of the sixth aspect, the shortest path is obtained by matching the first destination address in a shared mapping relationship.

[0107] In a possible implementation manner of the sixth aspect, the transceiver unit is further used to: receive the shared mapping relationship sent by the first node.

[0108] In a possible implementation manner of the sixth aspect, the first isolation identifier includes: an identifier of the detour path, and the identifier of the detour path includes: an identifier of the source node.

[0109] In a possible implementation manner of the sixth aspect, the transceiver unit is further used to: receive the first isolation identifier sent by the first node.

[0110] In a possible implementation manner of the sixth aspect, the first message encapsulates the first number of first isolation identifiers, and the first number is different from the number of intermediate nodes in the detour path.

[0111] In a possible implementation manner of the sixth aspect, the first isolation identifier is encapsulated into the first message by the source node.

[0112] In a possible implementation of the sixth aspect, the first isolation identifier is encapsulated in a message header of the first message. In a possible implementation of the sixth aspect, when the first message is an IPv6 message, the first isolation identifier is encapsulated in a flow label of the first message.

[0113] For example, when executing the method described in the second aspect, the processing unit is used to determine a detour path for message transmission of the second node, wherein the message reaches one or more destination addresses through the detour path; determine a first isolation identifier for indicating the detour path; and the transceiver unit is used to send the first isolation identifier to the first node.

[0114] In a possible implementation of the sixth aspect, the processing unit is further configured to: formulate an isolation mapping relationship, and call the transceiver unit to send the isolation mapping relationship to the first node. The isolation mapping relationship includes a correspondence between multiple isolation identifiers and multiple first mapping relationships, and the first mapping relationship includes a correspondence between multiple destination addresses and multiple detour paths.

[0115] In a possible implementation of the sixth aspect, a second node needs to establish communication with a destination node, and the first node determines a shortest path between the second node and the destination node. The processing unit is configured to specify a shared mapping relationship based on the shortest path and invoke the transceiver unit to send the shared mapping relationship to the first node. The shared mapping relationship includes a correspondence between the shortest path and a destination address, where the destination address is the address of the destination node.

[0116] For example, when executing the method described in the third aspect, the processing unit is used to obtain a first isolation identifier; the transceiver unit is used to send a first message based on the first isolation identifier, and the first message encapsulates the first isolation identifier, and the number of the first isolation identifiers encapsulated in the first message is fixed.

[0117] In a possible implementation of the sixth aspect, the first isolation identifier is used to indicate a detour path to one or more destination addresses, and the transceiver unit is also used to: send a first message through a first path according to the first isolation identifier and the first destination address, the first destination address is the destination address of the first message, and the first path is related to the first isolation identifier and the first destination address.

[0118] In a possible implementation manner of the sixth aspect, the first isolation identifier is encapsulated into the first message by the source node.

[0119] In a possible implementation of the sixth aspect, the first isolation identifier is encapsulated in a message header of the first message. In a possible implementation of the sixth aspect, when the first message is an IPv6 message, the first isolation identifier is encapsulated in a flow label of the first message.

[0120] In a seventh aspect, the present application provides a communication device, including a processor and a communication interface. The processor and the communication interface are used to execute the method described in the first to third aspects and any possible implementation or design thereof.

[0121] In a specific design, the processor is coupled to a memory, for example, the memory is used to store programs or instructions. The at least one processor is used to execute the program or instructions to enable the device to implement all or part of the operations of the first to third aspects and any possible implementation or design thereof.

[0122] In an eighth aspect, the present application provides a computer-readable storage medium storing a program or instruction. When the program or instruction runs on a processor, the method described in the first to third aspects and any possible implementation or design thereof is executed.

[0123] In the ninth aspect of the present application, a computer program product is provided, comprising a program or instructions, which, when executed on a processor, implements all or part of the operations in the first to third aspects and any possible implementation or design thereof.

[0124] In a specific design, the computer program product can be the computer-readable storage medium mentioned in the eighth aspect above.

[0125] In a tenth aspect, the present application provides a chip system comprising at least one processor for supporting all or part of the functions of a communication device as described in the first to third aspects and any possible implementation or design thereof.

[0126] In a specific design, the chip system may include: an application-specific integrated circuit (ASIC) or a general-purpose processor, and the ASIC includes: a network switching chip and a router chip; specifically, the functional module in the first node or the second node for sensing the topology, determining the detour path, and formulating the isolation identifier, etc., is called a management and control plane module, which is usually implemented using a general-purpose processor; the device form corresponding to the general-purpose processor is usually a server; the functional module in the second node or the third node for sending the first message, etc., and the functional module in the first node for sending the first isolation identifier, etc., are called dedicated forwarding functional modules, which are usually implemented using ASICs, and the device form corresponding to the above-mentioned ASICs is usually a network device such as a switch or a router; in addition to using ASICs to implement dedicated forwarding functional modules, these network devices can use independent general-purpose processors to load ASIC operating files, configure ASIC registers, read ASIC registers, etc.; in some cases, the general-purpose processor core and the ASIC are combined into a chip, so that the network device does not include an additional general-purpose processor.

[0127] Among them, the technical effects brought about by any one of the fourth to tenth aspects can be referred to the technical effects brought about by the above-mentioned first to third aspects and any possible implementation method or design method, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0128] FIG1 is a schematic diagram of a transmission path in a network system provided in an embodiment of the present application;

[0129] FIG2a is a schematic diagram of a system architecture provided by an embodiment of the present application;

[0130] FIG2 b is a schematic diagram of another system architecture provided in an embodiment of the present application;

[0131] FIG3 is a flow chart of a method 100 provided in an embodiment of the present application;

[0132] FIG4 is a schematic diagram of a forwarding table and an isolation table provided in an embodiment of the present application;

[0133] FIG5 is a schematic diagram of a message matching process provided in an embodiment of the present application;

[0134] FIG6 is a schematic diagram of a forwarding table entry provided in an embodiment of the present application;

[0135] FIG7 is a flow chart of a method 200 provided in an embodiment of the present application;

[0136] FIG8 is a schematic structural diagram of an IPv6 message encapsulating a first isolation identifier provided in an embodiment of the present application;

[0137] FIG9 is a schematic flow chart of an embodiment;

[0138] FIG10 is a schematic diagram of a message encapsulating an isolation identifier in an embodiment;

[0139] FIG11 is a flow chart of another embodiment;

[0140] FIG12 is a schematic structural diagram of a communication device provided in an embodiment of the present application;

[0141] FIG13 is another structural diagram of a communication device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0142] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

[0143] The following are some terms involved in the embodiments of this application for explanation.

[0144] (1) Detour Path and Shortest Path: A detour path is a path that does not have the fewest intermediate nodes among the transmission paths of multiple messages with the same source node and destination node. The shortest path is a path that has the fewest intermediate nodes among the transmission paths of multiple messages with the same source node and destination node. That is, a detour path is a path other than the shortest path among the transmission paths of multiple messages with the same source node and destination node. A detour path includes: a source node, one or more forwarding ports, and a destination node. The forwarding port is a port of an intermediate node in the detour path. Referring to Figure 1, the path 33->31->01 has only one intermediate node, node 31. 33->31->01 is the path with the fewest intermediate nodes among all paths with a source node of node 33 and a destination node of node 01. Therefore, 33->31->01 is the shortest path. There are two intermediate nodes in 33->32->02->01, namely node 32 and node 02. The number of intermediate nodes is greater than that of 33->31->01, so 33->32->02->01 is a detour path.

[0145] (2) Node: In a communication system, a node is a connection point, representing a redistribution point or a communication endpoint. For example, a node can be: a virtual switch, a virtual router, a physical switch, a physical router, a packet transport network (PTN) device, an optical transport network (OTN) device, a switching chip, a routing chip, and other network devices. For example, a node can also be: a controller, a network card in a server, the server itself hosted by an NPU or GPU, and the processor chip of a server. Specifically, taking the network system as a data center network as an example, a node can be a spine switch, a leaf switch, etc.

[0146] (3) The terms "system" and "network" in the embodiments of the present application can be used interchangeably. "At least one" means one or more, and "more" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, "at least one of A, B and C" includes A, B, C, AB, AC, BC or ABC. In addition, unless otherwise specified, the ordinal numbers such as "first" and "second" mentioned in the embodiments of the present application are used to distinguish multiple objects, and are not used to limit the order, timing, priority or importance of multiple objects.

[0147] The following is an example of the network system on which the embodiments of the present application are based.

[0148] Private networks and public networks are two common types of networks that differ in terms of network isolation, security, and accessibility. A private network is a network owned by a specific user or organization. It is usually completely isolated from the networks of other users or organizations to ensure the security of data and resources. Resources in a private network can only be accessed by users or organizations within the network and are usually not directly exposed to the public internet. A public network is a network shared by all users or organizations, allowing communication and interaction between different users or organizations. Resources in a public network can be accessed by anyone and usually require authentication and authorization for access. Optionally, this solution can also be applied to public networks.

[0149] This solution may be based on a centralized system, such as the system 1001 in FIG. 2 a , or may be based on a distributed system, such as the system 1002 in FIG. 2 b .

[0150] System 1001 includes: a spine 101, a leaf 102, a top of rack (ToR) 103, and a controller 104. Among them, the spine 101 includes multiple spine nodes, the leaf 102 includes multiple leaf nodes, and the ToR 103 includes multiple ToR nodes. The spine nodes are interconnected with the leaf nodes, and each leaf node is connected to each spine node, and vice versa. In addition, the leaf nodes are interconnected with the ToR nodes, and each ToR node is connected to each leaf node, and vice versa. For example, the leaf nodes can be composed of access switches that aggregate traffic from servers and connect to the spine. For example, the spine nodes interconnect the leaf nodes in a full mesh topology, for example, the ToR nodes are access points for the servers, and the ToR nodes are deployed on top of the servers. Each spine node, leaf node, and ToR node is connected to the controller 104, and the traffic forwarding process of these nodes is controlled by the controller 104.

[0151] System 1002 includes multiple nodes. In Figure 2b, shaded triangles represent nodes. The multiple nodes in system 1002 include: Node 01, Node 02, Node 03, Node 04, Node 11, Node 12, Node 13, etc. Unshaded triangles represent processors. Each of the aforementioned multiple nodes can be configured with a processor to control traffic forwarding.

[0152] It should be noted that Figures 2a and 2b are schematic diagrams of two possible, non-limiting system architectures provided in this application. This application can be applied to traffic engineering systems, including: data center networks, data center interconnection networks, artificial intelligence (AI) networks, supercomputer (high performance computing, HPC) networks, AI and HPC converged networks, cloud networks, wide area core networks, or independent switch-free direct connection networks, centralized computer networks, and distributed computer networks.

[0153] Optionally, the aforementioned Spine nodes, Leaf nodes, ToR nodes, and Node 01 can be devices, chips, or systems with packet forwarding capabilities. For example, these nodes can be network devices such as virtual switches, virtual routers, physical switches, physical routers, packet transport network devices, optical transport network devices, switching chips, and routing chips. For example, these nodes can also be network cards in servers, servers powered by NPUs or GPUs, or server processor chips. Specifically, assuming the network system in which these nodes reside is a data center network, these nodes can be spine switches or leaf switches.

[0154] When a node like Node 01 needs to transmit a message, it typically travels along the shortest path to the destination. However, some links along the shortest path, or ports on either side of the link, may be overloaded or experience link failures. Therefore, it is necessary to control the message transmission along a selected, suitable path. This requires a method for controlling the message transmission path so that the message is transmitted along the selected, suitable path.

[0155] To control the transmission path of packets, a policy-based routing approach can be used. In this approach, access control list (ACL) commands must be set on nodes. Nodes can then determine the corresponding detour paths based on these ACL commands. ACL commands typically take the form of ACL entries, which typically include a match item and an action item. An ACL match item describes the item to be matched against a packet field or attribute, such as the source address or the port on which the network enters. An ACL action item describes the action to be performed by the node when a packet field or attribute matches the ACL match item. In policy-based routing, the action item typically specifies the packet's egress port, which is the port of an intermediate node on the detour path. This approach has three problems. First, as mentioned above, policy-based routing requires setting ACL commands on nodes, which requires a large number of ACL entries. However, the network's available number of ACL entries is insufficient to meet this requirement. In some large-scale networks, insufficient ACL entries can even make traffic engineering impossible. Second, traditional policy-based routing relies on ACL technology, which is implemented using TCAM on physical devices, resulting in very high power consumption. Third, in traditional ACL technology, once a message matches an ACL matching item, the action specified by the ACL action item must be executed, such as forwarding it from a certain port, even if the output port specified by the matching ACL action item is in a faulty state or unavailable state. The unavailable state here includes link unavailable or unavailable under management status. If the message is forwarded to this type of output port, it will cause packet loss and reduce network forwarding availability.

[0156] In addition to using policy routing, source routing technology can also be used. In source routing, when a message needs to be transmitted along a specified path, multiple tunnel headers (IPinIP) need to be encapsulated in the message. This tunnel header is used to identify the detour path. For IPinIP of IPv4 messages, an IPinIP header is 20 bytes long. If the detour path detours three hops relative to the shortest path, an additional three-layer IPinIP header needs to be introduced, resulting in a 60-byte encapsulation overhead. For small-sized messages such as 64-byte messages, the additional three-layer IPinIP tunnel header wastes nearly 50% of the bandwidth. It can be seen that the encapsulation overhead of this method is too large.

[0157] Therefore, how to implement packet transmission along a detour path without relying on ACL technology and how to reduce the overhead caused by encapsulating the detour path identifier are technical issues that need to be solved urgently.

[0158] In order to control the transmission path of the message and solve the problem of relying on ACL technology to realize the message transmission according to the detour path, the embodiment of the present application provides a message sending method 100, which can be applicable to the scenarios shown in Figures 2a and 2b. When the message sending method is applied to the scenario shown in Figure 2a, the second node in the method can be, for example, the Spine node, Leaf node, or ToR node shown in Figure 2a. When the method is applied to the scenario shown in Figure 2b, the second node in the method can be, for example, node 01, node 02, node 03 or node 04 shown in Figure 2b, wherein, in method 100, the first path selected by the second node is controlled by the first isolation identifier and the first destination address, and the first path is the transmission path of the first message, that is, this solution can control the transmission path of the first message by the first isolation identifier and the first destination address. Furthermore, when the load of some links on a certain path, or the ports on both sides of the link is too high, the traffic on the path with too high load can be transferred to the path with lower load by controlling the transmission path of the message, thereby achieving load balancing.

[0159] This solution can achieve traffic transmission on a detour path without relying on ACL technology, reducing power consumption during traffic forwarding.

[0160] The following is a detailed introduction to the method 100 provided in an embodiment of the present application in conjunction with Figure 3. It should be noted that in Figure 3, the second node is used as an example to illustrate the method as the execution subject of the interactive diagram, but the present application does not limit the execution subject of the interactive diagram. For example, in Figure 3 and the corresponding embodiments, the execution subject in S301-S302 is the second node, and the execution subject may also be a chip, chip system, or processor that supports the second node to implement the method, or a logic module or software that can implement all or part of the functions of the second node. In Figure 3 and the corresponding embodiments, the second node in S301-S302 may also be replaced by a chip, chip system, or processor that supports the second node to implement the method, or may be replaced by a logic module or software that can implement all or part of the functions of the controller.

[0161] As shown in FIG3 , the method 100 provided in the embodiment of the present application includes the following steps:

[0162] Step 301: The second node obtains a first isolation identifier.

[0163] It should be noted that the first isolation identifier is used to indicate a detour path to one or more destination addresses.

[0164] In a possible implementation, the first isolation identifier includes: the first isolation identifier includes: an identifier of the detour path, and the identifier of the detour path includes: an identifier of a source node.

[0165] Optionally, there is only one detour path from the same source node to the same destination node, in which case the source node identifier can be used as the detour path identifier; there are multiple detour paths from the same source node to the same destination node, and these multiple detour paths will not pass through the same intermediate node, in which case the source node identifier can be used as the detour path identifier; there are multiple detour paths from the same source node to the same destination node, and if these multiple detour paths will pass through the same intermediate node, but the forwarding ports matched when passing through the same intermediate node are the same, in this case the source node identifier can be used as the detour path identifier. There are multiple detour paths from the same source node to the same destination node. If these multiple detour paths pass through the same intermediate node, but the forwarding ports matched when passing through the same intermediate node are different, different identifiers can be assigned to these multiple detour paths. For example, one detour path is: 1-2-3-4, and the other detour path is: 1-2-5-4. These two paths both pass through the same intermediate node, that is, node 2, but the forwarding ports corresponding to node 2 are different. In this case, different detour path identifiers can be assigned to these two paths. For example, the two paths can be identified by A and B respectively.

[0166] Optionally, the second node can be a source node or an intermediate node. When the system where the second node is located is a distributed system, such as system 1001, if the second node is a source node, the way in which the source node obtains the first isolation identifier includes: the source node formulates the first isolation identifier corresponding to the detour path. If the second node is an intermediate node, the way in which the intermediate node obtains the first isolation identifier includes: the intermediate node receives the first isolation identifier sent by the source node. When the system where the second node is located is a centralized system, the system also includes: a first node, the first node is used to control the forwarding of the message of the second node, for example, the centralized system can be system 1001, and the first node can be a controller in system 1001. In a centralized system, if the second node is a source node, the way in which the source node obtains the first isolation identifier includes: receiving the first isolation identifier sent by the first node. If the second node is an intermediate node, the way in which the intermediate node obtains the first isolation identifier includes: receiving the first isolation identifier sent by the source node.

[0167] Optionally, before the second node obtains the first isolation identifier, the source node and the first node need to first determine a detour path based on the network load. In a distributed system, such as system 1002, when the second node is the source node, the source node can perform path planning based on the network load. In a centralized system, such as system 1001, the first node can perform path planning based on the network load.

[0168] Optionally, the source node or the first node can measure the network load and determine the location of a high-load area, where the high-load area can be one or several specific links, or two ports on both sides of a link. When the source node or the first node performs path planning, it will select a path that can avoid the high-load area. Specifically, according to shortest path first routing, the source node or the first node will select the shortest path as the transmission path. However, if the shortest path passes through the high-load area, the source node or the first node will select a specific detour path as the transmission path for the message, and the specific detour path does not pass through the high-load area.

[0169] Optionally, the network load may be measured periodically, for example, on a daily, weekly or monthly basis, and a high-load area may be determined through this measurement.

[0170] Optionally, the source node or the first node can perform global planning, that is, plan an entire detour path based on the measurement results of the network load. For example, the shortest path is 1-2-3-4, and the shortest path will pass through a high-load area. At this time, the source node or the first node can plan a detour path that bypasses the high-load area. For example, the corresponding detour path can be 1-5-6-4. At this time, the source node is the starting node of the detour path, such as node 1 in the aforementioned example; the source node or the first node can perform local planning, that is, plan a local detour path. For example, when the shortest path is 1-2-3-4-5, and the 3-4 section of the path will pass through a high-load area, the source node or the first node can plan a detour path for the 3-4 section. The detour path will not pass through the 3-4 section of the path, but will bypass the 3-4 section of the path. For example, the detour path is 3-6-7, and the corresponding complete path is 1-2-3-6-7-5. For this complete path, the source node is the node that starts the detour, for example, node 3 in the aforementioned example.

[0171] Optionally, after determining the corresponding detour path based on the measurement results of the network load, an isolation identifier corresponding to the detour path is formulated. Optionally, the isolation identifier can also be used to indicate a detour path set. In a centralized system, when the first isolation identifier is formulated by the first node, the first node can send the first isolation identifier for indicating the detour path to the source node, and then the source node encapsulates the first isolation identifier into a first message and sends the first message to the intermediate node. In a distributed system, when the first isolation identifier is formulated by the source node, the source node can directly encapsulate the first isolation identifier into a first message and send the first message to the intermediate node.

[0172] The method for the source node to encapsulate the first isolation identifier into the first message can adopt the following method 200, that is, the number of first isolation identifiers encapsulated into the first message is different from the number of intermediate nodes in the detour path. In addition to the encapsulation method in method 200, the encapsulation of the first isolation identifier can also adopt encapsulation methods such as multi-stage tunneling.

[0173] Step 302: The second node sends a first message through a first path according to the first isolation identifier and the first destination address.

[0174] It should be noted that the first destination address is the destination address of the first message, and the first path is related to the first isolation identifier and the first destination address. Optionally, the destination address may be the IP address of the destination node of the first message.

[0175] Specifically, two situations can be divided according to the relationship between the first destination address and the "one or more destination addresses" in step 301:

[0176] Case 1: the one or more destination addresses include the first destination address.

[0177] In a possible implementation, when the one or more destination addresses include the first destination address, the first path is a path in the detour path that reaches the first destination address.

[0178] Based on the above technical solution, the first path is the transmission path of the first message, and the first path is also one of the detour paths indicated by the first isolation identifier. Therefore, the controller or source node can indicate the detour path of the first message by setting or specifying the first isolation identifier, thereby enabling the message to be transmitted along the detour path specified by the controller or source node.

[0179] In one possible implementation, the first path is a detour path that matches the first isolation identifier and the first destination address in the isolation mapping relationship. The isolation mapping relationship includes a correspondence between multiple isolation identifiers and multiple first mapping relationships, and the first mapping relationship includes a correspondence between multiple destination addresses and multiple detour paths.

[0180] Optionally, after determining a detour path for the message based on network load conditions, the source node or the first node may determine the destination address of the detour path, the identifiers of the intermediate nodes on the detour path, and the identifier of the destination node. The identifiers of the intermediate nodes and the identifier of the destination node are hereinafter referred to as node identifiers. The source node or the first node establishes an isolation identifier for indicating the detour path. The source node or the first node uses the destination address and the identifiers of the nodes on the detour path as a first mapping relationship, and uses the correspondence between the first mapping relationship and the isolation identifier as an isolation mapping relationship.

[0181] Optionally, when there is only a single link between nodes, or there are multiple links between nodes, but these multiple links are bound into one link at the L2 layer, wherein the link is a physical or logical path connecting the nodes. For example, in the path 1-2-3-4, if only one physical or logical path can be established between node 1 and node 2, then there is only a single link between node 1 and node 2; if only multiple physical or logical paths can be established between node 1 and node 2, then there are multiple links between node 1 and node 2. In this case, in the first mapping relationship, the node identifier is the node address, and the node address includes: the node's Internet Protocol (IP) address or Media Access Control (MAC) address. In this case, the first mapping relationship includes: the destination address, and the corresponding relationship between the node address.

[0182] Optionally, when multiple links exist between nodes and these multiple links are not bound into one link at the L2 layer, in the first mapping relationship, the node identifier is the node's forwarding port, and the first mapping relationship includes: a correspondence between the destination address and the forwarding port. In a more specific design, in the first mapping relationship, the forwarding port can be identified by the IP address of the forwarding port. In this case, the first mapping relationship includes: a correspondence between the destination address and the IP address of the forwarding port.

[0183] Optionally, the forwarding port is an egress port of the second node, the egress port is located on one side of the link, and the other side of the link is an ingress port of the next node on the detour path.

[0184] Optionally, a detour path will only correspond to one first mapping relationship on the same node, and the first mapping relationship has only a correspondence between a destination address and a forwarding port. For example, when the first mapping relationship is a forwarding table entry, the detour path a is 1-2-3-4, and the detour path a only corresponds to one forwarding table entry at node 2, and the forwarding table entry is: the correspondence between the destination address of node 4 and a forwarding port of node 3.

[0185] Optionally, from the local perspective of the second node performing a match on the isolation mapping relationship, the second node actually matches the forwarding port. As mentioned above, the forwarding port is the port of the next intermediate node on the detour path for transmitting the message. However, in a complete message transmission process, all forwarding ports matched by all nodes on a path, together with the source node and the intermediate nodes, constitute a detour path. Therefore, from the overall perspective, the node matches the corresponding detour path based on the isolation mapping relationship. Accordingly, the first mapping relationship of a certain node includes: the correspondence between the destination address and the forwarding port. The number of the forwarding port is not limited to one. The correspondence between the destination address and the forwarding port is the forwarding table entry of the isolation mapping table.

[0186] Optionally, the expression form of the isolation mapping relationship includes: the form of a table or table item, the form of a text description, the form of a function or the form of a set. For the convenience of description, the following is explained by taking the isolation mapping relationship as an isolation table or table item as an example. At this time, the isolation table can be obtained on the first node through a command line or other methods. When the isolation mapping relationship is an isolation table on the first node, the first mapping relationship is one or more forwarding table items corresponding to the first isolation identifier, and the forwarding table item includes: the correspondence between the destination address and the identifier of the next node, and the next node is the next node of the second node on the first path in the order of forwarding messages.

[0187] Taking Figure 4 as an example of the above-mentioned isolation table, Table 410 is a partial forwarding table in the shortest path first routing technology. At this time, the shortest path from node 32 to node 04 includes: 32-31-01-03-04 or 32-33-01-03-04, and the corresponding forwarding table entries of the shortest path include: the destination address is 04, and there are two corresponding next nodes, one is node 31 and the other is node 33. 420 in FIG4 shows a design method of the isolation table of the present application, that is, the routing table entry includes an isolation identifier, and the detour path from node 33 to node 04 includes: 33-32-02-03-04 or 33-23-13-03-04. Table 420 has multiple isolation identifiers relative to Table 410, namely, isolation identifier a and isolation identifier b, wherein the detour path corresponding to isolation identifier a is 33-32-02-03-04, and the detour path corresponding to isolation identifier b is 33-23-13-03-04. Therefore, the corresponding routing table entry on node 33 includes: isolation identifier a, destination address 04, and the corresponding next node is node 32; isolation identifier b, destination address 04, and the corresponding next node is node 23. Table 430 in Figure 4 shows a design method of the isolation table of the present application, that is, the isolation identifier is not included in the forwarding table item. At this time, there are two corresponding forwarding table items on node 33, one of which is the forwarding table item corresponding to isolation identifier a, and the forwarding table item includes: the destination address is the address of node 04, and the corresponding next node is node 32; the other forwarding table item is the forwarding table item corresponding to isolation identifier b, the destination address is the address of node 04, and the corresponding next node is node 23. For the detour path 33-32-02-03-04, when there is only a single link between node 33 and node 32, or there are multiple links between node 33 and node 32, but these multiple links are bound as one link at the L2 layer, node 32 can be identified by the address of node 32 in the forwarding table item, such as the IP address of node 32. Similarly, for the detour path 33-23-13-03-04, node 23 can be identified by the address of node 23 in the forwarding table item. For the detour path 33-32-02-03-04, when multiple links exist between node 33 and node 32, and these multiple links are not bound into a single link at the L2 layer, node 32 in the forwarding table entry can be identified by the IP address of the forwarding port of node 32. Similarly, for the detour path 33-23-13-03-04, node 23 in the forwarding table entry can be identified by the IP address of the forwarding port of node 23.

[0188] Optionally, a detour path corresponds to only one first mapping relationship on the same node, and the first mapping relationship has only a correspondence between a destination address and a forwarding port. For example, when the first mapping relationship is a forwarding table entry, the detour path a is 1-2-3-4, and the detour path a corresponds to only one forwarding table entry in node 2, and the forwarding table entry is: the correspondence between the destination address of node 4 and the IP address of a forwarding port of node 3.

[0189] Optionally, after formulating the isolation mapping relationship, the source node or the first node may send the isolation mapping relationship to the second node. In this case, the source node or the first node may only send the mapping relationship related to the second node in the isolation mapping relationship to the second node, that is, send the mapping relationship corresponding to the detour path passing through the second node to the second node. For example, when the detour path is 1-2-3-4, 5-6-7-8, since the detour path 1-2-3-4 passes through node 2. The isolation mapping relationship sent by node 1 to node 2 is the mapping relationship corresponding to the detour path 1-2-3-4. The source node or the first node may also send the mapping relationship related to the isolation mapping relationship and the second node, as well as the mapping relationship unrelated to the second node, to the second node. Taking the detour paths 1-2-3-4, 5-6-7-8 as an example, the isolation mapping relationship sent by node 1 to node 2 includes the mapping relationship corresponding to the detour path 1-2-3-4, and also includes the mapping relationship corresponding to the detour path 5-6-7-8.

[0190] Optionally, if two or more detour paths start from the intermediate node of the first intersection, and all subsequent detour path intermediate nodes and destination nodes are the same, in order to reduce duplicate entries, such detour paths can be marked with the same isolation identifier, that is, these detour path sets can be marked with the same isolation identifier.

[0191] It should be noted that "intersecting intermediate nodes" means that multiple detour paths pass through the same intermediate node, for example: path A: 1-2-3-4-5, path B: 6-7-8-4-5, the intermediate node where path A and path B intersect for the first time is node 4.

[0192] For example, the intermediate node of the first intersection of path A (1-2-3-4-5) and path B (6-7-8-4-5) is node 4. After 4, the nodes on path A and path B are the same. In this case, path A and path B can be marked with a detour path identifier such as identifier #1. At node 4, whether path A or path B is at node 2, the next node matched by identifier #1 is node 5. At the nodes before node 4, the nodes on path A and path B will match different next nodes. For example, at node 2, the next node matched by identifier #1 in the isolation table is node 3, while at node 7, the next node matched by identifier #1 in the isolation table is node 8. That is, the mapping relationship corresponding to identifier #1 at node 2 is different from the mapping relationship corresponding to identifier #1 at node 7. That is, in this solution, different nodes can share the same isolation identifier, and the same isolation identifier can correspond to different mapping relationships, or forwarding table entries, at different nodes. However, this solution does not limit the same isolation identifier to different mapping relationships at different nodes.

[0193] Optionally, after the second node receives the isolation mapping relationship and obtains the first isolation identifier, when the isolation mapping relationship includes: the correspondence between the destination address, the forwarding port, and the isolation identifier, the second node can match the corresponding forwarding port in the isolation mapping relationship according to the first isolation identifier and the destination address. For a single match, the second node matches the forwarding port. For a complete message transmission process, all second nodes on a path will be matched to the corresponding forwarding port, wherein the forwarding port is located on an intermediate node or a destination node. At this time, the source node, the intermediate node where the forwarding port is located, and the destination node where the forwarding port is located together constitute a detour path for the message. It can be seen that for a complete message transmission process, the second node can match the corresponding detour path in the isolation mapping relationship according to the isolation identifier and the destination address.

[0194] Alternatively, the second node is that the first isolation mark is maintained and is only this first mapping relations that the first isolation mark is used exclusively, has only carried the first isolation mark, could use this first mapping relations, promptly only have to carry the first isolation mark in the message, could query this first mapping relations based on the destination address that message carries, thereby mate corresponding forwarding port.In this scheme, can there be a plurality of mapping relations on the second node, can now, according to the difference of corresponding isolation mark, distinguish these a plurality of mapping relations.For example, can distinguish the first mapping relations and other mapping relations by the first isolation mark.

[0195] Optionally, in the isolation mapping relationship, the first isolation identifier can be used to mark a detour path or a detour path set. Taking the first mapping relationship as a routing table entry as an example, in the isolation mapping relationship, the first isolation identifier corresponds to the routing table entry, and the routing table entry is used to record the mapping relationship corresponding to the detour path or detour path set that is different from the common shortest path. The node can determine the detour path corresponding to the first isolation identifier by querying the first mapping relationship corresponding to the first isolation identifier.

[0196] Optionally, when matching the corresponding forwarding port in the isolation mapping relationship, the second node can first determine the first mapping relationship based on the isolation identifier, and then search for the corresponding forwarding port according to the destination address in the first mapping relationship that matches the isolation identifier. Since fewer search conditions need to be set, the forwarding table entries can be recorded and searched in the memory on the forwarding chip of the second node or in a memory outside the forwarding chip, such as a general SRAM, DRAM, etc. Compared with TCAM table lookup, table lookup in memory has lower power consumption and lower cost.

[0197] In a possible implementation manner, the second node receives the isolation mapping relationship sent by the first node.

[0198] Based on the above technical solution, on the one hand, the first node can control the message detour path through the isolation mapping relationship. On the other hand, the second node does not need to formulate the isolation mapping relationship by itself, which can save the computing power consumed by the second node in formulating the isolation mapping relationship.

[0199] Optionally, when the system where the second node is located is a distributed system, the isolation mapping relationship is formulated by the source node. After the formulation is completed, the source node sends the isolation mapping relationship to other nodes in the network system based on a distributed routing protocol. The distributed routing protocol includes: OSPF routing protocol, or ISIS routing protocol, OSPF traffic engineering; ISIS traffic engineering, border gateway protocol or other distributed routing protocols. When the system where the second node is located is a centralized system, the isolation mapping relationship is formulated by the first node and sent to the nodes in the network system.

[0200] In a possible implementation, when there is no detour path matching the first isolation identifier or the first destination address in the isolation mapping relationship, the first path is the shortest path to the first destination address.

[0201] Based on the above technical solution, when the isolation mapping relationship fails to match, that is, the corresponding detour path cannot be matched in the isolation mapping relationship, the message is sent through the shortest path, thereby ensuring that the message is reachable and preventing the information carried in the message from being lost.

[0202] Optionally, the situation in which the isolation mapping relationship cannot match the corresponding bypass path includes: the bypass path that matches the first isolation identifier and the first destination address has not been recorded in the isolation mapping relationship, or the bypass path that matches the first isolation identifier and the first destination address was originally recorded in the isolation mapping relationship, but due to a link failure on the bypass path, the second node does not use or cannot use the isolation mapping relationship corresponding to the bypass path, wherein the link failure includes: the forwarding port on the bypass path is in a faulty state or an unavailable state, and the unavailable state includes: link unavailability or unavailable under management state.

[0203] Optionally, the detour path that matches the first isolation identifier and the first destination address and has not yet been recorded in the isolation mapping relationship includes: the mapping relationship corresponding to the first isolation identifier has not yet been recorded in the isolation mapping relationship; the mapping relationship corresponding to the first destination address has not yet been recorded in the isolation mapping relationship, the destination address corresponding to the first isolation identifier recorded in the isolation mapping relationship does not include the first destination address, and the isolation identifier corresponding to the first destination address recorded in the isolation mapping relationship does not include the first isolation identifier.

[0204] Optionally, the situation in which the above-mentioned second node is unable to use the mapping relationship corresponding to the bypass path includes: when a link failure occurs on the bypass path recorded in the isolation mapping relationship, the second node or the first node deletes the mapping relationship corresponding to the bypass path, resulting in the second node being unable to use the mapping relationship corresponding to the bypass path.

[0205] Based on the above technical solution, when the detour path that matches the first isolation identifier and the first destination address has not been recorded in the isolation mapping relationship, and the second node cannot match the detour path corresponding to the first isolation identifier or the first destination address, that is, when the match fails in the isolation mapping relationship, the second node can transmit the message to the destination node through the shortest path, thereby ensuring that the message is reachable and preventing the information carried by the message from being lost. When a link failure occurs, the second node does not use the mapping relationship corresponding to the detour path where the faulty link is located, and thus cannot match or does not match the corresponding detour path, thereby ensuring that the message will not be sent through the detour path where the faulty link is located. It can be seen that this technical solution avoids packet loss caused by sending messages through the detour path where the faulty link is located, and improves the reachability of network forwarding.

[0206] Case 2: the one or more destination addresses do not include the first destination address.

[0207] In a possible implementation, when the one or more destination addresses do not include the first destination address, the first path is the shortest path to the first destination address.

[0208] Based on the above technical solution, when the corresponding detour path cannot be determined based on the first isolation identifier and the first destination address, the second node matches the corresponding shortest path based on the destination address in the shared mapping relationship. This solution ensures the reachability of the message by setting a shared mapping relationship. And on this basis, when a link failure occurs in the isolation mapping relationship and the path recorded in the shared mapping relationship, in this solution, the node does not use or cannot use the isolation mapping relationship or shared mapping relationship corresponding to the faulty link, thereby avoiding matching the faulty path, thereby further ensuring the reachability of the message.

[0209] In a possible implementation, the shortest path is obtained by matching the first destination address in a shared mapping relationship.

[0210] Optionally, the shared mapping relationship includes: a correspondence between multiple destination addresses and multiple shortest paths.

[0211] For example, the shortest path between source node 1 and destination node 4 is 1-2-3-4, and the shortest path between source node 5 and destination node 6 is 5-2-7-6. Then, on node 2, the shared mapping relationship includes: the correspondence between the address of node 4 and the identifier of node 3, or the correspondence between the address of node 6 and the identifier of node 7, that is, when the destination address carried in the message is the address of node 4, the next node is node 3; when the destination address carried in the message is the address of node 6, the next node is node 7.

[0212] In a possible implementation, before sending the first message through the first path according to the first isolation identifier and the first destination address, the shared mapping relationship sent by the first node is received.

[0213] Optionally, when the system where the second node is located is a distributed system, the source node formulates the shared mapping relationship. After the formulation is completed, the source node sends the shared mapping relationship to other nodes in the network system based on a distributed routing protocol. The distributed routing protocol includes: OSPF routing protocol, ISIS routing protocol, OSPF traffic engineering; ISIS traffic engineering, border gateway protocol or other distributed routing protocols. When the system where the second node is located is a centralized system, the first node formulates the shared mapping relationship and sends the shared mapping relationship to the nodes in the network system.

[0214] The following describes the relationship between the shared mapping relationship and the isolated mapping relationship in conjunction with Table 1:

[0215] Table 1

[0216] Optionally, taking the form of a shared mapping relationship as an item as an example, the shared mapping relationship includes one or more forwarding table items, and optionally, each forwarding table item includes: the correspondence between the destination address and the identifier of the next node on the shortest path. Optionally, the forwarding table item of the shared mapping relationship can be shared by multiple different isolation identifiers. For example, when the second node obtains the first isolation identifier as the isolation identifier, the second node can match the corresponding shortest path in the shared mapping relationship. When the second node obtains the second isolation identifier as the isolation identifier, the second node can still match the corresponding shortest path in the shared mapping relationship, that is, the shared mapping relationship can be shared by the first isolation identifier and the second isolation identifier, rather than being exclusive to the first isolation identifier or the second isolation identifier; optionally, the shared mapping relationship can be generated based on the shortest path first routing algorithm, and the isolation mapping relationship can be generated based on policy routing. Policy routing is a mechanism for path selection based on a specified strategy. For example, in this solution, the first node can specify to select a path based on the result of network load detection. More specifically, the first node can select a detour path for the message by detecting the network load, and then formulate the isolation mapping relationship corresponding to the detour path.

[0217] Optionally, the second node can perform two matches. Exemplarily, these two matches can be as follows: the second node matches the forwarding port corresponding to the first isolation identifier and the destination address of the first message in the isolation mapping relationship, that is, the address of the next node or the IP address of the forwarding port of the next node; when the match is successful, the second node sends the first message to the matched forwarding port. When the match fails, the second node searches for a forwarding port that matches the first identifier and the first destination address in the shared mapping relationship. When the match is successful, the second node sends the first message to the matched forwarding port; when the match fails, the second node discards the message.

[0218] Please refer to Figure 5, which is a schematic diagram of the two matches. Figure 5 takes the first isolation identifier as isolation identifier e and isolation identifier f, and the second isolation identifier as isolation identifier g as an example. In the isolation mapping relationship, isolation identifier e or isolation identifier f is matched and the forwarding port corresponding to the destination address of the message is matched. When the match is successful, the message is sent to the matched forwarding port. When the match fails, identifier g is matched in the shared mapping relationship and the forwarding port corresponding to the destination address of the message is matched. When the match is successful, the message is sent to the matched forwarding port. When the match fails, the message is discarded.

[0219] Optionally, the first identifier is the identifier of the shortest path, and the first identifier is a default identifier. The first identifier can be explicit or implicit. For example, if the shortest path is 1-2-3-4, the first identifier is the identifier of the path 1-2-3-4, for example, the first identifier can be a. Optionally, the first identifier can be pre-set.

[0220] Alternatively, if one or more forwarding table items in the first mapping relationship of the detour path on a node are identical to one or more forwarding table items in the shared mapping relationship, that is, at the node, the detour path corresponding to the first mapping relationship and the shortest path corresponding to the shared mapping relationship have the same destination address and have the same next node. At this time, it is not necessary to set the identical forwarding table items in the isolated mapping relationship on the node, but the forwarding table items of the shared mapping relationship can be directly reused, thereby reducing duplicate entries.

[0221] For example, refer to Figure 6. The controller needs to distribute 37.5% of the traffic from 33->03->04 to 33->32->02->03->04. The isolation identifier d in Figure 6 is encapsulated in the packet header by source node 33. Identifier c corresponds to the default first identifier for node 03, which is the isolation identifier for the shortest path. Node 03's isolation table does not have a forwarding entry for isolation identifier d. In this case, the forwarding port corresponding to identifier c can be matched in the shared table.

[0222] Alternatively, when there is a situation where the above-mentioned table items are identical, there is a corresponding relationship between the first identifier and these multiple isolation identifiers, for example, isolation identifier a corresponds to 1-2-3-4, isolation identifier b corresponds to 1-5-3-4, and the shortest path is 1-3-4. Since on node 3, the forwarding table items corresponding to isolation identifier a and isolation identifier b overlap with the forwarding table items of the shortest path, isolation identifier a and isolation identifier b can now share the forwarding table item corresponding to the shortest path at node 3. At this time, this forwarding table item is no longer set in the isolation mapping relationship, and the forwarding table item corresponding to the shortest path is directly reused. In order to allow isolation identifier a and isolation identifier b to match the forwarding table item corresponding to the shortest path, the corresponding relationship between isolation identifier a, isolation identifier b and the first identifier can be set, and the first identifier is used to identify the shortest path. First, isolation identifier a and isolation identifier b are corresponded to the first identifier, and then the shortest path is matched according to the first identifier.

[0223] In order to solve the problem of excessive overhead caused by encapsulating the identifier of the detour path, an embodiment of the present application provides an identifier encapsulation method 200, which can be applicable to the scenarios shown in Figures 2a and 2b. When method 200 is applied to the scenario shown in Figure 2a, the third node in the method can be, for example, the Spine node, Leaf node, or ToR node shown in Figure 2a. When the method is applied to the scenario shown in Figure 2b, the third node in the method can be, for example, node 01, node 02, node 03 or node 04 shown in Figure 2b. In method 200, the number of isolation identifiers in the first message is different from the number of intermediate nodes of the detour path. Compared with source routing technology, this type of technology needs to encapsulate isolation identifiers that are the same as the number of intermediate nodes. When the number of intermediate nodes is large, a large number of isolation identifiers need to be encapsulated. In this solution, the encapsulated identifiers can be less than the number of intermediate nodes. When the number of intermediate nodes is large, fewer identifiers can be encapsulated, which can save the overhead for encapsulating isolation identifiers.

[0224] It should be noted that method 200 can be applied to the encapsulation of the first isolation identifier in method 100; method 200 can also be applied to the encapsulation of identifiers of other detour paths, and this application does not limit this. When method 200 is applied to method 100, the third node in method 200 can be the same as the second node in method 100.

[0225] The following is a detailed description of the method 200 provided in an embodiment of the present application in conjunction with Figure 7. It should be noted that in Figure 7, the third node is used as an example of the execution subject to illustrate the method, but the present application does not limit the execution subject of the interactive illustration. For example, the execution subject in S701-S702 in Figure 7 and the corresponding embodiments is the third node, and the execution subject can also be a chip, chip system, or processor that supports the third node to implement the method, or a logic module or software that can implement all or part of the functions of the third node. The controller in S701-S702 in Figure 7 and the corresponding embodiments can also be replaced by a chip, chip system, or processor that supports the controller to implement the method, or can be replaced by a logic module or software that can implement all or part of the functions of the controller.

[0226] As shown in FIG7 , the method 200 provided in the embodiment of the present application includes the following steps:

[0227] Step S701: The third node obtains a first isolation identifier.

[0228] It should be noted that the first isolation identifier is used to identify a detour path for the first message. More specifically, in one possible implementation, the first isolation identifier is used to indicate a detour path to one or more destination addresses, and the third node sends the first message through the first path based on the first isolation identifier and the first destination address, the first destination address being the destination address of the first message, and the first path is related to the first isolation identifier and the first destination address.

[0229] For example, the first isolation identifier may be used to indicate two paths: 33->03->04 and 33->02->05->15. The destination addresses of the two paths are the address of node 04 and the address of node 15, respectively.

[0230] Optionally, the first isolation identifier includes: an identifier of the detour path, and the identifier of the detour path includes: an identifier of the source node.

[0231] For example, when the controller specifies 33->03->04 as the detour path, the first isolation identifier is used to identify the path 33->03->04. For example, the first isolation identifier can be the identifier of node 33. For example, when the number of the path 33->03->04 is k, the first isolation identifier can be k.

[0232] Step S702: The third node sends a first message according to the first isolation identifier.

[0233] It should be noted that the first message encapsulates a first number of first isolation identifiers, and the first number is different from the number of intermediate nodes in the detour path.

[0234] In a possible implementation, the first isolation identifier is encapsulated into the first message by the source node.

[0235] Optionally, the source node encapsulates the first isolation identifier into a first message and sends the first message to the intermediate node, and the intermediate node obtains the first isolation identifier encapsulated in the message.

[0236] In a possible implementation, the first isolation identifier is encapsulated in a message header of the first message.

[0237] Optionally, the first isolation identifier is encapsulated in a field defined in the protocol in the message header of the first message.

[0238] It should be noted that, optionally, "the message header is already defined in the protocol" refers to existing fields in the message header structure specified in the network protocol. That is, this solution reuses existing fields in the message header to encapsulate the first isolation identifier, rather than adding new fields to encapsulate the first isolation identifier. This allows encapsulation of the first isolation identifier without changing the message structure, introducing additional encapsulation overhead, or increasing the message length and thereby occupying additional bandwidth.

[0239] In a specific design, the first isolation identifier carried by the first message does not change before the first message reaches the destination node. Optionally, the first isolation identifier itself and the length, size, and number of the first isolation identifiers do not change. The "first isolation identifier itself does not change" means that the field corresponding to the first isolation identifier does not change. For example, when the first isolation identifier is a numeric field, the numeric value does not change.

[0240] Optionally, the protocol is a network protocol, which includes: IPV6 protocol, TCP protocol or UDP protocol.

[0241] Based on the above technical solution, the third node and the like can reuse the existing fields in the message header to encapsulate the first isolation identifier, thereby achieving the encapsulation of the first isolation identifier without changing the structure of the message, and without introducing additional encapsulation overhead, nor causing the message length to become longer and thereby occupying additional bandwidth.

[0242] Alternatively, the third node may encapsulate the first isolation identifier in the payload of the previous layer, or may add a new field to the header of the first message, such as an additional 2 bytes, to carry the first isolation identifier. Optionally, in this scenario, the length of the first isolation identifier field encapsulated in the first message is fixed and does not increase with the number of intermediate nodes in the detour path.

[0243] In one possible implementation, when the first message is an IPv6 message, the third node encapsulates the first isolation identifier into the flow label of the first message. Taking FIG8 as an example, FIG8 depicts the structure of an IPv6 message, wherein the first isolation identifier may be encapsulated in the area where the dotted box is located, i.e., the blank area of ​​the flow label field.

[0244] Based on the above technical solution, since the flow label is used to differentiate traffic, while the first isolation identifier is used to mark the detour path of the packet, that is, the transmission path of the traffic, which is also an important feature for distinguishing traffic. Therefore, the function of the first isolation identifier is similar to that of the flow label. Encapsulating the first isolation identifier in the flow label does not change the properties of the flow label.

[0245] In the technical solution of the present application, the number of isolation identifiers in the first message is different from the number of intermediate nodes in the detour path. Compared with source routing technology, such technology must encapsulate the same number of isolation identifiers as the number of intermediate nodes. When the number of intermediate nodes is large, it is necessary to encapsulate a large number of isolation identifiers. This solution can encapsulate fewer identifiers than the number of intermediate nodes, which can save the overhead of encapsulating isolation identifiers. In addition, this solution can reuse the fields in the message header that have been defined in the protocol to encapsulate the first isolation identifier. On the one hand, this encapsulation method can not change the structure of the message, and on the other hand, this encapsulation method can further save encapsulation overhead.

[0246] It can be seen that this solution has the following technical effects:

[0247] First, this solution replaces the ACL technology through an isolation mapping relationship. In the isolation mapping relationship, the first isolation identifier can be used to mark a detour path or a detour path set, and the first mapping relationship corresponding to the first isolation identifier provides a routing table entry corresponding to the detour path, and the isolation mapping relationship is used to record the routing table entry of the detour path that is different from the common shortest path first. In this way, this solution can replace the ACL-based policy routing through the isolation mapping relationship; when the isolation mapping relationship is formulated by the first node, the first node can send the corresponding isolation mapping relationship to the second node, and when the isolation mapping relationship is formulated by the source node, the source node can send the corresponding isolation mapping relationship to the second node through a distributed routing protocol. When the isolation mapping relationship is a correspondence between a newly added mapping relationship and a newly added isolation identifier, the second node can add the newly added mapping relationship and the newly added isolation identifier to the isolation mapping relationship used by the second node when receiving the newly added mapping relationship and the newly added isolation identifier.

[0248] Specifically, ACL technology requires table lookups based on multiple conditions, such as source address, destination address, source port, and destination port. This requires TCAM table entry recording and lookup, which consumes high power and is costly. This solution performs table lookups based on the destination address, eliminating the need for multiple lookup conditions. This allows table entry recording and lookup to be performed on the forwarding chip or in external memory, such as general-purpose SRAM or DRAM. This approach reduces power consumption and costs compared to TCAM lookups.

[0249] Specifically, this solution uses a combination of shared and isolated mappings to achieve packet transmission along detour paths with fewer entries. If the routing table entries for a detour path overlap with those for the shortest path, and a node already has these overlapping entries in its shared mapping, that node does not need to duplicate them in its isolated mapping, thus saving on routing entries.

[0250] Specifically, when a link failure occurs, the second node does not use the mapping relationship corresponding to the detour path where the faulty link is located, that is, it does not match the detour path where the faulty link is located, thereby ensuring that the message will not be sent through the detour path where the faulty link is located. In traditional policy routing solutions, once the ACL matching item is matched successfully, the action of the ACL action item will be executed, but the forwarding port specified by the ACL action item may be in a faulty state or an unavailable state. The unavailable state here includes link unavailability or unavailable under management status. If the message is forwarded to this type of forwarding port, it will cause packet loss. It can be seen that compared with the policy routing solution, this technical solution avoids packet loss caused by sending messages to a faulty port or link, and improves the availability of network forwarding.

[0251] Furthermore, in solutions that only support setting up isolation mappings, the isolation identifiers isolate the private network addresses managed independently by different tenants. This is to ensure that packets destined for a tenant's private network address are not sent to nodes with the same private network address in other tenants. This solution essentially isolates different tenants from independently managing and allocating their own private network address space. This solution is designed for private networks and cannot be applied to public networks. Furthermore, this solution uses traditional shortest path first forwarding technology for path selection.

[0252] The combination of the isolation identifier and the isolation mapping relationship of this scheme is to isolate different forwarding behaviors for the same destination node. To be precise, the isolation identifier of this scheme is to isolate the forwarding behaviors of different detour paths or detour path sets on the same intermediate node, that is, policy routing behavior. For example, for packets sent from nodes A and B respectively and arriving at node D through intermediate node C, if the packet originating from node A detouring through C to D is sent from the first port on C, and the traffic originating from node B detouring through C to D is sent out from the second port on C, then the forwarding behaviors of these two detour paths on node C are different, so two different isolation identifiers are needed to isolate the forwarding behaviors corresponding to different detour paths. More specifically, different forwarding behaviors correspond to sending packets from different egress ports of the same node, so the isolation identifier also isolates different egress ports of the same node. The egress port is at one end of the link, and the ingress port of the next node is at the other end of the link. Different egress ports mean different links, so the isolation identifier also isolates different links between the two nodes. If the traffic originating from node A and passing through C to D goes out from the first port on C, and the traffic originating from node B and passing through C to D also goes out from the first port on C, then the forwarding behavior of these two detour paths on node C, that is, the policy routing behavior, is the same. If these two detour paths do not intersect at other nodes, that is, there are no other identical intermediate nodes, or the forwarding behavior at other identical intermediate nodes is also the same, then these two detour paths (A->C->D and B->C->D) can use the same isolation identifier. In this solution, as long as the same forwarding behavior is directed to the same destination node, even if the user or source node is different, the same isolation identifier can still be used, and the same first mapping relationship can be accessed through the isolation identifier.

[0253] In addition, in solutions that only support setting relatively isolated mapping relationships, when a match fails in an isolated mapping relationship, the message will be discarded. However, this solution provides a shared mapping relationship on the basis of an isolated mapping relationship. Therefore, when a match fails in an isolated mapping relationship, the technical solution of this application provides a second matching opportunity, that is, matching the forwarding port corresponding to the destination address in the shared mapping relationship, and then sending the message to the matched forwarding port, thereby ensuring that the message is reachable and improving network availability. It can be seen that compared with this type of solution, this solution improves the reachability of the message and improves network availability.

[0254] The methods shown in FIG. 3 and FIG. 7 are described below with reference to specific examples.

[0255] One embodiment is an example of method 100. And embodiment 2 is an example of method 200. This embodiment is an example in which the second node in method 100 is node 33, the destination address is the address of node 04, the first isolation identifier is isolation identifier m, the isolation mapping relationship is in the form of an isolation table, and the sharing mapping relationship is in the form of a sharing table. This embodiment also takes method 100 applying the encapsulation method of the isolation identifier in method 200 as an example. For example, the shortest path between node 33 and node 04 is 33->03->04. After detecting the load situation, the controller determines that the traffic on this path needs to be transferred to 33->32->02->03->04.

[0256] FIG9 is a flow chart of an embodiment. The specific flow in FIG9 includes:

[0257] Step 901: The controller sends an isolation identifier m to node 33;

[0258] The controller monitors the network load and identifies high-load areas. It discovers that some links or ports on both sides of the shortest path 33->03->04 pass through the high-load area, while 33->32->02->03->04 bypasses the high-load area. The controller then allocates 37.5% of the traffic from 33->03->04 to 33->32->02->03->04. The isolation identifier m is the isolation identifier for the path 33->32->02->03->04. For example, the isolation identifier m could be the identifier of node 33.

[0259] Step 902: The controller sends an isolation table to each node.

[0260] The aforementioned nodes include the source node and intermediate nodes on the detour path, namely, node 33, node 32, node 02, and node 03. The aforementioned isolation table may only include the mapping relationship corresponding to the path segment 33->32->02->03, and not include the mapping relationship corresponding to the path segment 03->04. This is because the path segment 03->04 also exists on the shortest path. The shared table in Example 1 includes the mapping relationship corresponding to the shortest path, namely, the mapping relationship 03->04. Therefore, the isolation table may exclude this mapping relationship, and the shared mapping relationship may be used directly.

[0261] Step 903: Node 33 matches the isolation identifier m and the forwarding port corresponding to the address of node 04 in the isolation table;

[0262] In the detour path 33->32->02->03->04, node 04 is the destination node, that is, the destination node of the message that node 33 needs to send, and the address of node 04 is the destination address of the message.

[0263] If the match succeeds in step 903 , step 904 is executed; if the match fails in step 904 , step 905 is executed.

[0264] Step 904: Node 33 sends a message to the forwarding port obtained by the first match.

[0265] The first match mentioned above is the match in step 903. The forwarding port here is the forwarding port of the intermediate node matched in step 903. In the detour path 33->32->02->03->04, the intermediate node after node 33 is node 32, so the forwarding port here is the port of node 32.

[0266] Please refer to Figure 10. Since 37.5% of the traffic from 33->03->04 needs to be shared to 33->32->02->03->04, as shown in message structure 1000 of Figure 10, node 33 needs to encapsulate 37.5% of the messages with the isolation identifier m. In this case, the existing fields in the message header can be reused to encapsulate the isolation identifier m. If the match is successful, node 33 will send these messages to node 32. Accordingly, node 32 receives the messages sent by node 33 carrying the isolation identifier m. As shown in message structure 1010 of Figure 10, 62.5% of the messages sent by node 33 do not need to carry the encapsulation isolation identifier. These messages will be sent to node 03. Accordingly, node 03 receives the messages sent by node 33, which do not carry the isolation identifier.

[0267] Step 905: Node 33 matches the isolation identifier n and the forwarding port corresponding to node 04 in the shared table;

[0268] The shared table here can be pre-sent by the controller to node 33, or it can be independently generated by node 33. The shared table here uses the forwarding table corresponding to the shortest path as an example. Isolation identifier n is the node corresponding to isolation identifier m in the shared table. This identifier is used to identify the shortest path between node 33 and node 04. If the match is successful in step 904, step 906 is executed. If the match is unsuccessful in step 906, step 907 is executed.

[0269] It should be noted that when a controller or node detects that a forwarding port in the network system fails, the forwarding table entry related to the forwarding port can be deleted from the corresponding isolation table or shared table, so that the node cannot match the failed forwarding port.

[0270] Step 906: Node 33 sends a message to the forwarding port corresponding to the intermediate node obtained by the second matching;

[0271] The second match mentioned above is the match in step 906. The forwarding port here is the port of the intermediate node matched in step 906. In the shortest path 33->03->04, the intermediate node after node 33 is node 03, so the forwarding port here is the port of node 03.

[0272] Step 907: discard the message.

[0273] In this embodiment, node 33 does not need to configure ACL commands, nor does it need to use ACL commands to determine the packet transmission path. It does not require the use of ACL technology or high-power TCAM. Therefore, this embodiment implements traffic transmission on a detour path without relying on ACL technology, reducing power consumption during the traffic forwarding process.

[0274] Another embodiment is an example of method 200. This embodiment is an example of a case in which the third node in method 200 is node 02, the first isolation identifier is isolation identifier k, and the first message is an IPv6 message. This embodiment is an example of method 200 being applied to an encapsulation process of an isolation identifier indicating a detour path. This embodiment is an example of method 200 being applied to a centralized system. For example, the shortest path between node 02 and node 03 is 21->02->03. After detecting the load situation, the controller determines that the traffic on this path needs to be transferred to 21->32->33->03.

[0275] FIG11 is a schematic diagram of a process flow of another embodiment. The specific process in FIG11 includes:

[0276] Step 1101: The controller sends an isolation identifier k to node 21;

[0277] It should be noted that the isolation identifier k is used to indicate the path 02->32->33->03. The controller sends the isolation identifier k to node 21 to instruct node 21 to transmit the message according to the path 02->32->33->03.

[0278] Step 1102: Node 21 matches the corresponding forwarding port according to the isolation identifier k;

[0279] Specifically, node 21 can match the corresponding forwarding port using method 100, that is, determine the forwarding port that matches the isolation identifier K and the address of node 03 in the isolation mapping relationship. Since the next node after node 02 is node 32 on the detour path, the port of node 32 will be matched here.

[0280] Step 1103: Node 21 encapsulates the isolation identifier k into the flow label of the first message.

[0281] Specifically, the isolation identifier k can be encapsulated in a blank field in the flow label. The flow label has 21 bits. For example, when the first 4 bits of the 21-bit field are blank, the isolation identifier k can be encapsulated in the 4-bit field.

[0282] Step 1104 : Node 21 sends a first message to the matched forwarding port.

[0283] That is, the first message is sent to the port of the port node of node 32. As described in step 1103, the message carries the isolation identifier k. After receiving the first message, node 32 can extract the isolation identifier k in the message, and then match the next forwarding port according to the isolation identifier k and the address of node 03. At this time, the port of node 33 will be matched, and the first message will be sent to the port. And so on. Finally, the message will be transmitted along the path 02->32->33->03.

[0284] In this embodiment, the function of the flow label is to distinguish traffic, while the function of the first isolation identifier is to mark the detour path of the message, that is, the transmission path of the traffic, which is also an important feature for distinguishing traffic. Therefore, the function of the first isolation identifier is the same as that of the flow label. Encapsulating the first isolation identifier in the flow label does not change the attributes of the flow label. The flow label is a field in the message structure defined in the IPV6 protocol. Therefore, encapsulating the first isolation identifier in the flow label can reuse the existing fields of the message, and the message can be encapsulated without changing the message.

[0285] The above describes the embodiment of the present application from the perspective of the method. The following describes the communication device in the embodiment of the present application from the perspective of specific device implementation.

[0286] Please refer to FIG. 12 , which is a schematic diagram of a communication device 1200 provided in an embodiment of the present application. The communication device 1200 includes at least a processing unit 1201 and a transceiver unit 1202 .

[0287] As an example, the communication device 1200 can implement the function of the second node in the above method 100, and thus can also achieve the beneficial effects of the above method 100.

[0288] Specifically, the processing unit 1201 is used to obtain a first isolation identifier, which is used to indicate a detour path to one or more destination addresses; the transceiver unit 1202 is used to send a first message through a first path according to the first isolation identifier and the first destination address, the first destination address is the destination address of the first message, and the first path is related to the first isolation identifier and the first destination address.

[0289] In a possible implementation, when the one or more destination addresses include the first destination address, the first path is a path in the detour path that reaches the first destination address.

[0290] In one possible implementation, the first path is a detour path that matches the first isolation identifier and the first destination address in the isolation mapping relationship. The isolation mapping relationship includes a correspondence between multiple isolation identifiers and multiple first mapping relationships, and the first mapping relationship includes a correspondence between multiple destination addresses and multiple detour paths.

[0291] In a possible implementation, the transceiver unit 1202 is further configured to: receive the isolation mapping relationship sent by the first node.

[0292] In a possible implementation, when there is no detour path matching the first isolation identifier or the first destination address in the isolation mapping relationship, the first path is the shortest path to the first destination address.

[0293] In a possible implementation, when the one or more destination addresses do not include the first destination address, the first path is the shortest path to the first destination address.

[0294] In a possible implementation, the shortest path is obtained by matching the first destination address in a shared mapping relationship.

[0295] In a possible implementation, the transceiver unit 1202 is further configured to: receive the shared mapping relationship sent by the first node.

[0296] In a possible implementation, the first isolation identifier includes: an identifier of the detour path, and the identifier of the detour path includes: an identifier of a source node.

[0297] In a possible implementation, the transceiver unit 1202 is further configured to receive the first isolation identifier sent by the first node.

[0298] In a possible implementation, the first message encapsulates the first number of first isolation identifiers, and the first number is different from the number of intermediate nodes in the detour path.

[0299] In a possible implementation, the first isolation identifier is encapsulated into the first message by the source node.

[0300] In a possible implementation, the first isolation identifier is encapsulated in a message header of the first message.

[0301] In a possible implementation, when the first message is an IPv6 message, the first isolation identifier is encapsulated in a flow label of the first message.

[0302] As another example, the communication device 1200 can implement the function of the first node in the above method 100, and thus can also achieve the beneficial effects of the above method 100.

[0303] Specifically, the processing unit 1201 is used to determine a detour path for message transmission of the second node, wherein the message reaches one or more destination addresses through the detour path; determine a first isolation identifier for indicating the detour path; and the transceiver unit 1202 is used to send the first isolation identifier to the first node.

[0304] In one possible implementation, the processing unit 1201 is further configured to: formulate an isolation mapping relationship, and call the transceiver unit 1202 to send the isolation mapping relationship to the first node. The isolation mapping relationship includes a correspondence between multiple isolation identifiers and multiple first mapping relationships, and the first mapping relationship includes a correspondence between multiple destination addresses and multiple detour paths.

[0305] In one possible implementation, a second node needs to establish communication with a destination node. The first node determines the shortest path between the second node and the destination node. The processing unit 1201 is configured to specify a shared mapping relationship based on the shortest path and invoke the transceiver unit 1202 to send the shared mapping relationship to the first node. The shared mapping relationship includes a correspondence between the shortest path and a destination address, where the destination address is the address of the destination node.

[0306] As another example, the communication device 1200 can implement the function of the third node in the above method 200, and thus can also achieve the beneficial effects of the above method 200.

[0307] Specifically, the processing unit 1201 is used to obtain a first isolation identifier; the transceiver unit 1202 is used to send a first message according to the first isolation identifier, the first message encapsulates the first isolation identifier, and the number of the first isolation identifiers encapsulated in the first message is fixed.

[0308] In one possible implementation, the first isolation identifier is used to indicate a detour path to one or more destination addresses, and the transceiver unit 1202 is also used to: send a first message through a first path according to the first isolation identifier and the first destination address, the first destination address is the destination address of the first message, and the first path is related to the first isolation identifier and the first destination address.

[0309] In a possible implementation, the first isolation identifier is encapsulated into the first message by the source node.

[0310] In a possible implementation, the first isolation identifier is encapsulated in a message header of the first message.

[0311] In a possible implementation, when the first message is an IPv6 message, the first isolation identifier is encapsulated in a flow label of the first message.

[0312] It should be noted that, for details of the information execution process of the units of the above-mentioned communication device 1200, please refer to the description in the method embodiment shown above in this application, and will not be repeated here.

[0313] Please refer to Figure 13, which is a structural diagram of the communication device involved in the above-mentioned embodiments provided in an embodiment of the present application, wherein the communication device can specifically be the first node, the second node or the third node in the above-mentioned embodiments, and the structure of the communication device can refer to the structure shown in Figure 13.

[0314] The communication device includes at least one processor 1301, at least one memory 1302, at least one transceiver 1303, and one or more antennas 1304. Processor 1301, memory 1302, and transceiver 1303 are connected, for example, via a bus. In the embodiment of the present application, this connection may include various interfaces, transmission lines, or buses, and is not limited in this embodiment. Antenna 1304 is connected to transceiver 1303.

[0315] As an implementation example, when the communication device shown in Figure 13 is the second node in the aforementioned Figure 3 and related embodiments, the processor 1301 is used to obtain a first isolation identifier, which is used to indicate a detour path to one or more destination addresses; the transceiver 1303 is used to send a first message through a first path according to the first isolation identifier and the first destination address, the first destination address is the destination address of the first message, and the first path is related to the first isolation identifier and the first destination address.

[0316] As an implementation example, when the communication device shown in Figure 13 is the first node in the aforementioned Figure 3 and related embodiments, the processor 1301 is used to determine a detour path for message transmission of the second node, wherein the message reaches one or more destination addresses through the detour path; determine a first isolation identifier for indicating the detour path; and the transceiver 1303 is used to send the first isolation identifier to the first node.

[0317] As an implementation example, when the communication device shown in Figure 13 is the third node in Figure 7 and related embodiments, the processor 1301 is used to obtain a first isolation identifier; the transceiver 1303 is used to send a first message according to the first isolation identifier, and the first message encapsulates the first isolation identifier, and the number of the first isolation identifiers encapsulated in the first message is fixed.

[0318] It should be noted that the execution process of each device in the communication device shown in Figure 13 and other contents can be specifically referred to the description in the method embodiment shown above in this application, and will not be repeated here.

[0319] Processor 1301 is primarily used to process communication protocols and communication data, as well as control the entire communication device, execute software programs, and process software program data, for example, to support the communication device in performing the actions described in the embodiments. The communication device may include a baseband processor and a central processing unit. The baseband processor is primarily used to process communication protocols and communication data, while the central processing unit is primarily used to control the entire first, second, or third node, execute software programs, and process software program data. Processor 1301 in Figure 13 may integrate the functions of a baseband processor and a central processing unit. Those skilled in the art will appreciate that the baseband processor and the central processing unit may also be independent processors interconnected via a bus or other technology. Those skilled in the art will appreciate that the first, second, or third node may include multiple baseband processors to accommodate different network standards, multiple central processing units to enhance their processing capabilities, and various components of the first, second, or third node may be connected via various buses. The baseband processor may also be referred to as a baseband processing circuit or a baseband processing chip. The central processing unit may also be referred to as a central processing circuit or a central processing chip. The function of processing the communication protocol and communication data may be built into the processor, or may be stored in the memory in the form of a software program, and the processor executes the software program to implement the baseband processing function.

[0320] The memory is primarily used to store software programs and data. Memory 1302 can exist independently and be connected to processor 1301. Alternatively, memory 1302 and processor 1301 can be integrated together, for example, within a single chip. Memory 1302 can store program code for executing the technical solutions of the embodiments of the present application, and execution is controlled by processor 1301. The various computer program codes executed can also be considered drivers for processor 1301.

[0321] Figure 13 shows only one memory and one processor. In the actual first node, second node, or third node, there may be multiple processors and multiple memories. The memory may also be referred to as a storage medium or storage device. The memory may be a storage element on the same chip as the processor, i.e., an on-chip storage element, or an independent storage element, which is not limited in the embodiments of the present application.

[0322] The transceiver 1303 can be used to support the reception or transmission of radio frequency signals between the communication device and the terminal, and the transceiver 1303 can be connected to the antenna 1304. The transceiver 1303 includes a transmitter Tx and a receiver Rx. Specifically, one or more antennas 1304 can receive radio frequency signals. The receiver Rx of the transceiver 1303 is used to receive the radio frequency signal from the antenna, convert the radio frequency signal into a digital baseband signal or a digital intermediate frequency signal, and provide the digital baseband signal or digital intermediate frequency signal to the processor 1301 so that the processor 1301 can further process the digital baseband signal or digital intermediate frequency signal, such as demodulation and decoding. In addition, the transmitter Tx in the transceiver 1303 is also used to receive a modulated digital baseband signal or digital intermediate frequency signal from the processor 1301, convert the modulated digital baseband signal or digital intermediate frequency signal into a radio frequency signal, and send the radio frequency signal through one or more antennas 1304. Specifically, the receiver Rx can selectively perform one or more stages of down-mixing and analog-to-digital conversion on the RF signal to obtain a digital baseband signal or a digital intermediate frequency signal. The order of the down-mixing and analog-to-digital conversion processes is adjustable. The transmitter Tx can selectively perform one or more stages of up-mixing and digital-to-analog conversion on the modulated digital baseband signal or digital intermediate frequency signal to obtain a RF signal. The order of the up-mixing and digital-to-analog conversion processes is adjustable. The digital baseband signal and the digital intermediate frequency signal may be collectively referred to as digital signals.

[0323] A transceiver may also be referred to as a transceiver unit, a transceiver, a transceiver device, etc. Alternatively, a device in a transceiver unit that implements a receiving function may be referred to as a receiving unit, and a device in a transceiver unit that implements a transmitting function may be referred to as a transmitting unit. That is, a transceiver unit includes a receiving unit and a transmitting unit. A receiving unit may also be referred to as a receiver, an input port, a receiving circuit, etc., and a transmitting unit may be referred to as a transmitter, a transmitter, or a transmitting circuit, etc.

[0324] It should be noted that the communication device shown in Figure 13 can be specifically used to implement the steps implemented by the first node, the second node or the third node in any of the aforementioned method embodiments, and to achieve the technical effects corresponding to the first node, the second node or the third node. The specific implementation method of the communication device shown in Figure 13 can refer to the description in any of the aforementioned method embodiments, and will not be repeated here one by one.

[0325] An embodiment of the present application also provides a computer-readable storage medium storing one or more computer-executable instructions. When the computer-executable instructions are executed by a processor, the processor executes the method described in the possible implementation of the communication device in the aforementioned embodiment, wherein the communication device can specifically be the first node, the second node or the third node in the aforementioned embodiment.

[0326] An embodiment of the present application also provides a computer program product (or computer program) storing one or more computers. When the computer program product is executed by the processor, the processor executes the method of the possible implementation of the above-mentioned communication device, wherein the communication device can specifically be the first node, the second node or the third node in the aforementioned embodiment.

[0327] The present application also provides a chip system, which includes a processor for supporting a communication device to implement the functions involved in the possible implementation of the communication device. In one possible design, the chip system may also include a memory for storing program instructions and data necessary for the communication device. The chip system may be composed of a chip or may include a chip and other discrete devices, wherein the communication device may specifically be the first node, the second node, or the third node in the aforementioned embodiment.

[0328] Optionally, the chip system may include: an application-specific integrated circuit ASIC (application-specific integrated circuit) or a general-purpose processor, the ASIC including: a network switching chip and a router chip; specifically, the functional module in the first node or the second node for sensing the topology, determining the detour path, and formulating the isolation identifier, etc., is called a management and control plane module, which is usually implemented by a general-purpose processor; the general-purpose processor usually corresponds to a server; the functional module in the second node or the third node for sending the first message, etc., and the functional module in the first node for sending the first isolation identifier, etc., are called dedicated forwarding functional modules, which are usually implemented by ASIC, and the device form corresponding to the above-mentioned ASIC is usually a network device such as a switch or a router; in addition to using ASIC to implement the dedicated forwarding functional module, these network devices can use an independent general-purpose processor to load the ASIC's running files, configure the ASIC's registers, read the ASIC's registers, etc.; in some cases, the general-purpose processor core is combined with the ASIC into a chip, so that the network device does not include an additional general-purpose processor.

[0329] An embodiment of the present application further provides a communication system, the communication system including the above-mentioned first node and the above-mentioned second node, or the communication system including: the above-mentioned second node, the second node including: a processor, the processor being configured to obtain an isolation mapping relationship; obtain a shared mapping relationship; obtain a first isolation identifier;

[0330] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0331] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0332] In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit 1201, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The above-mentioned integrated units may be implemented in the form of hardware or software functional units.

[0333] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the part that essentially contributes to the technical solution of the present application or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a first node, a second node or a third node, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0334] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A message sending method, characterized in that: The method comprises: Obtaining a first isolation identifier, where the first isolation identifier is used to indicate a detour path to one or more destination addresses; A first message is sent through a first path according to the first isolation identifier and a first destination address, where the first destination address is a destination address of the first message, and the first path is related to the first isolation identifier and the first destination address.

2. The message sending method according to claim 1, wherein: When the one or more destination addresses include the first destination address, the first path is a path in the detour path that reaches the first destination address.

3. The message sending method according to claim 2, wherein: The first path is a detour path that matches the first isolation identifier and the first destination address in the isolation mapping relationship. The isolation mapping relationship includes a correspondence between multiple isolation identifiers and multiple first mapping relationships. The first mapping relationship includes a correspondence between multiple destination addresses and multiple detour paths.

4. The message sending method according to claim 3, wherein: Before sending the first message through the first path according to the first isolation identifier and the first destination address, the method further includes: Receive the isolation mapping relationship sent by the first node.

5. The message sending method according to claim 4, characterized in that: When there is no detour path matching the first isolation identifier or the first destination address in the isolation mapping relationship, the first path is the shortest path to the first destination address.

6. The message sending method according to claim 1, wherein: When the one or more destination addresses do not include the first destination address, the first path is the shortest path to the first destination address.

7. The message sending method according to claim 5 or 6, characterized in that: The shortest path is obtained by matching the first destination address in the shared mapping relationship.

8. The message sending method according to claim 7, characterized in that: Before sending the first message through the first path according to the first isolation identifier and the first destination address, the method further includes: Receive the shared mapping relationship sent by the first node.

9. The message sending method according to any one of claims 1 to 8, characterized in that: The first isolation identifier includes: an identifier of the detour path, and the identifier of the detour path includes: an identifier of a source node.

10. The message sending method according to any one of claims 1 to 9, characterized in that: Applied to the source node, obtaining the first isolation identifier includes: Receive the first isolation identifier sent by the first node.

11. The message sending method according to any one of claims 1 to 10, characterized in that: The first message encapsulates a first number of first isolation identifiers, and the first number is different from the number of intermediate nodes in the detour path.

12. The message sending method according to claim 11, characterized in that: The first isolation identifier is encapsulated into the first message by the source node.

13. The message sending method according to claim 11 or 12, characterized in that: The first isolation identifier is encapsulated in the message header of the first message.

14. The message sending method according to claim 13, wherein: When the first message is an IPv6 message, the first isolation identifier is encapsulated in the flow label of the first message.

15. A label packaging method, characterized in that: The method comprises: Obtain a first isolation identifier; A first message is sent according to the first isolation identifier, where a first number of first isolation identifiers is encapsulated in the first message, and the first number is different from the number of intermediate nodes of the detour path.

16. The marking packaging method according to claim 15, characterized in that: The first isolation identifier is used to indicate a detour path to one or more destination addresses, and the sending of the first message according to the first isolation identifier includes: The first message is sent through a first path according to the first isolation identifier and a first destination address, where the first destination address is a destination address of the first message, and the first path is related to the first isolation identifier and the first destination address.

17. The marking packaging method according to claim 16, characterized in that: The first isolation identifier is encapsulated into the first message by the source node.

18. The marking packaging method according to any one of claims 15 to 17, characterized in that: The first isolation identifier is encapsulated in a field defined in the protocol in the message header of the first message.

19. The marking packaging method according to claim 18, characterized in that: When the first message is an IPv6 message, the first isolation identifier is encapsulated in the flow label of the first message.

20. A communication system comprising a first node and a second node, characterized in that: The first node is used to obtain the isolation mapping relationship and send the isolation mapping relationship to the second node; The first node is configured to obtain a shared mapping relationship and send the shared mapping relationship to the second node; The first node is configured to obtain a first isolation identifier and send the first isolation identifier to the second node; The second node is used to execute any one of the methods 1 to 19 above.

21. A communication system, comprising a first node, the first node comprising: A processor, characterized in that: The processor is used to obtain an isolation mapping relationship; The processor is used to obtain a shared mapping relationship; The processor is configured to obtain a first isolation identifier; The first node is used to execute any one of the methods 1 to 3, 5 to 7, 9, and 11 to 19 above.

22. A communication device, characterized in that: include: Communication interface and processor; The communication interface and the processor perform the method according to any one of claims 1 to 19.

23. A communication device, characterized in that: include: A transceiver unit, configured to perform the transceiver operation in the method according to any one of claims 1 to 19; A processing unit, configured to perform operations other than the sending and receiving operations in the method according to any one of claims 1 to 19.

24. A computer-readable storage medium, characterized in that The medium stores instructions, and when the instructions are executed by a processor, the method according to any one of claims 1 to 19 is implemented.

25. A computer program product, characterized in that The method comprises instructions which, when executed on a processor, execute the method according to any one of claims 1 to 19.

26. A chip, characterized in that: The system comprises at least one processing unit and an interface circuit, wherein the interface circuit is used to provide program instructions or data to the at least one processing unit, and the at least one processing unit is used to execute the program instructions to implement the method according to any one of claims 1 to 19.

Citation Information

Patent Citations

  • Routing method and equipment based on load balancing

    CN105634973A

  • Message transmission method and switch

    CN108234320A

  • Method and device for acquiring information of forwarding path of data packet in segment routing

    CN110708243A

  • Path congestion notification

    US20220294737A1

  • IPV6 message encapsulation processing method and apparatus

    WO2017016254A1