Message forwarding method, device, equipment, medium and program product

By creating forwarding messages at the starting node and adjusting information according to the plane domain header adjustment method, the problem of high pressure on edge nodes when SRv6 and MPLS coexist is solved, efficient forwarding across plane domains is achieved, and the computational burden on edge nodes is reduced.

CN117041142BActive Publication Date: 2025-10-03CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310914693.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-24
Publication Date
2025-10-03
Estimated Expiration
2043-07-24

AI Technical Summary

Technical Problem

In Segment Routing (SR) technology, cross-domain forwarding places heavy pressure on edge nodes, especially when SRv6 and MPLS domains coexist. Edge nodes need to maintain mapping table entries, which results in heavy computational pressure.

Method used

By creating a forwarding message at the starting node and encapsulating it according to the message content and the labels of each node, it is ensured that the label of each node matches the segment identifier of the plane domain to which it belongs. At the edge node, information is adjusted according to the header adjustment method of the plane domain to which it belongs, avoiding label mapping and maintenance at the edge node.

Benefits of technology

It reduces the computing pressure on edge nodes, improves the speed and efficiency of the message forwarding process, supports cross-plane domain forwarding, and reduces the maintenance pressure on edge nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117041142B_ABST
    Figure CN117041142B_ABST
Patent Text Reader

Abstract

The present application relates to a message forwarding method, apparatus, equipment, medium and program product, and relates to the field of communication technology. The method comprises: in response to a message forwarding instruction, obtaining the message content of the message, the label of each node in the message forwarding path, then creating a forwarding message of the message according to the message content and the label of each node, and forwarding the message based on the forwarding message. Among them, each node in the message forwarding path is distributed in at least two plane domains, and the label of each node matches the segment identifier of the plane domain to which it belongs, and is used for the edge node in each node to adjust the header information of the received forwarded message according to the header adjustment method of the plane domain to which it belongs. The use of this method can reduce the pressure on the edge nodes of each plane domain to a certain extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a message forwarding method, apparatus, device, medium and program product. Background Art

[0002] With the development of communication technology and the popularization of Segment Routing (SR) technology based on Internet Protocol Version 6 (IPv6), scenarios have emerged where the Segment Routing IPv6 (SRv6) plane domain based on the IPv6 forwarding plane and the Multi-Protocol Label Switching (MPLS) plane domain coexist. In this case, packets usually need to be forwarded across the plane domains.

[0003] In related technologies, when a message is forwarded across control plane domains, it needs to pass through nodes in each plane domain so that the message reaches a destination node.

[0004] However, in the related art, when messages are forwarded across plane domains, there is a problem of high pressure on edge nodes of each plane domain. Summary of the Invention

[0005] Based on this, it is necessary to provide a message forwarding method, device, equipment, medium and program product to address the above technical problems and reduce the pressure on edge nodes.

[0006] In a first aspect, an embodiment of the present application provides a message forwarding method, applied to a starting node in a message forwarding path, the method comprising:

[0007] In response to a message forwarding instruction, obtain message content of the message and labels of each node in a message forwarding path; each node in the message forwarding path is distributed in at least two plane domains;

[0008] A forwarding message is created based on the message content and the labels of each node. The label of each node is matched with the segment identifier of the plane domain to which it belongs. The edge node in each node adjusts the header information of the received forwarding message according to the header adjustment method of the plane domain to which it belongs.

[0009] Forwards messages based on forwarding messages.

[0010] In one embodiment, creating a forwarding message for the message based on the message content and the labels of each node includes:

[0011] Get the plane domain of the starting node;

[0012] When the plane domain of the starting node is a segment routing SRv6 plane domain based on Internet Protocol version 6, the message content and the labels of each node are encapsulated according to the routing extension header format of the SRv6 plane domain to obtain a forwarding message of the message;

[0013] When the plane domain of the starting node is a multi-protocol label switching MPLS plane domain, the message content and the labels of each node are encapsulated according to the MPLS label header format and routing extension header format of the MPLS plane domain to obtain a forwarding message of the message.

[0014] In one embodiment, the message content and the labels of each node are encapsulated according to the routing extension header format of the SRv6 plane domain to obtain a forwarding message of the message, including:

[0015] According to the labels of the nodes, a first node belonging to the SRv6 plane domain and a second node belonging to the MPLS plane domain are obtained;

[0016] Obtain a first label list according to the label of the first node and the label of the second node;

[0017] The first label list and the message content are encapsulated according to the routing extension header format of the SRv6 plane domain to obtain a forwarding message of the message.

[0018] In one embodiment, obtaining a first label list according to the label of the first node and the label of the second node includes:

[0019] Obtain the order of each node based on the message forwarding path;

[0020] Compressing the label of the second node to obtain a compressed label of the second node;

[0021] The compressed label of the second node is encapsulated with the label of the first node in the order of the nodes to form a first label list.

[0022] In one embodiment, the packet content and the labels of each node are encapsulated according to the MPLS label header format and the routing extension header format of the MPLS plane domain to obtain a forwarding message of the packet, including:

[0023] According to the labels of the nodes and the order of the nodes, obtain the third node belonging to the SRv6 plane domain, the fourth node belonging to the MPLS plane domain and located before the third node, and the fifth node belonging to the MPLS plane domain and located before the third node;

[0024] Obtaining, according to the routing extension header format, a second label list obtained by encapsulating the label of the third node and the label of the fifth node; and obtaining, according to the MPLS label header format, a label stack formed by the label of the fourth node;

[0025] A forwarding message of the message is obtained according to the encapsulated second label list, the label stack, and the message content.

[0026] In one embodiment, obtaining, according to the routing extension header format, a second label list obtained by encapsulating the label of the third node and the label of the fifth node includes:

[0027] Compress the label of the fifth node to obtain a compressed label of the fifth node;

[0028] Encapsulate the compressed label of the fifth node and the label of the third node in the order of the nodes to form a second label list;

[0029] The second label list is encapsulated according to the routing extension header format of the SRv6 plane domain to obtain an encapsulated second label list.

[0030] In one embodiment, obtaining a label stack formed by the label of the fourth node according to the MPLS label header format includes:

[0031] Sort the labels of the fourth node according to the order of each node;

[0032] The sorted label of the fourth node is encapsulated according to the MPLS label header format to obtain a label stack.

[0033] In one embodiment, for any node, if the node is an edge node of the SRv6 plane domain, the edge node adjusts the header information of the received forwarded message according to the header adjustment method of the SRv6 plane domain.

[0034] In one embodiment, header information of a received forwarded message is adjusted according to a header adjustment method of the SRv6 plane domain, including: parsing label information belonging to a node in the MPLS plane domain in the received forwarded message and copying the information to the header, and updating the label of the node in the SRv6 plane domain in the header to form a message format of the MPLS plane domain.

[0035] In one embodiment, updating the label of the node in the SRv6 plane domain in the header includes: deleting the label of the node in the SRv6 plane domain in the header; or modifying the destination address of the SRv6 plane domain in the header.

[0036] In one embodiment, for any node, if the node is an edge node of the MPLS plane domain, the edge node adjusts the header information of the received forwarded message according to the header adjustment method of the MPLS plane domain.

[0037] In one embodiment, header information of a received forwarding message is adjusted according to a header adjustment method of an MPLS plane domain, including: stripping label information belonging to a node in the MPLS plane domain from the received forwarding message to form a message format of an SRv6 plane domain.

[0038] In a second aspect, an embodiment of the present application further provides a message forwarding device, the device comprising:

[0039] An instruction response module, configured to obtain, in response to a message forwarding instruction, message content of the message and labels of each node in a message forwarding path; each node in the message forwarding path is distributed in at least two plane domains;

[0040] The message generation module is used to create a forwarding message based on the message content and the labels of each node. The label of each node is matched with the segment identifier of the plane domain to which it belongs. The edge node in each node is used to adjust the header information of the received forwarding message according to the header adjustment method of the plane domain to which it belongs.

[0041] The message forwarding module is used to forward messages based on the forwarding message.

