Message repackaging method and device and message sending method and device

By receiving IOAM messages in the backup path, the local protection switching status is determined, and the IOAM messages are reencapsulated after switching occurs, which solves the problem that the IOAM encapsulation node cannot perceive the change of the forwarding path, and realizes IOAM reencapsulation after forwarding path switching.

CN120110984APending Publication Date: 2025-06-06ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311682487.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-06
Publication Date
2025-06-06

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 IOAM header in time, and the IOAM re-encapsulation after forwarding path switching cannot be realized.

Method used

By receiving IOAM messages sent by the inlet node or exit node in the backup path, it is determined whether the local protection switching is completed, and when the local protection switching is completed, the second IOAM message is re-encapsulated to ensure that the IOAM encapsulation node can sense the forwarding path changes.

Benefits of technology

After local protection switching, the IOAM encapsulation node can timely sense the forwarding path changes of data packets and re-encapsulate IOAM packets, solving the problem that the IOAM encapsulation node cannot re-encapsulate in time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120110984A_ABST
    Figure CN120110984A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a message repackaging method and device and a message sending method and device.The message repackaging method comprises the steps that a first in-band operation, administration and maintenance (IOAM) message sent by an inlet node or an outlet node in a backup path is received, the backup path is used for performing fault protection on a protected path; determining whether local protection switching is completed or not according to the first IOAM message; and under the condition that the completion of the local protection switching is determined according to the first IOAM message, a second IOAM message is repackaged, the second IOAM message is a message sent to a target receiving end, and the payload of a data message carried by the second IOAM message is consistent with that of a data message carried by the first IOAM message. By adopting the technical scheme, the problem that the IOAM packaging node cannot repackage the IOAM message in time due to the fact that the IOAM packaging node cannot sense the change of the forwarding path of the data message when the local protection switching occurs is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of communications, and in particular, to a message repackaging method and device, and a message sending method and device. Background Art

[0002] The prior art provides a variety of methods for implementing network fault protection recovery. Among them, one method is to implement fast protection switching by configuring a backup path for a certain forwarding path. This method is also called a local protection switching method. It implements protection switching in a shorter time and the backup path occupies fewer resources.

[0003] However, in a network that has deployed in-band 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 message has changed, 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 the forwarding path is switched.

[0004] To address the above problems, no effective solution has been proposed in the prior art. Summary of the invention

[0005] The embodiments of the present invention provide a message repackaging method and device, as well as a message sending method and device, so as to at least solve the problem in the related art that when local protection switching occurs, the IOAM encapsulation node cannot 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.

[0006] According to an embodiment of the present invention, 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 perform fault protection on a protected path; determining whether a local protection switching is completed according to the first IOAM message; and repackaging a 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 a data message carried by the second IOAM message is consistent with a data message payload carried in the first IOAM message.

[0007] In an exemplary embodiment, the second IOAM message is re-encapsulated, including: determining 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, performing route tracing to determine the first node number of the forwarding path after the local protection switching is completed, and re-encapsulating the second IOAM message according to the first node number.

[0008] In an exemplary embodiment, before re-encapsulating 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 the third IOAM message is received, 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; and determining whether to re-encapsulate the second IOAM message based on the size relationship.

[0009] In an exemplary embodiment, determining whether to re-encapsulate the second IOAM message based on the size relationship includes: when the size relationship indicates that the second node number and the third node number are inconsistent, determining to re-encapsulate the second IOAM message; when the size relationship indicates that the second node number and the third node number are consistent, prohibiting re-encapsulation of the second IOAM message.

[0010] In an exemplary embodiment, repackaging the second IOAM message includes: when the size relationship indicates that the second node number is greater than the third node number, repackaging 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 node number is less than the third node number, repackaging 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.

[0011] In an exemplary embodiment, before receiving a first in-band operation, administration and maintenance IOAM message sent by an egress node in a backup path, the method further includes: setting a loopback indication in a 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.

