Message re-encapsulation method and apparatus, and message sending method and apparatus

By receiving and analyzing IOAM messages, determining the completion status of local protection switching, and re-encapsulating the second IOAM message, solving the problem that the IOAM encapsulation node cannot perceive the forwarding path changes, and realizing IOAM re-encapsulation after forwarding path switching.

WO2025118566A1PCT designated stage expired Publication Date: 2025-06-12ZTE CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/102079
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-06
Filing Date
2024-06-27
Publication Date
2025-06-12

AI Technical Summary

Technical Problem

In a network with IOAM technology deployed, when local protection switching occurs, the IOAM encapsulation node cannot sense that the forwarding path of the data packet has changed, resulting in the inability to change the size of the added IOAM header in time, and the IOAM re-encapsulation after forwarding path switching cannot be realized.

Method used

By receiving the first IOAM message sent by the inlet node or the exit node in the backup path, it is determined whether the local protection switching is completed, and after the determination is completed, the second IOAM message is re-encapsulated so that the data message it carries is consistent with the data message payload in the first IOAM message.

Benefits of technology

This enables the IOAM encapsulation node to sense the forwarding path changes of the data packets after local protection switching, and promptly re-encapsulate the IOAM packets, solving the problem that the IOAM encapsulation node cannot realize IOAM re-encapsulation after forwarding path switching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024102079_12062025_PF_FP_ABST
    Figure CN2024102079_12062025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the embodiments of the present disclosure are a message re-encapsulation method and apparatus, and a message sending method and apparatus. The message re-encapsulation method comprises: receiving a first in situ operations, administration, and maintenance (IOAM) message, which is sent by an ingress node or an egress node in a backup path, wherein the backup path is used for performing fault protection on a protected path; on the basis of the first IOAM message, determining whether local protection switching has been completed; and when it is determined, on the basis of the first IOAM message, that the local protection switching has been completed, re-encapsulating a second IOAM message, wherein the second IOAM message is a message that is sent to a target receiving end, and the payload of a data message carried in the second IOAM message is consistent with the payload of a data message carried in the first IOAM message. Using the technical solution solves the problem of an IOAM encapsulation node being incapable of re-encapsulating an IOAM message in a timely manner caused by the IOAM encapsulation node being incapable of sensing a change in a forwarding path of a data message when local protection switching occurs.
Need to check novelty before this filing date? Find Prior Art

Description

Message repackaging method and device, and message sending method and device

[0001] This disclosure claims priority to the Chinese patent application filed with the China Patent Office on December 6, 2023, with application number 202311682487.1 and invention name “Message repackaging method and device, and message sending method and device”, the entire content of which is incorporated by reference into this disclosure. Technical Field

[0002] The present disclosure relates to the field of communications, and more particularly, to a method and apparatus for repackaging a message, and a method and apparatus for sending a message. Background Art

[0003] The existing technology provides a variety of methods for implementing network fault protection and recovery. Among them, one method is to achieve rapid protection switching by configuring a backup path for a certain forwarding path. This method is also called the local protection switching method. It takes a shorter time to implement protection switching, and the backup path occupies fewer resources.

[0004] However, in a network that has deployed in-situ Operations, Administration, and Maintenance (IOAM) technology, when local protection switching occurs, the encapsulation nodes in the network that has deployed IOAM technology cannot perceive that the forwarding path of the data packet has changed, resulting in the IOAM encapsulation nodes being unable to change the size of the added IOAM header in a timely manner, that is, the IOAM encapsulation nodes are unable to implement IOAM re-encapsulation after the forwarding path is switched.

[0005] To address the above problems, no effective solutions have been proposed in the prior art.

[0006] Summary of the Invention

[0007] The embodiments of the present disclosure provide a method and device for repackaging a message, as well as a method and device for sending a message, so as to at least solve the problem in the related art that when local protection switching occurs, the IOAM encapsulation node is unable to perceive that the forwarding path of the data message has changed, resulting in the IOAM encapsulation node being unable to repack the IOAM message in time.

[0008] According to an embodiment of the present disclosure, a message repackaging method is provided, comprising: receiving a first in-band operation, administration, and maintenance (IOAM) message sent by an ingress node or an egress node in a backup path, wherein the backup path is used to provide fault protection for a protected path; determining whether a local protection switch is completed based on the first IOAM message; and repackaging a second IOAM message when it is determined that the local protection switch is completed based on the first IOAM message, wherein the second IOAM message is a message sent to a target receiving end, and a data message carried by the second IOAM message is consistent with a data message payload carried in the first IOAM message.

[0009] According to another embodiment of the present disclosure, a method for sending a message is provided, which is applied to an ingress node or an egress node, and includes: sending a first in-band operation, administration, and maintenance (IOAM) message to an encapsulation node, so that the encapsulation node determines whether local protection switching is completed based on the first IOAM message when receiving the first IOAM message; and re-encapsulating a second IOAM message when it is determined that the local protection switching is completed based on the first IOAM message, wherein the second IOAM message is a message sent to a target receiving end, and the data message carried by the second IOAM message is consistent with the data message payload carried in the first IOAM message.