[0042] In a third aspect, embodiments of the present application further provide a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method in any one of the embodiments of the first aspect.

[0043] In a fourth aspect, embodiments of the present application further provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method in any one of the embodiments of the first aspect.

[0044] In a fifth aspect, embodiments of the present application further provide a computer program product, comprising a computer program that, when executed by a processor, implements the steps of the method in any one of the embodiments of the first aspect.

[0045] The above-mentioned message forwarding method, device, equipment, medium and program product, in response to the forwarding instruction of the message, obtains the message content of the message and the label of each node in the message forwarding path, then creates a forwarding message of the message based on the message content and the label of each node, and forwards the message based on the forwarding message. Among them, each node in the message forwarding path is distributed in at least two plane domains, and the label of each node matches the segment identifier of the plane domain to which it belongs, and is used for the edge node in each node to adjust the header information of the received forwarding message according to the header adjustment method of the plane domain to which it belongs. In this method, the forwarding message is created based on the message content and the label of each node in the message forwarding path. Since each node in the message forwarding path is distributed in at least two plane domains, it is equivalent to that the forwarding message will also pass through at least two plane domains to achieve cross-plane forwarding. Based on this, the method is based on forwarding message forwarding, so in the case where the forwarding message is forwarded across planes, the message also supports cross-plane forwarding. Furthermore, the edge nodes of each plane domain adjust the header information of the received forwarded messages according to the header adjustment method to which they belong. This is equivalent to the fact that in the process of forwarding messages, the edge nodes only need to adjust the header information of the received forwarded messages according to the header adjustment method of the plane domain to which they belong, so as to realize cross-plane domain forwarding of messages, thereby avoiding the edge nodes from converting the labels of nodes in different plane domains by maintaining a mapping table, reducing the pressure on the edge nodes, and improving the speed of the entire message forwarding process. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 is a diagram of the internal structure of a computer device in one embodiment;

[0047] Figure 2 Schematic diagram of a flow chart of a message forwarding method in one embodiment;

[0048] Figure 3 Schematic diagram of a flow chart of a message acquisition step in one embodiment;

[0049] Figure 4 Schematic diagram of the message format of the SRv6 plane domain in one embodiment;

[0050] Figure 5 Schematic diagram of a message format in an MPLS plane domain in one embodiment;

[0051] Figure 6 Schematic diagram of the message format of the MPLS plane domain in another embodiment;

[0052] Figure 7 A schematic flow chart of a message acquisition step in another embodiment;

[0053] Figure 8 A flowchart of a tag list acquisition step in one embodiment;

[0054] Figure 9 A schematic flow chart of a message acquisition step in another embodiment;

[0055] Figure 10 A flowchart of a tag list acquisition step in another embodiment;

[0056] Figure 11 A flowchart of a label stack acquisition step in one embodiment;

[0057] Figure 12 A schematic diagram of a message forwarding scenario in an embodiment;

[0058] Figure 13 A schematic diagram of a message forwarding scenario in another embodiment;

[0059] Figure 14 FIG. 4 is a structural block diagram of a message forwarding device in an embodiment. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0061] The message forwarding method provided in the embodiment of the present application can be applied to a computer device. The computer device can be a server, and its internal structure diagram can be as follows: Figure 1 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store message forwarding data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a message forwarding method is implemented.

[0062] Those skilled in the art will understand that Figure 1The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0063] Segment Routing (SR) is an architecture designed based on the source routing concept to forward data packets on the network. It is essentially a processing method that divides the network path into segments (Segments) and assigns segment identifiers (Segment IDs, SIDs) to these segments and forwarding nodes in the network. By arranging the segments and network nodes in an orderly manner (Segment List), the forwarding path of the message is obtained.

[0064] SR technology supports two control plane domains: Multi-Protocol Label Switching (MPLS) and Internet Protocol Version 6 (IPv6). SR based on the MPLS plane is called SR-MPLS (Segment Routing MPLS), and its SID is the MPLS label; SR based on the IPv6 plane is called SRv6, and its SID is the IPv6 address.

[0065] Based on this, in scenarios where SRv6 plane domains and MPLS plane domains coexist, packets usually need to be forwarded across plane domains.

[0066] In related technologies, when a message needs to be forwarded across planes, a mapping table entry is usually maintained at an edge node of each plane, and the message is mapped and converted according to the mapping table entry to achieve cross-plane forwarding of the message.

[0067] However, in related technologies, the edge nodes of each plane domain need to spend a lot of computing power to maintain mapping table entries, which puts a lot of pressure on maintenance. In addition, in most cases, it only supports mapping the MPLS plane domain to the Segment Routing IPv6 Best Effort (SRv6 BE) plane to achieve single-hop forwarding of packets.

[0068] Based on this, the embodiment of the present application takes into account the high maintenance pressure of edge nodes and the limitations of forwarding messages across planes, creates a forwarding message for the message based on the message content and the label of each node, and forwards the message based on the forwarding message. Since each node in the message forwarding path in the embodiment of the present application is distributed in at least two plane domains, it supports forwarding messages from the MPLS plane domain to the Segment Routing IPv6 Traffic Engineering Policy (SRv6 TE), and the label of each node in the embodiment of the present application matches the segment identifier of the plane domain to which it belongs, and the edge node in each node adjusts the header information of the received forwarding message according to the header adjustment method of the plane domain to which it belongs, without the need for edge label mapping and maintenance, which relieves the computing pressure of the edge node to a certain extent.

[0069] It should be noted that the beneficial effects or technical problems solved by the embodiments of the present application are not limited to this one, but may also include other implicit or related problems. For details, please refer to the description of the following embodiments.

[0070] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0071] In one embodiment, Figure 2 As shown, a message forwarding method is provided, which is applied to a starting node in a message forwarding path, and the method includes:

[0072] S201 , in response to a message forwarding instruction, obtain message content of the message and labels of each node in a message forwarding path; each node in the message forwarding path is distributed in at least two plane domains.

[0073] In the embodiment of the present application, the message forwarding process is based on segment routing technology. Specifically, the network path of the message is determined according to the starting node and destination node of the message, and the network path is divided into segments. According to the identification of each node in the network on each segment, a node label is assigned to each node. By arranging the node labels in order, the message forwarding path is obtained.

[0074] Furthermore, each node in the message forwarding path is distributed in at least two plane domains, which means that the message needs to be forwarded from a node in one plane domain to a node in another plane domain, that is, the message is forwarded across planes.

[0075] For example, if some nodes in the packet forwarding path are distributed in the SRv6 plane domain and other nodes are distributed in the MPLS plane domain, then the packet can be forwarded from the SRv6 plane domain to the MPLS plane domain, from the MPLS plane domain to the SRv6 plane domain, from the SRv6 plane domain to the MPLS plane domain and then forwarded back to the SRv6 plane domain, and from the MPLS plane domain to the SRv6 plane domain and then forwarded back to the MPLS plane domain, performing various cross-plane forwarding operations.

[0076] It should be noted that the message forwarding path is determined before the message is forwarded. During the actual forwarding process, the message forwarding path is also encapsulated together with the message content at the starting node for forwarding.

[0077] Optionally, the starting node responds to the forwarding instruction of the message, obtains the message content carried in the forwarding instruction, and determines the message forwarding path and the label of each node in the message forwarding path according to the destination node.

[0078] S202, creating a forwarding message of the message based on the message content and the label of each node; the label of each node matches the segment identifier of the plane domain to which it belongs, so that the edge node in each node adjusts the header information of the received forwarding message according to the header adjustment method of the plane domain to which it belongs.

[0079] When the message content and the label of each node are obtained, the header information of the message is created according to the label of each node, and the header information of the message is superimposed with the message content to obtain a forwarded message.

[0080] It should be noted that the segment identifiers of different plane domains are different, and the methods for adjusting header information based on these segment identifiers are also different. For example, in the MPLS plane domain, the segment identifier of the MPLS plane domain is the MPLS label, and the MPLS label is 32 bits long. The corresponding header adjustment method is: each time the packet hops through the MPLS plane domain, an MPLS label is stripped. However, in the SRv6 plane domain, the segment identifier of the SRv6 plane domain is the IPv6 address, and the IPv6 address is 128 bits long. The corresponding header adjustment method is: each time the packet hops through the SRv6 plane domain, the IPv6 destination address is updated.