[0012] According to another embodiment of the present invention, 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 to complete a local protection switching 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 a data message carried by the second IOAM message is consistent with a data message payload carried in the first IOAM message.

[0013] 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.

[0014] 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.

[0015] According to another embodiment of the present invention, there is provided a message repackaging device, which is applied to a packaging node, and includes: a receiving module, which is used 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 perform fault protection on a protected path; a determination module, which is used to determine whether a local protection switching is completed according to the first IOAM message; and an encapsulation module, which is used to repack 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 a data message carried by the second IOAM message is consistent with a data message payload carried in the first IOAM message.

[0016] According to another embodiment of the present invention, a message sending device is provided, which is applied to an ingress node or an egress node, and includes: a sending module, which is used 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; 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 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.

[0017] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when run.

[0018] According to yet another embodiment of the present invention, there is provided 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 execute the steps in any one of the above method embodiments.

[0019] Through the present invention, since the IOAM message sent by the egress node or the ingress node in the backup path in the embodiment of the present application 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 re-encapsulation of the IOAM message by the IOAM encapsulation node after the forwarding path is switched. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0021] Figure 1 It is a hardware structure block diagram of an encapsulation node of a message re-encapsulation method according to an embodiment of the present invention;

[0022] Figure 2 is a network schematic diagram corresponding to the message repackaging method of an embodiment of the present invention;

[0023] Figure 3 is a flow chart of a message repackaging method according to an embodiment of the present invention;

[0024] Figure 4 It is a schematic diagram of the encapsulation format of a data message carrying an IOAM header;

[0025] Figure 5 This is a schematic diagram (I) of the IOAM data format corresponding to the protected path in the embodiment of the present application;

[0026] Figure 6 Schematic diagram (I) of the IOAM data format corresponding to the backup path in the embodiment of the present application;

[0027] Figure 7 This is a schematic diagram (II) of the IOAM data format corresponding to the protected path in the embodiment of the present application;

[0028] Figure 8 This is a schematic diagram (II) of the IOAM data format corresponding to the backup path in the embodiment of the present application;

[0029] Fig. 9 is a flow chart of a method for sending a message according to an embodiment of the present invention;

[0030] Fig.10 is a schematic diagram of a message repackaging method according to an embodiment of the present application;

[0031] Fig.11 This is a schematic diagram of the network forwarding IOAM message process in an embodiment of the present application;

[0032] Fig.12 This is a schematic diagram of the process of forwarding IOAM messages after the forwarding path is switched in an embodiment of the present application;

[0033] Fig.13 is a structural block diagram of a message repackaging device according to an embodiment of the present invention;

[0034] Fig.14 It is a structural block diagram of a message sending device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0035] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.

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

[0037] The method embodiments provided in the embodiments of the present application can be executed in a packaging node or a similar computing device. Taking running on a packaging node as an example, Figure 1 FIG. 1 is a hardware structure block diagram of an encapsulation node of a message re-encapsulation method according to an embodiment of the present invention. Figure 1 As shown, the encapsulation node may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as 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 packaging node may also include a transmission device 106 for communication functions and an input and output device 108. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned encapsulation node. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0038] 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 invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement 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 arranged 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 combinations thereof.

[0039] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wired network provided by a communication provider of the encapsulated node. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices in a wired manner for communication.

[0040] The present application embodiment can be run on Figure 2 In the network diagram shown in Figure 2 As shown in the figure, the network is configured with a local protection switching strategy, such as Figure 2 As shown, a section of the end-to-end forwarding path from the entry node to the exit node is the protected forwarding path, that is, the forwarding path "backup path entry node-forwarding node 1-forwarding node 2-backup path exit node", and 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.

[0041] In this embodiment, a method for repackaging a message running on a packaging node is provided. Figure 3 is a flow chart of a message repackaging method according to an embodiment of the present invention, such as Figure 3 As shown, the process includes the following steps:

[0042] Step S302, 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 the protected path;