[0010] According to another embodiment of the present disclosure, a message re-encapsulation device is provided, which is applied to an encapsulation node, including: a receiving module, configured to receive a first in-band operation, administration, and maintenance IOAM message sent by an ingress node or an egress node in a backup path, wherein the backup path is used to provide fault protection for a protected path; a determination module, configured to determine whether local protection switching is completed based on the first IOAM message; an encapsulation module, configured to re-encapsulate the second IOAM message when it is determined that the local protection switching is completed based on the first IOAM message, wherein the second IOAM message is a message sent to a target receiving end, and the data message carried by the second IOAM message is consistent with the data message payload carried in the first IOAM message.

[0011] According to another embodiment of the present disclosure, a message sending device is provided, which is applied to an ingress node or an egress node, including: a sending module, configured to send a first in-band operation, administration, and maintenance (IOAM) message to an encapsulation node, so that the encapsulation node determines whether local protection switching is completed based on the first IOAM message when receiving the first IOAM message; and re-encapsulates a second IOAM message when it is determined that the local protection switching is completed based on the first IOAM message, wherein the second IOAM message is a message sent to a target receiving end, and the data message carried by the second IOAM message is consistent with the data message payload carried in the first IOAM message.

[0012] According to another embodiment of the present disclosure, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when running.

[0013] According to another embodiment of the present disclosure, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any one of the above method embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The exemplary embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation of the present disclosure. In the drawings:

[0015] FIG1 is a block diagram of the hardware structure of an encapsulation node of a message re-encapsulation method according to an embodiment of the present disclosure;

[0016] FIG2 is a network diagram corresponding to the message repackaging method according to an embodiment of the present disclosure;

[0017] FIG3 is a flow chart of a message repackaging method according to an embodiment of the present disclosure;

[0018] FIG4 is a schematic diagram of the encapsulation format of a data message carrying an IOAM header;

[0019] FIG5 is a schematic diagram (I) of the IOAM data format corresponding to the protected path in an embodiment of the present disclosure;

[0020] FIG6 is a schematic diagram (I) of the IOAM data format corresponding to the backup path in an embodiment of the present disclosure;

[0021] FIG7 is a schematic diagram (II) of the IOAM data format corresponding to the protected path in an embodiment of the present disclosure;

[0022] FIG8 is a schematic diagram (II) of the IOAM data format corresponding to the backup path in an embodiment of the present disclosure;

[0023] FIG9 is a flowchart of a method for sending a message according to an embodiment of the present disclosure;

[0024] FIG10 is a schematic diagram of a message repackaging method according to an embodiment of the present disclosure;

[0025] FIG11 is a schematic diagram of a network forwarding IOAM message process according to an embodiment of the present disclosure;

[0026] FIG12 is a schematic diagram of a process for forwarding IOAM messages after forwarding path switching according to an embodiment of the present disclosure;

[0027] FIG13 is a structural block diagram of a packet repackaging apparatus according to an embodiment of the present disclosure;

[0028] FIG14 is a structural block diagram of a device for sending a message according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings and in conjunction with the embodiments.

[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0031] The method embodiments provided in the embodiments of the present disclosure can be executed in an encapsulation node or a similar computing device. Taking the operation on the encapsulation node as an example, Figure 1 is a hardware structure block diagram of the encapsulation node of a message re-encapsulation method of the embodiment of the present disclosure. As shown in Figure 1, the encapsulation node may include one or more (only one is shown in Figure 1) processors 102 (the processor 102 may include but is not limited to a microprocessor (Central Processing Unit, MCU) or a programmable logic device (Field Programmable Gate Array, FPGA) and a memory 104 for storing data, wherein the above-mentioned encapsulation node may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that the structure shown in Figure 1 is only for illustration, and it does not limit the structure of the above-mentioned encapsulation node. For example, the encapsulation node may also include more or fewer components than those shown in Figure 1, or have a configuration different from that shown in Figure 1.

[0032] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the message repackaging method in the embodiment of the present disclosure. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories can be connected to the encapsulation node via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0033] The transmission device 106 is configured to receive or transmit data via a network. A specific example of the aforementioned network may include a wired network provided by the communication provider of the encapsulated node. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a wired connection for communication.

[0034] The embodiment of the present disclosure can run on the network diagram shown in Figure 2. As shown in Figure 2, the network is configured with a local protection switching strategy. As shown in Figure 2, a section of the end-to-end forwarding path from the entry node to the exit node is a protected forwarding path, that is, the forwarding path "backup path entry node-forwarding node 1-forwarding node 2-backup path exit node". A corresponding backup path is configured for the protected forwarding path, that is, the backup path "backup path entry node-backup path forwarding node 1-backup path forwarding node 2-backup path forwarding node 3-backup path forwarding node 4-backup path exit node", wherein the backup path is used to provide fault protection for the protected forwarding path, that is, when the protected forwarding path fails, the data packets forwarded by the protected forwarding path will be automatically switched to the backup path for forwarding.

[0035] In this embodiment, a method for repackaging a message running on an encapsulation node is provided. FIG3 is a flow chart of the method for repackaging a message according to an embodiment of the present disclosure. As shown in FIG3 , the flow chart includes the following steps:

[0036] Step S302: receiving a first in-band operations management and maintenance (IOAM) message sent by an ingress node or an egress node in a backup path, wherein the backup path is used to provide fault protection for the protected path;

[0037] It should be noted that an IOAM message is a data message carrying an IOAM header, wherein the IOAM header is a special message header embedded in the data message for collecting flow detection information by network nodes, as shown in FIG4 , which is a schematic diagram of the encapsulation format of a data message carrying an IOAM header.

[0038] Step S304: determining whether local protection switching is completed according to the first IOAM message;

[0039] Step S306: When it is determined that the local protection switching is completed according to the first IOAM message, the second IOAM message is re-encapsulated, wherein the second IOAM message is a message sent to the target receiving end, and the data message carried by the second IOAM message is consistent with the data message payload carried in the first IOAM message.

[0040] Through the above steps, since the IOAM message sent by the egress node or the ingress node in the backup path in the embodiment of the present disclosure determines whether a local protection switching occurs, in the case of a local protection switching, the second IOAM message sent by the encapsulation node is re-encapsulated, so that after the local protection switching occurs, the IOAM encapsulation node can sense that the forwarding path of the data message has changed and re-encapsulate the IOAM message in time. Therefore, the problem that the IOAM encapsulation node cannot sense that the forwarding path of the data message has changed when the local protection switching occurs, resulting in the IOAM encapsulation node being unable to re-encapsulate the IOAM message in time can be solved, thereby achieving the effect of the IOAM encapsulation node re-encapsulating the IOAM message after the forwarding path is switched.

[0041] The above-mentioned step S306 can be implemented in the following manner: determine whether the first IOAM message sent by the entry node of the backup path is received; in the case of receiving the first IOAM message sent by the entry node of the backup path, perform route tracing to determine the number of first nodes of the forwarding path after the local protection switching is completed, and re-encapsulate the second IOAM message according to the number of the first nodes.

[0042] Optionally, the above-mentioned step S306 can also be implemented in the following manner: determining whether a third IOAM message sent by the egress node of the backup path is received; in the case of receiving the third IOAM message, determining the size relationship between the number of second nodes in the third IOAM message and the number of third nodes in the first IOAM message sent by the egress node, wherein the third IOAM message is a message sent by the egress node before a fault in the protected path is detected; and determining whether to re-encapsulate the second IOAM message based on the size relationship.

[0043] Specifically, when the size relationship indicates that the second node number and the third node number are inconsistent, it is determined to re-encapsulate the second IOAM message; when the size relationship indicates that the second node number and the third node number are consistent, it is prohibited to re-encapsulate the second IOAM message.

[0044] It is understandable that if the first IOAM message is sent by the egress node, the number of nodes is determined by comparing the IOAM header contents before and after the protection switching.

[0045] That is, the encapsulation node determines a new IOAM header by comparing the IOAM headers carried in the IOAM messages sent by the egress node and received before and after the local protection switching occurs, and then determines whether to re-encapsulate the second IOAM message:

[0046] If it is determined that the number of node data contained in the IOAM headers sent by the egress node received before and after the local protection switching occurs is the same, it indicates that the number of nodes along the forwarding path is the same before and after the switching. In this case, there is no need to re-encapsulate the second IOAM message.

[0047] For example, assume that the protected path passes through three nodes (nodes 1, 2, and 3) and the backup path also passes through three nodes (nodes 4, 5, and 6), and the backup path is not a tunnel.

[0048] After comparing the headers of the first and third IOAM messages sent by the egress node and received before and after the local protection switching, the encapsulation node determines that the two messages contain the same amount of node data: the IOAM header received before the local protection switching contains IOAM data for the three nodes corresponding to the protected path (nodes 1, 2, and 3), while the IOAM header received after the local protection switching contains IOAM data for the three nodes corresponding to the backup path (nodes 4, 5, and 6). Therefore, the encapsulation node does not need to perform IOAM re-encapsulation on the second IOAM message.

[0049] Figure 5 is a schematic diagram (I) of the IOAM data format corresponding to the protected path in the embodiment of the present disclosure. As shown in Figure 5, since the protected path passes through three nodes, the IOAM data includes three node data lists, each of which contains node-related information such as the node identifier, IOAM message inbound interface, IOAM message outbound interface, and IOAM message latency.

[0050] Figure 6 is a schematic diagram of the IOAM data format corresponding to the backup path in the embodiment of the present disclosure (I). As shown in Figure 6, since the backup path passes through three nodes, the IOAM data includes three node data lists.

[0051] When it is determined that the amount of node data contained in the IOAM header sent by the egress node received before and after the local protection switching occurs is different, it is determined that the second IOAM message needs to be re-encapsulated. At this time, the encapsulation node will perform IOAM re-encapsulation on the second IOAM message based on the IOAM header received after the local protection switching occurs.

[0052] In an exemplary embodiment, re-encapsulating the second IOAM message includes the following two situations:

[0053] 1) if the size relationship indicates that the number of the second nodes is greater than the number of the third nodes, re-encapsulate the second IOAM message to obtain a fourth IOAM message, wherein the number of node data fields reserved in a header of the fourth IOAM message is greater than the number of node data fields reserved in the header of the second IOAM message;