[0081] Based on this, in an embodiment of the present application, the label of each node in the message forwarding path is matched with the segment identifier of the plane domain to which each node belongs, so that each node can read the received forwarded message, adjust it according to the header information of the message, update the format of the forwarded message, and perform the next forwarding or receiving processing and other operations.

[0082] It should be noted that, each node may be divided into a starting node, a destination node, and a forwarding node between the starting node and the destination node according to the relative position of the node in the message path information.

[0083] Considering that each node in the packet forwarding path is distributed across at least two plane domains, we can further identify edge nodes from the forwarding nodes based on the nodes' relative positions within their respective plane domains. An edge node is a node that connects one plane domain to another when two plane domains interact.

[0084] Exemplarily, the message forwarding path is node R1 (MPLS plane domain) - node R2 (MPLS plane domain) - node R3 (SRv6 plane domain) - node R4 (SRv6 plane domain) - node R5 (SRv6 plane domain). Then node R1 is the starting node, node R2 is the edge node of the MPLS plane domain, node R3 is the edge node of the SRv6 plane domain, node R4 is the forwarding node of the SRv6 plane domain, and node R5 is the destination node.

[0085] S203: forwarding the message based on the forwarding message.

[0086] Based on the message forwarding path in the forwarded message, the label of the next node of the starting node is obtained, and the next node is determined according to the label of the next node, and the forwarded message is sent to the next node.

[0087] Optionally, the starting node determines the corresponding destination address according to the label list pointed to by the segment pointer in the message forwarding path, and uses the destination address as the address of the next node, thereby determining the next node.

[0088] Optionally, the identifier of the next node on the forwarding path is determined according to the node label in the message forwarding path, and then the next node is determined.

[0089] In an embodiment of the present application, in response to the forwarding instruction of the message, the message content of the message and the label of each node in the message forwarding path are obtained, and then a forwarding message of the message is created according to the message content and the label of each node, and the message is forwarded based on the forwarding message. Among them, each node in the message forwarding path is distributed in at least two plane domains, and the label of each node matches the segment identifier of the plane domain to which it belongs, and the edge node in each node adjusts the header information of the received forwarding message according to the header adjustment method of the plane domain to which it belongs. In this method, the forwarding message is created based on the message content and the label of each node in the message forwarding path. Since each node in the message forwarding path is distributed in at least two plane domains, it is equivalent to that the forwarding message will also pass through at least two plane domains to achieve cross-plane forwarding. Based on this, the method is based on forwarding message forwarding, so in the case where the forwarding message is forwarded across planes, the message also supports cross-plane forwarding. Furthermore, the edge nodes of each plane domain adjust the header information of the received forwarded messages according to the header adjustment method to which they belong. This is equivalent to the fact that in the process of forwarding messages, the edge nodes only need to adjust the header information of the received forwarded messages according to the header adjustment method of the plane domain to which they belong, so as to realize cross-plane domain forwarding of messages, thereby avoiding the edge nodes from converting the labels of nodes in different plane domains by maintaining a mapping table, reducing the pressure on the edge nodes, and improving the speed of the entire message forwarding process.

[0090] During message forwarding, the header information and message content are usually encapsulated to create a forwarding message to ensure that each node in the message forwarding path supports the forwarding message identification, forwarding, etc. Based on this, the following describes the steps of creating a forwarding message through an embodiment.

[0091] In one embodiment, Figure 3 As shown in the figure, a forwarding message is created based on the message content and the labels of each node, including:

[0092] S301, obtaining the plane domain of the starting node.

[0093] The plane domain in the embodiment of the present application refers to a communication plane domain that supports message forwarding of SR technology, such as an SRv6 plane domain based on an IPv6 plane, an SR MPLS plane domain based on an MPLS plane (referred to as MPLS plane domain), etc.

[0094] Each communication plane includes multiple nodes and supports mutual communication. At the same time, a node exists in one communication plane, and the message formats of different plane domains are also different.

[0095] See Figure 4 , Figure 4 This is a diagram of the message format of the SRv6 plane domain standard. Figure 4As can be seen, the SRv6 plane domain message format includes the SRv6 plane domain routing message extension header (IPv6 extension header) and message content. The routing message extension header includes the SRv6 domain node label list (Segment List), and the label list is pushed in reverse order according to the path address. This label list includes the IPv6 address of each SRv6 node. During the actual forwarding process, the labels in the label list do not change. Based on this, the destination address is updated based on the update of the segment pointer. Specifically, each time the message hops to an SRv6 plane domain node, the segment pointer points to the previous IPv6 address in the label list, and uses it as the destination address of the next hop of the message.

[0096] See Figure 5 , taking the MPLS plane domain including two MPLS labels as an example, Figure 5 This is a diagram of the standard message format for the MPLS plane domain. Figure 5 As can be seen, the MPLS plane domain message format includes the MPLS label stack and message content, and the MPLS labels in the label stack are arranged in sequence. During the actual forwarding process, the first MPLS label in the MPLS label stack is stripped off each time the message hops to an MPLS plane domain node.

[0097] Since different plane domains have different message formats, it is necessary to determine the plane domain to which the starting node belongs and encapsulate the message according to the message format of the plane domain to ensure that the forwarded message can be forwarded in the plane domain.

[0098] Optionally, the plane domain to which the start node belongs is determined according to the plane domain identifier of the start node.

[0099] S302: When the plane domain of the starting node is a segment routing SRv6 plane domain based on Internet Protocol version 6, the message content and the label of each node are encapsulated according to the routing extension header format of the SRv6 plane domain to obtain a forwarding message of the message.

[0100] According to the routing extension header format of the SRv6 plane domain, the label of each node is stored in the label list in the form of an IPv6 address, and the message content in the label list domain is encapsulated to obtain the forwarding message of the message.

[0101] Optionally, according to a rule that a label list including labels of each node is placed first and message content is placed last, the label of each node and the message content are aggregated to obtain a forwarding message of the message.

[0102] S303: When the plane domain of the starting node is a Multi-Protocol Label Switching (MPLS) plane domain, encapsulate the message content and the labels of each node according to the MPLS label header format and routing extension header format of the MPLS plane domain to obtain a forwarding message.

[0103] According to the routing extension header format of the SRv6 plane domain, the label of each node is stored in the label list in the form of an IPv6 address, and according to the MPLS label header format of the MPLS plane domain, the label of the node in the MPLS plane domain, the label list including the label of each node, and the message content are encapsulated to obtain a forwarding message of the message.

[0104] See Figure 6 , Figure 6 This is a diagram of the message format of the forwarding message obtained according to the MPLS label header format of the MPLS plane domain and the routing extension header format of the SRv6 plane domain, which is equivalent to integrating the above Figure 4 and Figure 5 Information provided by Figure 6 It can be seen that when the starting node belongs to the MPLS plane domain, the constructed forwarding message includes the MPLS label stack, the SRv6 routing extension header including the label list, and the message content.

[0105] In the process of constructing the forwarding message, the embodiment of the present application takes into account the differences in the message formats supported by different plane domains, and encapsulates the message in a targeted manner according to the message format supported by each plane domain to ensure the forwarding ability of the forwarding message. Furthermore, the encapsulation process of the forwarding message is based on the message content and the label of each node, which is equivalent to the forwarding message including the information of each node in the entire message path, so that the forwarding message determined in this way is complete and comprehensive. In summary, the forwarding message determined in this way can be forwarded across planes and can also be adaptively read in different plane domains. There is no need for each node to perform additional mapping or conversion operations, which greatly reduces the computing pressure of the edge nodes in the control plane.

[0106] As can be seen from the above embodiments, the encapsulation basis of the forwarded message varies depending on the plane domain to which the starting node belongs. Based on this, the following embodiment illustrates the steps for obtaining the forwarded message when the starting node is in an SRv6 plane domain.