[0043] It should be noted that the 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 of network nodes, such as Figure 4 As shown, Figure 4 The figure is a schematic diagram of the encapsulation format of a data message carrying an IOAM header.

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

[0045] Step S306, when it is determined according to the first IOAM message that the local protection switching is completed, re-encapsulate the second 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.

[0046] 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 application 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.

[0047] 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; when the first IOAM message sent by the entry node of the backup path is received, perform route tracing to determine the first node number of the forwarding path after the local protection switching is completed, and re-encapsulate the second IOAM message according to the first node number.

[0048] Optionally, the above step S306 can also be implemented in the following manner: determine whether a third IOAM message sent by the egress node of the backup path is received; when the third IOAM message is received, determine 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 determine whether to re-encapsulate the second IOAM message based on the size relationship.

[0049] 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.

[0050] 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.

[0051] 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 received before and after the local protection switching occurs, and then determines whether to re-encapsulate the second IOAM message:

[0052] 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.

[0053] 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.

[0054] After the encapsulation node compares the header of the first IOAM message sent by the egress node and the header of the third IOAM message received before and after the local protection switching occurs, it determines that the number of node data contained in the two is the same: the IOAM header received before the local protection switching occurs contains the IOAM data of the three nodes (nodes 1, 2, and 3) corresponding to the protected path, and the IOAM header received after the local protection switching occurs contains the IOAM data of the three nodes (nodes 4, 5, and 6) corresponding to the backup path. Therefore, the encapsulation node does not need to perform IOAM re-encapsulation on the second IOAM message.

[0055] in, Figure 5Schematic diagram (I) of the IOAM data format corresponding to the protected path in the embodiment of the present application. Figure 5 As shown, since the protected path passes through three nodes, the IOAM data includes three node data lists, each of which includes node-related information such as the node identifier, IOAM message input interface, IOAM message output interface, and IOAM message delay of the node.

[0056] Figure 6 Schematic diagram (I) of the IOAM data format corresponding to the backup path in the embodiment of the present application. Figure 6 As shown, since the backup path passes through three nodes, the IOAM data contains three node data lists.

[0057] When 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 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 according to the IOAM header received after the local protection switching occurs.

[0058] In an exemplary embodiment, repackaging the second IOAM message includes the following two situations:

[0059] 1) when the size relationship indicates that the number of the second nodes is greater than the number of the third nodes, re-encapsulating 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;

[0060] 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.

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

[0062] After the encapsulation node compares the header of the first IOAM message and the header of the third IOAM message sent by the egress node received before and after the local protection switching occurs, it determines that the number of node data contained in the two is different. Specifically, the header of the third IOAM message contains the IOAM data of the two nodes (nodes 1 and 2) corresponding to the protected path, while the header of the first IOAM message contains the IOAM data of the four nodes (nodes 3, 4, 5, and 6) corresponding to the backup path. Therefore, the encapsulation node re-encapsulates the second IOAM message according to the header of the first IOAM message, and the re-encapsulated second IOAM message will reserve two more node data lists than the previously encapsulated second IOAM message to meet the requirement that the backup path passes through two more nodes than the protected path.

[0063] in, Figure 7 This is a schematic diagram (II) of the IOAM data format corresponding to the protected path in the embodiment of the present application. Figure 7 As shown, since the protected path passes through two nodes, the IOAM data includes two node data lists, each of which includes node-related information such as the node identifier, IOAM message input interface, IOAM message output interface, and IOAM message delay of the node.

[0064] Figure 8 Schematic diagram (II) of the IOAM data format corresponding to the backup path in the embodiment of the present application. Figure 8 As shown, since the backup path passes through 4 nodes, the IOAM data contains 4 node data lists.

[0065] For example, for situation 2), the protected path of the 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.

[0066] 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, and 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.

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