[0054] 2) When the size relationship indicates that the number of the second nodes is less than the number of the third nodes, re-encapsulate the second IOAM message to obtain a fifth IOAM message, wherein the number of node data fields reserved in the header of the fifth IOAM message is less than the number of node data fields reserved in the header of the second IOAM message.

[0055] For example, for case 1), assume that the protected path passes through two nodes (nodes 1 and 2) and the backup path passes through four nodes (nodes 3, 4, 5, and 6), and the backup path is not a tunnel.

[0056] After comparing the headers of the first and third IOAM messages sent by the egress node before and after the local protection switchover, the encapsulation node determines that the number of node data contained in the two messages differs. Specifically, the header of the third IOAM message contains IOAM data for two nodes (nodes 1 and 2) corresponding to the protected path, while the header of the first IOAM message contains IOAM data for four nodes (nodes 3, 4, 5, and 6) corresponding to the backup path. Therefore, the encapsulation node re-encapsulates the second IOAM message based on the header of the first IOAM message. The re-encapsulated second IOAM message reserves two more node data lists than the previously encapsulated second IOAM message, to accommodate the requirement that the backup path passes through two more nodes than the protected path.

[0057] Figure 7 is a schematic diagram (II) of the IOAM data format corresponding to the protected path in the embodiment of the present disclosure. As shown in Figure 7, since the protected path passes through two nodes, the IOAM data includes two node data lists, each of which contains node-related information such as the node identifier, IOAM message inbound interface, IOAM message outbound interface, and IOAM message latency.

[0058] Figure 8 is a schematic diagram (II) of the IOAM data format corresponding to the backup path in the embodiment of the present disclosure. As shown in Figure 8, since the backup path passes through 4 nodes, the IOAM data includes 4 node data lists.

[0059] For example, in case 2), the protected path of local protection switching passes through two nodes (nodes 1 and 2) and the backup path passes through four nodes (nodes 3, 4, 5, and 6), and the backup path is a tunnel.

[0060] In this embodiment, the backup path is a tunnel, that is, the entry node will add a new outer tunnel encapsulation to the IOAM message entering the backup path. The forwarding node in the backup path forwards the IOAM message based on the outer tunnel encapsulation. The exit node will strip off the outer tunnel encapsulation and restore the original IOAM message. Therefore, in this embodiment, the four nodes (nodes 3, 4, 5, and 6) passed by the backup path will not add any IOAM data to the IOAM message, that is, the IOAM data corresponding to the backup path is 0, and the number of nodes is also 0. Therefore, the second IOAM message after re-encapsulation does not need to reserve a node data list.

[0061] For example, in case 2), the protected path of local protection switching passes through four nodes (nodes 1, 2, 3, and 4), while the backup path passes through two nodes (nodes 5 and 6), and the backup path is not a tunnel.

[0062] After comparing the headers of the first and third IOAM messages sent by the egress node before and after the local protection switchover, the encapsulation node determines that the number of node data contained in the two messages differs. Specifically, the header of the third IOAM message contains IOAM data for four nodes (nodes 1, 2, 3, and 4) corresponding to the protected path, while the header of the first IOAM message contains IOAM data for two nodes (nodes 5 and 6) corresponding to the backup path. Therefore, the encapsulation node re-encapsulates the second IOAM message based on the header of the first IOAM message. The re-encapsulated second IOAM message will have two fewer reserved node data lists than the previously encapsulated second IOAM message.

[0063] In an exemplary embodiment, before receiving the first in-band operation, administration, and maintenance (IOAM) message sent by the egress node in the backup path, the method further includes: setting a loopback indication in the header of the second IOAM message, wherein, when the ingress node or the egress node receives the second IOAM message carrying the loopback indication, the ingress node or the egress node sets identification information indicating whether the local protection switching is completed in the header of the second IOAM message to obtain the first IOAM message.

[0064] In the disclosed embodiment, when the encapsulation node adds an IOAM header to a data message entering the IOAM network domain, it also sets an instruction in the IOAM header to require the ingress node and / or egress node to copy the IOAM message and send it back.

[0065] According to the IOAM header format specified by IETF RFC9197, the IOAM header contains an IOAM options header and IOAM data. The IOAM data contains a series of node data lists, and the IOAM options header contains multiple reserved bits. Instructions can be set in the reserved bits to require the ingress node and / or egress node to copy the IOAM message and send it back.

[0066] Before the local protection switching occurs, the ingress node and / or the egress node copies the second IOAM message and sets the identification information of the ingress node and / or the egress node and an indication that the local protection switching has not occurred in the IOAM header of the second IOAM message to generate a first IOAM message and send it to the encapsulation node. Since the IOAM header contains an IOAM option header and IOAM data, and the IOAM option header contains multiple reserved bits, the ingress node and / or the egress node sets the identification information of the ingress node and / or the egress node and an indication that the local protection switching has not occurred in the reserved bits. It should be noted that before the local protection switching occurs, the ingress node sends the first IOAM message after the ingress node detects that the protected path has failed, while the egress node sends the first IOAM message before the egress node detects that the protected path has failed, because once the egress node detects that the protected path has failed, it is very likely that the egress node will no longer be able to find a suitable route to send the first IOAM message to the encapsulation node.