[0107] In one embodiment, Figure 7 As shown in the figure, according to the routing extension header format of the SRv6 plane domain, the message content and the label of each node are encapsulated to obtain the forwarding message of the message, including:

[0108] S701 : Acquire a first node belonging to an SRv6 plane domain and a second node belonging to an MPLS plane domain according to a label of each node.

[0109] Based on the label of each node, determine whether the label of each node is an MPLS label or an IPv6 address of the SRv6 plane domain. If the label of the node is an IPv6 address, determine that the node belongs to the SRv6 plane domain, and determine the node corresponding to the SRv6y plane domain as the first node. If the label of the node is an MPLS label, determine that the node belongs to the MPLS plane domain, and determine the node corresponding to the MPLS plane domain as the second node.

[0110] It should be noted that the label of a node in an MPLS plane domain is 32 bits, and the label of a node in an SRv6 plane domain is 128 bits.

[0111] Optionally, the plane domain to which each node belongs is determined based on the length of its label. For any node, if the node label is 128 bits long, the node is determined to be the first node in the SRv6 plane domain; if the node label is 32 bits long, the node is determined to be the second node in the MPLS plane domain.

[0112] S702: Obtain a first label list according to the label of the first node and the label of the second node.

[0113] The first label list includes labels of nodes in the message forwarding path and serves as a forwarding basis for the SRv6 plane domain in the process of forwarding messages. During the message forwarding process, the content of the first label list remains unchanged.

[0114] According to the order of the first node and the second node in the message forwarding path, the first node label and the second node label are sorted to obtain a first label list.

[0115] S703 : Encapsulate the first label list and the message content according to the routing extension header format of the SRv6 plane domain to obtain a forwarding message of the message.

[0116] According to the routing extension header format of the SRv6 plane domain, the first label list is superimposed before the message content to obtain the forwarding message of the message. The format of the forwarding message can be found in the above Figure 4 The message format diagram is shown.

[0117] In an embodiment of the present application, a first label list generated by the label of the first node in the SRv6 plane domain and the label of the second node in the MPLS plane domain is used by nodes in the SRv6 plane domain to adjust headers according to the header adjustment format of the SRv6 plane domain and forward packets, thereby alleviating the computing pressure on edge nodes in the SRv6 plane domain to a certain extent.

[0118] During the process of obtaining the first label list, since the labels of the first node and the second node belong to different plane domains and have different label lengths, it is necessary to unify the labels of the first node and the second node into a label format supported by the SRv6 domain to ensure that the forwarded message includes all node labels, facilitating the nodes in the SRv6 domain to forward according to the first label list. Based on this, the following describes the steps for obtaining the first label list through an embodiment.

[0119] In one embodiment, Figure 8 As shown, according to the label of the first node and the label of the second node, obtaining the first label list includes:

[0120] S801: Obtain the order of each node according to the message forwarding path.

[0121] The order of the forwarding nodes that the message passes through is determined according to the message forwarding path, that is, the order of each node.

[0122] S802: Compress the label of the second node to obtain a compressed label of the second node.

[0123] The label of the second node is an MPLS label of the MPLS plane domain, and each label is 32 bits long. The label of the first node is an IPv6 address of the SRv6 plane domain, and each label is 128 bits long.

[0124] The originating node belongs to an SRv6 domain, meaning the minimum unit for each packet hop is a 128-bit label. To ensure the comprehensiveness and consistency of the label lengths in the first label list, the labels of the second nodes must be compressed. Specifically, the four second node labels (4 x 32 bits) are aggregated into a single 128-bit label. In the compressed second node label, the last four binary digits of the last label are used to record the number of compressed second node labels.

[0125] Optionally, if the second node has 5 labels, in order to ensure that the labels of the second node are all in the first label list, the length of two IPv6 addresses is required (if not full, fill with 0), that is, the last four digits of the compressed label of the second node are 0010, to indicate that the compressed label occupies two SIDs in the segment routing header (SRH).

[0126] S803 : Encapsulate the compressed label of the second node and the label of the first node in the order of the nodes to form a first label list.

[0127] According to the order of each node, the forwarding order of the compressed second node label and the labels of each first node is determined, and then reverse encapsulated to form a first label list.

[0128] In an embodiment of the present application, when the starting node is in the SRv6 plane domain, the label of the first node is compressed, and the compressed label of the second node is encapsulated with the label of the first node in the order of each node to obtain a first label list. This method of creating the first label list is consistent with the actual forwarding path of the message, and to a certain extent improves the forwarding speed of the message in the SRv6 plane domain.

[0129] During message forwarding, the encapsulation of the forwarded message varies depending on the plane domain to which the starting node belongs. The previous embodiment describes the steps for obtaining a forwarded message when the starting node is in an SRv6 plane domain. The following example illustrates the steps for obtaining a forwarded message when the starting node is in an MPLS plane domain.

[0130] In one embodiment, Figure 9 As shown, according to the MPLS label header format and routing extension header format of the MPLS plane domain, the message content and the labels of each node are encapsulated to obtain the message forwarding message, including:

[0131] S901: Acquire, based on the labels of the nodes and the order of the nodes, a third node belonging to the SRv6 plane domain, a fourth node belonging to the MPLS plane domain and located before the third node, and a fifth node belonging to the MPLS plane domain and located before the third node.

[0132] When the plane domain to which the starting node belongs is the MPLS plane domain, and the message needs to pass through nodes in the MPLS plane domain and the SRv6 plane domain in sequence to reach the target node in the MPLS plane domain, the node in the SRv6 plane domain is determined as the third node, the node in the MPLS plane domain before the third node is determined as the fourth node, and the node in the MPLS plane domain after the third node is determined as the fifth node based on the labels and order of the nodes.

[0133] It should be emphasized that the third node, the fourth node, and the fifth node are three node types determined according to the plane domain to which the node belongs and the forwarding order, and each type may include one or more nodes.

[0134] S902: Obtain a second label list encapsulated by the label of the third node and the label of the fifth node according to the routing extension header format; and obtain a label stack formed by the label of the fourth node according to the MPLS label header format.

[0135] According to the node types and forwarding order of the third node, the fourth node and the fifth node, it is determined that the message is forwarded via the path of the fourth node, the third node and the fifth node in sequence.

[0136] The fourth node is in the MPLS plane domain to which the start node belongs, and the MPLS plane domain forwards packets based on MPLS labels. Then, the label of the fourth node is integrated according to the MPLS label header format to form a label station.

[0137] The third node and the fifth node are located in a plane domain subsequent to the MPLS plane domain to which the start node belongs. The following describes how to process the label of the third node and the label of the fifth node.

[0138] The third node is in the SRv6 plane domain, and the SRv6 plane domain forwards packets based on the label list. Therefore, the label of the third node needs to be integrated according to the routing extension header format of the SRv6 plane domain to form a label list corresponding to the third node.

[0139] Although the fifth node is in the MPLS domain, it is behind the SRv6 domain. This means that the label for the fifth node must pass through the SRv6 domain before entering the MPLS domain. To ensure that the forwarded message in the SRv6 domain is determined before forwarding, the labels for the fifth node must be consolidated according to the SRv6 domain's routing extension header format to form a label list corresponding to the fifth node.

[0140] Based on the above analysis of the third and fifth nodes, we know that the labels for the third and fifth nodes need to be encapsulated according to the routing extension header format to obtain a second label list. In other words, the second label list includes both the label list corresponding to the third and fifth nodes, and according to the packet forwarding order, the operation of identifying the label for the third node precedes the operation of identifying the label for the fifth node.

[0141] S903: Obtain a forwarding message for the message according to the encapsulated second label list, the label stack, and the message content.

[0142] The above information is encapsulated in the order of the label stack, the encapsulated second label list, and the message content to obtain a forwarding message of the message.