[0068] After the encapsulation node compares the header of the first IOAM message sent by the egress node and the header of the third IOAM message received before and after the local protection switching occurs, it determines that the number of node data contained in the two is different. Specifically, the header of the third IOAM message contains the IOAM data of the four nodes (nodes 1, 2, 3, and 4) corresponding to the protected path, while the header of the first IOAM message contains the IOAM data of the two nodes (nodes 5 and 6) corresponding to the backup path. Therefore, the encapsulation node re-encapsulates the second IOAM message according to the header of the first IOAM message, and the re-encapsulated second IOAM message will reserve two fewer node data lists than the previously encapsulated second IOAM message.

[0069] 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, it also 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 of whether the local protection switching is completed in the header of the second IOAM message to obtain the first IOAM message.

[0070] In the embodiment of the present application, when the encapsulation node adds an IOAM header to the data message entering the IOAM network domain, an instruction requiring the ingress node and / or egress node to copy the IOAM message and send it back is set in the IOAM header.

[0071] According to the IOAM header format specified by IETF RFC9197, the IOAM header includes an IOAM option header and IOAM data, wherein the IOAM data includes a series of node data lists, and the IOAM option header includes multiple reserved bits, and instructions requiring the ingress node and / or egress node to copy the IOAM message and send it back can be set in the reserved bits.

[0072] 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 the indication that the local protection switching has not occurred in the IOAM header of the second IOAM message, so as to generate a first IOAM message, and send it to the encapsulation node. Since the IOAM header contains the 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 the 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, and 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, then at this time the egress node is likely to be unable to find a suitable route to send the first IOAM message to the encapsulation node.

[0073] 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 the indication that the local protection switching has occurred in the IOAM header of the second IOAM message, so as to generate a first IOAM message, and send it to the encapsulation node. Since the IOAM header includes the IOAM option header and the IOAM data, and the IOAM option header includes a plurality of reserved bits, the ingress node and / or the egress node sets the identification information of the ingress node and / or the egress node and the indication that the local protection switching has occurred in the reserved bits.

[0074] 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 not carrying 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.

[0075] In this embodiment, a method for sending a message running on an ingress node or an egress node is provided. Fig. 9 is a flow chart of a method for sending a message according to an embodiment of the present invention, such as Fig. 9 As shown, the process includes the following steps:

[0076] Step S902: Send a first in-band operation, management and maintenance IOAM message to the encapsulation node, so that the encapsulation node determines whether to complete the 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, re-encapsulate the second 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.

[0077] 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 application 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.

[0078] 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.

[0079] 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.

[0080] 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 application.

[0081] In this embodiment, a message repackaging method is provided. Fig.10 is a schematic diagram of a message repackaging method according to an embodiment of the present application, such as Fig.10 As shown, the specific steps are as follows:

[0082] 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.

[0083] It should be noted that local protection switching requires configuring a backup path for the protected forwarding path. When the protected forwarding path fails, the forwarding of data packets will be switched to the backup path. Once the failure of the protected forwarding path is cleared, the forwarding of data packets will be switched from the backup path back to the protected forwarding path. Figure 2 shown.

[0084] Fig.11 Schematic diagram of the network forwarding IOAM message flow in the embodiment of the present application, such as Fig.11 As shown, in the IOAM network domain, the IOAM encapsulation node adds an IOAM header to the data message entering the network, and 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.

[0085] Optionally, when the IOAM encapsulation node adds an IOAM header to a data message entering the network, an instruction is set in the IOAM header to require 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.

[0086] Optionally, in the copied IOAM message sent by the backup path egress node to the IOAM encapsulation node, in addition to setting the indication of the backup path egress node, an indication that the protection switching has not occurred can also be set. By explicitly setting the indication that the protection switching has not occurred, the IOAM encapsulation node can be prevented from making a misjudgment on whether the protection switching has occurred after receiving the copied IOAM message.

[0087] 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.

[0088] 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.

[0089] Fig.12 Schematic diagram of the process of forwarding IOAM messages after the forwarding path is switched in the embodiment of the present application. Fig.12 As shown, after a protected forwarding path fails and the forwarding of the IOAM message is switched to a backup path, the backup path egress node copies the IOAM message, sets an indication of the backup path egress node and an indication that the protection switching has been completed in the IOAM header, and sends it to the IOAM encapsulation node to notify the IOAM encapsulation node to perform IOAM re-encapsulation.