[0067] After the local protection switching occurs, the ingress node and / or the egress node copies the second IOAM message and sets the identification information of the ingress node and / or the egress node and an indication that the local protection switching has occurred in the IOAM header of the second IOAM message to generate a first IOAM message and send it to the encapsulation node. Because the IOAM header includes an IOAM options header and IOAM data, and the IOAM options header includes multiple reserved bits, the ingress node and / or the egress node sets the identification information of the ingress node and / or the egress node and an indication that the local protection switching has occurred in the reserved bits.

[0068] It should be noted that the ingress node and / or egress node will only copy the IOAM message carrying the above-mentioned indication and send it to the encapsulation node. For the IOAM message that does not carry the above-mentioned indication, the ingress node and / or egress node will not copy it and will not send it to the IOAM encapsulation node. This can greatly reduce the burden on the ingress node and / or egress node.

[0069] In this embodiment, a method for sending a message running on an ingress node or an egress node is provided. FIG9 is a flow chart of the method for sending a message according to an embodiment of the present disclosure. As shown in FIG9 , the flow includes the following steps:

[0070] Step S902: Send a first in-band operation, administration, and maintenance (IOAM) message to the encapsulation node, so that upon receiving the first IOAM message, the encapsulation node determines whether local protection switching is completed based on the first IOAM message; and upon determining that the local protection switching is completed based on the first IOAM message, re-encapsulate a second IOAM message, wherein the second IOAM message is a message sent to a target receiving end, and the data message carried by the second IOAM message is consistent with the data message payload carried in the first IOAM message.

[0071] Through the above steps, since the IOAM message sent by the egress node or the ingress node in the backup path in the embodiment of the present disclosure determines whether a local protection switching occurs, in the case of a local protection switching, the second IOAM message sent by the encapsulation node is re-encapsulated, so that after the local protection switching occurs, the IOAM encapsulation node can sense that the forwarding path of the data message has changed and re-encapsulate the IOAM message in time. Therefore, the problem that the IOAM encapsulation node cannot sense that the forwarding path of the data message has changed when the local protection switching occurs, resulting in the IOAM encapsulation node being unable to re-encapsulate the IOAM message in time can be solved, thereby achieving the effect of the IOAM encapsulation node re-encapsulating the IOAM message after the forwarding path is switched.

[0072] In an exemplary embodiment, sending a first in-band operation, administration, and maintenance (IOAM) message to an encapsulation node includes: receiving a second IOAM message sent by the encapsulation node, and determining whether a loopback indication is set in the second IOAM message; if it is determined that a loopback indication is set in the second IOAM message, determining whether a local protection switching is completed; if the local protection switching is completed, generating a first IOAM message, and sending the first IOAM message to the encapsulation node, wherein the first IOAM message carries identification information for indicating that the local protection switching is completed.

[0073] In an exemplary embodiment, sending a first in-band operation, administration, and maintenance (IOAM) message to an encapsulation node includes: determining whether a protected path has a fault; if the protected path has a fault, generating a first IOAM message and sending the first IOAM message to the encapsulation node, wherein the first IOAM message carries identification information for indicating completion of local protection switching.

[0074] In order to better understand the process of the above-mentioned message repackaging method, the implementation method flow of the above-mentioned message repackaging is described below in combination with an optional embodiment, but it is not used to limit the technical solution of the embodiment of the present disclosure.

[0075] In this embodiment, a method for repackaging a message is provided. FIG10 is a schematic diagram of the method for repackaging a message according to an embodiment of the present disclosure. As shown in FIG10 , the specific steps are as follows:

[0076] Step S1001: before local protection switching occurs, the egress node of the backup path copies the IOAM message sent by the encapsulation node, sets the indication of the egress node of the backup path in the IOAM header, and sends it to the IOAM encapsulation node.

[0077] It should be noted that local protection switching requires configuring a backup path for the protected forwarding path. When the protected forwarding path fails, data packet forwarding will be switched to the backup path. Once the fault on the protected forwarding path is cleared, data packet forwarding will be switched back from the backup path to the protected forwarding path, as shown in Figure 2.

[0078] Figure 11 is a schematic diagram of the network forwarding IOAM message process in an embodiment of the present disclosure. As shown in Figure 11, in the IOAM network domain, the IOAM encapsulation node adds an IOAM header to the data message entering the network. The data message with the IOAM header added is called an IOAM message; the backup path egress node configured with local protection switching copies the IOAM message, sets the indication of the backup path egress node in the IOAM header, and sends it to the IOAM encapsulation node; the IOAM decapsulation node strips the IOAM header from the IOAM message leaving the network and restores the original data message.

[0079] Optionally, when the IOAM encapsulation node adds an IOAM header to the data packet entering the network, it also sets an instruction in the IOAM header requiring the backup path egress node to copy the IOAM message and send it back. Before local protection switching occurs, the backup path egress node will only copy the IOAM message carrying the above instruction and send it to the IOAM encapsulation node. For the IOAM message that does not carry the above instruction, the backup path egress node will not copy it and will not send it to the IOAM encapsulation node, thereby greatly reducing the burden on the backup path egress node.