[0143] In an embodiment of the present application, the nodes are divided into three types: the third node, the fourth node, and the fifth node according to the order of the nodes and the labels of the nodes. This is equivalent to encapsulating the label of the fourth node in the MPLS plane domain to which the starting node belongs in each node to obtain a label stack, and obtaining the label of the third node and the label of the fifth node after the MPLS plane domain to which the starting node belongs, and obtaining the encapsulated second label list. The nodes in the MPLS plane domain adjust the header according to the header adjustment format of the MPLS plane domain and forward the message, thereby alleviating the computing pressure of the edge nodes of the SRv6 plane domain to a certain extent.

[0144] As can be seen from the preceding embodiment, the second label list includes the label of the third node and the label of the fifth node after the MPLS plane domain to which the start node belongs, and the second label list is obtained according to the routing extension header format of the SRv6 plane domain. Based on this, the following describes how to obtain the second label list through an embodiment.

[0145] In one embodiment, Figure 10 As shown, according to the routing extension header format, the second label list obtained by encapsulating the label of the third node and the label of the fifth node includes:

[0146] S1001: Compress the label of the fifth node to obtain a compressed label of the fifth node.

[0147] The fifth node is the node that forwards the packet to the MPLS plane domain after it is forwarded by the SRv6 plane domain, when the originating node is the MPLS plane domain. This means that the label of the fifth node is an MPLS label with a length of 32 bits.

[0148] Then, similar to the method of compressing the label of the second node in the aforementioned step S802, the labels of the four fifth nodes are grouped together to form a label with a length of 128 bits, which is stored as a SID in the SRH list in the IPv6 extension header.

[0149] Optionally, if the fifth node has 4 labels, then in order to ensure that the labels of the second node are all in the first label list, an IPv6 address (that is, SID) of length is required to store the label of the fifth node. At the same time, an IPv6 address is also required to represent the number of SIDs occupied by the compressed fifth node label in the SRH. Specifically, the last four bits of the IPv6 address are defined as 0010 to represent that the compressed label occupies two SIDs in the SRH.

[0150] S1002 : Encapsulate the compressed label of the fifth node and the label of the third node in the order of the nodes to form a second label list.

[0151] According to the order of each node, the forwarding order of the forwarded message is determined to pass through the third node first and then the fifth node. Considering the characteristic that the SRv6 plane domain executes in reverse order according to the list, according to the rule that the compressed label of the fifth node comes before the label of the third node, the compressed label of the fifth node and the label of the third node are summarized to form a second label list.

[0152] For example, the compressed label of the fifth node is MPLS-SID, and the label of the third node is C::, then the order of the second label list is: {MPLS-SID, C::}, that is, the forwarded message is forwarded through the node corresponding to the label C:: to the node corresponding to the label MPLS-SID.

[0153] S1003: Encapsulate the second label list according to the routing extension header format of the SRv6 plane domain to obtain an encapsulated second label list.

[0154] The second label list is encapsulated according to the routing header format to obtain an encapsulated second label list.

[0155] In an embodiment of the present application, when the starting node is in an MPLS plane domain, the labels of the nodes in the plane domain after the MPLS plane domain are all encapsulated in the routing extension header format to obtain a second label list. This method of creating the second label list can more comprehensively represent the actual forwarding path of the message, and supports each node in the SRv6 plane domain to parse and read the second label list.

[0156] As can be seen from the above embodiment, the label stack includes the label of the fourth node in the MPLS plane domain to which the start node belongs, and the label stack is obtained according to the MPLS label header format. Based on this, the following describes how to obtain the label stack through an embodiment.

[0157] In one embodiment, Figure 11 As shown, the label stack formed by obtaining the label of the fourth node according to the MPLS label header format includes:

[0158] S1101 , sort the labels of the fourth node according to the order of the nodes.

[0159] The forwarding order of the fourth node is determined according to the order of the nodes in the message forwarding path, and the labels of the fourth node are sorted according to the forwarding order of the fourth node.

[0160] S1102 : Encapsulate the sorted label of the fourth node according to the MPLS label header format to obtain a label stack.

[0161] The MPLS label header format refers to the label sequence format composed of MPLS labels and has a forwarding order. For details, see the above Figure 5 The labels of the fourth node are aggregated in order to obtain a label stack.

[0162] In an embodiment of the present application, the label of the fourth node is encapsulated according to the order of each node and the MPLS label header format to obtain a label stack, so that the fourth node in the MPLS plane domain can quickly locate the next forwarding node according to the label in the label stack, thereby accelerating the forwarding speed of the message in the MPLS plane domain to which the fourth node belongs.

[0163] The above describes an embodiment of the message forwarding process, with the starting node in the message forwarding path as the execution subject. Based on this, the present application also provides corresponding embodiments of the above process, with edge nodes in different plane domains as the execution subject. The following example illustrates the execution actions of edge nodes in an SRv6 plane domain.

[0164] In one embodiment, for any node, if the node is an edge node of the SRv6 plane domain, the edge node adjusts header information of the received forwarded message according to the header adjustment method of the SRv6 plane domain.

[0165] After receiving the forwarding message sent by the previous node, the edge node of the SRv6 plane domain performs the following operations simultaneously: based on the header information of the forwarding message, it determines the outgoing interface, that is, the next forwarding node; obtains the node label of the MPLS plane domain based on the header information and copies it to the header information; determines the number of MPLS labels in the label list based on the header information, and updates the label of the node pointed to by the segment instruction in the header information.

[0166] Optionally, the edge node of the SRv6 plane domain parses the label information of the node in the MPLS plane domain in the received forwarding message and copies it to the header, and updates the label of the node in the SRv6 plane domain in the header to form the message format of the MPLS plane domain.

[0167] The edge node of the SRv6 plane domain determines the number of SIDs occupied by the labels belonging to nodes in the MPLS plane domain based on the specified four bits defined in the SID label. It then removes zeros from the specified number of SIDs in the SID list, using a 32-bit label length, and extracts the MPLS label from the SID. It then copies the MPLS label into the packet header, forming the MPLS plane domain message format. Simultaneously, the segment pointer (SegmentLeft) of the node in the SRv6 plane domain is updated based on the number of SIDs occupied by the MPLS label to update the IPv6 destination address.

[0168] During the actual forwarding process, each time a message hops to a node in the SRv6 plane domain, the label of the node pointed to by the segment instruction in the header information will be updated accordingly. The label of the node in the SRv6 plane domain in the header will also be updated based on the label of the node pointed to by the segment instruction.

[0169] Optionally, the edge node of the SRv6 plane domain updates the label of the node of the SRv6 plane domain in the header, including: deleting the label of the node of the SRv6 plane domain in the header.

[0170] In an MPLS-SRv6-MPLS forwarding scenario, if a packet hops from an edge node in the SRv6 domain to a node in the MPLS domain, this means the hop has completed. Naturally, the SRv6 node label in the packet header is no longer needed. Therefore, the SRv6 node label is removed from the packet header to reduce the storage burden of the packet header.

[0171] Optionally, the edge node of the SRv6 plane domain updates the label of the node of the SRv6 plane domain in the header, including: modifying the destination address of the SRv6 plane domain in the header.

[0172] In the SRv6-MPLS-SRv6 forwarding scenario, if a packet hops from an edge node in the SRv6 domain to a node in the MPLS domain, this means that the hops to the nodes in the SRv6 domain have not yet been completed. Therefore, the edge node in the SRv6 domain modifies the destination address in the SRv6 domain in the packet header to the label of the node in the SRv6 domain following the MPLS domain to ensure packet continuity throughout the entire forwarding process.

[0173] In this embodiment of the present application, the edge nodes of the SRv6 plane domain update the labels of the nodes in the SRv6 plane domain in the header to form the message format of the MPLS plane domain, which can ensure the consistency of the entire message forwarding process. In addition, each edge node only needs to adjust the header according to the plane domain to which it belongs. The edge node does not need to perform label mapping and mapping maintenance operations for different plane domains, which reduces the pressure on the edge node to a certain extent.

[0174] During cross-plane forwarding of packets, forwarding nodes in the SRv6 plane domain and forwarding nodes in the MPLS plane domain are naturally involved. The previous embodiment describes the execution actions of edge nodes in the SRv6 plane domain. The following embodiment describes the execution actions of edge nodes in the MPLS plane domain.