[0090] 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 received before and after the local protection switching occurs, and performs IOAM re-encapsulation for the affected data messages.

[0091] 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 the same, it means 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.

[0092] 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.

[0093] After the protected forwarding path fails, the forwarding of the IOAM message will be switched back from 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, informing 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.

[0094] The present application 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 cannot perceive that the forwarding path of the data message has changed, 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.

[0095] 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 a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence 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 a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0096] 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 modes, and will not be repeated hereafter. 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, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0097] Fig.13 is a structural block diagram of a message repackaging device according to an embodiment of the present invention, which is applied to a packaging node, such as Fig.13 As shown, the device comprises:

[0098] The receiving module 1302 is used 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 the protected path;

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

[0100] The encapsulation module 1306 is used 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 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.

[0101] 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 application 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 re-encapsulation of the IOAM message by the IOAM encapsulation node after the forwarding path is switched.

[0102] In an exemplary embodiment, the encapsulation module 1306 is used 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, route tracing is performed to determine the first node number of the forwarding path after the local protection switching is completed, and the second IOAM message is re-encapsulated according to the first node number.

[0103] In an exemplary embodiment, the encapsulation module 1306 is used to determine whether a third IOAM message sent by the egress node of the backup path is received; when the third IOAM message is received, determine 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 determine whether to re-encapsulate the second IOAM message based on the size relationship.

[0104] In an exemplary embodiment, the encapsulation module 1306 is used 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.

[0105] In an exemplary embodiment, the encapsulation module 1306 is used to re-encapsulate the second IOAM message to obtain a fourth IOAM message when the size relationship indicates that the second node number is greater than the third node number, 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 to re-encapsulate the second IOAM message to obtain a fifth IOAM message when the size relationship indicates that the second node number is less than the third node number, 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.

[0106] In an exemplary embodiment, the above-mentioned device also includes: a sending module, used 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.

[0107] Fig.14 is a structural block diagram of a message sending device according to an embodiment of the present invention, which is applied to an ingress node or an egress node, such as Fig.14 As shown, including:

[0108] The sending module 1402 is used to send a first in-band operation, administration and maintenance IOAM message to the encapsulation node, so that the encapsulation node determines whether to complete the 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, 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.

[0109] 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 application 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 re-encapsulation of the IOAM message by the IOAM encapsulation node after the forwarding path is switched.

[0110] In an exemplary embodiment, the sending module 1402 is used to receive a second IOAM message sent by the encapsulation node and determine whether a loopback indication is set in the second IOAM message; when it is determined that a loopback indication is set in the second IOAM message, determine whether the local protection switching is completed; when 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.

[0111] In an exemplary embodiment, the sending module 1402 is used to determine whether there is a fault in the protected path; when there is a fault in the protected path, a first IOAM message is generated and the first IOAM message is sent to the encapsulation node, wherein the first IOAM message carries identification information for indicating completion of local protection switching.

[0112] It should be noted that the above modules can be implemented by 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.

[0113] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0114] 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.

[0115] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0116] 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.

[0117] 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 herein.

[0118] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that 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 executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0119] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A message repackaging method, It is 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, It is characterized in that 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, It is characterized in that 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, It is characterized in that 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, It is characterized in that 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; When the size relationship indicates that the second number of nodes is less than the third number of nodes, the second 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, It is characterized in that 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, It is 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, It is characterized in that 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, It is characterized in that 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, It is 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 local protection switching is completed according to the first IOAM message; An encapsulation module is used 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, It is characterized in that Applied to ingress or egress nodes, including: A sending module is used 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; 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 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, It is characterized in that The computer-readable storage medium stores a computer program, 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, It is characterized in that When the processor executes the computer program, the processor implements the steps of the method described in any one of claims 1 to 6, or implements the steps of the method described in any one of claims 7 to 9.