[0080] Optionally, in addition to the backup path egress node indication, the copied IOAM message sent by the backup path egress node to the IOAM encapsulation node may also include an indication that a protection switching has not occurred. By explicitly indicating that a protection switching has not occurred, the IOAM encapsulation node can be prevented from misjudging whether a protection switching has occurred after receiving the copied IOAM message.

[0081] After receiving the copied IOAM message sent by the backup path egress node, the IOAM encapsulation node saves the IOAM header carried in the IOAM message for use in IOAM re-encapsulation.

[0082] Step S1002: After the local protection switching occurs, the backup path egress node copies the IOAM message, sets the backup path egress node indication and the protection switching completion indication in the IOAM header, and sends it to the IOAM encapsulation node.

[0083] Figure 12 is a schematic diagram of the process of forwarding IOAM messages after the forwarding path is switched in an embodiment of the present disclosure. As shown in Figure 12, after a failure occurs in the protected forwarding path and the forwarding of the IOAM message is switched to the backup path, the backup path egress node copies the IOAM message, sets the indication of the backup path egress node and the indication that the protection switching is completed in the IOAM header, and sends it to the IOAM encapsulation node to notify the IOAM encapsulation node to perform IOAM re-encapsulation.

[0084] In step S1003, the IOAM encapsulation node determines a new IOAM header by comparing the IOAM headers carried in the IOAM messages sent by the backup path egress node and received before and after the local protection switching occurs, and performs IOAM re-encapsulation for the affected data messages.

[0085] If the IOAM encapsulation node compares the IOAM headers sent by the backup path egress node before and after the local protection switching occurs and finds that the number of node data contained in the two is the same, it indicates that the number of nodes along the forwarding path is the same before and after the switching. In this case, there is no need to perform IOAM re-encapsulation.

[0086] If the IOAM encapsulation node compares the IOAM headers sent by the backup path egress node received before and after the local protection switching occurs and finds that the number of node data contained in the two is different, it indicates that IOAM re-encapsulation is required. In this case, the IOAM encapsulation node will perform IOAM re-encapsulation on the data packets entering the IOAM network domain based on the IOAM headers received after the local protection switching occurs.

[0087] After the protected forwarding path recovers from the fault, the forwarding of the IOAM message will be switched back to the backup path. At this time, the backup path egress node will again send an IOAM message carrying a copy of the instruction to the IOAM encapsulation node, notifying the IOAM encapsulation node to perform IOAM re-encapsulation again. After receiving the above notification, the IOAM encapsulation node will again determine the new IOAM header through comparison and complete the IOAM re-encapsulation.

[0088] The present disclosure proposes a method for implementing IOAM re-encapsulation after forwarding path switching, which solves the problem in the prior art that when local protection switching occurs, the IOAM encapsulation node is unable to perceive the change in the forwarding path of the data message, resulting in the IOAM encapsulation node being unable to change the size of the added IOAM header in time, that is, the IOAM encapsulation node is unable to implement IOAM re-encapsulation after forwarding path switching.

[0089] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory (ROM / RAM), a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present disclosure.

[0090] In this embodiment, a message repackaging device and a message sending device are also provided, which are used to implement the above-mentioned embodiments and preferred implementation methods, and the details that have been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and conceivable.

[0091] FIG13 is a structural block diagram of a message repackaging device according to an embodiment of the present disclosure, which is applied to a packaging node. As shown in FIG13 , the device includes:

[0092] A receiving module 1302 is configured to receive a first in-band operations management and maintenance (IOAM) message sent by an ingress node or an egress node in a backup path, wherein the backup path is used to provide fault protection for a protected path;

[0093] Determining module 1304, configured to determine whether local protection switching is completed according to the first IOAM message;

[0094] The encapsulation module 1306 is configured to re-encapsulate the second IOAM message when it is determined that the local protection switching is completed based on the first IOAM message, wherein the second IOAM message is a message sent to the target receiving end, and the data message carried by the second IOAM message is consistent with the data message payload carried in the first IOAM message.

[0095] Through the above-mentioned device, since the IOAM message sent by the egress node or the ingress node in the backup path in the embodiment of the present disclosure determines whether a local protection switching occurs, in the case of a local protection switching, the second IOAM message sent by the encapsulation node is re-encapsulated, so that after the local protection switching occurs, the IOAM encapsulation node can sense that the forwarding path of the data message has changed and re-encapsulate the IOAM message in time. Therefore, it can solve the problem that when the local protection switching occurs, the IOAM encapsulation node cannot sense that the forwarding path of the data message has changed, resulting in the IOAM encapsulation node being unable to re-encapsulate the IOAM message in time, thereby achieving the effect of realizing the IOAM encapsulation node re-encapsulating the IOAM message after the forwarding path is switched.

[0096] In an exemplary embodiment, the encapsulation module 1306 is configured to determine whether the first IOAM message sent by the entry node of the backup path is received; when the first IOAM message sent by the entry node of the backup path is received, perform route tracing to determine the number of first nodes of the forwarding path after the local protection switching is completed, and re-encapsulate the second IOAM message according to the number of the first nodes.