[0175] In one embodiment, for any node, if the node is an edge node of the MPLS plane domain, the edge node adjusts the header information of the received forwarded message according to the header adjustment method of the MPLS plane domain.

[0176] Optionally, label information belonging to nodes in the MPLS plane domain in the received forwarding message is stripped off to form a message format of the SRv6 plane domain.

[0177] Whether in MPLS-SRv6-MPLS or SRv6-MPLS-SRv6 forwarding scenarios, edge nodes within the MPLS domain only need to strip the label corresponding to the edge node from the header according to the MPLS domain's header adjustment method. The resulting header format conforms to the routing extension header format of the SRv6 domain. Nodes supporting the SRv6 domain then forward the received forwarding message. Furthermore, stripping the MPLS label from the label stack reduces the storage capacity of the message header information, significantly accelerating message forwarding.

[0178] In this embodiment of the present application, the MPLS plane domain's edge nodes strip the MPLS plane domain's node labels from the header, forming a message format consistent with the SRv6 plane domain. This ensures consistency throughout the message forwarding process. Furthermore, each edge node only needs to adjust the header according to the plane domain to which it belongs, eliminating the need for edge nodes to perform label mapping and mapping maintenance between different plane domains, which reduces the pressure on edge nodes to a certain extent.

[0179] In one embodiment, Figure 12 As shown in the figure, the packet forwarding process is described by taking the forwarding scenario where the packet passes through MPLS-SRv6-MPLS in sequence as an example.

[0180] Figure 12In the figure, R1 to R8 are nodes on the packet forwarding path, where R1 is a node in the MPLS plane domain and is the starting node in the packet forwarding path; R2 is a node in the MPLS plane domain and is an edge node in the MPLS plane domain, and "MPLS Label 2" is the SID of R2 on the packet forwarding path; R3 is a node in the SRv6 plane domain, "A::" is the SID of R3 on the packet forwarding path; R4 is a node in the SRv6 plane domain, "B::" is the SID of R4 on the packet forwarding path; R5 is a node in the SRv6 plane domain and is an edge node in the SRv6 plane domain, and "C::" is the SID of R5 on the packet forwarding path; R6 is a node in the MPLS plane domain, "MPLS Label 3" is the SID of R6 on the packet forwarding path; R7 is a node in the MPLS plane domain, and "MPLS Label 4" is the SID of R7 on the packet forwarding path; R8 is a node in the MPLS plane domain and is also the destination node.

[0181] R1 encapsulates an MPLS label, MPLS Label 2, and treats the IPv6 SRH header as a regular IPv6 address and encapsulates it with the compressed MPLS label stack. The controller can control the content of the compressed MPLS label stack. The compressed MPLS label stack contains MPLS Label 3 and MPLS Label 4.

[0182] When the packet is forwarded to R2 based on MPLS label 2, R2 removes MPLS label 2 to reveal the IPv6 routing extension header. Based on the IPv6 destination address in the IPv6 routing extension header, R2 determines the outbound interface R3 that matches the destination address and then forwards the packet to R3 in the SRv6 domain.

[0183] The IPv6 destination address received by R2 is the same as the IPv6 destination address in the IPv6 routing extension header of the forwarding message sent by R1. Both are the SID of the first node R3 in the initial SRv6 plane domain, that is, A::.

[0184] The message received by R3 is a normal SRv6 TE message. R3 updates the segment pointer (SL) corresponding to the SRH in the IPv6 routing extension header, determines the SID pointed to by the SL as the new IPv6 destination address, and determines the matching outbound interface R4 based on the new IPv6 destination address. Then, it forwards the message to R4 in the SRv6 domain.

[0185] The message received by R4 is a normal SRv6 TE message. R4 updates the SL corresponding to the SRH in the IPv6 routing extension header, determines the SID pointed to by the SL as the new IPv6 destination address, and determines the matching outbound interface R5 based on the new IPv6 destination address. Then, it forwards the message to R5 in the SRv6 domain.

[0186] After receiving the message, R5 checks that C::1 is the local END.TM SID and performs the operation specified by the END.TM SID: based on the value of the last four bits of the SID being 1, SL=1, the MPLS label stack indicated by SL=0 is copied to the outside of the IPv6 routing extension header, and the trailing 0 is removed to form two MPLS labels. Since the SL value is less than 2, it means that the nodes in the SRv6 plane domain have already jumped, and the label of the node in the SRv6 plane domain in the header is no longer needed. At this time, the label of the node in the SRv6 plane domain in the header is deleted, and the message is forwarded to R6 in the MPLS plane domain according to the outbound interface specified by C::1.

[0187] The message format received by R6 is a common MPLS forwarding message format. It is forwarded according to the MPLS label stack and passed to R8 to complete the message forwarding.

[0188] In the embodiment of the present application, by defining a new functional SID, messages can be interconnected in different plane domains without changing the major forwarding logic, thereby reducing additional control plane changes and eliminating the need to maintain a large number of mapping tables, thereby reducing the maintenance pressure on edge nodes in each plane domain.

[0189] In one embodiment, Figure 13 The following figure illustrates the packet forwarding process in a scenario where packets pass through SRv6, MPLS, and SRv6 in sequence:

[0190] Figure 13In the figure, N1 to N8 are nodes in the packet forwarding path, where N1 is a node in the SRv6 plane domain and is the starting node in the packet forwarding path; N2 is a node in the SRv6 plane domain and is an edge node in the SRv6 plane domain; "B::1" is the SID of N2 in the packet forwarding path; N3 is a node in the MPLS plane domain, "MPLS label 10" is the SID of N3 in the packet forwarding path; N4 is a node in the MPLS plane domain, and "MPLS label 20" is the SID of N4 in the packet forwarding path. The SID on the packet forwarding path is as follows: N5 is a node in the MPLS plane domain and an edge node in the MPLS plane domain. "MPLS label 30" is the SID of N5 on the packet forwarding path. N6 is a node in the SRv6 plane domain. "C::" is the SID of N6 on the packet forwarding path. N7 is a node in the SRv6 plane domain. "D::" is the SID of R7 on the packet forwarding path. N8 is a node in the SRv6 plane domain and is also the destination node. "E::" is the SID of N8 on the packet forwarding path.

[0191] N1 encapsulates the MPLS label stack in an IPv6 SRH header and forwards the packet. The MPLS label stack contains MPLS label 10, MPLS label 20, and MPLS label 30. B::1 in the IPv6 destination address is the END.TM SID on N2. Based on B::1, N1 determines that the next forwarding node is N and forwards the packet to N2.

[0192] After receiving the packet, N2 determines that B::1 is the local END.TM SID and reads the last four bits of the SID. This confirms that the MPLS label stack occupies a SID. N2 then updates the IPv6 destination address and copies the SID with SL=4 outside the IP header, which is the MPLS label in the label stack. The trailing zero is removed, resulting in three MPLS labels. N2 also changes the SL value to 2 and copies the SID label pointed to by SL=2 into the IPv6 DA. N2 then forwards the packet to N3 in the MPLS domain using the outbound interface specified by B::1.

[0193] After receiving the message, N3 forwards it to N4 based on the MPLS label guidance.

[0194] After receiving the message, N4 forwards it to N5 based on the MPLS label guidance.

[0195] After receiving the packet, N5 removes the last MPLS label and forwards the packet through the outbound interface specified for the label to N6 in the SRv6 domain.

[0196] The message received by N6 is in a standard SRv6 TE forwarding message format. It is forwarded according to the SID list in the SRH and ultimately sent to N8, completing the message forwarding.

[0197] In the embodiment of the present application, by defining a new functional SID, messages can be interconnected in different plane domains without changing the major forwarding logic, thereby reducing additional control plane changes and eliminating the need to maintain a large number of mapping tables, thereby reducing the maintenance pressure on edge nodes in each plane domain.

[0198] In one embodiment, a message forwarding method is provided, which is applied to a starting node in a message forwarding path, and includes the following steps:

[0199] (1) In response to the message forwarding instruction, the message content and the labels of each node in the message forwarding path are obtained.

[0200] Among them, each node in the message forwarding path is distributed in at least two plane domains, and the label of each node matches the segment identifier of the plane domain to which it belongs, so that the edge node in each node adjusts the header information of the received forwarded message according to the header adjustment method of the plane domain to which it belongs.

[0201] (2) Get the plane domain of the starting node.

[0202] (3) When the plane domain of the starting node is a segment routing SRv6 plane domain based on Internet Protocol version 6, a first node belonging to the SRv6 plane domain and a second node belonging to the MPLS plane domain are obtained according to the label of each node.

[0203] (4) Obtain the order of each node based on the message forwarding path.

[0204] (5) Compress the label of the second node to obtain a compressed label of the second node.

[0205] (6) Encapsulate the compressed label of the second node and the label of the first node in the order of each node to form a first label list.

[0206] (7) According to the routing extension header format of the SRv6 plane domain, the first label list and the message content are encapsulated to obtain a forwarding message of the message.

[0207] (8) When the plane domain of the starting node is a multi-protocol label switching (MPLS) plane domain, obtain, based on the labels of the nodes and the order of the nodes, a third node belonging to the SRv6 plane domain, a fourth node belonging to the MPLS plane domain and located before the third node, and a fifth node belonging to the MPLS plane domain and located before the third node.

[0208] (9) Compress the label of the fifth node to obtain a compressed label of the fifth node.

[0209] (10) According to the order of each node, the compressed label of the fifth node is encapsulated with the label of the third node to form a second label list.

[0210] (11) Encapsulate the second label list according to the routing extension header format of the SRv6 plane domain to obtain an encapsulated second label list.

[0211] (12) Sort the labels of the fourth node according to the order of each node.

[0212] (13) Encapsulate the sorted label of the fourth node according to the MPLS label header format to obtain a label stack.

[0213] (14) Obtain a forwarding message of the message according to the encapsulated second label list, label stack and message content.

[0214] (15) Forwarding messages based on the forwarding message.

[0215] During packet forwarding, if the node is an edge node in the SRv6 domain, it parses the label information belonging to the node in the MPLS domain in the received forwarded message and copies it to the header. It also updates the label of the node in the SRv6 domain in the header to form the message format of the MPLS domain.

[0216] The updating of the label of the node in the SRv6 plane domain in the header includes: deleting the label of the node in the SRv6 plane domain in the header; or modifying the destination address of the SRv6 plane domain in the header.

[0217] If the node is an edge node of the MPLS plane domain, the edge node removes the label information belonging to the node in the MPLS plane domain from the received forwarding message to form the message format of the SRv6 plane domain.

[0218] In an embodiment of the present application, in response to the forwarding instruction of the message, the message content of the message and the label of each node in the message forwarding path are obtained, and then a forwarding message of the message is created according to the message content and the label of each node, and the message is forwarded based on the forwarding message. Among them, each node in the message forwarding path is distributed in at least two plane domains, and the label of each node matches the segment identifier of the plane domain to which it belongs, and the edge node in each node adjusts the header information of the received forwarding message according to the header adjustment method of the plane domain to which it belongs. In this method, the forwarding message is created based on the message content and the label of each node in the message forwarding path. Since each node in the message forwarding path is distributed in at least two plane domains, it is equivalent to that the forwarding message will also pass through at least two plane domains to achieve cross-plane forwarding. Based on this, the method is based on forwarding message forwarding, so in the case where the forwarding message is forwarded across planes, the message also supports cross-plane forwarding. Furthermore, the edge nodes of each plane domain adjust the header information of the received forwarded messages according to the header adjustment method to which they belong. This is equivalent to the fact that in the process of forwarding messages, the edge nodes only need to adjust the header information of the received forwarded messages according to the header adjustment method of the plane domain to which they belong, so as to realize cross-plane domain forwarding of messages, thereby avoiding the edge nodes from converting the labels of nodes in different plane domains by maintaining a mapping table, reducing the pressure on the edge nodes, and improving the speed of the entire message forwarding process.

[0219] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0220] Based on the same inventive concept, embodiments of the present application further provide a message forwarding device for implementing the message forwarding method described above. The implementation solution provided by this device is similar to the implementation solution described in the above method. Therefore, the specific limitations of one or more message forwarding device embodiments provided below can be found in the above limitations of the message forwarding method and will not be repeated here.

[0221] In one embodiment, Figure 14As shown, a message forwarding device is provided, including: an instruction response module 1401, a message generation module 1402 and a message forwarding module 1403, wherein:

[0222] The instruction response module 1401 is configured to obtain the message content of the message and the label of each node in the message forwarding path in response to the message forwarding instruction; each node in the message forwarding path is distributed in at least two plane domains;

[0223] Message generation module 1402 is configured to create a forwarding message based on the message content and the labels of each node. The label of each node matches the segment identifier of the plane domain to which it belongs, so that the edge node in each node can adjust the header information of the received forwarding message according to the header adjustment method of the plane domain to which it belongs.

[0224] The message forwarding module 1403 is configured to forward messages based on the forwarding message.

[0225] In one embodiment, the message generation module 1402 includes a plane domain acquisition unit, a first encapsulation unit, and a second encapsulation unit, wherein:

[0226] A plane domain acquisition unit, used for acquiring the plane domain of the starting node;

[0227] A first encapsulation unit is configured to, when the plane domain of the starting node is a segment routing SRv6 plane domain based on Internet Protocol version 6, encapsulate the message content and the label of each node according to the routing extension header format of the SRv6 plane domain to obtain a forwarding message of the message;

[0228] The second encapsulation unit is used to encapsulate the message content and the labels of each node according to the MPLS label header format and routing extension header format of the MPLS plane domain when the plane domain of the starting node is a multi-protocol label switching MPLS plane domain, so as to obtain a forwarding message of the message.

[0229] In one embodiment, the first encapsulation unit includes a first partitioning subunit, a first listing subunit, and a first generating subunit, wherein:

[0230] A first division subunit is configured to obtain, according to the label of each node, a first node belonging to the SRv6 plane domain and a second node belonging to the MPLS plane domain;

[0231] A first list subunit, configured to obtain a first label list according to the label of the first node and the label of the second node;

[0232] The first generating subunit is configured to encapsulate the first label list and the message content according to the routing extension header format of the SRv6 plane domain to obtain a forwarding message of the message.

[0233] In one embodiment, the first list subunit further includes a sequential acquisition subunit, a first compression subunit, and a first acquisition subunit, wherein:

[0234] The sequence acquisition subunit is used to obtain the sequence of each node according to the message forwarding path;

[0235] a first compression subunit, configured to compress the label of the second node to obtain a compressed label of the second node;

[0236] The first acquiring subunit is configured to encapsulate the compressed label of the second node and the label of the first node in the order of the nodes to form a first label list.

[0237] In one embodiment, the second encapsulation unit includes a second partitioning subunit, a second listing subunit, and a second generating subunit, wherein:

[0238] The second partitioning subunit is configured to obtain, based on the labels of the nodes and the order of the nodes, a third node belonging to the SRv6 plane domain, a fourth node belonging to the MPLS plane domain and located before the third node, and a fifth node belonging to the MPLS plane domain and located before the third node;

[0239] The second list subunit is configured to obtain, according to the routing extension header format, a second label list encapsulated by the label of the third node and the label of the fifth node; and obtain, according to the MPLS label header format, a label stack formed by the label of the fourth node;

[0240] The second generating subunit is configured to obtain a forwarding message of the message according to the encapsulated second label list, the label stack and the message content.

[0241] In one embodiment, the second list subunit further includes a second compression subunit, a list forming subunit, and a second acquisition subunit, wherein:

[0242] a second compression subunit, configured to compress the label of the fifth node to obtain a compressed label of the fifth node;

[0243] a list forming subunit, configured to encapsulate the compressed label of the fifth node and the label of the third node in the order of the nodes to form a second label list;