[0097] In an exemplary embodiment, the encapsulation module 1306 is configured to determine whether a third IOAM message sent by the egress node of the backup path is received; upon receiving the third IOAM message, determine a size relationship between the number of second nodes in the third IOAM message and the number of third nodes in the first IOAM message sent by the egress node, wherein the third IOAM message is a message sent by the egress node before a fault in the protected path is detected; and determine whether to re-encapsulate the second IOAM message based on the size relationship.

[0098] In an exemplary embodiment, the encapsulation module 1306 is configured to determine to re-encapsulate the second IOAM message when the size relationship indicates that the second node number and the third node number are inconsistent; and to prohibit re-encapsulation of the second IOAM message when the size relationship indicates that the second node number and the third node number are consistent.

[0099] In an exemplary embodiment, the encapsulation module 1306 is configured to, when the size relationship indicates that the second number of nodes is greater than the third number of nodes, re-encapsulate the second IOAM message to obtain a fourth IOAM message, wherein the number of node data fields reserved in the header of the fourth IOAM message is greater than the number of node data fields reserved in the header of the second IOAM message; and when the size relationship indicates that the second number of nodes is less than the third number of nodes, re-encapsulate the second IOAM message to obtain a fifth IOAM message, wherein the number of node data fields reserved in the header of the fifth IOAM message is less than the number of node data fields reserved in the header of the second IOAM message.

[0100] In an exemplary embodiment, the above-mentioned device also includes: a sending module, configured to set a loopback indication in the header of the second IOAM message, wherein, when the ingress node or the egress node receives the second IOAM message carrying the loopback indication, the ingress node or the egress node sets identification information of whether the local protection switching is completed in the header of the second IOAM message to obtain the first IOAM message.

[0101] FIG14 is a structural block diagram of a message sending device according to an embodiment of the present disclosure, which is applied to an ingress node or an egress node. As shown in FIG14 , the device includes:

[0102] The sending module 1402 is configured to send a first in-band operation, administration, and maintenance (IOAM) message to the encapsulation node, so that the encapsulation node determines whether local protection switching is completed based on the first IOAM message when receiving the first IOAM message; and re-encapsulates the second IOAM message when it is determined that the local protection switching is completed based on the first IOAM message, wherein the second IOAM message is a message sent to the target receiving end, and the data message carried by the second IOAM message is consistent with the data message payload carried in the first IOAM message.

[0103] Through the above-mentioned device, since the IOAM message sent by the egress node or the ingress node in the backup path in the embodiment of the present disclosure determines whether a local protection switching occurs, in the case of a local protection switching, the second IOAM message sent by the encapsulation node is re-encapsulated, so that after the local protection switching occurs, the IOAM encapsulation node can sense that the forwarding path of the data message has changed and re-encapsulate the IOAM message in time. Therefore, it can solve the problem that when the local protection switching occurs, the IOAM encapsulation node cannot sense that the forwarding path of the data message has changed, resulting in the IOAM encapsulation node being unable to re-encapsulate the IOAM message in time, thereby achieving the effect of realizing the IOAM encapsulation node re-encapsulating the IOAM message after the forwarding path is switched.

[0104] In an exemplary embodiment, the sending module 1402 is configured to receive a second IOAM message sent by the encapsulation node and determine whether a loopback indication is set in the second IOAM message; if it is determined that a loopback indication is set in the second IOAM message, determine whether the local protection switching is completed; if the local protection switching is completed, generate a first IOAM message and send the first IOAM message to the encapsulation node, wherein the first IOAM message carries identification information for indicating the completion of the local protection switching.

[0105] In an exemplary embodiment, the sending module 1402 is configured to determine whether a protected path has a fault; if a fault exists in the protected path, generate a first IOAM message and send the first IOAM message to the encapsulation node, wherein the first IOAM message carries identification information for indicating completion of local protection switching.

[0106] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0107] An embodiment of the present disclosure further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when run.

[0108] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0109] An embodiment of the present disclosure further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0110] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0111] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail here.

[0112] Obviously, those skilled in the art should understand that the modules or steps of the present disclosure described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed across a network composed of multiple computing devices, they can be implemented using program code executable by the computing device, and thus, they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be performed in a different order than herein, or they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. Thus, the present disclosure is not limited to any particular combination of hardware and software.

[0113] The foregoing description is merely a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Those skilled in the art will readily appreciate that various modifications and variations of the present disclosure are possible. Any modifications, equivalent substitutions, or improvements made within the principles of the present disclosure shall be included within the scope of protection of the present disclosure.

Claims

1. A message repackaging method, characterized in that: Applicable to package nodes, including: Receiving a first in-band operation management and maintenance (IOAM) message sent by an ingress node or an egress node in a backup path, wherein the backup path is used to perform fault protection on a protected path; determining whether local protection switching is completed according to the first IOAM message; When it is determined that the local protection switching is completed according to the first IOAM message, the second IOAM message is re-encapsulated, wherein the second IOAM message is a message sent to the target receiving end, and the data message carried by the second IOAM message is consistent with the data message payload carried in the first IOAM message.

2. The method according to claim 1, wherein: Re-encapsulating the second IOAM message, including: Determining whether a first IOAM message sent by an ingress node of the backup path is received; In case of receiving the first IOAM message sent by the ingress node of the backup path, performing route tracing to determine the number of first nodes of the forwarding path after the local protection switching is completed; The second IOAM message is repackaged according to the number of the first nodes.

3. The method according to claim 1, wherein: Before repackaging the second IOAM message, the method further includes: Determining whether a third IOAM message sent by the egress node of the backup path is received; When receiving the third IOAM message, determining a size relationship between the number of second nodes in the third IOAM message and the number of third nodes in the first IOAM message sent by the egress node, wherein the third IOAM message is a message sent by the egress node before a fault in the protected path is detected; Determine whether to re-encapsulate the second IOAM message according to the size relationship.

4. The method according to claim 3, wherein: Determining whether to re-encapsulate the second IOAM message according to the size relationship includes: When the size relationship indicates that the number of the second nodes is inconsistent with the number of the third nodes, determining to re-encapsulate the second IOAM message; When the size relationship indicates that the number of the second nodes is consistent with the number of the third nodes, re-encapsulation of the second IOAM message is prohibited.

5. The method according to claim 4, wherein: Re-encapsulating the second IOAM message, including: When the size relationship indicates that the number of the second nodes is greater than the number of the third nodes, and the backup path is not a tunnel path, re-encapsulating the second IOAM message to obtain a fourth IOAM message, wherein the number of node data fields reserved in a header of the fourth IOAM message is greater than the number of node data fields reserved in a header of the second IOAM message; In the case where the size relationship indicates that the number of the second nodes is less than the number of the third nodes, The IOAM message is re-encapsulated to obtain a fifth IOAM message, wherein the number of node data fields reserved in the header of the fifth IOAM message is less than the number of node data fields reserved in the header of the second IOAM message.

6. The method according to claim 1, wherein: Before receiving the first in-band operation, administration and maintenance (IOAM) message sent by the egress node in the backup path, the method further includes: A loopback indication is set in the header of the second IOAM message, wherein, when the ingress node or the egress node receives the second IOAM message carrying the loopback indication, the ingress node or the egress node sets identification information of whether the local protection switching is completed in the header of the second IOAM message to obtain the first IOAM message.

7. A method for sending a message, characterized in that: Applied to ingress or egress nodes, including: A first in-band operation, administration and maintenance IOAM message is sent to an encapsulation node, so that the encapsulation node determines whether to complete local protection switching according to the first IOAM message when receiving the first IOAM message; when it is determined that the local protection switching is completed according to the first IOAM message, a second IOAM message is re-encapsulated, wherein the second IOAM message is a message sent to a target receiving end, and a data message carried by the second IOAM message is consistent with a data message payload carried in the first IOAM message.

8. The method according to claim 7, wherein: Sending a first in-band operation, administration and maintenance (IOAM) message to the encapsulation node includes: receiving a second IOAM message sent by the encapsulation node, and determining whether a loopback indication is set in the second IOAM message; In the case where it is determined that a loopback indication is set in the second IOAM message, determining whether the local protection switching is completed; When the local protection switching is completed, a first IOAM message is generated and sent to the encapsulation node, wherein the first IOAM message carries identification information for indicating that the local protection switching is completed.

9. The method according to claim 7, wherein: Sending a first in-band operation, administration and maintenance (IOAM) message to the encapsulation node includes: Determine whether there is a fault on the protected path; In the case that a fault occurs on the protected path, a first IOAM message is generated and sent to the encapsulation node, wherein the first IOAM message carries identification information for indicating completion of local protection switching.

10. A message repackaging device, characterized in that: Applicable to package nodes, including: A receiving module, configured to receive a first in-band operation management and maintenance IOAM message sent by an ingress node or an egress node in a backup path, wherein the backup path is used to perform fault protection on a protected path; a determination module, configured to determine whether the local protection switching is completed according to the first IOAM message; The encapsulation module is configured to re-encapsulate the second IOAM message when it is determined that the local protection switching is completed according to the first IOAM message, wherein the second IOAM message is a message sent to a target receiving end, and the data message carried by the second IOAM message is consistent with the data message payload carried in the first IOAM message.

11. A message sending device, characterized in that: Applied to ingress or egress nodes, including: A sending module is configured to send a first in-band operation, administration and maintenance IOAM message to an encapsulation node, so that the encapsulation node determines whether to complete local protection switching according to the first IOAM message when receiving the first IOAM message; and re-encapsulates the second IOAM message when it is determined that the local protection switching is completed according to the first IOAM message, wherein the second IOAM message is a message sent to a target receiving end, and the data message carried by the second IOAM message is consistent with the data message payload carried in the first IOAM message.

12. A computer-readable storage medium having a computer program stored therein, wherein: When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 6 are implemented, or the steps of the method described in any one of claims 7 to 9 are implemented.

13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method described in any one of claims 1 to 6 are implemented, or the steps of the method described in any one of claims 7 to 9 are implemented.

Citation Information

Patent Citations

  • Packaging method, device and node

    CN108737269A

  • Message processing method, message processing device, message packaging method, message packaging device and message packaging system

    CN110224916A

  • Message sampling method and decapsulation method, node, system and storage medium

    CN111327445A

  • In-situ OAM data based segment routed path and service function validation

    US20190349290A1