[0244] The second acquiring subunit is configured to encapsulate the second label list according to the routing extension header format of the SRv6 plane domain to obtain the encapsulated second label list.

[0245] In one embodiment, the second list subunit further includes a label sorting subunit and a label stack obtaining subunit, wherein:

[0246] a label sorting subunit, configured to sort the labels of the fourth node according to the order of the nodes;

[0247] The label stack obtaining subunit is configured to encapsulate the sorted labels of the fourth nodes according to the MPLS label header format to obtain a label stack.

[0248] In one embodiment, for any node, if the node is an edge node of the SRv6 plane domain, the edge node adjusts header information of the received forwarded message according to the header adjustment method of the SRv6 plane domain.

[0249] In one embodiment, header information of a received forwarded message is adjusted according to a header adjustment method of the SRv6 plane domain, including: parsing label information belonging to a node in the MPLS plane domain in the received forwarded message and copying the information to the header, and updating the label of the node in the SRv6 plane domain in the header to form a message format of the MPLS plane domain.

[0250] In one embodiment, updating the label of the node in the SRv6 plane domain in the header includes: deleting the label of the node in the SRv6 plane domain in the header; or modifying the destination address of the SRv6 plane domain in the header.

[0251] In one embodiment, for any node, if the node is an edge node of the MPLS plane domain, the edge node adjusts the header information of the received forwarded message according to the header adjustment method of the MPLS plane domain.

[0252] In one embodiment, header information of a received forwarding message is adjusted according to a header adjustment method of an MPLS plane domain, including: stripping label information belonging to a node in the MPLS plane domain from the received forwarding message to form a message format of an SRv6 plane domain.

[0253] Each module in the above-mentioned message forwarding device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0254] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0255] The computer device provided in the above embodiment has an implementation principle and technical effects similar to those of the above method embodiment, and will not be described in detail here.

[0256] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0257] The above embodiment provides a computer-readable storage medium, whose implementation principle and technical effects are similar to those of the above method embodiment, and will not be repeated here.

[0258] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0259] The above embodiment provides a computer program product, whose implementation principle and technical effects are similar to those of the above method embodiment, and will not be repeated here.

[0260] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.

[0261] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.

[0262] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0263] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A message forwarding method, characterized in that: Applied to a starting node in a message forwarding path, the method comprises: In response to a message forwarding instruction, obtain message content of the message and labels of each node in the message forwarding path; each node in the message forwarding path is distributed in at least two plane domains; Creating a forwarding message of the message based on the message content and the labels of each node; matching the label of each node with the segment identifier of the plane domain to which it belongs, so that the edge node among the nodes adjusts the header information of the received forwarding message according to the header adjustment method of the plane domain to which it belongs; the header information adjustment includes: stripping the label information belonging to the node in the MPLS plane domain in the forwarding message; When the starting node is a Multi-Protocol Label Switching (MPLS) plane domain, obtaining, based on the labels of the nodes and the order of the nodes, a third node belonging to a Segment Routing (SRv6) plane domain of Internet Protocol version 6, a fourth node belonging to the MPLS plane domain and located before the third node, and a fifth node belonging to the MPLS plane domain and located after the third node; Compressing the label of the fifth node according to the label length of the third node to obtain a compressed label of the fifth node, and specifying the last four bits of the last label in the compressed label of the fifth node to record the number of labels of the compressed fifth node; encapsulating the compressed label of the fifth node with the label of the third node in the order of each of the nodes to form a second label list, encapsulating the second label list according to the routing extension header format of the SRv6 plane domain to obtain the encapsulated second label list; and obtaining a label stack formed by the label of the fourth node according to the MPLS label header format; Obtaining a forwarding message for the message according to the encapsulated second label list, the label stack, and the message content; The message is forwarded based on the forwarded message.

2. The method according to claim 1, characterized in that The step of creating a forwarding message for the message according to the message content and the labels of each node further includes: In a case where the plane domain of the starting node is based on the SRv6 plane domain, the message content and the labels of each node are encapsulated according to a routing extension header format of the SRv6 plane domain to obtain a forwarding message of the message.

3. The method according to claim 2, characterized in that The encapsulating the message content and the labels of each node according to the routing extension header format of the SRv6 plane domain to obtain a forwarding message of the message includes: Acquire, according to the labels of the nodes, a first node belonging to the SRv6 plane domain and a second node belonging to the MPLS plane domain; Acquire a first label list according to the label of the first node and the label of the second node; The first label list and the message content are encapsulated according to the routing extension header format of the SRv6 plane domain to obtain a forwarding message of the message.

4. The method according to claim 3, characterized in that The acquiring a first label list according to the label of the first node and the label of the second node includes: Obtaining the order of each of the nodes according to the message forwarding path; compressing the label of the second node to obtain a compressed label of the second node; The compressed label of the second node is encapsulated with the label of the first node in the order of the nodes to form the first label list.

5. The method according to claim 1, wherein The acquiring, according to the MPLS label header format, a label stack formed by the label of the fourth node includes: Sort the labels of the fourth node according to the order of the nodes; The sorted labels of the fourth nodes are encapsulated according to the MPLS label header format to obtain the label stack.

6. The method according to any one of claims 1 to 5, characterized in that For any node, if the node is an edge node of the SRv6 plane domain, the edge node adjusts header information of the received forwarded message according to the header adjustment method of the SRv6 plane domain.

7. The method according to claim 6, characterized in that Adjusting the header information of the received forwarded message according to the header adjustment method of the SRv6 plane domain includes: parsing the label information of the node in the MPLS plane domain in the received forwarded message and copying it to the header, and updating the label of the node in the SRv6 plane domain in the header to form a message format of the MPLS plane domain.

8. The method according to claim 7, characterized in that Updating the label of the node in the SRv6 plane domain in the header includes: deleting the label of the node in the SRv6 plane domain in the header; or modifying the destination address of the SRv6 plane domain in the header.

9. The method according to any one of claims 1 to 5, characterized in that For any node, if the node is an edge node of the MPLS plane domain, the edge node adjusts the header information of the received forwarding message according to the header adjustment method of the MPLS plane domain.

10. The method according to claim 9, characterized in that The step of adjusting the header information of the received forwarding message according to the header adjustment mode of the MPLS plane domain includes: stripping the label information of the node in the MPLS plane domain from the received forwarding message to form a message format of the SRv6 plane domain.

11. A message forwarding device, characterized in that: Applied to a starting node in a message forwarding path, the device comprises: an instruction response module, configured to obtain, in response to a message forwarding instruction, message content of the message and labels of each node in the message forwarding path; each node in the message forwarding path is distributed in at least two plane domains; A message generation module is configured to create a forwarding message for the message based on the message content and the labels of each node; the label of each node is matched with the segment identifier of the plane domain to which it belongs, and the edge node among the nodes adjusts the header information of the received forwarding message according to the header adjustment method of the plane domain to which it belongs; the header information adjustment includes: stripping the label information belonging to the node in the MPLS plane domain in the forwarding message; When the starting node is a Multi-Protocol Label Switching (MPLS) plane domain, obtaining, based on the labels of the nodes and the order of the nodes, a third node belonging to a Segment Routing (SRv6) plane domain of Internet Protocol version 6, a fourth node belonging to the MPLS plane domain and located before the third node, and a fifth node belonging to the MPLS plane domain and located after the third node; Compressing the label of the fifth node according to the label length of the third node to obtain a compressed label of the fifth node, and specifying the last four bits of the last label in the compressed label of the fifth node to record the number of labels of the compressed fifth node; encapsulating the compressed label of the fifth node with the label of the third node in the order of each of the nodes to form a second label list, encapsulating the second label list according to the routing extension header format of the SRv6 plane domain to obtain the encapsulated second label list; and obtaining a label stack formed by the label of the fourth node according to the MPLS label header format; Obtaining a forwarding message for the message according to the encapsulated second label list, the label stack, and the message content; A message forwarding module is used to forward the message based on the forwarding message.

12. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 10 are implemented.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.

14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.

Citation Information

Patent Citations

  • Message processing method and device and network equipment

    CN116418739A