Nothing Special   »   [go: up one dir, main page]

WO2022135321A1 - Packet transmission method, device and system - Google Patents

Packet transmission method, device and system Download PDF

Info

Publication number
WO2022135321A1
WO2022135321A1 PCT/CN2021/139554 CN2021139554W WO2022135321A1 WO 2022135321 A1 WO2022135321 A1 WO 2022135321A1 CN 2021139554 W CN2021139554 W CN 2021139554W WO 2022135321 A1 WO2022135321 A1 WO 2022135321A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
identifier
path
message
identification
Prior art date
Application number
PCT/CN2021/139554
Other languages
French (fr)
Chinese (zh)
Inventor
刘翔
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN202110267901.7A external-priority patent/CN114726754A/en
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022135321A1 publication Critical patent/WO2022135321A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks

Definitions

  • the present application relates to the field of communication technologies, and in particular, to a message transmission method, device, and system.
  • a communication system usually includes a plurality of nodes, and the nodes can transmit packets along the path of the tunnel by using the tunneling technology.
  • the head node of the path needs to perform fault detection on the path.
  • node A may send a detection packet to node B along path 1.
  • node B After receiving the detection packet, node B will determine the shortest path (path 2) from node B to node A according to the Internet Protocol (Internet Protocol, IP) routing, and send the detection packet to node A along path 2. response message. If node A receives the response message within the time period threshold after sending the detection message, node A determines that path 1 is not faulty, and can continue to transmit messages on path 1 subsequently. If node A does not receive the response message within the duration threshold after sending the detection message, node A determines that path 1 is faulty, and will not transmit messages on path 1 subsequently.
  • IP Internet Protocol
  • the application provides a message transmission method, device and system, which can solve the problem of low accuracy of path fault detection.
  • the technical solution is as follows:
  • a message transmission method includes: after receiving a detection message, a first node obtains and sends a response message of the detection message.
  • the detection packet carries a first identification list, the first identification list is used to indicate the first path from the second node to the first node, and the first identification list includes: the first path the first identifier of the first intermediate node;
  • the response message carries a second identifier list, the second identifier list is obtained by the first node according to the first identifier list, and the second identifier list is used for A second path from the first node to the second node is indicated, and the second identification list includes the first identification.
  • both the first identifier list and the second identifier list include the first identifier of the first intermediate node
  • both the first path and the second path pass through the first intermediate node indicated by the first identifier
  • the first path and the second path pass through the first intermediate node indicated by the first identifier.
  • the head and tail nodes of the path are opposite, so the second path has a higher degree of consistency with the first path. Therefore, the transmission path of the response packet is highly consistent with the transmission path of the detection packet, the transmission status of the response packet is relatively consistent with the transmission status of the detection packet, and the transmission status of the response packet can reflect the failure of the first path. In this case, the accuracy of the second node determining whether the first path is faulty according to the response message is relatively high.
  • the second node since the second node has high accuracy in determining whether the first path is faulty, the probability of service interruption caused by the second node switching paths when the first path is not faulty is reduced, and user experience is improved.
  • the path in this embodiment of the present application may be a path of a tunnel, or may not be a path of a tunnel, which is not limited in this embodiment of the present application.
  • the tunnel can be any type of tunnel, for example, a segment routing policy (Segment Routing Internet Protocol version 6 policy, SRv6 policy) tunnel based on the sixth version of the Internet Protocol, a segment routing traffic engineering tunnel (Segment Routing Traffic Engineering Tunnel, SR-TE Tunnel), or segment routing (Segment Routing Best Effort policy, SR-BE), etc.
  • the first identification list may be a segment list.
  • the detection message carries: an operation code, and the operation code is used to instruct: to generate a response message carrying an identification list that is used to indicate that the first path is consistent with and opposite to the direction; the first node may When the detection message carries the operation code, the response message is generated. When the detection packet carries an operation code, the first node may generate a response packet according to the instruction of the operation code, so that the efficiency of generating the response packet after the first node receives the detection packet can be improved.
  • the detection message may also not carry an operation code, which is not limited in this application.
  • the first path is consistent with the second path, and the consistency here can be strict consistency.
  • the nodes traversed by the first path and the second path are exactly the same, and the consistency here can also be non-strict consistency. are consistent, for example, the nodes traversed by the first path and the second path are only partially the same.
  • the first identifier list includes: identifiers of multiple intermediate nodes on the first path; the second identifier list also includes: identifiers of the multiple intermediate nodes; The arrangement order of the identifiers in the second identifier list is opposite to the arrangement order of the identifiers of the plurality of intermediate nodes in the first identifier list.
  • the consistency between the first path and the second path is further improved, and the accuracy with which the second node determines whether the first path is faulty according to the response message is further improved.
  • the above-mentioned multiple intermediate nodes may be some or all of the intermediate nodes on the first path, which is not limited in this application.
  • the plurality of intermediate nodes include: other nodes in the first path except the first node and the second node. In this case, the degree of consistency between the first path and the second path is high.
  • the first node when the first node obtains the response message of the detection message, according to the identifiers of the multiple intermediate nodes included in the first identifier list, in the reverse order, obtain the second identifier list. , and then encapsulate the second identification list into the response message.
  • the first identifier includes: an identifier of a port or link where the first intermediate node receives the detection packet.
  • the first identifier may also be the node identifier of the first intermediate node, which is not limited in this application.
  • the first identification includes: when the first intermediate node receives the identification of the port or link of the detection packet, when the first intermediate node sends the response packet, the first intermediate node may The port or link in the system sends a response packet. In this way, it is ensured that the first intermediate node receives the detection packet and sends the response packet through the same port or link, thereby further improving the consistency of the transmission path of the detection packet and the transmission path of the response packet.
  • the identifier of the first intermediate node in the detection packet sent by the second node may be the same as the first identifier Differently, after receiving the detection packet, the first intermediate node needs to update the identifier of the first intermediate node in the detection packet to the above-mentioned first identifier.
  • the second identification list may further include the identification of the second node.
  • the identification of the second node may be obtained by the first node in any manner.
  • the detection message also carries the address of the second node, and before obtaining the response message, the first node may determine the identifier of the second node according to the address of the second node.
  • the first node may store a correspondence between the address of the node and the identifier, and the first node may determine the identifier of the second node corresponding to the address of the second node according to the correspondence.
  • the detection packet includes a first segment routing header (Segment Routing Header, SRH), the first SRH carries the first identification list; the response packet includes a second SRH, the The second SRH carries the second identification list.
  • the detection message includes a first load part, and the first load part carries the first identification list; the response message includes a second load part, and the second load part carries the first identification list. 2. List of identities.
  • the detection message is: a seamless bidirectional forwarding detection (Seamless Bidirectional Forwarding Detection, SBFD) message.
  • the detection message may also be other types of messages, which are not limited in this application.
  • a packet transmission method includes: a second node generates a detection packet, and sends the detection packet to the first node.
  • the detection packet carries a first identification list
  • the first identification list is used to indicate the first path from the second node to the first node
  • the first identification list includes: the first path The initial identification of the first intermediate node.
  • the detection packet is used to instruct the first node to obtain a response packet of the detection packet, and the response packet carries a second identification list; the second identification list is the basis of the first node. Obtained from the first identification list, the second identification list is used to indicate the second path from the first node to the second node, and the second identification list includes: an identification.
  • both the first identifier list and the second identifier list include the first identifier of the first intermediate node
  • both the first path and the second path pass through the first intermediate node indicated by the first identifier
  • the first path and the second path pass through the first intermediate node indicated by the first identifier.
  • the head and tail nodes of the path are opposite, so the second path has a higher degree of consistency with the first path. Therefore, the transmission path of the response packet is highly consistent with the transmission path of the detection packet, the transmission status of the response packet is relatively consistent with the transmission status of the detection packet, and the transmission status of the response packet can reflect the failure of the first path. In this case, the accuracy of the second node determining whether the first path is faulty according to the response message is relatively high.
  • the second node since the second node has high accuracy in determining whether the first path is faulty, the probability of service interruption caused by the second node switching paths when the first path is not faulty is reduced, and user experience is improved.
  • the detection message carries: an operation code; the operation code is used to instruct: to generate a response message carrying an identification list used to indicate that the first path is consistent and opposite in direction.
  • the detection packet carries an operation code
  • the first node can generate a response packet according to the instruction of the operation code, so that the efficiency of generating the response packet after the first node receives the detection packet can be improved.
  • the detection message may also not carry an operation code, which is not limited in this application.
  • the first identifier list includes: identifiers of multiple intermediate nodes on the first path; the second identifier list also includes: identifiers of the multiple intermediate nodes; The arrangement order of the identifiers in the second identifier list is opposite to the arrangement order of the identifiers of the plurality of intermediate nodes in the first identifier list.
  • the consistency between the first path and the second path is further improved, and the accuracy with which the second node determines whether the first path is faulty according to the response message is further improved.
  • the detection packet further carries: a first indication; the first indication is used to instruct the first intermediate node: when the detection packet carries the first indication, the The initial identification is updated to the first identification.
  • the first intermediate node may update the initial identification in the first identification list to the first identification of the first intermediate node when the detection packet carries the first indication.
  • the first intermediate node may not change the initial identification. In this way, the first intermediate node can determine whether the identifier in the message needs to be changed according to the first instruction, thereby preventing the first intermediate node from changing the identifier in each received packet, reducing the need for power consumption of the first intermediate node.
  • a flags (Flags) field in the packet header of the detection packet carries the first indication.
  • the detection packet includes a first SRH, and the first SRH carries the first identification list; or, the detection packet includes a first load part, and the first load part carries Describe the first identification list.
  • a third aspect provides a packet transmission method, the method is performed by a third node on a first path, where the first path is a path from the second node to the first node, the method includes: first, The third node receives the detection message.
  • the detection packet carries a first identification list, the first identification list is used to indicate the first path, and the first identification list includes the initial identification of the third node.
  • the third node updates the initial identification in the first identification list to the first identification of the third node, obtains the updated detection message, and analyzes the updated detection message to be processed.
  • the third node may be the first node on the first path, or may be the first intermediate node on the first path, where the first intermediate node is any intermediate node on the first path.
  • processing the updated detection message by the third node may include: the third node generates a response message according to the updated detection message.
  • processing the updated detection message by the third node may include: sending the updated detection message by the third node.
  • the second intermediate node in the response packet generated by the first node according to the detection packet The identifier list includes: the first identifier of the first intermediate node, and the first identifier is the identifier of the port or link where the first intermediate node receives the detection message. Therefore, when the first intermediate node sends the response message, the The port or link in the first intermediate node sends a response message. In this way, it is ensured that the first intermediate node receives the detection packet and sends the response packet through the same port or link, thereby further improving the consistency of the transmission path of the detection packet and the transmission path of the response packet.
  • the initial identification of the above-mentioned third node is different from the first identification.
  • the initial identification includes: the node identification of the third node, for example, the node identification may be a node segment identification (Node SID); the first identification
  • the identifier includes: an identifier of the port or link where the third node receives the detection message, for example, the first identifier may be a link segment identifier (End.X SID).
  • the detection packet further carries: a first indication
  • the third node may update the initial identification to the first identification when the detection packet carries the first indication.
  • the third node may not change the initial identification. In this way, the third node can determine whether the identifier in the message needs to be changed according to the first instruction, thereby preventing the third node from changing the identifier in each received message, reducing the Power consumption of three nodes.
  • processing the updated detection packet by the third node includes: sending the updated detection packet by the third node; the method further includes: After processing the updated detection packet, the third node receives a response packet of the detection packet, and sends the response packet.
  • the response message carries a second identification list, the second identification list is used to indicate the second path from the first node to the second node, and the second identification list includes the first identification list. logo.
  • a message transmission device belongs to the first node, and the message transmission device includes: a receiving module, an obtaining module, and a sending module.
  • the receiving module is configured to receive a detection packet, the detection packet carries a first identification list, and the first identification list is used to indicate the first path from the second node to the first node.
  • the identification list includes: the first identification of the first intermediate node on the first path; the obtaining module is used to obtain a response message of the detection message, the response message carries a second identification list, the second The identification list is obtained according to the first identification list, the second identification list is used to indicate the second path from the first node to the second node, and the second identification list includes the first identification ; The sending module is used to send the response message.
  • both the first identifier list and the second identifier list include the first identifier of the first intermediate node
  • both the first path and the second path pass through the first intermediate node indicated by the first identifier
  • the first path and the second path pass through the first intermediate node indicated by the first identifier.
  • the head and tail nodes of the path are opposite, so the second path has a higher degree of consistency with the first path. Therefore, the transmission path of the response packet is highly consistent with the transmission path of the detection packet, the transmission status of the response packet is relatively consistent with the transmission status of the detection packet, and the transmission status of the response packet can reflect the failure of the first path. In this case, the accuracy of the second node determining whether the first path is faulty according to the response message is relatively high.
  • the second node since the second node has high accuracy in determining whether the first path is faulty, the probability of service interruption caused by the second node switching paths when the first path is not faulty is reduced, and user experience is improved.
  • the detection message carries: an operation code, and the operation code is used to instruct: to generate a response message carrying an identification list that is used to indicate that the first path is consistent and in the opposite direction; the obtaining module It is used for: generating the response message when the detection message carries the operation code.
  • the detection packet carries an operation code
  • the first node may generate a response packet according to the instruction of the operation code, so that the efficiency of generating the response packet after the first node receives the detection packet can be improved.
  • the detection message may also not carry an operation code, which is not limited in this application.
  • the first identifier list includes: identifiers of multiple intermediate nodes on the first path; the second identifier list also includes: identifiers of the multiple intermediate nodes; The arrangement order of the identifiers in the second identifier list is opposite to the arrangement order of the identifiers of the plurality of intermediate nodes in the first identifier list.
  • the consistency between the first path and the second path is further improved, and the accuracy with which the second node determines whether the first path is faulty according to the response message is further improved.
  • the plurality of intermediate nodes include: other nodes in the first path except the first node and the second node.
  • the degree of consistency between the first path and the second path is high.
  • the obtaining module is configured to: obtain the second identification list in reverse order according to the identifications of the multiple intermediate nodes included in the first identification list; encapsulated into the response message.
  • the first identifier includes: an identifier of a port or link where the first intermediate node receives the detection packet.
  • the first identifier may also be the node identifier of the first intermediate node, which is not limited in this application.
  • the first identification includes: when the first intermediate node receives the identification of the port or link of the detection packet, when the first intermediate node sends the response packet, the first intermediate node may The port or link in the system sends a response packet. In this way, it is ensured that the first intermediate node receives the detection packet and sends the response packet through the same port or link, thereby further improving the consistency of the transmission path of the detection packet and the transmission path of the response packet.
  • the identifier of the first intermediate node in the detection packet sent by the second node may be the same as the first identifier Differently, after receiving the detection packet, the first intermediate node needs to update the identifier of the first intermediate node in the detection packet to the above-mentioned first identifier.
  • the second identification list may further include the identification of the second node.
  • the identification of the second node may be obtained by the first node in any manner.
  • the detection packet further carries the address of the second node
  • the packet transmission device further includes: a determining module, configured to, before obtaining the response packet, determine the address of the second node according to the address of the second node. , determine the identifier of the second node, and the response message includes: the identifier of the second node.
  • the first node may store a correspondence between the address of the node and the identifier, and the first node may determine the identifier of the second node corresponding to the address of the second node according to the correspondence.
  • the detection message includes a first SRH, and the first SRH carries the first identifier list; the response message includes a second SRH, and the second SRH carries the second identifier or, the detection packet includes a first load part, and the first load part carries the first identification list; the response packet includes a second load part, and the second load part carries Describe the second identification list.
  • the detection message is: an SBFD message.
  • the detection message may also be other types of messages, which are not limited in this application.
  • a message transmission device in a fifth aspect, is provided, the message transmission device belongs to the second node, and the message transmission device includes: a generating module and a sending module.
  • the generating module is configured to generate a detection packet, the detection packet carries a first identification list, and the first identification list is used to indicate a first path from the second node to the first node, and the first identification list
  • the identifier list includes: the initial identifier of the first intermediate node on the first path; the sending module is configured to send the detection message to the first node; the detection message is used to instruct the first node to obtain the The response message of the detection message, the response message carries a second identification list; the second identification list is obtained by the first node according to the first identification list, and the second identification list is used for A second path from the first node to the second node is indicated, and the second identification list includes: a first identification of the first intermediate node.
  • both the first identifier list and the second identifier list include the first identifier of the first intermediate node
  • both the first path and the second path pass through the first intermediate node indicated by the first identifier
  • the first path and the second path pass through the first intermediate node indicated by the first identifier.
  • the head and tail nodes of the path are opposite, so the second path has a higher degree of consistency with the first path. Therefore, the transmission path of the response packet is highly consistent with the transmission path of the detection packet, the transmission status of the response packet is relatively consistent with the transmission status of the detection packet, and the transmission status of the response packet can reflect the failure of the first path. In this case, the accuracy of the second node determining whether the first path is faulty according to the response message is relatively high.
  • the second node since the second node has high accuracy in determining whether the first path is faulty, the probability of service interruption caused by the second node switching paths when the first path is not faulty is reduced, and user experience is improved.
  • the detection message carries: an operation code; the operation code is used to instruct: to generate a response message carrying an identification list used to indicate that the first path is consistent and opposite in direction.
  • the detection packet carries an operation code
  • the first node may generate a response packet according to the instruction of the operation code, so that the efficiency of generating the response packet after the first node receives the detection packet can be improved.
  • the detection message may also not carry an operation code, which is not limited in this application.
  • the first identifier list includes: identifiers of multiple intermediate nodes on the first path; the second identifier list also includes: identifiers of the multiple intermediate nodes; The arrangement order of the identifiers in the second identifier list is opposite to the arrangement order of the identifiers of the plurality of intermediate nodes in the first identifier list.
  • the consistency between the first path and the second path is further improved, and the accuracy with which the second node determines whether the first path is faulty according to the response message is further improved.
  • the detection packet further carries: a first indication; the first indication is used to instruct the first intermediate node: when the detection packet carries the first indication, the The initial identification is updated to the first identification.
  • the first intermediate node may update the initial identification in the first identification list to the first identification of the first intermediate node when the detection packet carries the first indication.
  • the first intermediate node may not change the initial identification. In this way, the first intermediate node can determine whether the identifier in the message needs to be changed according to the first instruction, thereby preventing the first intermediate node from changing the identifier in each received packet, reducing the need for power consumption of the first intermediate node.
  • the flag field in the packet header of the detection packet carries the first indication.
  • the detection packet includes a first SRH, and the first SRH carries the first identification list; or, the detection packet includes a first load part, and the first load part carries Describe the first identification list.
  • a sixth aspect provides a message transmission device, the message transmission device belongs to a third node on a first path, the first path is a path from the second node to the first node, and the message transmission
  • the device includes: a first receiving module, an updating module and a processing module.
  • the first receiving module is configured to receive a detection packet; the detection packet carries a first identification list, the first identification list is used to indicate the first path, and the first identification list includes the first identification list.
  • the initial identification of the three nodes; the updating module is used to update the initial identification in the first identification list to the first identification of the third node to obtain the updated detection message; the processing module is used to update the The updated detection message is processed.
  • the third node may be the first node on the first path, or may be the first intermediate node on the first path, where the first intermediate node is any intermediate node on the first path.
  • processing the updated detection message by the third node may include: the third node generates a response message according to the updated detection message.
  • processing the updated detection message by the third node may include: sending the updated detection message by the third node.
  • the second intermediate node in the response packet generated by the first node according to the detection packet The identifier list includes: the first identifier of the first intermediate node, and the first identifier is the identifier of the port or link where the first intermediate node receives the detection message. Therefore, when the first intermediate node sends the response message, the The port or link in the first intermediate node sends a response message. In this way, it is ensured that the first intermediate node receives the detection packet and sends the response packet through the same port or link, thereby further improving the consistency of the transmission path of the detection packet and the transmission path of the response packet.
  • the initial identification of the third node is different from the first identification.
  • the initial identification includes: the node identification of the third node, for example, the node identification may be Node SID; the first identification includes: the The identifier of the port or link where the third node receives the detection message, for example, the first identifier may be End.X SID.
  • the detection message further carries: a first indication
  • the updating module is configured to: when the detection message carries the first indication, update the initial identifier to the first indication logo.
  • the third node can determine whether the identifier in the message needs to be changed according to the first instruction, thereby preventing the third node from changing the identifier in each received message, reducing the Power consumption of three nodes.
  • the message transmission device further includes: a second receiving module and a sending module.
  • the second receiving module is configured to receive a response message of the detection message after the processing module processes the updated detection message; the response message carries a second identification list, and the first The second identification list is used to indicate the second path from the first node to the second node, and the second identification list includes the first identification; the sending module is configured to send the response message.
  • a communication device comprising: a processor and a memory, where a program is stored in the memory; the processor is configured to call the program stored in the memory, so that the communication device Execute the message transmission method according to any one of the designs in the first aspect; or, the processor is configured to call a program stored in the memory, so that the communication device executes the method described in any one of the designs in the second aspect A message transmission method; or, the processor is configured to call a program stored in the memory, so that the communication device executes the message transmission method according to any design of the third aspect.
  • a communication system in an eighth aspect, includes a first node and a second node; the first node includes: the message transmission device according to any design of the fourth aspect; the second node Including: the message transmission device described in any one of the designs of the fifth aspect.
  • the communication system further includes: a first intermediate node; at least one of the first intermediate node and the second node is: the message transmission device described in any design of the sixth aspect the third node.
  • a computer storage medium is provided, and a computer program is stored in the storage medium;
  • the computer When the computer program runs on the computer, the computer causes the computer to execute the message transmission method described in any design of the first aspect; or, when the computer program runs on the computer, the computer causes the computer to execute the message transmission method described in any design of the third aspect.
  • a tenth aspect provides a computer program product containing instructions, when the computer program product runs on the message transmission device, the message transmission device is made to execute the message transmission method described in any design of the first aspect; or , when the computer program product runs on the message transmission device, causes the message transmission device to execute the message transmission method described in any design of the second aspect; or, when the computer program product runs on the message transmission device, causing the message transmission device to execute the message transmission method described in any design of the third aspect;
  • FIG. 1 is a schematic structural diagram of a communication system according to an embodiment of the present application.
  • FIG. 2 is a schematic structural diagram of a communication device according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a message transmission process according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of another message transmission process provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of another message transmission process provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of an SRH provided by an embodiment of the present application.
  • FIG. 8 is a flowchart of another message transmission method provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of another message transmission process provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of another message transmission process provided by an embodiment of the present application.
  • FIG. 11 is a block diagram of a message transmission device provided by an embodiment of the present application.
  • FIG. 12 is a block diagram of another message transmission device provided by an embodiment of the present application.
  • FIG. 13 is a block diagram of still another message transmission device provided by an embodiment of the present application.
  • FIG. 1 is a schematic structural diagram of a communication system provided by an embodiment of the present application.
  • the communication system includes multiple nodes, such as nodes R1 , R2 , R3 , R4 and R5 in FIG. 1 .
  • the embodiment of the present application does not limit the number of nodes in the communication system.
  • the communication system includes five nodes as an example.
  • the number of nodes in the communication system may also be other values, such as 2, 10 , 100 or 1000, etc.
  • a node in a communication system may be a gateway, a router, an interface unit in a router, a server or a server cluster, and so on.
  • the nodes in the communication system are all communication devices, and the communication device may include: a processor; the processor is configured to couple with the memory, and after reading the instructions in the memory, execute the method executed by the communication device as described in the embodiments of the present application according to the instructions .
  • the number of processors may be multiple, and the memory coupled with the processors may be independent of the processor or independent of the communication device, and may also be within the processor or the network device.
  • the storage can be a physically independent unit, or a storage space on a cloud server or a network hard disk.
  • the memory may be one or more.
  • the number of memories is multiple, they can be located in the same or different positions, and can be used independently or in combination.
  • FIG. 2 is a schematic structural diagram of a communication device according to an embodiment of the present application.
  • the communication device 200 includes: a processor 202 and a memory 201, wherein the memory 201 is used for storing a program, and the processor 202 is used for calling the program stored in the memory 201, so that the communication device executes a corresponding method or function.
  • the communication device 200 may further include at least one communication interface 203 and at least one communication bus 204 .
  • An interface eg, communication interface 203 in this embodiment of the present application is also called a port.
  • the memory 201 , the processor 202 and the communication interface 203 are communicatively connected through a communication bus 204 .
  • the communication interface 203 is used to communicate with other devices under the control of the processor 202 , and the processor 202 can call the program stored in the memory 201 through the communication bus 204 .
  • the communication device provided by the embodiments of the present application may be used to perform operations performed by the first node, the second node, or the first intermediate node in the packet transmission methods provided by the subsequent embodiments of the present application.
  • each node in the communication system There is a connection relationship between each node in the communication system, for example, the nodes R1, R2, R3 and R4 in FIG. 1 are connected in sequence, and the node R1, the node R5 and the node R4 are connected in sequence.
  • a message transmission path can be deployed in the communication system, and the head node of the path can transmit the message along the path to the tail node of the path.
  • the path 1 deployed in the communication system shown in FIG. 1 may be: node R1 ⁇ node R2 ⁇ node R3 ⁇ node R4.
  • the head node R1 of the path can transmit the packet to the tail node R4 through the nodes R2 and R3 in sequence.
  • the path in this embodiment of the present application may be a path of a tunnel, or may not be a path of a tunnel, which is not limited in this embodiment of the present application.
  • the tunnel can be any type of tunnel, such as SRv6 policy tunnel, SR-TE tunnel, or SR-BE.
  • the head node of the path needs to perform fault detection on the path.
  • the head node R1 in FIG. 1 may send a detection packet to the tail node R4 along the path 1.
  • the tail node R4 After the tail node R4 receives the detection message, it will determine the shortest path 2 (node R4 ⁇ node R5 ⁇ node R1) from the tail node R4 to the head node R1 according to the IP route, and send the detection to the head node R1 along the path 2. message response message.
  • the head node R1 may determine whether a response packet of the detection packet is received within the time duration threshold after the detection packet is sent. If the head node R1 receives the response message within the duration threshold after sending the detection message, the head node R1 determines that the path 1 is not faulty, and can continue to transmit messages on the path 1 subsequently. If the head node R1 does not receive the response message within the duration threshold after sending the detection message, the head node R1 determines that the path 1 is faulty, and will not transmit the message on the path 1 subsequently.
  • the embodiment of the present application provides a message transmission method, and the method can be used in the communication system provided by the embodiment of the present application.
  • the message transmission method can transmit a response message along a second path with a high degree of consistency with the first path according to the first path transmitted by the detection message. In this way, the consistency of the transmission path of the response packet and the transmission path of the detection packet is high, so that the transmission of the response packet can reflect the failure of the first path.
  • the accuracy of fault detection is high.
  • FIG. 4 is a flowchart of a message transmission method provided by an embodiment of the present application.
  • the message transmission method includes:
  • the second node generates a detection packet, and the detection packet carries a first identification list, where the first identification list is used to indicate a first path from the second node to the first node, and the first identification list includes: the first identification list on the first path A first identification of an intermediate node.
  • This embodiment of the present application takes the path to be detected as the first path as an example, and the first path may be a path of a tunnel, or may not be a path of a tunnel, which is not limited in this embodiment of the present application.
  • the head node of the first path is the second node, and the tail node of the first path is the first node.
  • the head node (second node) of the first path needs to generate a detection packet for fault detection.
  • the detection packet carries a first identification list for indicating the first path.
  • the first identification list may be a segment routing list.
  • the identifier of the node in the embodiment of the present application may be any identifier of the node, including: a segment identifier (Segment Identifier, SID), such as a node segment identifier (Node SID), or, the port used to send the detection message in the node corresponds to The link segment identifier (End.X SID).
  • the first identification list may indicate the first path in any way.
  • the first identification list may include the identification of each node on the first path except the head node (or include the identification of each node on the first path. identifiers), and these identifiers are arranged in sequence according to the arrangement order of the nodes on the first path, so that the first identifier list indicates the first path.
  • the first path is path 1 shown in FIG. 1 (node R1 ⁇ node R2 ⁇ node R3 ⁇ node R4), node R1 is the second node, and node R4 is the first node.
  • the identification of the node R1 is 1::
  • the identification of the node R2 is 2::
  • the identification of the node R3 is 3::
  • the identification of the node R4 is 4:::.
  • the first identification list carried in the detection packet may include: 4::, 3::, 2::.
  • the first identification list may also include: 2::, 3::, 4::, which is not limited in this embodiment of the present application.
  • the first path includes at least one intermediate node located between the first node and the second node, and no matter how the first identification list indicates the first path, the first identification list may include: the first intermediate node on the first path
  • the first identifier of the first intermediate node may be any node in the at least one intermediate node.
  • the first path indicated by the first identification list passes through the node indicated by the node identification in the first identification list, the first identification list includes the first identification of the first intermediate node, and the first path passes through the first intermediate node.
  • the identifier of the node can be a node identifier (such as the address of the node, etc.) used to indicate the node, or an identifier used to indicate a component in the node (such as the identifier of a port or link in the node). ), as long as the node can be determined according to the identification of the node.
  • the identifier of the node is used as an example to indicate the node identifier of the node.
  • the detection packet generated by the second node may be a detection packet in any format.
  • the detection packet generated by the second node is an SBFD packet as an example.
  • SBFD is a simplified mechanism of Bidirectional Forwarding Detection (BFD). SBFD simplifies the state machine of BFD, shortens the negotiation time between nodes, improves the flexibility of the communication system, and can support segment The path of the segment routing (SR) tunnel is used for fault detection.
  • BFD Bidirectional Forwarding Detection
  • the second node sends a detection packet to the first node.
  • the second node may send the detection packet to the first node along the first path indicated by the first identification list.
  • the detection message passes through each intermediate node on the first path in turn.
  • the intermediate node can send the detection message according to the first identification list. message.
  • node R1 is the second node
  • node R4 is the first node
  • nodes R2 and R3 are both intermediate nodes.
  • the node R1 can send the message to the node R2 according to the first identification list
  • the node R2 can send the detection message to the node R3 according to the first identification list
  • the node R3 can send the detection message to the node R4 according to the first identification list.
  • the first node obtains a response message of the detection message, the response message carries a second identification list, the second identification list is obtained according to the first identification list, and the second identification list is used to indicate the first node to the second identification list
  • the second path of the node, the second identification list includes the first identification.
  • the detection message may be used to instruct the first node to obtain the response message. After receiving the detection packet, the first node can obtain a response packet of the detection packet.
  • the response packet carrying the second identification list Similar to the detection packet carrying the first identification list, the response packet carrying the second identification list.
  • the second identification list is obtained by the first node according to the first identification list carried in the detection message, the second identification list is used to indicate the second path from the first node to the second node, and the second identification list includes the first identification list.
  • a first identifier of the first intermediate node in the identifier list It can be seen that both the first identification list and the second identification list include the first identification of the first intermediate node.
  • the second path indicated by the second identifier list passes through the node indicated by the identifier in the second identifier list, and the second identifier list includes the first identifier of the first intermediate node. Therefore, the second path also passes through the first identifier in the first path. first intermediate node.
  • the first node sends a response message to the second node.
  • the first node may send the response message to the second node along the second path indicated by the second identifier list.
  • the detection message passes through each intermediate node on the second path in turn.
  • the intermediate node can send the detection message according to the second identification list. message.
  • node R4 can send the response message to node R3 according to the second identification list
  • node R3 can send the response message to node R2 according to the second identification list
  • node R2 can send the response message to node R1 according to the second identification list .
  • the intermediate nodes passed by the first path and the second path are the same as an example, and some intermediate nodes passed by the first path and the second path may be the same, but another part of the intermediate nodes are different.
  • the first path is path 1 in FIG. 5 (node R1 ⁇ node R2 ⁇ node R3 ⁇ node R4).
  • the second path may be: (node R4 ⁇ node R2 ⁇ node R1); or, if node R5 is connected to both node R2 and node R3, the second path may be: (node R4 ⁇ Node R3 ⁇ Node R5 ⁇ Node R2 ⁇ Node R1) and so on.
  • the second node may determine whether the first path is faulty according to the response packet of the detection packet. For example, if the second node receives the response message of the detection message within the duration threshold after sending the detection message, the second node can determine that the first path is not faulty; if the second node is sending the detection message If the response message is not received within the subsequent time duration threshold, the second node determines that the first path is faulty.
  • both the first identifier list and the second identifier list include the first identifier of the first intermediate node
  • both the first path and the second path pass through the first intermediate node indicated by the first identifier
  • the first path and the second path pass through the first intermediate node indicated by the first identifier.
  • the head and tail nodes of the path are opposite, so the second path has a higher degree of consistency with the first path. Therefore, the transmission path of the response packet is highly consistent with the transmission path of the detection packet, the transmission status of the response packet is relatively consistent with the transmission status of the detection packet, and the transmission status of the response packet can reflect the failure of the first path. In this case, the accuracy of the second node determining whether the first path is faulty according to the response message is relatively high.
  • the second node since the second node has high accuracy in determining whether the first path is faulty, the probability of service interruption caused by the second node switching paths when the first path is not faulty is reduced, and user experience is improved.
  • both the first identification list and the second identification list contain the first identification.
  • both the first identification list and the second identification list may also include: identifications of multiple intermediate nodes (including the first intermediate node) on the first path.
  • the order in which the identifiers of the plurality of intermediate nodes are arranged in the second identifier list is opposite to the order in which the identifiers of the plurality of intermediate nodes are arranged in the first identifier list. In this case, the consistency between the first path and the second path is further improved, and the accuracy with which the second node determines whether the first path is faulty according to the response message is further improved.
  • the first identification list includes: 3::, 2::, and the first path passes through nodes R1, R2, R3 and R4 in sequence;
  • the second identification list includes: 2: :, 3::, the second path passes through nodes R4, R3, R2 and R1 in sequence. At this time, the second path and the first path pass through the same node, and the degree of consistency between the first path and the second path is high.
  • the first path is consistent with the second path, and the consistency here can be strict consistency.
  • the nodes traversed by the first path and the second path are exactly the same, and the consistency here can also be non-strict consistency. are consistent, for example, the nodes traversed by the first path and the second path are only partially the same.
  • the multiple intermediate nodes may be some or all of the intermediate nodes on the first path, which is not limited in this embodiment of the present application.
  • the multiple intermediate nodes include: other nodes in the first path except the first node and the second node.
  • the degree of consistency between the first path and the second path is high.
  • the first node may obtain the second identification list in reverse order according to the identifications of the plurality of intermediate nodes in the first identification list, and encapsulate the second identification list into the response message.
  • the encapsulation can be completed according to an Operation Administration and Maintenance (OAM) instruction.
  • OAM Operation Administration and Maintenance
  • the first identification list and the second identification list include the identifications of the intermediate nodes.
  • the first identification list may further include the identification of the first node
  • the second identification list may further include the identification of the second node.
  • the identifiers of the nodes in the first identifier list may be sequentially arranged in the order of the nodes on the first path
  • the identifiers of the nodes in the second identifier list may be sequentially arranged in the order of the nodes on the second path.
  • the first path is path 1 in FIG. 5 (node R1 ⁇ node R2 ⁇ node R3 ⁇ node R4)
  • the second path is path 2 in FIG. 6 (node R4 ⁇ node R3 ⁇ node R2 ⁇ node R1)
  • the first identification list includes: 4::, 3::, 2::
  • the second identification list includes: 1::, 2:::, 3::.
  • the first identification list includes: the identification of the first node and the identification of each intermediate node on the first path
  • the second identification list includes: the identification of the second node and the identification of each intermediate node on the first path:
  • the first node may arrange the identifiers of multiple nodes in the first identifier list in reverse order, remove the identifier of the first node, and add the identifier of the second node to obtain the second identifier list.
  • the first node adds the identifier of the second node, if the identifiers of each node in the first identifier list are arranged in sequence according to the arrangement order of the nodes on the first path, the first node can remove the identifier of the first node After identification, the identification of the second node is added before the remaining identifications.
  • the first node can add the identifier of the second node after removing the identifier of the first node. After the rest of the logo.
  • the first node can first arrange these identifiers in reverse order to obtain 2: :, 3::, 4::. After that, the first node may remove the identifier 4:: of the first node (node R4) to obtain 2::, 3::. Finally, the first node can add the identifier 1:: of the second node (R1) before the remaining identifiers to obtain 1::, 2::, 3::.
  • the first node can first arrange these identifiers in reverse order to obtain 4 ::, 3::, 2::. After that, the first node may remove the identifier 4:: of the first node (node R4) to obtain 3::, 2::. Finally, the first node may add the identifier 1:: of the second node (R1) after the remaining identifiers to obtain 3::, 2::, 1::.
  • the identification of the second node may be obtained by the first node in any manner.
  • the detection packet sent by the second node also carries the address of the second node (not shown in FIG. 5 ), and the first node can determine the address of the second node according to the address of the second node carried in the detection packet. logo.
  • the first node may store a correspondence between the addresses of the nodes and the identifiers, and the first node may determine the identifier of the second node corresponding to the address of the second node according to the correspondence.
  • the above-mentioned first path may be a path of an SRv6 tunnel (also referred to as an SRv6 policy tunnel), the above-mentioned detection packet includes the first SRH, the first SRH carries the above-mentioned first identification list, and the above-mentioned response packet includes the second SRH. , the second SRH carries the above-mentioned second identifier list.
  • an SRv6 tunnel also referred to as an SRv6 policy tunnel
  • the above-mentioned detection packet includes the first SRH
  • the first SRH carries the above-mentioned first identification list
  • the above-mentioned response packet includes the second SRH.
  • the second SRH carries the above-mentioned second identifier list.
  • FIG. 7 is a schematic structural diagram of an SRH provided by an embodiment of the present application.
  • the SRH includes: a next header type (Next Header) field and a header length (Hdr Ext Len) field , Routing Type field, the number of remaining segments (Segments Left, SL) to the destination node, the last element index of the segment list (Last Entry) field, the flag field, the same group data identification (Tag) field, segment routing List field and optional content part (Optional Type Length Value Objects) field, and the optional content part field is variable.
  • the segment routing list field may carry the foregoing first identification list
  • the segment routing list field may carry the foregoing second identification list.
  • the above-mentioned first path may not be the path of the SRv6 tunnel, the above-mentioned detection packet includes the first load part, the first load part carries the first identification list, the above-mentioned response packet includes the second load part, and the second load part carries the first load part. 2. List of identities.
  • the detection packet generated by the second node carries the first identification list (or the first identification list and the address of the second node). Further, the detection packet also carries other contents, and the following will take the other four kinds of information carried by the detection packet as an example for description.
  • the detection message may also carry an operation code, which may be referred to as a first operation code.
  • the first operation code is used to instruct: to generate a response message carrying an identification list indicating the same and opposite directions as the first path.
  • the first node may generate a response message when the detection message carries the first operation code.
  • the first opcode may include: FE.
  • the first opcode may be carried in the SRH or other extension header of the detection packet.
  • the FE is used to instruct to generate a response packet carrying an identification list indicating the same and opposite directions as the first path.
  • the first opcode may be an identifier of the first node.
  • the identification of the first node as the first operation code may be the same or different from the identification of the first node in the first identification list.
  • the identifier of the first node as the first opcode in FIG. 5 is 4::FE
  • the identifier of the first node in the first identifier list is 4::.
  • the identifier of the first node can be used to instruct: to generate a response message carrying an identifier list used to indicate that the identifier is consistent with the first path and in the opposite direction.
  • the first opcode may be generated by the second node, or sent by the controller to the second node.
  • the detection packet may also carry the SL.
  • the first path may be divided into multiple path segments arranged in sequence, and the detection packet will be sequentially transmitted on the multiple path segments during the process of transmission on the first path.
  • SL is used to indicate the number of remaining segment indices to reach the destination node, and the number is equal to the number of path segments in the first path where the detection packet has not been transmitted.
  • path 1 (the first path) is divided into sequentially arranged: path segment 1 (node R1 ⁇ node R2), path segment 2 (node R2 ⁇ node R3), and path segment 3 (node R3) ⁇ Node R4), these three path segments are not marked in FIG. 5 .
  • node R2 can determine that the detection packet needs to be transmitted on path segment 2 and path segment 3 according to the first identifier list. Therefore, node R2 will determine the SL in the detection packet.
  • the detection packet may also carry a destination address (Destination Address, DA).
  • DA indicates the address of the next node to which the detection message needs to be transmitted in the first path.
  • the node R2 After receiving the detection packet sent by the node R1, the node R2 can determine that the detection packet needs to be transmitted to the node R3 according to the first identification list. If the identification of the node R3 is the address of the node R3, the node R2 will send the detection packet to the node R2.
  • the node R3 can determine that the detection packet needs to be transmitted to the node R4 according to the first identification list. If the identification of the node R4 is the address of the node R4, the node R3 will send the detection packet to the node R3.
  • the DA may be an Internet Protocol version 6 (Internet Protocol version 6, IPv6) DA.
  • the detection packet when the detection packet is an SBFD packet, the detection packet may carry an SBFD payload (payload).
  • the response message obtained by the first node carries the second identification list. Further, similar to the detection message, the response message also carries other contents, and the following will take the other four kinds of information carried by the response message as an example for description.
  • the response message may also carry an opcode, which is called a second opcode.
  • the second operation code is used to indicate: perform fault detection on the first path according to the response message.
  • the second operation code in the response message may include: FF.
  • the second opcode may be carried in the SRH or other extension headers of the detection packet. FF is used to instruct to perform fault detection on the first path according to the response packet.
  • the second opcode may be an identification of the second node.
  • the identification of the second node as the second operation code may be the same as or different from the identification of the second node in the second identification list.
  • the identifier of the second node as the second operation code in FIG. 6 is 1::FF
  • the identifier of the second node in the second identifier list is 1::.
  • the identifier of the second node may be used to indicate: perform fault detection on the first path according to the response message.
  • the second opcode may be generated by the first node, or sent by the controller to the first node.
  • the response message may also carry SL.
  • the second path may be divided into multiple path segments arranged in sequence, and the response packet will be transmitted on the multiple path segments in sequence during the process of transmission on the second path.
  • the SL is used to indicate the number of path segments in the second path for which the response packet has not been transmitted.
  • path 2 (second path) is divided into sequentially arranged: path segment 3 (node R3 ⁇ node R4), path segment 2 (node R2 ⁇ node R3), and path segment 1 (node R1) ⁇ Node R2), these three path segments are not marked in FIG. 6 .
  • node R3 can determine that the response message needs to be transmitted on path segment 2 and path segment 1 according to the second identification list. Therefore, node R3 will use the SL in the response message.
  • the response message may also carry DA.
  • the DA may be an Internet Protocol version 6 (Internet Protocol version 6, IPv6) DA.
  • the response packet is also an SBFD packet, and the response packet also carries an SBFD packet.
  • the detection message may carry the first operation code
  • the response message may carry the second operation code
  • the first operation code in the detection packet may be included in the first identification list, and the first operation code may be immediately followed by the identification of the first node.
  • the first operation code may be arranged after the identifier of the first node; when the identifier of the first node is the identifier ranked in the first identifier list In the case of the first flag, the first opcode may be ordered before the flag of the first node.
  • the first opcode (4::FE) in FIG. 5 is taken as an example outside the first identifier list.
  • the first opcode (4::FE) in FIG. 5 may also be included in the first identifier.
  • the first identification list may include: 4::FE, 4:::, 3::, 2::, or, 2::, 3::, 4::, 4::FE.
  • the second operation code in the response packet may also be included in the second identification list, and the second operation code may be followed by the identification of the second node.
  • the second operation code may be ranked after the identifier of the second node; when the identifier of the second node is the identifier ranked in the second identifier list
  • the second opcode may be queued before the identification of the second node when the first one is identified.
  • the second opcode (1::FF) in FIG. 6 is taken as an example outside the second identification list.
  • the second opcode (1::FF) in FIG. 6 may be included in the second identification list.
  • the second identification list may include: 1::FF, 1::, 2::, 3::, or, 3::, 2::, 1::, 1::FF.
  • the first identifier list includes the first opcode, the identifier of the first node, and the identifier of each intermediate node on the first path
  • the second identifier list includes the second opcode, the identifier of the second node, and the identifier of each intermediate node on the first path.
  • the first node may arrange the contents in the first identification list (including the first operation code and the identification of the node) in the reverse order, and remove the first operation code and the first operation code.
  • the identifier of the node, the identifier of the second node and the second operation code are added to obtain the second identifier list.
  • the first node may also send a first SBFD control packet to the second node, where the first SBFD control packet carries the SBFD description of the first node Discriminator and other information.
  • the second node may also send a second SBFD control packet to the first node, where the second SBFD control packet carries information such as the SBFD descriptor of the second node.
  • the SBFD descriptor of the node may be information such as the address of the node.
  • the first node may record the matching relationship between the SBFD descriptor of the first node and the SBFD descriptor of the second node.
  • the detection packet may carry the SBFD descriptor of the second node.
  • the first node may determine, according to the recorded matching relationship, that the SBFD descriptor of the second node carried in the detection packet is the same as that of the first node. Whether the SBFD descriptors match.
  • the first node performs the foregoing S403 only when the SBFD descriptor of the second node carried in the detection packet matches the SBFD descriptor of the first node, and the first node is in a working state.
  • the intermediate node in the first path does not adjust the first identification list when sending the detection packet as an example.
  • the intermediate node may further adjust the first identification list.
  • FIG. 8 is a flowchart of another message transmission method provided by an embodiment of the present application.
  • the message transmission method includes:
  • the second node generates a detection packet, where the detection packet carries a first identification list, where the first identification list is used to indicate a first path from the second node to the first node, and the first identification list includes: the first identification list on the first path An initial identification of an intermediate node.
  • the initial identification of the first intermediate node may be the node identification of the first intermediate node.
  • the second node sends a detection packet to the first intermediate node.
  • the first intermediate node updates the initial identifier in the first identifier list to the first identifier of the first intermediate node to obtain an updated detection message.
  • the initial identification and the first identification are two different identifications of the first intermediate node.
  • the identifier of the node is the SID of the node
  • the initial identifier and the first identifier are two different SIDs of the first intermediate node.
  • the initial identification includes: a node identification of the first intermediate node, where the node identification may be a Node SID, and the first identification includes: an identification of a port or link where the first intermediate node receives the detection packet, such as the first intermediate node.
  • the ID can be an End.X SID.
  • node R2 and node R3 are both the first intermediate nodes, and the first intermediate node in the detection packet sent by node R1 is the first
  • the identification list is the same as the first identification list in FIG. 5 , including 4::, 3::, and 2::.
  • the node R2 can update the initial identification of the node R2 in the first identification list (that is, the node identification 2:: of the node R2) is the identifier (2::1) of the port 1 in the node R2, and the first identifier list in the updated detection message includes: 4::, 3::, 2::1.
  • the node R3 can use the initial identification of the node R3 in the first identification list (that is, the node identification 3 of the node R3: ) is updated to the identifier (3::1) of port 1 in node R3, and the first identifier list in the updated detection message includes: 4::, 3::1, and 2::1.
  • the initial identifier may be the first End.X SID corresponding to the egress port through which the first intermediate node sends the detection packet
  • the first identifier may be the first SID corresponding to the ingress port through which the first intermediate node receives the detection packet. Two End.X SIDs.
  • node R2 and node R3 are both the first intermediate nodes
  • the first intermediate node in the detection packet sent by node R1 is the first
  • the list of identities includes 4::, 3::2, 2::2.
  • 2::2 represents the first End.X SID corresponding to the outgoing port 2 in the node R2 that sends the detection message
  • 3::2 represents the first End.X corresponding to the outbound port 2 in the node R3 that sends the detection message SID.
  • the node R2 can use the first End.X SID (eg 2::2) corresponding to the outbound port 2 of the node R2 in the first identification list to send the detection packet. ) is updated to the second End.X SID (2::1) corresponding to the ingress port 1 where the node R2 receives the detection message, and the first identifier list in the updated detection message includes: 4::, 3::2 , 2::1.
  • the node R3 can use the first End.X SID (such as 3::2) corresponding to the outbound port 2 of the node R3 in the first identification list to send the detection packet.
  • Update the second End.X SID (3::1) corresponding to the ingress port 1 where the node R3 receives the detection packet, and the first identifier list in the updated detection packet includes: 4::, 3::1, 2::1.
  • the first intermediate node sends the updated detection message to the first node.
  • the first intermediate node may send the updated detection packet according to the first identification list in the updated detection packet.
  • node R2 as the first intermediate node, can send the updated detection message to node R3 according to the first identification list in the updated detection message; node R3, as the first intermediate node, The updated detection message may be sent to the node R4 according to the first identification list in the updated detection message.
  • the first node obtains a response message of the detection message, the response message carries a second identification list, the second identification list is obtained according to the first identification list, and the second identification list is used to indicate the first node to the second identification list
  • the second path of the node, the second identification list includes the first identification.
  • the first node When the first node obtains the response message, it can obtain the second identification list according to the first identification list, and encapsulate the second identification list in the response message.
  • the detection packet received by the first node is the detection packet updated by the first intermediate node
  • the first identification list in the detection packet carries the first intermediate node
  • the first identifier is the identifier of the port or link of the first intermediate node. Therefore, the identifier of the first intermediate node in the second identifier list obtained by the first node is also the first identifier.
  • the node R4 is the first node, and the second identifier list in the response message generated by the node R4 includes: 1::, 2::1, and 3::1.
  • the first node sends a response message to the first intermediate node.
  • the first intermediate node sends a response message to the second node.
  • the second identifier list in this embodiment of the present application includes: the first identifier of the first intermediate node, and the first identifier is the identifier of the port or link through which the first intermediate node receives the detection packet, the first intermediate node is based on When the second identification list sends the response message, the response message may be sent from the port or link in the first intermediate node. In this way, it is ensured that the first intermediate node receives the detection packet and sends the response packet through the same port or link, thereby further improving the consistency of the transmission path of the detection packet and the transmission path of the response packet.
  • the second identification list in the response message in FIG. 10 includes: 1::, 2::1, 3::1, and nodes R2 and R3 are both first intermediate nodes.
  • the node R4 can send the response message to the node R3, and the node R3 can send the response message from the port 1 of the node R3 to the node R2 according to 3::1 in the second identification list.
  • the node R2 may send the response message from the port 1 of the node R2 to the node R1 according to 2::1 in the second identification list. It can be seen that the transmission path of the detection message is the same as the transmission path of the response message.
  • the first intermediate node may update the initial identification in the first identification list to the first identification of the first intermediate node when the detection packet carries the first indication in the above S803.
  • the first intermediate node may not change the initial identification. In this way, the first intermediate node can determine whether the identifier in the message needs to be changed according to the first instruction, thereby preventing the first intermediate node from changing the identifier in each received packet, reducing the need for power consumption of the first intermediate node.
  • the first indication may be carried at any position in the detection packet.
  • the flag field in the header of the detection packet may carry the first indication.
  • the flag field in FIG. 7 may include 8 bits from 0 to 7 (these bits are not shown in FIG. 7 ), wherein bit 7 may be used to carry the first indication. When the value of bit 7 is 1, bit 7 carries the first indication.
  • the first intermediate node can determine whether the detection packet carries the first indication according to the value of the bit 7, and then determines whether the identifier in the detection packet needs to be changed.
  • the identifier represented by the DA in the response packet is: the first identifier of the first intermediate node, such as the identifier of the port or link in the first intermediate node that receives the detection packet.
  • the first identifier list carried in the detection packet generated by the second node includes: the initial identifier of the first intermediate node. Since the first intermediate node updates the initial identification of the first intermediate node to the first identification, the first identification list carried in the detection packet received by the first node includes: the first identification of the first intermediate node. It can be seen that the initial identifier of the first intermediate node in the detection packet generated by the second node is different from the first identifier of the first intermediate node in the detection packet received by the first node.
  • the first identifier list carried in the detection packet generated by the second node includes: the first identifier of the first intermediate node.
  • the first identifier list carried in the detection packet received by the first node includes: the first identifier of the first intermediate node. It can be seen that the identifier of the first intermediate node in the detection packet generated by the second node is the same as the identifier of the first intermediate node in the detection packet received by the first node.
  • the first identifier generated by the second node is called the initial identifier
  • the first identifier generated by the second node is called the initial identifier
  • the first identifier generated by the second node The initial identifier of the first intermediate node in the detection packet is the same as the first identifier of the first intermediate node in the detection packet received by the first node.
  • the first intermediate node on the first path may update the detection packet.
  • the first node on the first path may also update the detection packet.
  • the detection message is updated.
  • both the first intermediate node and the first node on the first path may be called a third node
  • the third node can, after receiving the detection packet, convert the third node carried in the first identification list to the third node.
  • the initial identification of the node is updated to the first identification of the third node, and an updated detection packet is obtained, and then the updated detection packet is processed.
  • processing the updated detection message by the third node may include: the third node generates a response message according to the updated detection message.
  • processing the updated detection message by the third node may include: sending the updated detection message by the third node.
  • a node needs to include hardware and/or corresponding hardware for executing each function. software module.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different ways to implement the described functionality for each particular application in conjunction with the embodiments, but such implementations should not be considered beyond the scope of this application.
  • the corresponding device may be divided into functional modules according to the above method embodiments.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic, and specifically as a possible division manner of logical functions, there may be other division manners in actual implementation.
  • FIG. 11 is a block diagram of a message transmission device provided by an embodiment of the present application, and the message transmission device may belong to the first node in the foregoing embodiments, for example.
  • the message transmission device includes: a receiving module 1101, an obtaining module 1102 and a sending module 1103.
  • the receiving module 1101 is configured to receive a detection packet, the detection packet carries a first identification list, the first identification list is used to indicate the first path from the second node to the first node, and the first identification list includes: the first identification list on the first path.
  • a first identification of an intermediate node For operations performed by the receiving module 1101, reference may be made to the content related to the first node in the foregoing S402 and S804.
  • the obtaining module 1102 is used to obtain a response message of the detection message, the response message carries a second identification list, the second identification list is obtained according to the first identification list, and the second identification list is used to indicate the first node to the second identification list.
  • the second path of the node, the second identification list includes the first identification.
  • the sending module 1103 is configured to send a response message according to the second identification list.
  • the sending module 1103 reference may be made to the content related to the first node in the foregoing S404 and S805.
  • both the first identifier list and the second identifier list include the first identifier of the first intermediate node
  • both the first path and the second path pass through the first intermediate node indicated by the first identifier
  • the first path and the second path pass through the first intermediate node indicated by the first identifier.
  • the head and tail nodes of the path are opposite, so the second path has a higher degree of consistency with the first path. Therefore, the transmission path of the response packet is highly consistent with the transmission path of the detection packet, the transmission status of the response packet is relatively consistent with the transmission status of the detection packet, and the transmission status of the response packet can reflect the failure of the first path. In this case, the accuracy of the second node determining whether the first path is faulty according to the response message is relatively high.
  • the second node since the second node has high accuracy in determining whether the first path is faulty, the probability of service interruption caused by the second node switching paths when the first path is not faulty is reduced, and user experience is improved.
  • the detection message carries: an operation code, and the operation code is used to indicate: generate a response message carrying an identification list used to indicate that the first path is consistent and opposite to the direction; the obtaining module is used for: carrying in the detection message When there is an opcode, a response message is generated.
  • the detection packet carries an operation code
  • the first node may generate a response packet according to the instruction of the operation code, so that the efficiency of generating the response packet after the first node receives the detection packet can be improved.
  • the detection message may also not carry an operation code, which is not limited in this application.
  • the first identification list includes: identifications of multiple intermediate nodes on the first path; the second identification list also includes: identifications of multiple intermediate nodes; the order in which the identifications of multiple intermediate nodes are arranged in the second identification list , which is opposite to the order in which the identifiers of the multiple intermediate nodes are arranged in the first identifier list.
  • the consistency between the first path and the second path is further improved, and the accuracy with which the second node determines whether the first path is faulty according to the response message is further improved.
  • the plurality of intermediate nodes include: other nodes in the first path except the first node and the second node.
  • the degree of consistency between the first path and the second path is high.
  • the obtaining module is configured to: obtain the second identification list in reverse order according to the identifications of the plurality of intermediate nodes included in the first identification list; and encapsulate the second identification list into the response message.
  • the first identifier includes: an identifier of a port or link where the first intermediate node receives the detection packet.
  • the first identifier may also be the node identifier of the first intermediate node, which is not limited in this application.
  • the first identification includes: when the first intermediate node receives the identification of the port or link of the detection packet, when the first intermediate node sends the response packet according to the second identification list, the first intermediate node can send the response packet from the first intermediate node.
  • the port or link in the node sends a response packet. In this way, it is ensured that the first intermediate node receives the detection packet and sends the response packet through the same port or link, thereby further improving the consistency of the transmission path of the detection packet and the transmission path of the response packet.
  • the identifier of the first intermediate node in the detection packet sent by the second node may be the same as the first identifier Differently, after receiving the detection packet, the first intermediate node needs to update the identifier of the first intermediate node in the detection packet to the above-mentioned first identifier.
  • the second identification list may further include the identification of the second node.
  • the identification of the second node may be obtained by the first node in any manner.
  • the detection message also carries the address of the second node
  • the message transmission device further includes: a determination module (not shown in FIG. 11 ), configured to determine, according to the address of the second node, before obtaining the response message
  • the identifier of the second node, and the response message includes: the identifier of the second node.
  • the first node may store a correspondence between the addresses of the nodes and the identifiers, and the first node may determine the identifier of the second node corresponding to the address of the second node according to the correspondence.
  • the determining module reference may be made to the process of determining the identifier of the second node in the foregoing embodiments.
  • the detection packet includes a first SRH, and the first SRH carries a first identification list; the response packet includes a second SRH, and the second SRH carries a second identification list; or, the detection packet includes a first load part , the first load part carries the first identification list; the response message includes the second load part, and the second load part carries the second identification list.
  • the detection message is: SBFD message.
  • the detection message may also be other types of messages, which are not limited in this application.
  • FIG. 12 is a block diagram of another message transmission device provided by an embodiment of the present application.
  • the message transmission device may belong to the second node in the foregoing embodiments.
  • the message transmission device includes: a generating module 1201 and a sending module 1202 .
  • the generating module 1201 is configured to generate a detection packet, the detection packet carries a first identification list, the first identification list is used to indicate the first path from the second node to the first node, and the first identification list includes: the first identification list on the first path.
  • An initial identification of an intermediate node For the operations performed by the generation module 1201, reference may be made to the content related to the second node in the foregoing S401 and S801.
  • the sending module 1202 is used to send a detection message to the first node; the detection message is used to instruct the first node to obtain a response message of the detection message, and the response message carries a second identification list; the second identification list is the first The node is obtained according to the first identification list, the second identification list is used to indicate the second path from the first node to the second node, and the second identification list includes: the first identification of the first intermediate node.
  • the sending module 1202 reference may be made to the content related to the second node in the foregoing S402 and S802.
  • both the first identifier list and the second identifier list include the first identifier of the first intermediate node
  • both the first path and the second path pass through the first intermediate node indicated by the first identifier
  • the first path and the second path pass through the first intermediate node indicated by the first identifier.
  • the head and tail nodes of the path are opposite, so the second path has a higher degree of consistency with the first path. Therefore, the transmission path of the response packet is highly consistent with the transmission path of the detection packet, the transmission status of the response packet is relatively consistent with the transmission status of the detection packet, and the transmission status of the response packet can reflect the failure of the first path. In this case, the accuracy of the second node determining whether the first path is faulty according to the response message is relatively high.
  • the second node since the second node has high accuracy in determining whether the first path is faulty, the probability of service interruption caused by the second node switching paths when the first path is not faulty is reduced, and user experience is improved.
  • the detection message carries: an operation code; the operation code is used to instruct: to generate a response message carrying an identification list used to indicate that the first path is consistent and opposite in direction.
  • the detection packet carries an operation code
  • the first node may generate a response packet according to the instruction of the operation code, so that the efficiency of generating the response packet after the first node receives the detection packet can be improved.
  • the detection message may also not carry an operation code, which is not limited in this application.
  • the first identification list includes: identifications of multiple intermediate nodes on the first path; the second identification list also includes: identifications of multiple intermediate nodes; the order in which the identifications of multiple intermediate nodes are arranged in the second identification list , which is opposite to the order in which the identifiers of the multiple intermediate nodes are arranged in the first identifier list.
  • the consistency between the first path and the second path is further improved, and the accuracy with which the second node determines whether the first path is faulty according to the response message is further improved.
  • the detection packet further carries: a first indication; the first indication is used to instruct the first intermediate node: when the detection packet carries the first indication, the initial identification is updated to the first identification.
  • the first intermediate node may update the initial identification in the first identification list to the first identification of the first intermediate node when the detection packet carries the first indication.
  • the first intermediate node may not change the initial identification. In this way, the first intermediate node can determine whether the identifier in the message needs to be changed according to the first instruction, thereby preventing the first intermediate node from changing the identifier in each received packet, reducing the need for power consumption of the first intermediate node.
  • the flag field in the packet header of the detection packet carries the first indication.
  • the detection packet includes a first SRH, and the first SRH carries a first identification list; or, the detection packet includes a first load part, and the first load part carries the first identification list.
  • FIG. 13 is a block diagram of another message transmission device provided by an embodiment of the present application.
  • the message transmission device may belong to the third node on the first path in the embodiment shown in FIG. 8 , and the first path is the second node Path to the first node.
  • the message transmission device includes: a first receiving module 1301 , an updating module 1302 and a processing module 1303 .
  • the first receiving module 1301 is configured to receive a detection packet; the detection packet carries a first identification list, the first identification list is used to indicate the first path, and the first identification list includes the initial identification of the third node.
  • the first receiving module 1301 For operations performed by the first receiving module 1301, reference may be made to the content related to the first intermediate node in S802 above.
  • the updating module 1302 is configured to update the initial identifier in the first identifier list to the first identifier of the third node to obtain the updated detection message. For the operation performed by the update module 1302, reference may be made to the content related to the first intermediate node in the foregoing S803.
  • the processing module 1303 is configured to process the updated detection message. For operations performed by the processing module 1303, reference may be made to the content related to the first intermediate node in S804 above.
  • the third node may be the first node on the first path, or may be the first intermediate node on the first path.
  • the first intermediate node is any intermediate node on the first path.
  • the processing module 1303 is configured to generate a response message according to the updated detection message.
  • the processing module 1303 is configured to send the updated detection message.
  • the third node is the first intermediate node
  • the second intermediate node in the response packet generated by the first node according to the detection packet The identification list includes: the first identification of the first intermediate node, and the first identification is the identification of the port or link where the first intermediate node receives the detection message. Therefore, the first intermediate node sends the response message according to the second identification list. , a response message can be sent from the port or link in the first intermediate node. In this way, it is ensured that the first intermediate node receives the detection packet and sends the response packet through the same port or link, thereby further improving the consistency of the transmission path of the detection packet and the transmission path of the response packet.
  • the initial identification of the above-mentioned third node is different from the first identification.
  • the initial identification includes: the node identification of the third node, for example, the node identification may be the Node SID; the first identification includes: the third node receives the detection message.
  • the identifier of the port or link, such as the first identifier can be End.X SID.
  • the detection message further carries: a first indication
  • the updating module is configured to: when the detection message carries the first indication, update the initial identification to the first identification.
  • the third node can determine whether the identifier in the message needs to be changed according to the first instruction, thereby preventing the third node from changing the identifier in each received message, reducing the Power consumption of three nodes.
  • the message transmission device further includes: a second receiving module and a sending module (these two modules are not shown in FIG. 13 ).
  • the second receiving module is configured to receive a response message of the detection message after sending the updated detection message according to the first identification list; the response message carries a second identification list, and the second identification list is used to indicate The second path from the first node to the second node, the second identification list includes the first identification; the sending module is configured to send a response message according to the second identification list.
  • the operations performed by the second receiving module reference may be made to the content related to the first intermediate node in the above S806, and the operation performed by the sending module may refer to the content related to the first intermediate node in the above S807.
  • the message transmission device for the first node, the second node or the third node provided by the present application may include a processing module, a storage module and a communication module.
  • the processing module may be used to control and manage the actions of the message transmission device, for example, it may be used to support the message transmission device to perform the actions performed by the first node or the second node in the above S401 to S404, or it may use The actions performed by the first node, the second node or the first intermediate node in the foregoing S801 to S807 are performed on the device supporting message transmission.
  • the storage module can be used to support the message transmission device to execute stored program codes and data.
  • the communication module can be used for the communication between the message transmission device and other devices.
  • the processing module may be a processor or a controller. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure.
  • the processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and the like.
  • the storage module may be a memory.
  • the communication module may specifically be a device that interacts with other devices, such as a radio frequency circuit, a Bluetooth chip, and a Wi-Fi chip.
  • the processing module is a processor
  • the storage module is a memory
  • the communication module is a communication interface
  • the message transmission device involved in this embodiment may be a communication device having the structure shown in FIG. 2 .
  • the above-mentioned modules and the like included in the message transmission device may be computer programs stored in the memory and invoked by the processor to implement the corresponding execution functions of the modules.
  • the communication system includes: a first node and a second node.
  • the first node may include the message transmission device shown in FIG. 11
  • the second node may include the message transmission device shown in FIG. 12 .
  • the second node is configured to generate the detection packet and send the detection packet to the first node.
  • the detection packet generated by the second node carries a first identification list
  • the first identification list is used to indicate the first path from the second node to the first node
  • the first identification list includes: the first intermediate node on the first path initial identification.
  • the first node is used to: receive the detection packet, obtain a response packet of the detection packet, and send the response packet according to the second identification list carried in the response packet.
  • the detection packet received by the first node carries a first identification list, and the first identification list is used to indicate the first path from the second node to the first node, and the first identification list includes: the first identification list on the first path A first identifier of an intermediate node; the response message carries a second identifier list, the second identifier list is obtained by the first node according to the first identifier list, and the second identifier list is used to indicate the first node to the second node. Two paths, the second identifier list includes the first identifier.
  • the detection packet carries: an operation code, and the operation code is used to indicate: generate a response packet that carries an identification list that is consistent with the first path and in the opposite direction; the first node is used to carry in the detection packet When there is an opcode, a response message is generated.
  • the first identification list includes: identifications of multiple intermediate nodes on the first path; the second identification list also includes: identifications of multiple intermediate nodes; the order in which the identifications of multiple intermediate nodes are arranged in the second identification list , which is opposite to the order in which the identifiers of the multiple intermediate nodes are arranged in the first identifier list.
  • the plurality of intermediate nodes include: other nodes in the first path except the first node and the second node.
  • the first node is used to: obtain the second identification list in reverse order according to the identifications of multiple intermediate nodes included in the first identification list; and then encapsulate the second identification list into the response message .
  • the detection message also carries the address of the second node
  • the first node is further configured to: before obtaining the response message, determine the identifier of the second node according to the address of the second node, and the response message includes: The identifier of the second node.
  • the detection packet includes a first SRH, and the first SRH carries a first identification list; the response packet includes a second SRH, and the second SRH carries a second identification list; or, the detection packet includes a first load part , the first load part carries the first identification list; the response message includes the second load part, and the second load part carries the second identification list.
  • the detection message is: SBFD message.
  • the communication system provided in this embodiment of the present application further includes a first intermediate node on the above-mentioned first path.
  • the first intermediate node may include the message transmission device shown in FIG. 13 .
  • the first intermediate node is configured to: receive a detection packet, where the detection packet carries a first identification list, the first identification list is used to indicate the first path, and the first identification list includes the initial identification of the first intermediate node.
  • the first intermediate node is further configured to update the initial identification in the first identification list to the first identification of the first intermediate node after receiving the detection packet, obtain the updated detection packet, and send the updated detection packet according to the first identification list.
  • the updated detection message is configured to: receive a detection packet, where the detection packet carries a first identification list, the first identification list is used to indicate the first path, and the first identification list includes the initial identification of the first intermediate node.
  • the first intermediate node is further configured to update the initial identification in the first identification list to the first identification of the first intermediate node after receiving the detection packet, obtain the updated detection packet, and send the updated detection packet according to the first identification list.
  • the updated detection message is configured to: receive a detection packet, where the detection packet carries a first identification list, the first identification list is
  • the initial identification includes: a node identification of the first intermediate node; the first identification includes: an identification of a port or a link where the first intermediate node receives the detection message.
  • the detection packet further carries: a first indication
  • the first intermediate node is configured to: when the detection packet carries the first indication, update the initial identification to the first identification.
  • the first intermediate node is further configured to: after sending the updated detection message according to the first identification list, receive a response message of the detection message, and send the response message according to the second identification list carried in the response message. response message.
  • the response message carries a second identification list
  • the second identification list is used to indicate the second path from the first node to the second node
  • the second identification list includes the first identification.
  • the first intermediate node may update the detection packet, and optionally, the first node on the first path may also update the detection packet after receiving the detection packet.
  • the process of updating the detection message by the first node reference may be made to the above-mentioned process of updating the detection message by the first intermediate node, which is not repeated in this embodiment of the present application.
  • both the first intermediate node and the first node on the first path may be called a third node
  • the third node can, after receiving the detection packet, convert the third node carried in the first identification list to the third node.
  • the initial identification of the node is updated to the first identification of the third node, and an updated detection packet is obtained, and then the updated detection packet is processed.
  • processing the updated detection message by the third node may include: the third node generates a response message according to the updated detection message.
  • processing the updated detection message by the third node may include: sending the updated detection message by the third node.
  • At least one of the first intermediate node and the second node in the communication system is: the third node to which the message transmission device shown in FIG. 13 belongs.
  • the embodiments of the present application provide a computer storage medium, in which a computer program is stored; when the computer program runs on the computer, the computer program enables the computer to execute any of the message transmission methods provided by the embodiments of the present application.
  • the embodiment of the present application also provides a computer program product including instructions, when the computer program product runs on the message transmission device, the message transmission device is made to execute any of the message transmission methods provided by the embodiments of the present application.
  • the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware or any combination thereof.
  • software it may be implemented in whole or in part in the form of a computer program product comprising one or more computer instructions.
  • the computer program instructions When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated.
  • the computer may be a general purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be downloaded from a website, computer, server, or data
  • the center transmits to another website site, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line) or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that includes one or more available media integrated.
  • the usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media, or semiconductor media (eg, solid state drives), and the like.
  • first and second etc. are used for descriptive purposes only and should not be construed to indicate or imply relative importance.
  • the term “at least one” refers to one or more, and “plurality” refers to two or more, unless expressly limited otherwise.
  • the disclosed systems, devices, etc. may be implemented by other structural manners.
  • the device embodiments described above are only illustrative.
  • the division of modules is only a logical function division. In actual implementation, there may be other division methods.
  • multiple modules may be combined or integrated into another A system, or some feature, can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or modules, and may be in electrical or other forms.
  • Units described as separate components may or may not be physically separated, and components described as units may or may not be physical units, and may be located in one place or distributed to multiple devices. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

A packet transmission method, device and system, relating to the technical field of communications. The method comprises: after receiving a detection packet, a first node obtains and sends a response packet for the detection packet. The detection packet carries a first identifier list for indicating a first path from a second node to the first node, the first identifier list comprising a first identifier of a first intermediate node on the first path. The response packet carries a second identifier list, the second identifier list being used for indicating a second path from the first node to the second node, and the second identifier list comprising the first identifier. The first identifier list and the second identifier list each comprise the first identifier of the first intermediate node, and therefore, the first path and the second path both pass through the first intermediate node, the consistency between a transmission path of the response packet and a transmission path of the detection packet is relatively high, and the accuracy of fault detection performed by a head node according to the response packet is relatively high.

Description

报文传输方法、设备及系统Message transmission method, device and system
本申请要求于2020年12月21日提交的申请号为202011517278.8、申请名称为“一种报文发送方法、装置及系统”的中国专利申请的优先权,以及于2021年03月11日提交的申请号为202110267901.7、申请名称为“报文传输方法、设备及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202011517278.8 and the application name "A message sending method, device and system" filed on December 21, 2020, and the Chinese patent application filed on March 11, 2021 The priority of the Chinese patent application with the application number of 202110267901.7 and the application title of "Message Transmission Method, Device and System", the entire content of which is incorporated in this application by reference.
技术领域technical field
本申请涉及通信技术领域,特别涉及一种报文传输方法、设备及系统。The present application relates to the field of communication technologies, and in particular, to a message transmission method, device, and system.
背景技术Background technique
随着通信技术的发展,隧道技术在通信系统中得到了广泛应用。通信系统通常包括多个节点,节点能够采用隧道技术沿隧道的路径传输报文。为了使报文能够在路径上顺利的传输,路径的头节点需要对路径进行故障检测。With the development of communication technology, tunnel technology has been widely used in communication systems. A communication system usually includes a plurality of nodes, and the nodes can transmit packets along the path of the tunnel by using the tunneling technology. In order to enable the smooth transmission of packets on the path, the head node of the path needs to perform fault detection on the path.
示例地,以节点A到节点B的路径1为例,节点A在对路径1进行检测时,可以沿路径1向节点B发送检测报文。节点B在接收到该检测报文后,会根据网际互连协议(Internet Protocol,IP)路由确定节点B到节点A的最短路径(路径2),并沿路径2向节点A发送该检测报文的回应报文。若节点A在发出检测报文后的时长阈值内接收到该回应报文,则节点A确定路径1并未故障,且后续可以继续在路径1上传输报文。若节点A在发出检测报文后的时长阈值内并未接收到该回应报文,则节点A确定路径1故障,且后续不会在路径1上传输报文。For example, taking path 1 from node A to node B as an example, when node A detects path 1, node A may send a detection packet to node B along path 1. After receiving the detection packet, node B will determine the shortest path (path 2) from node B to node A according to the Internet Protocol (Internet Protocol, IP) routing, and send the detection packet to node A along path 2. response message. If node A receives the response message within the time period threshold after sending the detection message, node A determines that path 1 is not faulty, and can continue to transmit messages on path 1 subsequently. If node A does not receive the response message within the duration threshold after sending the detection message, node A determines that path 1 is faulty, and will not transmit messages on path 1 subsequently.
但是,由于回应报文传输的路径2可能与需要检测的路径1不同,当路径1并未故障且路径2故障时,节点A在发出检测报文后的时长阈值内无法接收到回应报文,此时节点A会确定路径1故障,这样的检测结果与实际情况不符。所以,路径故障检测的准确度较低。However, since the path 2 for the transmission of the response message may be different from the path 1 to be detected, when the path 1 is not faulty and the path 2 is faulty, node A cannot receive the response message within the time limit after sending the detection message. At this time, node A will determine that path 1 is faulty, and the detection result is inconsistent with the actual situation. Therefore, the accuracy of path fault detection is low.
发明内容SUMMARY OF THE INVENTION
本申请提供了一种报文传输方法、设备及系统,可以解决路径故障检测的准确度较低的问题,所述技术方案如下:The application provides a message transmission method, device and system, which can solve the problem of low accuracy of path fault detection. The technical solution is as follows:
第一方面,提供了一种报文传输方法,所述方法包括:第一节点在接收到检测报文后,获得并发送所述检测报文的回应报文。其中,所述检测报文携带有第一标识列表,所述第一标识列表用于指示第二节点到所述第一节点的第一路径,所述第一标识列表包括:所述第一路径上第一中间节点的第一标识;所述回应报文携带有第二标识列表,所述第二标识列表是第一节点根据所述第一标识列表获得的,所述第二标识列表用于指示所述第一节点到所述第二节点的第二路径,所述第二标识列表包括所述第一标识。In a first aspect, a message transmission method is provided, the method includes: after receiving a detection message, a first node obtains and sends a response message of the detection message. Wherein, the detection packet carries a first identification list, the first identification list is used to indicate the first path from the second node to the first node, and the first identification list includes: the first path the first identifier of the first intermediate node; the response message carries a second identifier list, the second identifier list is obtained by the first node according to the first identifier list, and the second identifier list is used for A second path from the first node to the second node is indicated, and the second identification list includes the first identification.
在第一标识列表和第二标识列表均包括第一中间节点的第一标识时,第一路径和第二路径均经过该第一标识所指示的第一中间节点,且第一路径和第二路径的头尾节点相反,因此,第二路径与第一路径的一致度较高。所以,回应报文的传输路径与检测报文的传输路径的一致度较高,回应报文的传输情况与检测报文的传输情况较为一致,回应报文的传输情况能够 反映第一路径的故障情况,第二节点根据该回应报文确定第一路径是否故障的准确度较高。When both the first identifier list and the second identifier list include the first identifier of the first intermediate node, both the first path and the second path pass through the first intermediate node indicated by the first identifier, and the first path and the second path pass through the first intermediate node indicated by the first identifier. The head and tail nodes of the path are opposite, so the second path has a higher degree of consistency with the first path. Therefore, the transmission path of the response packet is highly consistent with the transmission path of the detection packet, the transmission status of the response packet is relatively consistent with the transmission status of the detection packet, and the transmission status of the response packet can reflect the failure of the first path. In this case, the accuracy of the second node determining whether the first path is faulty according to the response message is relatively high.
并且,由于第二节点确定第一路径是否故障的准确度较高,因此,降低了第二节点在第一路径并未故障时切换路径而导致业务中断的概率,提升了用户体验。In addition, since the second node has high accuracy in determining whether the first path is faulty, the probability of service interruption caused by the second node switching paths when the first path is not faulty is reduced, and user experience is improved.
本申请实施例中的路径可以是隧道的路径,也可以不是隧道的路径,本申请实施例对此不作限定。其中,隧道可以是任一种类型的隧道,比如,基于第六版互联网协议的段路由策略(Segment Routing Internet Protocol version 6 policy,SRv6 policy)隧道,段路由流量工程隧道(Segment Routing Traffic Engineering Tunnel,SR-TE Tunnel),或尽力而为的段路由(Segment Routing Best Effort policy,SR-BE)等。当第一路径为隧道的路径时,第一标识列表可以是段路由列表(segment list)。The path in this embodiment of the present application may be a path of a tunnel, or may not be a path of a tunnel, which is not limited in this embodiment of the present application. The tunnel can be any type of tunnel, for example, a segment routing policy (Segment Routing Internet Protocol version 6 policy, SRv6 policy) tunnel based on the sixth version of the Internet Protocol, a segment routing traffic engineering tunnel (Segment Routing Traffic Engineering Tunnel, SR-TE Tunnel), or segment routing (Segment Routing Best Effort policy, SR-BE), etc. When the first path is the path of the tunnel, the first identification list may be a segment list.
可选地,所述检测报文携带有:操作码,所述操作码用于指示:生成携带有用于指示与所述第一路径一致且方向相反的标识列表的回应报文;第一节点可以在所述检测报文携带有所述操作码时,生成所述回应报文。在检测报文携带有操作码时,第一节点可以根据该操作码的指示,生成回应报文,这样一来,可以提升第一节点在接收到检测报文后生成回应报文的效率。该检测报文中也可以不携带有操作码,本申请对此不作限定。需要说明的是,本申请中第一路径与第二路径一致,此处的一致可以是严格的一致,如第一路径和第二路径所经过的节点完全相同,此处的一致也可以是非严格的一致,如第一路径和第二路径所经过的节点仅部分相同。Optionally, the detection message carries: an operation code, and the operation code is used to instruct: to generate a response message carrying an identification list that is used to indicate that the first path is consistent with and opposite to the direction; the first node may When the detection message carries the operation code, the response message is generated. When the detection packet carries an operation code, the first node may generate a response packet according to the instruction of the operation code, so that the efficiency of generating the response packet after the first node receives the detection packet can be improved. The detection message may also not carry an operation code, which is not limited in this application. It should be noted that, in this application, the first path is consistent with the second path, and the consistency here can be strict consistency. For example, the nodes traversed by the first path and the second path are exactly the same, and the consistency here can also be non-strict consistency. are consistent, for example, the nodes traversed by the first path and the second path are only partially the same.
可选地,所述第一标识列表包括:所述第一路径上多个中间节点的标识;所述第二标识列表也包括:所述多个中间节点的标识;所述多个中间节点的标识在所述第二标识列表中的排列顺序,与所述多个中间节点的标识在所述第一标识列表中的排列顺序相反。在这种情况下,第一路径和第二路径的一致度进一步提升,第二节点根据回应报文确定第一路径是否故障的准确度也进一步提升。Optionally, the first identifier list includes: identifiers of multiple intermediate nodes on the first path; the second identifier list also includes: identifiers of the multiple intermediate nodes; The arrangement order of the identifiers in the second identifier list is opposite to the arrangement order of the identifiers of the plurality of intermediate nodes in the first identifier list. In this case, the consistency between the first path and the second path is further improved, and the accuracy with which the second node determines whether the first path is faulty according to the response message is further improved.
上述多个中间节点可以是第一路径上的部分或全部中间节点,本申请对此不作限定。可选地,所述多个中间节点包括:所述第一路径中除所述第一节点和所述第二节点之外的其他节点。这种情况下,第一路径和第二路径的一致度较高。The above-mentioned multiple intermediate nodes may be some or all of the intermediate nodes on the first path, which is not limited in this application. Optionally, the plurality of intermediate nodes include: other nodes in the first path except the first node and the second node. In this case, the degree of consistency between the first path and the second path is high.
可选地,第一节点在获得检测报文的回应报文时,可以根据所述第一标识列表中包括的所述多个中间节点的标识,按照相反的顺序,获得所述第二标识列表,再将所述第二标识列表封装到所述回应报文中。Optionally, when the first node obtains the response message of the detection message, according to the identifiers of the multiple intermediate nodes included in the first identifier list, in the reverse order, obtain the second identifier list. , and then encapsulate the second identification list into the response message.
可选地,所述第一标识包括:所述第一中间节点接收所述检测报文的端口或链路的标识。或者,该第一标识也可以是第一中间节点的节点标识,本申请对此不作限定。需要说明的是,在第一标识包括:所述第一中间节点接收所述检测报文的端口或链路的标识时,第一中间节点在发送回应报文时,可以从该第一中间节点中的该端口或链路发送回应报文。这样一来,就保证了第一中间节点接收检测报文和发送回应报文的端口或链路相同,从而进一步提升了检测报文的传输路径与回应报文的传输路径的一致性。Optionally, the first identifier includes: an identifier of a port or link where the first intermediate node receives the detection packet. Alternatively, the first identifier may also be the node identifier of the first intermediate node, which is not limited in this application. It should be noted that, when the first identification includes: when the first intermediate node receives the identification of the port or link of the detection packet, when the first intermediate node sends the response packet, the first intermediate node may The port or link in the system sends a response packet. In this way, it is ensured that the first intermediate node receives the detection packet and sends the response packet through the same port or link, thereby further improving the consistency of the transmission path of the detection packet and the transmission path of the response packet.
在第一节点接收到的检测报文中的第一标识为第一中间节点的端口或链路的标识时,第二节点发出的检测报文中第一中间节点的标识可以与该第一标识不同,第一中间节点在接收到检测报文后,需要将该检测报文中第一中间节点的标识更新为上述第一标识。When the first identifier in the detection packet received by the first node is the identifier of the port or link of the first intermediate node, the identifier of the first intermediate node in the detection packet sent by the second node may be the same as the first identifier Differently, after receiving the detection packet, the first intermediate node needs to update the identifier of the first intermediate node in the detection packet to the above-mentioned first identifier.
可选地,第二标识列表还可以包括第二节点的标识。在第二标识列表包括第二节点的标识时,第二节点的标识可以由第一节点采用任一种方式获得。示例地,所述检测报文还携带 有所述第二节点的地址,第一节点在获得所述回应报文之前,可以根据所述第二节点的地址,确定所述第二节点的标识。第一节点中可以存储有节点的地址与标识的对应关系,第一节点可以根据该对应关系,确定第二节点的地址对应的第二节点的标识。Optionally, the second identification list may further include the identification of the second node. When the second identification list includes the identification of the second node, the identification of the second node may be obtained by the first node in any manner. Exemplarily, the detection message also carries the address of the second node, and before obtaining the response message, the first node may determine the identifier of the second node according to the address of the second node. The first node may store a correspondence between the address of the node and the identifier, and the first node may determine the identifier of the second node corresponding to the address of the second node according to the correspondence.
可选地,所述检测报文包括第一段路由扩展头(Segment Routing Header,SRH),所述第一SRH携带有所述第一标识列表;所述回应报文包括第二SRH,所述第二SRH携带有所述第二标识列表。或者,所述检测报文包括第一负载部分,所述第一负载部分携带有所述第一标识列表;所述回应报文包括第二负载部分,所述第二负载部分携带有所述第二标识列表。Optionally, the detection packet includes a first segment routing header (Segment Routing Header, SRH), the first SRH carries the first identification list; the response packet includes a second SRH, the The second SRH carries the second identification list. Or, the detection message includes a first load part, and the first load part carries the first identification list; the response message includes a second load part, and the second load part carries the first identification list. 2. List of identities.
可选地,所述检测报文为:无缝双向转发检测(Seamless Bidirectional Forwarding Detection,SBFD)报文。检测报文还可以是其他类型的报文,本申请对此不作限定。Optionally, the detection message is: a seamless bidirectional forwarding detection (Seamless Bidirectional Forwarding Detection, SBFD) message. The detection message may also be other types of messages, which are not limited in this application.
第二方面,提供了一种报文传输方法,所述方法包括:第二节点生成检测报文,并向第一节点发送所述检测报文。其中,所述检测报文携带有第一标识列表,所述第一标识列表用于指示所述第二节点到第一节点的第一路径,所述第一标识列表包括:所述第一路径上第一中间节点的初始标识。所述检测报文用于指示所述第一节点:获得所述检测报文的回应报文,所述回应报文携带有第二标识列表;所述第二标识列表是所述第一节点根据所述第一标识列表获得的,所述第二标识列表用于指示所述第一节点到所述第二节点的第二路径,所述第二标识列表包括:所述第一中间节点的第一标识。In a second aspect, a packet transmission method is provided, the method includes: a second node generates a detection packet, and sends the detection packet to the first node. Wherein, the detection packet carries a first identification list, the first identification list is used to indicate the first path from the second node to the first node, and the first identification list includes: the first path The initial identification of the first intermediate node. The detection packet is used to instruct the first node to obtain a response packet of the detection packet, and the response packet carries a second identification list; the second identification list is the basis of the first node. Obtained from the first identification list, the second identification list is used to indicate the second path from the first node to the second node, and the second identification list includes: an identification.
在第一标识列表和第二标识列表均包括第一中间节点的第一标识时,第一路径和第二路径均经过该第一标识所指示的第一中间节点,且第一路径和第二路径的头尾节点相反,因此,第二路径与第一路径的一致度较高。所以,回应报文的传输路径与检测报文的传输路径的一致度较高,回应报文的传输情况与检测报文的传输情况较为一致,回应报文的传输情况能够反映第一路径的故障情况,第二节点根据该回应报文确定第一路径是否故障的准确度较高。When both the first identifier list and the second identifier list include the first identifier of the first intermediate node, both the first path and the second path pass through the first intermediate node indicated by the first identifier, and the first path and the second path pass through the first intermediate node indicated by the first identifier. The head and tail nodes of the path are opposite, so the second path has a higher degree of consistency with the first path. Therefore, the transmission path of the response packet is highly consistent with the transmission path of the detection packet, the transmission status of the response packet is relatively consistent with the transmission status of the detection packet, and the transmission status of the response packet can reflect the failure of the first path. In this case, the accuracy of the second node determining whether the first path is faulty according to the response message is relatively high.
并且,由于第二节点确定第一路径是否故障的准确度较高,因此,降低了第二节点在第一路径并未故障时切换路径而导致业务中断的概率,提升了用户体验。In addition, since the second node has high accuracy in determining whether the first path is faulty, the probability of service interruption caused by the second node switching paths when the first path is not faulty is reduced, and user experience is improved.
可选地,所述检测报文携带有:操作码;所述操作码用于指示:生成携带有用于指示与所述第一路径一致且方向相反的标识列表的回应报文。在检测报文携带有操作码时,第一节点可以根据该操作码的指示,生成回应报文,这样一来,可以提升第一节点在接收到检测报文后生成回应报文的效率。该检测报文中也可以不携带有操作码,本申请对此不作限定。Optionally, the detection message carries: an operation code; the operation code is used to instruct: to generate a response message carrying an identification list used to indicate that the first path is consistent and opposite in direction. When the detection packet carries an operation code, the first node can generate a response packet according to the instruction of the operation code, so that the efficiency of generating the response packet after the first node receives the detection packet can be improved. The detection message may also not carry an operation code, which is not limited in this application.
可选地,所述第一标识列表包括:所述第一路径上多个中间节点的标识;所述第二标识列表也包括:所述多个中间节点的标识;所述多个中间节点的标识在所述第二标识列表中的排列顺序,与所述多个中间节点的标识在所述第一标识列表中的排列顺序相反。在这种情况下,第一路径和第二路径的一致度进一步提升,第二节点根据回应报文确定第一路径是否故障的准确度也进一步提升。Optionally, the first identifier list includes: identifiers of multiple intermediate nodes on the first path; the second identifier list also includes: identifiers of the multiple intermediate nodes; The arrangement order of the identifiers in the second identifier list is opposite to the arrangement order of the identifiers of the plurality of intermediate nodes in the first identifier list. In this case, the consistency between the first path and the second path is further improved, and the accuracy with which the second node determines whether the first path is faulty according to the response message is further improved.
可选地,所述检测报文还携带有:第一指示;所述第一指示用于指示所述第一中间节点:在所述检测报文携带有所述第一指示时,将所述初始标识更新为所述第一标识。相应地,第一中间节点可以在检测报文携带有第一指示时,将第一标识列表中的初始标识更新为第一中间节点的第一标识。在检测报文并未携带有第一指示时,第一中间节点可以不对该初始标识进行更改。这样一来,第一中间节点便可以根据该第一指示来判定是否需要对报文中的标识进行更改,从而避免了第一中间节点对接收到的每个报文中的标识进行更改,降低了第一中间节点的功耗。Optionally, the detection packet further carries: a first indication; the first indication is used to instruct the first intermediate node: when the detection packet carries the first indication, the The initial identification is updated to the first identification. Correspondingly, the first intermediate node may update the initial identification in the first identification list to the first identification of the first intermediate node when the detection packet carries the first indication. When the detection packet does not carry the first indication, the first intermediate node may not change the initial identification. In this way, the first intermediate node can determine whether the identifier in the message needs to be changed according to the first instruction, thereby preventing the first intermediate node from changing the identifier in each received packet, reducing the need for power consumption of the first intermediate node.
可选地,所述检测报文的报文头中的标志(Flags)字段携带有所述第一指示。Optionally, a flags (Flags) field in the packet header of the detection packet carries the first indication.
可选地,所述检测报文包括第一SRH,所述第一SRH携带有所述第一标识列表;或者,所述检测报文包括第一负载部分,所述第一负载部分携带有所述第一标识列表。Optionally, the detection packet includes a first SRH, and the first SRH carries the first identification list; or, the detection packet includes a first load part, and the first load part carries Describe the first identification list.
第三方面,提供了一种报文传输方法,所述方法由第一路径上的第三节点执行,所述第一路径为第二节点到第一节点的路径,所述方法包括:首先,第三节点接收检测报文。其中,所述检测报文携带有第一标识列表,所述第一标识列表用于指示所述第一路径,所述第一标识列表包括所述第三节点的初始标识。之后,第三节点将所述第一标识列表中的所述初始标识更新为所述第三节点的第一标识,得到更新后的所述检测报文,并对更新后的所述检测报文进行处理。A third aspect provides a packet transmission method, the method is performed by a third node on a first path, where the first path is a path from the second node to the first node, the method includes: first, The third node receives the detection message. Wherein, the detection packet carries a first identification list, the first identification list is used to indicate the first path, and the first identification list includes the initial identification of the third node. Afterwards, the third node updates the initial identification in the first identification list to the first identification of the third node, obtains the updated detection message, and analyzes the updated detection message to be processed.
第三节点可以是第一路径上的第一节点,也可以是第一路径上的第一中间节点,该第一中间节点为第一路径上的任一中间节点。当第三节点是第一节点时,第三节点对更新后的检测报文进行处理可以包括:第三节点根据该更新后的检测报文生成回应报文。当第三节点是第一中间节点时,第三节点对更新后的检测报文进行处理可以包括:第三节点发送该更新后的检测报文。The third node may be the first node on the first path, or may be the first intermediate node on the first path, where the first intermediate node is any intermediate node on the first path. When the third node is the first node, processing the updated detection message by the third node may include: the third node generates a response message according to the updated detection message. When the third node is the first intermediate node, processing the updated detection message by the third node may include: sending the updated detection message by the third node.
当第三节点是第一中间节点时,由于第一中间节点对检测报文中第一中间节点的标识进行了更新,因此,第一节点根据该检测报文生成的回应报文中的第二标识列表包括:第一中间节点的第一标识,且第一标识为第一中间节点接收检测报文的端口或链路的标识,因此,第一中间节点在发送回应报文时,可以从该第一中间节点中的该端口或链路发送回应报文。这样一来,就保证了第一中间节点接收检测报文和发送回应报文的端口或链路相同,从而进一步提升了检测报文的传输路径与回应报文的传输路径的一致性。When the third node is the first intermediate node, since the first intermediate node has updated the identifier of the first intermediate node in the detection packet, the second intermediate node in the response packet generated by the first node according to the detection packet The identifier list includes: the first identifier of the first intermediate node, and the first identifier is the identifier of the port or link where the first intermediate node receives the detection message. Therefore, when the first intermediate node sends the response message, the The port or link in the first intermediate node sends a response message. In this way, it is ensured that the first intermediate node receives the detection packet and sends the response packet through the same port or link, thereby further improving the consistency of the transmission path of the detection packet and the transmission path of the response packet.
上述第三节点的初始标识与第一标识不同,可选地,所述初始标识包括:所述第三节点的节点标识,如该节点标识可以为节点段标识(Node SID);所述第一标识包括:所述第三节点接收所述检测报文的端口或链路的标识,如该第一标识可以为链路段标识(End.X SID)。The initial identification of the above-mentioned third node is different from the first identification. Optionally, the initial identification includes: the node identification of the third node, for example, the node identification may be a node segment identification (Node SID); the first identification The identifier includes: an identifier of the port or link where the third node receives the detection message, for example, the first identifier may be a link segment identifier (End.X SID).
可选地,所述检测报文还携带有:第一指示,第三节点可以在所述检测报文携带有所述第一指示时,将所述初始标识更新为所述第一标识。在检测报文并未携带有第一指示时,第三节点可以不对该初始标识进行更改。这样一来,第三节点便可以根据该第一指示来判定是否需要对报文中的标识进行更改,从而避免了第三节点对接收到的每个报文中的标识进行更改,降低了第三节点的功耗。Optionally, the detection packet further carries: a first indication, and the third node may update the initial identification to the first identification when the detection packet carries the first indication. When the detection packet does not carry the first indication, the third node may not change the initial identification. In this way, the third node can determine whether the identifier in the message needs to be changed according to the first instruction, thereby preventing the third node from changing the identifier in each received message, reducing the Power consumption of three nodes.
可选地,第三节点为第一中间节点时,第三节点对更新后的所述检测报文进行处理,包括:第三节点发送更新后的所述检测报文;所述方法还包括:第三节点在对更新后的所述检测报文进行处理之后,接收所述检测报文的回应报文,并发送所述回应报文。其中,所述回应报文携带有第二标识列表,所述第二标识列表用于指示所述第一节点到所述第二节点的第二路径,所述第二标识列表包括所述第一标识。Optionally, when the third node is the first intermediate node, processing the updated detection packet by the third node includes: sending the updated detection packet by the third node; the method further includes: After processing the updated detection packet, the third node receives a response packet of the detection packet, and sends the response packet. Wherein, the response message carries a second identification list, the second identification list is used to indicate the second path from the first node to the second node, and the second identification list includes the first identification list. logo.
第四方面,提供了一种报文传输设备,所述报文传输设备属于第一节点,所述报文传输设备包括:接收模块、获得模块和发送模块。其中,接收模块用于接收检测报文,所述检测报文携带有第一标识列表,所述第一标识列表用于指示第二节点到所述第一节点的第一路径,所述第一标识列表包括:所述第一路径上第一中间节点的第一标识;获得模块用于获得所述检测报文的回应报文,所述回应报文携带有第二标识列表,所述第二标识列表是根据所述第一标识列表获得的,所述第二标识列表用于指示所述第一节点到所述第二节点的第二路径, 所述第二标识列表包括所述第一标识;发送模块用于发送所述回应报文。In a fourth aspect, a message transmission device is provided, the message transmission device belongs to the first node, and the message transmission device includes: a receiving module, an obtaining module, and a sending module. The receiving module is configured to receive a detection packet, the detection packet carries a first identification list, and the first identification list is used to indicate the first path from the second node to the first node. The identification list includes: the first identification of the first intermediate node on the first path; the obtaining module is used to obtain a response message of the detection message, the response message carries a second identification list, the second The identification list is obtained according to the first identification list, the second identification list is used to indicate the second path from the first node to the second node, and the second identification list includes the first identification ; The sending module is used to send the response message.
在第一标识列表和第二标识列表均包括第一中间节点的第一标识时,第一路径和第二路径均经过该第一标识所指示的第一中间节点,且第一路径和第二路径的头尾节点相反,因此,第二路径与第一路径的一致度较高。所以,回应报文的传输路径与检测报文的传输路径的一致度较高,回应报文的传输情况与检测报文的传输情况较为一致,回应报文的传输情况能够反映第一路径的故障情况,第二节点根据该回应报文确定第一路径是否故障的准确度较高。When both the first identifier list and the second identifier list include the first identifier of the first intermediate node, both the first path and the second path pass through the first intermediate node indicated by the first identifier, and the first path and the second path pass through the first intermediate node indicated by the first identifier. The head and tail nodes of the path are opposite, so the second path has a higher degree of consistency with the first path. Therefore, the transmission path of the response packet is highly consistent with the transmission path of the detection packet, the transmission status of the response packet is relatively consistent with the transmission status of the detection packet, and the transmission status of the response packet can reflect the failure of the first path. In this case, the accuracy of the second node determining whether the first path is faulty according to the response message is relatively high.
并且,由于第二节点确定第一路径是否故障的准确度较高,因此,降低了第二节点在第一路径并未故障时切换路径而导致业务中断的概率,提升了用户体验。In addition, since the second node has high accuracy in determining whether the first path is faulty, the probability of service interruption caused by the second node switching paths when the first path is not faulty is reduced, and user experience is improved.
可选地,所述检测报文携带有:操作码,所述操作码用于指示:生成携带有用于指示与所述第一路径一致且方向相反的标识列表的回应报文;所述获得模块用于:在所述检测报文携带有所述操作码时,生成所述回应报文。在检测报文携带有操作码时,第一节点可以根据该操作码的指示,生成回应报文,这样一来,可以提升第一节点在接收到检测报文后生成回应报文的效率。该检测报文中也可以不携带有操作码,本申请对此不作限定。Optionally, the detection message carries: an operation code, and the operation code is used to instruct: to generate a response message carrying an identification list that is used to indicate that the first path is consistent and in the opposite direction; the obtaining module It is used for: generating the response message when the detection message carries the operation code. When the detection packet carries an operation code, the first node may generate a response packet according to the instruction of the operation code, so that the efficiency of generating the response packet after the first node receives the detection packet can be improved. The detection message may also not carry an operation code, which is not limited in this application.
可选地,所述第一标识列表包括:所述第一路径上多个中间节点的标识;所述第二标识列表也包括:所述多个中间节点的标识;所述多个中间节点的标识在所述第二标识列表中的排列顺序,与所述多个中间节点的标识在所述第一标识列表中的排列顺序相反。在这种情况下,第一路径和第二路径的一致度进一步提升,第二节点根据回应报文确定第一路径是否故障的准确度也进一步提升。Optionally, the first identifier list includes: identifiers of multiple intermediate nodes on the first path; the second identifier list also includes: identifiers of the multiple intermediate nodes; The arrangement order of the identifiers in the second identifier list is opposite to the arrangement order of the identifiers of the plurality of intermediate nodes in the first identifier list. In this case, the consistency between the first path and the second path is further improved, and the accuracy with which the second node determines whether the first path is faulty according to the response message is further improved.
可选地,所述多个中间节点包括:所述第一路径中除所述第一节点和所述第二节点之外的其他节点。这种情况下,第一路径和第二路径的一致度较高。Optionally, the plurality of intermediate nodes include: other nodes in the first path except the first node and the second node. In this case, the degree of consistency between the first path and the second path is high.
可选地,所述获得模块用于:根据所述第一标识列表中包括的所述多个中间节点的标识,按照相反的顺序,获得所述第二标识列表;将所述第二标识列表封装到所述回应报文中。Optionally, the obtaining module is configured to: obtain the second identification list in reverse order according to the identifications of the multiple intermediate nodes included in the first identification list; encapsulated into the response message.
可选地,所述第一标识包括:所述第一中间节点接收所述检测报文的端口或链路的标识。或者,该第一标识也可以是第一中间节点的节点标识,本申请对此不作限定。需要说明的是,在第一标识包括:所述第一中间节点接收所述检测报文的端口或链路的标识时,第一中间节点在发送回应报文时,可以从该第一中间节点中的该端口或链路发送回应报文。这样一来,就保证了第一中间节点接收检测报文和发送回应报文的端口或链路相同,从而进一步提升了检测报文的传输路径与回应报文的传输路径的一致性。Optionally, the first identifier includes: an identifier of a port or link where the first intermediate node receives the detection packet. Alternatively, the first identifier may also be the node identifier of the first intermediate node, which is not limited in this application. It should be noted that, when the first identification includes: when the first intermediate node receives the identification of the port or link of the detection packet, when the first intermediate node sends the response packet, the first intermediate node may The port or link in the system sends a response packet. In this way, it is ensured that the first intermediate node receives the detection packet and sends the response packet through the same port or link, thereby further improving the consistency of the transmission path of the detection packet and the transmission path of the response packet.
在第一节点接收到的检测报文中的第一标识为第一中间节点的端口或链路的标识时,第二节点发出的检测报文中第一中间节点的标识可以与该第一标识不同,第一中间节点在接收到检测报文后,需要将该检测报文中第一中间节点的标识更新为上述第一标识。When the first identifier in the detection packet received by the first node is the identifier of the port or link of the first intermediate node, the identifier of the first intermediate node in the detection packet sent by the second node may be the same as the first identifier Differently, after receiving the detection packet, the first intermediate node needs to update the identifier of the first intermediate node in the detection packet to the above-mentioned first identifier.
可选地,第二标识列表还可以包括第二节点的标识。在第二标识列表包括第二节点的标识时,第二节点的标识可以由第一节点采用任一种方式获得。示例地,所述检测报文还携带有所述第二节点的地址,所述报文传输设备还包括:确定模块,用于在获得所述回应报文之前,根据所述第二节点的地址,确定所述第二节点的标识,所述回应报文包括:所述第二节点的标识。第一节点中可以存储有节点的地址与标识的对应关系,第一节点可以根据该对应关系,确定第二节点的地址对应的第二节点的标识。Optionally, the second identification list may further include the identification of the second node. When the second identification list includes the identification of the second node, the identification of the second node may be obtained by the first node in any manner. Exemplarily, the detection packet further carries the address of the second node, and the packet transmission device further includes: a determining module, configured to, before obtaining the response packet, determine the address of the second node according to the address of the second node. , determine the identifier of the second node, and the response message includes: the identifier of the second node. The first node may store a correspondence between the address of the node and the identifier, and the first node may determine the identifier of the second node corresponding to the address of the second node according to the correspondence.
可选地,所述检测报文包括第一SRH,所述第一SRH携带有所述第一标识列表;所述回应报文包括第二SRH,所述第二SRH携带有所述第二标识列表;或者,所述检测报文包括第 一负载部分,所述第一负载部分携带有所述第一标识列表;所述回应报文包括第二负载部分,所述第二负载部分携带有所述第二标识列表。Optionally, the detection message includes a first SRH, and the first SRH carries the first identifier list; the response message includes a second SRH, and the second SRH carries the second identifier or, the detection packet includes a first load part, and the first load part carries the first identification list; the response packet includes a second load part, and the second load part carries Describe the second identification list.
可选地,所述检测报文为:SBFD报文。检测报文还可以是其他类型的报文,本申请对此不作限定。Optionally, the detection message is: an SBFD message. The detection message may also be other types of messages, which are not limited in this application.
第五方面,提供了一种报文传输设备,所述报文传输设备属于第二节点,所述报文传输设备包括:生成模块和发送模块。其中,生成模块用于生成检测报文,所述检测报文携带有第一标识列表,所述第一标识列表用于指示所述第二节点到第一节点的第一路径,所述第一标识列表包括:所述第一路径上第一中间节点的初始标识;发送模块用于向第一节点发送所述检测报文;所述检测报文用于指示所述第一节点:获得所述检测报文的回应报文,所述回应报文携带有第二标识列表;所述第二标识列表是所述第一节点根据所述第一标识列表获得的,所述第二标识列表用于指示所述第一节点到所述第二节点的第二路径,所述第二标识列表包括:所述第一中间节点的第一标识。In a fifth aspect, a message transmission device is provided, the message transmission device belongs to the second node, and the message transmission device includes: a generating module and a sending module. The generating module is configured to generate a detection packet, the detection packet carries a first identification list, and the first identification list is used to indicate a first path from the second node to the first node, and the first identification list The identifier list includes: the initial identifier of the first intermediate node on the first path; the sending module is configured to send the detection message to the first node; the detection message is used to instruct the first node to obtain the The response message of the detection message, the response message carries a second identification list; the second identification list is obtained by the first node according to the first identification list, and the second identification list is used for A second path from the first node to the second node is indicated, and the second identification list includes: a first identification of the first intermediate node.
在第一标识列表和第二标识列表均包括第一中间节点的第一标识时,第一路径和第二路径均经过该第一标识所指示的第一中间节点,且第一路径和第二路径的头尾节点相反,因此,第二路径与第一路径的一致度较高。所以,回应报文的传输路径与检测报文的传输路径的一致度较高,回应报文的传输情况与检测报文的传输情况较为一致,回应报文的传输情况能够反映第一路径的故障情况,第二节点根据该回应报文确定第一路径是否故障的准确度较高。When both the first identifier list and the second identifier list include the first identifier of the first intermediate node, both the first path and the second path pass through the first intermediate node indicated by the first identifier, and the first path and the second path pass through the first intermediate node indicated by the first identifier. The head and tail nodes of the path are opposite, so the second path has a higher degree of consistency with the first path. Therefore, the transmission path of the response packet is highly consistent with the transmission path of the detection packet, the transmission status of the response packet is relatively consistent with the transmission status of the detection packet, and the transmission status of the response packet can reflect the failure of the first path. In this case, the accuracy of the second node determining whether the first path is faulty according to the response message is relatively high.
并且,由于第二节点确定第一路径是否故障的准确度较高,因此,降低了第二节点在第一路径并未故障时切换路径而导致业务中断的概率,提升了用户体验。In addition, since the second node has high accuracy in determining whether the first path is faulty, the probability of service interruption caused by the second node switching paths when the first path is not faulty is reduced, and user experience is improved.
可选地,所述检测报文携带有:操作码;所述操作码用于指示:生成携带有用于指示与所述第一路径一致且方向相反的标识列表的回应报文。在检测报文携带有操作码时,第一节点可以根据该操作码的指示,生成回应报文,这样一来,可以提升第一节点在接收到检测报文后生成回应报文的效率。该检测报文中也可以不携带有操作码,本申请对此不作限定。Optionally, the detection message carries: an operation code; the operation code is used to instruct: to generate a response message carrying an identification list used to indicate that the first path is consistent and opposite in direction. When the detection packet carries an operation code, the first node may generate a response packet according to the instruction of the operation code, so that the efficiency of generating the response packet after the first node receives the detection packet can be improved. The detection message may also not carry an operation code, which is not limited in this application.
可选地,所述第一标识列表包括:所述第一路径上多个中间节点的标识;所述第二标识列表也包括:所述多个中间节点的标识;所述多个中间节点的标识在所述第二标识列表中的排列顺序,与所述多个中间节点的标识在所述第一标识列表中的排列顺序相反。在这种情况下,第一路径和第二路径的一致度进一步提升,第二节点根据回应报文确定第一路径是否故障的准确度也进一步提升。Optionally, the first identifier list includes: identifiers of multiple intermediate nodes on the first path; the second identifier list also includes: identifiers of the multiple intermediate nodes; The arrangement order of the identifiers in the second identifier list is opposite to the arrangement order of the identifiers of the plurality of intermediate nodes in the first identifier list. In this case, the consistency between the first path and the second path is further improved, and the accuracy with which the second node determines whether the first path is faulty according to the response message is further improved.
可选地,所述检测报文还携带有:第一指示;所述第一指示用于指示所述第一中间节点:在所述检测报文携带有所述第一指示时,将所述初始标识更新为所述第一标识。相应地,第一中间节点可以在检测报文携带有第一指示时,将第一标识列表中的初始标识更新为第一中间节点的第一标识。在检测报文并未携带有第一指示时,第一中间节点可以不对该初始标识进行更改。这样一来,第一中间节点便可以根据该第一指示来判定是否需要对报文中的标识进行更改,从而避免了第一中间节点对接收到的每个报文中的标识进行更改,降低了第一中间节点的功耗。Optionally, the detection packet further carries: a first indication; the first indication is used to instruct the first intermediate node: when the detection packet carries the first indication, the The initial identification is updated to the first identification. Correspondingly, the first intermediate node may update the initial identification in the first identification list to the first identification of the first intermediate node when the detection packet carries the first indication. When the detection packet does not carry the first indication, the first intermediate node may not change the initial identification. In this way, the first intermediate node can determine whether the identifier in the message needs to be changed according to the first instruction, thereby preventing the first intermediate node from changing the identifier in each received packet, reducing the need for power consumption of the first intermediate node.
可选地,所述检测报文的报文头中的标志字段携带有所述第一指示。Optionally, the flag field in the packet header of the detection packet carries the first indication.
可选地,所述检测报文包括第一SRH,所述第一SRH携带有所述第一标识列表;或者,所述检测报文包括第一负载部分,所述第一负载部分携带有所述第一标识列表。Optionally, the detection packet includes a first SRH, and the first SRH carries the first identification list; or, the detection packet includes a first load part, and the first load part carries Describe the first identification list.
第六方面,提供了一种报文传输设备,所述报文传输设备属于第一路径上的第三节点, 所述第一路径为第二节点到第一节点的路径,所述报文传输设备包括:第一接收模块、更新模块和处理模块。其中,第一接收模块用于接收检测报文;所述检测报文携带有第一标识列表,所述第一标识列表用于指示所述第一路径,所述第一标识列表包括所述第三节点的初始标识;更新模块用于将所述第一标识列表中的所述初始标识更新为所述第三节点的第一标识,得到更新后的所述检测报文;处理模块用于对更新后的所述检测报文进行处理。A sixth aspect provides a message transmission device, the message transmission device belongs to a third node on a first path, the first path is a path from the second node to the first node, and the message transmission The device includes: a first receiving module, an updating module and a processing module. The first receiving module is configured to receive a detection packet; the detection packet carries a first identification list, the first identification list is used to indicate the first path, and the first identification list includes the first identification list. The initial identification of the three nodes; the updating module is used to update the initial identification in the first identification list to the first identification of the third node to obtain the updated detection message; the processing module is used to update the The updated detection message is processed.
第三节点可以是第一路径上的第一节点,也可以是第一路径上的第一中间节点,该第一中间节点为第一路径上的任一中间节点。当第三节点是第一节点时,第三节点对更新后的检测报文进行处理可以包括:第三节点根据该更新后的检测报文生成回应报文。当第三节点是第一中间节点时,第三节点对更新后的检测报文进行处理可以包括:第三节点发送该更新后的检测报文。The third node may be the first node on the first path, or may be the first intermediate node on the first path, where the first intermediate node is any intermediate node on the first path. When the third node is the first node, processing the updated detection message by the third node may include: the third node generates a response message according to the updated detection message. When the third node is the first intermediate node, processing the updated detection message by the third node may include: sending the updated detection message by the third node.
当第三节点是第一中间节点时,由于第一中间节点对检测报文中第一中间节点的标识进行了更新,因此,第一节点根据该检测报文生成的回应报文中的第二标识列表包括:第一中间节点的第一标识,且第一标识为第一中间节点接收检测报文的端口或链路的标识,因此,第一中间节点在发送回应报文时,可以从该第一中间节点中的该端口或链路发送回应报文。这样一来,就保证了第一中间节点接收检测报文和发送回应报文的端口或链路相同,从而进一步提升了检测报文的传输路径与回应报文的传输路径的一致性。When the third node is the first intermediate node, since the first intermediate node has updated the identifier of the first intermediate node in the detection packet, the second intermediate node in the response packet generated by the first node according to the detection packet The identifier list includes: the first identifier of the first intermediate node, and the first identifier is the identifier of the port or link where the first intermediate node receives the detection message. Therefore, when the first intermediate node sends the response message, the The port or link in the first intermediate node sends a response message. In this way, it is ensured that the first intermediate node receives the detection packet and sends the response packet through the same port or link, thereby further improving the consistency of the transmission path of the detection packet and the transmission path of the response packet.
上述第三节点的初始标识与第一标识不同,可选地,所述初始标识包括:所述第三节点的节点标识,如该节点标识可以为Node SID;所述第一标识包括:所述第三节点接收所述检测报文的端口或链路的标识,如该第一标识可以为End.X SID。The initial identification of the third node is different from the first identification. Optionally, the initial identification includes: the node identification of the third node, for example, the node identification may be Node SID; the first identification includes: the The identifier of the port or link where the third node receives the detection message, for example, the first identifier may be End.X SID.
可选地,所述检测报文还携带有:第一指示,所述更新模块用于:在所述检测报文携带有所述第一指示时,将所述初始标识更新为所述第一标识。这样一来,第三节点便可以根据该第一指示来判定是否需要对报文中的标识进行更改,从而避免了第三节点对接收到的每个报文中的标识进行更改,降低了第三节点的功耗。Optionally, the detection message further carries: a first indication, and the updating module is configured to: when the detection message carries the first indication, update the initial identifier to the first indication logo. In this way, the third node can determine whether the identifier in the message needs to be changed according to the first instruction, thereby preventing the third node from changing the identifier in each received message, reducing the Power consumption of three nodes.
可选地,所述报文传输设备还包括:第二接收模块和发送模块。其中,第二接收模块用于在处理模块对更新后的所述检测报文进行处理之后,接收所述检测报文的回应报文;所述回应报文携带有第二标识列表,所述第二标识列表用于指示所述第一节点到所述第二节点的第二路径,所述第二标识列表包括所述第一标识;发送模块用于发送所述回应报文。Optionally, the message transmission device further includes: a second receiving module and a sending module. The second receiving module is configured to receive a response message of the detection message after the processing module processes the updated detection message; the response message carries a second identification list, and the first The second identification list is used to indicate the second path from the first node to the second node, and the second identification list includes the first identification; the sending module is configured to send the response message.
第七方面,提供了一种通信设备,所述通信设备包括:处理器和存储器,所述存储器中存储有程序;所述处理器用于调用所述存储器中存储的程序,以使得所述通信设备执行如第一方面中任一设计所述的报文传输方法;或者,所述处理器用于调用所述存储器中存储的程序,以使得所述通信设备执行如第二方面任一设计所述的报文传输方法;或者,所述处理器用于调用所述存储器中存储的程序,以使得所述通信设备执行如第三方面任一设计所述的报文传输方法。In a seventh aspect, a communication device is provided, the communication device comprising: a processor and a memory, where a program is stored in the memory; the processor is configured to call the program stored in the memory, so that the communication device Execute the message transmission method according to any one of the designs in the first aspect; or, the processor is configured to call a program stored in the memory, so that the communication device executes the method described in any one of the designs in the second aspect A message transmission method; or, the processor is configured to call a program stored in the memory, so that the communication device executes the message transmission method according to any design of the third aspect.
第八方面,提供了一种通信系统,所述通信系统包括第一节点和第二节点;所述第一节点包括:第四方面任一设计所述的报文传输设备;所述第二节点包括:第五方面任一设计所述的报文传输设备。In an eighth aspect, a communication system is provided, the communication system includes a first node and a second node; the first node includes: the message transmission device according to any design of the fourth aspect; the second node Including: the message transmission device described in any one of the designs of the fifth aspect.
可选地,所述通信系统还包括:第一中间节点;所述第一中间节点和所述第二节点中的至少一个节点为:第六方面任一设计所述的报文传输设备所述的第三节点。Optionally, the communication system further includes: a first intermediate node; at least one of the first intermediate node and the second node is: the message transmission device described in any design of the sixth aspect the third node.
第九方面,提供了一种计算机存储介质,所述存储介质内存储有计算机程序;In a ninth aspect, a computer storage medium is provided, and a computer program is stored in the storage medium;
所述计算机程序在计算机上运行时,使得计算机执行第一方面任一设计所述的报文传输方法;或者,所述计算机程序在计算机上运行时,使得计算机执行第二方面任一设计所述的报文传输方法;或者,所述计算机程序在计算机上运行时,使得计算机执行第三方面任一设计所述的报文传输方法。When the computer program runs on the computer, the computer causes the computer to execute the message transmission method described in any design of the first aspect; or, when the computer program runs on the computer, the computer causes the computer to execute the message transmission method described in any design of the third aspect.
第十方面,提供了一种包含指令的计算机程序产品,当计算机程序产品在报文传输设备上运行时,使得报文传输设备执行如第一方面任一设计所述的报文传输方法;或者,当计算机程序产品在报文传输设备上运行时,使得报文传输设备执行如第二方面任一设计所述的报文传输方法;或者,当计算机程序产品在报文传输设备上运行时,使得报文传输设备执行如第三方面任一设计所述的报文传输方法;A tenth aspect provides a computer program product containing instructions, when the computer program product runs on the message transmission device, the message transmission device is made to execute the message transmission method described in any design of the first aspect; or , when the computer program product runs on the message transmission device, causes the message transmission device to execute the message transmission method described in any design of the second aspect; or, when the computer program product runs on the message transmission device, causing the message transmission device to execute the message transmission method described in any design of the third aspect;
第二方面至第十方面中任一种设计方式所带来的技术效果可参见第一方面中相应设计方式所带来的技术效果,此处不再赘述。For the technical effect brought by any one of the design methods in the second aspect to the tenth aspect, reference may be made to the technical effect brought by the corresponding design method in the first aspect, which will not be repeated here.
附图说明Description of drawings
图1为本申请实施例提供的一种通信系统的结构示意图;FIG. 1 is a schematic structural diagram of a communication system according to an embodiment of the present application;
图2为本申请实施例提供的一种通信设备的结构示意图;FIG. 2 is a schematic structural diagram of a communication device according to an embodiment of the present application;
图3为本申请实施例提供的一种报文传输过程示意图;3 is a schematic diagram of a message transmission process according to an embodiment of the present application;
图4为本申请实施例提供的一种报文传输方法的流程图;4 is a flowchart of a message transmission method provided by an embodiment of the present application;
图5为本申请实施例提供的另一种报文传输过程示意图;FIG. 5 is a schematic diagram of another message transmission process provided by an embodiment of the present application;
图6为本申请实施例提供的另一种报文传输过程示意图;FIG. 6 is a schematic diagram of another message transmission process provided by an embodiment of the present application;
图7为本申请实施例提供的一种SRH的结构示意图;FIG. 7 is a schematic structural diagram of an SRH provided by an embodiment of the present application;
图8为本申请实施例提供的另一种报文传输方法的流程图;FIG. 8 is a flowchart of another message transmission method provided by an embodiment of the present application;
图9为本申请实施例提供的另一种报文传输过程示意图;FIG. 9 is a schematic diagram of another message transmission process provided by an embodiment of the present application;
图10为本申请实施例提供的另一种报文传输过程示意图;FIG. 10 is a schematic diagram of another message transmission process provided by an embodiment of the present application;
图11为本申请实施例提供的一种报文传输设备的框图;11 is a block diagram of a message transmission device provided by an embodiment of the present application;
图12为本申请实施例提供的另一种报文传输设备的框图;12 is a block diagram of another message transmission device provided by an embodiment of the present application;
图13为本申请实施例提供的又一种报文传输设备的框图。FIG. 13 is a block diagram of still another message transmission device provided by an embodiment of the present application.
具体实施方式Detailed ways
为使本申请的原理和技术方案更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the principles and technical solutions of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
图1为本申请实施例提供的一种通信系统的结构示意图,如图1所示,通信系统包括多个节点,如图1中的节点R1、R2、R3、R4和R5。需要说明的是,本申请实施例不对通信系统中节点的个数进行限定,图1中以通信系统包括五个节点为例,通信系统中节点的个数也可以是其他数值,如2、10、100或1000等。FIG. 1 is a schematic structural diagram of a communication system provided by an embodiment of the present application. As shown in FIG. 1 , the communication system includes multiple nodes, such as nodes R1 , R2 , R3 , R4 and R5 in FIG. 1 . It should be noted that the embodiment of the present application does not limit the number of nodes in the communication system. In FIG. 1, the communication system includes five nodes as an example. The number of nodes in the communication system may also be other values, such as 2, 10 , 100 or 1000, etc.
通信系统中的节点可以是网关、路由器、路由器中的接口单元、服务器或者服务器集群等。通信系统中的节点均为通信设备,通信设备可以包括:处理器;处理器用于与存储器耦合,并读取存储器中的指令之后,根据指令执行如本申请实施例描述的由通信设备执行的方法。A node in a communication system may be a gateway, a router, an interface unit in a router, a server or a server cluster, and so on. The nodes in the communication system are all communication devices, and the communication device may include: a processor; the processor is configured to couple with the memory, and after reading the instructions in the memory, execute the method executed by the communication device as described in the embodiments of the present application according to the instructions .
在该通信设备中,处理器的个数可以为多个,与处理器耦合的存储器可以独立于处理器 之外或独立于通信设备之外,也可以在处理器或网络设备之内。存储器可以是物理上独立的单元,也可以是云服务器上的存储空间或网络硬盘等。可选地,存储器可以为一个或多个。当存储器的个数为多个时,可以位于相同的或不同的位置,并且可以独立或配合使用。示例性地,当存储器位于通信设备内部时,请参考图2,图2为本申请实施例提供的一种通信设备的结构示意图。该通信设备200包括:处理器202和存储器201,其中,存储器201用于存储程序,处理器202用于调用存储器201中存储的程序,以使得该通信设备执行相应的方法或功能。可选地,如图2所示,该通信设备200还可以包括至少一个通信接口203和至少一个通信总线204,本申请实施例中的接口(如通信接口203)也称端口。存储器201、处理器202以及通信接口203通过通信总线204通信连接。其中,通信接口203用于在处理器202的控制下与其他设备通信,处理器202可以通过通信总线204调用存储器201中存储的程序。本申请实施例提供的通信设备可以用于执行本申请后续实施例提供的报文传输方法中由第一节点、第二节点或第一中间节点执行操作。In the communication device, the number of processors may be multiple, and the memory coupled with the processors may be independent of the processor or independent of the communication device, and may also be within the processor or the network device. The storage can be a physically independent unit, or a storage space on a cloud server or a network hard disk. Optionally, the memory may be one or more. When the number of memories is multiple, they can be located in the same or different positions, and can be used independently or in combination. Exemplarily, when the memory is located inside the communication device, please refer to FIG. 2 , which is a schematic structural diagram of a communication device according to an embodiment of the present application. The communication device 200 includes: a processor 202 and a memory 201, wherein the memory 201 is used for storing a program, and the processor 202 is used for calling the program stored in the memory 201, so that the communication device executes a corresponding method or function. Optionally, as shown in FIG. 2 , the communication device 200 may further include at least one communication interface 203 and at least one communication bus 204 . An interface (eg, communication interface 203 ) in this embodiment of the present application is also called a port. The memory 201 , the processor 202 and the communication interface 203 are communicatively connected through a communication bus 204 . The communication interface 203 is used to communicate with other devices under the control of the processor 202 , and the processor 202 can call the program stored in the memory 201 through the communication bus 204 . The communication device provided by the embodiments of the present application may be used to perform operations performed by the first node, the second node, or the first intermediate node in the packet transmission methods provided by the subsequent embodiments of the present application.
通信系统中的各个节点之间存在连接关系,比如图1中的节点R1、R2、R3和R4依次连接,节点R1、节点R5和节点R4依次连接。基于节点之间的连接关系,通信系统中可以部署有报文传输的路径,该路径的头节点能够将报文沿该路径向该路径的尾节点传输。例如,图1所示的通信系统中部署的路径1可以为:节点R1→节点R2→节点R3→节点R4。该路径的头节点R1可以将报文依次经过节点R2和R3,传输至尾节点R4。There is a connection relationship between each node in the communication system, for example, the nodes R1, R2, R3 and R4 in FIG. 1 are connected in sequence, and the node R1, the node R5 and the node R4 are connected in sequence. Based on the connection relationship between nodes, a message transmission path can be deployed in the communication system, and the head node of the path can transmit the message along the path to the tail node of the path. For example, the path 1 deployed in the communication system shown in FIG. 1 may be: node R1→node R2→node R3→node R4. The head node R1 of the path can transmit the packet to the tail node R4 through the nodes R2 and R3 in sequence.
本申请实施例中的路径可以是隧道的路径,也可以不是隧道的路径,本申请实施例对此不作限定。其中,隧道可以是任一种类型的隧道,比如SRv6 policy隧道、SR-TE隧道或SR-BE等。The path in this embodiment of the present application may be a path of a tunnel, or may not be a path of a tunnel, which is not limited in this embodiment of the present application. The tunnel can be any type of tunnel, such as SRv6 policy tunnel, SR-TE tunnel, or SR-BE.
为了使报文能够在路径上顺利的传输,路径的头节点需要对路径进行故障检测。In order to enable the smooth transmission of packets on the path, the head node of the path needs to perform fault detection on the path.
示例地,图1中的头节点R1在对路径1进行检测时,如图3所示,可以沿路径1向尾节点R4发送检测报文。尾节点R4在接收到该检测报文后,会根据IP路由确定尾节点R4到头节点R1的最短路径2(节点R4→节点R5→节点R1),并沿该路径2向头节点R1发送该检测报文的回应报文。For example, when the head node R1 in FIG. 1 detects the path 1, as shown in FIG. 3 , it may send a detection packet to the tail node R4 along the path 1. After the tail node R4 receives the detection message, it will determine the shortest path 2 (node R4 → node R5 → node R1) from the tail node R4 to the head node R1 according to the IP route, and send the detection to the head node R1 along the path 2. message response message.
头节点R1在发出检测报文之后,可以判断发出检测报文后的时长阈值内是否接收到该检测报文的回应报文。若头节点R1在发出检测报文后的时长阈值内接收到该回应报文,则头节点R1确定该路径1并未故障,且后续可以继续在该路径1上传输报文。若头节点R1在发出检测报文后的时长阈值内并未接收到该回应报文,则头节点R1确定路径1故障,且后续不会在该路径1上传输报文。After sending the detection packet, the head node R1 may determine whether a response packet of the detection packet is received within the time duration threshold after the detection packet is sent. If the head node R1 receives the response message within the duration threshold after sending the detection message, the head node R1 determines that the path 1 is not faulty, and can continue to transmit messages on the path 1 subsequently. If the head node R1 does not receive the response message within the duration threshold after sending the detection message, the head node R1 determines that the path 1 is faulty, and will not transmit the message on the path 1 subsequently.
但是,由于回应报文传输的路径2(节点R4→节点R5→节点R1)与需要检测的路径1(节点R1→节点R2→节点R3→节点R4)不同,当路径1并未故障,且路径2故障时,头节点R1在发出检测报文后的时长阈值内无法接收到回应报文,此时头节点R1会确定路径1故障,这样的检测结果与实际情况不符。所以,路径故障检测的准确度较低。However, since the path 2 (node R4→node R5→node R1) for the transmission of the response message is different from the path 1 to be detected (node R1→node R2→node R3→node R4), when path 1 is not faulty, and the path 2 When the fault occurs, the head node R1 cannot receive the response packet within the time limit after sending the detection packet. At this time, the head node R1 will determine that the path 1 is faulty, and the detection result is inconsistent with the actual situation. Therefore, the accuracy of path fault detection is low.
本申请实施例提供了一种报文传输方法,该方法可以用于本申请实施例提供的通信系统。该报文传输方法能够根据检测报文所传输的第一路径,沿与该第一路径一致度较高的第二路径传输回应报文。这样一来,回应报文传输的路径与检测报文传输的路径的一致度较高,从而使得回应报文的传输情况能够反映第一路径的故障情况,因此,头节点根据该回应报文进 行故障检测的准确度较高。The embodiment of the present application provides a message transmission method, and the method can be used in the communication system provided by the embodiment of the present application. The message transmission method can transmit a response message along a second path with a high degree of consistency with the first path according to the first path transmitted by the detection message. In this way, the consistency of the transmission path of the response packet and the transmission path of the detection packet is high, so that the transmission of the response packet can reflect the failure of the first path. The accuracy of fault detection is high.
示例地,图4为本申请实施例提供的一种报文传输方法的流程图,如图4所示,该报文传输方法包括:Exemplarily, FIG. 4 is a flowchart of a message transmission method provided by an embodiment of the present application. As shown in FIG. 4 , the message transmission method includes:
S401、第二节点生成检测报文,检测报文携带有第一标识列表,第一标识列表用于指示第二节点到第一节点的第一路径,第一标识列表包括:第一路径上第一中间节点的第一标识。S401. The second node generates a detection packet, and the detection packet carries a first identification list, where the first identification list is used to indicate a first path from the second node to the first node, and the first identification list includes: the first identification list on the first path A first identification of an intermediate node.
本申请实施例以待检测的路径为第一路径为例,第一路径可以是隧道的路径,也可以不是隧道的路径,本申请实施例对此不作限定。第一路径的头节点为第二节点,第一路径的尾节点为第一节点。This embodiment of the present application takes the path to be detected as the first path as an example, and the first path may be a path of a tunnel, or may not be a path of a tunnel, which is not limited in this embodiment of the present application. The head node of the first path is the second node, and the tail node of the first path is the first node.
为了对第一路径进行故障检测,第一路径的头节点(第二节点)需要生成用于故障检测的检测报文。该检测报文携带有用于指示第一路径的第一标识列表,可选地,当第一路径为隧道的路径时,第一标识列表可以是段路由列表。本申请实施例中节点的标识可以是节点的任一种标识,包括:段标识(Segment Identifier,SID),如节点段标识(Node SID),或者,节点中用于发送检测报文的端口对应的链路段标识(End.X SID)。In order to perform fault detection on the first path, the head node (second node) of the first path needs to generate a detection packet for fault detection. The detection packet carries a first identification list for indicating the first path. Optionally, when the first path is a tunnel path, the first identification list may be a segment routing list. The identifier of the node in the embodiment of the present application may be any identifier of the node, including: a segment identifier (Segment Identifier, SID), such as a node segment identifier (Node SID), or, the port used to send the detection message in the node corresponds to The link segment identifier (End.X SID).
第一标识列表可以通过任一种方式指示第一路径,示例地,第一标识列表可以包括该第一路径上除头节点之外每个节点的标识(或者包括第一路径上每个节点的标识),且这些标识按照节点在第一路径上的排布顺序依次排布,从而使得第一标识列表指示第一路径。The first identification list may indicate the first path in any way. For example, the first identification list may include the identification of each node on the first path except the head node (or include the identification of each node on the first path. identifiers), and these identifiers are arranged in sequence according to the arrangement order of the nodes on the first path, so that the first identifier list indicates the first path.
例如,假设第一路径为图1所示的路径1(节点R1→节点R2→节点R3→节点R4),节点R1为第二节点,节点R4为第一节点。节点R1的标识为1::,节点R2的标识为2::,节点R3的标识为3::,节点R4的标识为4::。那么,如图5所示,检测报文携带的第一标识列表可以包括:4::,3::,2::。可选地,该第一标识列表也可以包括:2::,3::,4::,本申请实施例对此不作限定。For example, it is assumed that the first path is path 1 shown in FIG. 1 (node R1→node R2→node R3→node R4), node R1 is the second node, and node R4 is the first node. The identification of the node R1 is 1::, the identification of the node R2 is 2::, the identification of the node R3 is 3::, and the identification of the node R4 is 4::. Then, as shown in FIG. 5 , the first identification list carried in the detection packet may include: 4::, 3::, 2::. Optionally, the first identification list may also include: 2::, 3::, 4::, which is not limited in this embodiment of the present application.
第一路径包括位于第一节点和第二节点之间的至少一个中间节点,无论第一标识列表以何种方式指示第一路径,第一标识列表均可以包括:第一路径上第一中间节点的第一标识,该第一中间节点可以是该至少一个中间节点中的任一节点。The first path includes at least one intermediate node located between the first node and the second node, and no matter how the first identification list indicates the first path, the first identification list may include: the first intermediate node on the first path The first identifier of the first intermediate node may be any node in the at least one intermediate node.
第一标识列表所指示的第一路径经过该第一标识列表中的节点标识所指示的节点,第一标识列表包括第一中间节点的第一标识,且第一路径经过第一中间节点。The first path indicated by the first identification list passes through the node indicated by the node identification in the first identification list, the first identification list includes the first identification of the first intermediate node, and the first path passes through the first intermediate node.
需要说明的是,节点的标识可以是用于指示节点的节点标识(如节点的地址等),也可以是用于指示节点中某一部件的标识(如节点中某一端口或链路的标识),只要根据节点的标识能够确定节点即可。本申请实施例中以节点的标识为用于指示节点的节点标识为例。It should be noted that the identifier of the node can be a node identifier (such as the address of the node, etc.) used to indicate the node, or an identifier used to indicate a component in the node (such as the identifier of a port or link in the node). ), as long as the node can be determined according to the identification of the node. In the embodiment of the present application, the identifier of the node is used as an example to indicate the node identifier of the node.
第二节点生成的检测报文可以是任一种格式的检测报文,本申请实施例中以第二节点生成的检测报文为:SBFD报文为例。其中,SBFD是双向转发检测(Bidirectional Forwarding Detection,BFD)的一种简化机制,SBFD简化了BFD的状态机,缩短了节点之间的协商时间,提高了通信系统的灵活性,并且能够支持对段路由(Segment Routing,SR)隧道的路径进行故障检测。The detection packet generated by the second node may be a detection packet in any format. In the embodiment of the present application, the detection packet generated by the second node is an SBFD packet as an example. Among them, SBFD is a simplified mechanism of Bidirectional Forwarding Detection (BFD). SBFD simplifies the state machine of BFD, shortens the negotiation time between nodes, improves the flexibility of the communication system, and can support segment The path of the segment routing (SR) tunnel is used for fault detection.
S402、第二节点向第一节点发送检测报文。S402. The second node sends a detection packet to the first node.
第二节点在生成检测报文之后,可以沿第一标识列表所指示的第一路径,向第一节点发送该检测报文。检测报文在从第二节点传输至第一节点的过程中,依次经过该第一路径上的每个中间节点,中间节点在接收到该检测报文后均可以根据该第一标识列表发送该报文。After generating the detection packet, the second node may send the detection packet to the first node along the first path indicated by the first identification list. In the process of being transmitted from the second node to the first node, the detection message passes through each intermediate node on the first path in turn. After receiving the detection message, the intermediate node can send the detection message according to the first identification list. message.
例如,如图5所示,在路径1上,节点R1为第二节点,节点R4为第一节点,节点R2 和R3均为中间节点。节点R1可以根据第一标识列表将报文发送至节点R2,节点R2可以根据第一标识列表将检测报文发送至节点R3,节点R3可以根据第一标识列表将检测报文发送至节点R4。For example, as shown in FIG. 5 , on path 1, node R1 is the second node, node R4 is the first node, and nodes R2 and R3 are both intermediate nodes. The node R1 can send the message to the node R2 according to the first identification list, the node R2 can send the detection message to the node R3 according to the first identification list, and the node R3 can send the detection message to the node R4 according to the first identification list.
S403、第一节点获得检测报文的回应报文,回应报文携带有第二标识列表,第二标识列表是根据第一标识列表获得的,第二标识列表用于指示第一节点到第二节点的第二路径,第二标识列表包括第一标识。S403, the first node obtains a response message of the detection message, the response message carries a second identification list, the second identification list is obtained according to the first identification list, and the second identification list is used to indicate the first node to the second identification list The second path of the node, the second identification list includes the first identification.
检测报文可以用于指示第一节点获得该回应报文。第一节点在接收到检测报文后,可以获得检测报文的回应报文。The detection message may be used to instruct the first node to obtain the response message. After receiving the detection packet, the first node can obtain a response packet of the detection packet.
类似检测报文携带有第一标识列表,回应报文携带有第二标识列表。其中,该第二标识列表是第一节点根据检测报文携带的第一标识列表获得的,第二标识列表用于指示第一节点到第二节点的第二路径,第二标识列表包括第一标识列表中第一中间节点的第一标识。可见,第一标识列表和第二标识列表均包含第一中间节点的第一标识。Similar to the detection packet carrying the first identification list, the response packet carrying the second identification list. The second identification list is obtained by the first node according to the first identification list carried in the detection message, the second identification list is used to indicate the second path from the first node to the second node, and the second identification list includes the first identification list. A first identifier of the first intermediate node in the identifier list. It can be seen that both the first identification list and the second identification list include the first identification of the first intermediate node.
第二标识列表所指示的第二路径经过该第二标识列表中的标识所指示的节点,第二标识列表包括第一中间节点的第一标识,因此,第二路径也经过第一路径中的第一中间节点。The second path indicated by the second identifier list passes through the node indicated by the identifier in the second identifier list, and the second identifier list includes the first identifier of the first intermediate node. Therefore, the second path also passes through the first identifier in the first path. first intermediate node.
S404、第一节点向第二节点发送回应报文。S404. The first node sends a response message to the second node.
第一节点在获得回应报文后,可以沿第二标识列表所指示的第二路径向第二节点发送回应报文。After obtaining the response message, the first node may send the response message to the second node along the second path indicated by the second identifier list.
检测报文在从第一节点传输至第二节点的过程中,依次经过该第二路径上的每个中间节点,中间节点在接收到该检测报文后均可以根据该第二标识列表发送该报文。In the process of being transmitted from the first node to the second node, the detection message passes through each intermediate node on the second path in turn. After receiving the detection message, the intermediate node can send the detection message according to the second identification list. message.
例如,如图6所示,假设第二路径为路径2(节点R4→节点R3→节点R2→节点R1),在路径2上,节点R1为第二节点,节点R4为第一节点,节点R2和R3均为中间节点。节点R4可以根据第二标识列表将回应报文发送至节点R3,节点R3可以根据第二标识列表将回应报文发送至节点R2,节点R2可以根据第二标识列表将回应报文发送至节点R1。For example, as shown in FIG. 6 , assuming that the second path is path 2 (node R4→node R3→node R2→node R1), on path 2, node R1 is the second node, node R4 is the first node, and node R2 and R3 are intermediate nodes. Node R4 can send the response message to node R3 according to the second identification list, node R3 can send the response message to node R2 according to the second identification list, node R2 can send the response message to node R1 according to the second identification list .
需要说明的是,本申请实施例中以第一路径和第二路径经过的中间节点相同为例,也可以是第一路径和第二路径经过的一部分中间节点相同,而另一部分中间节点不同。例如,第一路径为图5中的路径1(节点R1→节点R2→节点R3→节点R4)。若节点R4与节点R2连接,则第二路径可以为:(节点R4→节点R2→节点R1);或者,若节点R5与节点R2和节点R3均连接,则第二路径可以为:(节点R4→节点R3→节点R5→节点R2→节点R1)等。It should be noted that, in the embodiment of the present application, the intermediate nodes passed by the first path and the second path are the same as an example, and some intermediate nodes passed by the first path and the second path may be the same, but another part of the intermediate nodes are different. For example, the first path is path 1 in FIG. 5 (node R1→node R2→node R3→node R4). If node R4 is connected to node R2, the second path may be: (node R4→node R2→node R1); or, if node R5 is connected to both node R2 and node R3, the second path may be: (node R4 →Node R3→Node R5→Node R2→Node R1) and so on.
第二节点在发出检测报文后,可以根据检测报文的回应报文确定第一路径是否故障。示例地,若第二节点在发出检测报文后的时长阈值内接收到该检测报文的回应报文,则第二节点可以确定第一路径并未故障;若第二节点在发出检测报文后的时长阈值内并未接收到该回应报文,则第二节点确定第一路径故障。After sending the detection packet, the second node may determine whether the first path is faulty according to the response packet of the detection packet. For example, if the second node receives the response message of the detection message within the duration threshold after sending the detection message, the second node can determine that the first path is not faulty; if the second node is sending the detection message If the response message is not received within the subsequent time duration threshold, the second node determines that the first path is faulty.
在第一标识列表和第二标识列表均包括第一中间节点的第一标识时,第一路径和第二路径均经过该第一标识所指示的第一中间节点,且第一路径和第二路径的头尾节点相反,因此,第二路径与第一路径的一致度较高。所以,回应报文的传输路径与检测报文的传输路径的一致度较高,回应报文的传输情况与检测报文的传输情况较为一致,回应报文的传输情况能够反映第一路径的故障情况,第二节点根据该回应报文确定第一路径是否故障的准确度较高。When both the first identifier list and the second identifier list include the first identifier of the first intermediate node, both the first path and the second path pass through the first intermediate node indicated by the first identifier, and the first path and the second path pass through the first intermediate node indicated by the first identifier. The head and tail nodes of the path are opposite, so the second path has a higher degree of consistency with the first path. Therefore, the transmission path of the response packet is highly consistent with the transmission path of the detection packet, the transmission status of the response packet is relatively consistent with the transmission status of the detection packet, and the transmission status of the response packet can reflect the failure of the first path. In this case, the accuracy of the second node determining whether the first path is faulty according to the response message is relatively high.
并且,由于第二节点确定第一路径是否故障的准确度较高,因此,降低了第二节点在第一路径并未故障时切换路径而导致业务中断的概率,提升了用户体验。In addition, since the second node has high accuracy in determining whether the first path is faulty, the probability of service interruption caused by the second node switching paths when the first path is not faulty is reduced, and user experience is improved.
上述实施例中以第一标识列表和第二标识列表均包含第一标识为例。可选地,第一标识列表和第二标识列表也可以均包括:第一路径上多个中间节点(包括第一中间节点)的标识。该多个中间节点的标识在第二标识列表中的排列顺序,与该多个中间节点的标识在第一标识列表中的排列顺序相反。在这种情况下,第一路径和第二路径的一致度进一步提升,第二节点根据回应报文确定第一路径是否故障的准确度也进一步提升。In the above embodiment, it is taken as an example that both the first identification list and the second identification list contain the first identification. Optionally, both the first identification list and the second identification list may also include: identifications of multiple intermediate nodes (including the first intermediate node) on the first path. The order in which the identifiers of the plurality of intermediate nodes are arranged in the second identifier list is opposite to the order in which the identifiers of the plurality of intermediate nodes are arranged in the first identifier list. In this case, the consistency between the first path and the second path is further improved, and the accuracy with which the second node determines whether the first path is faulty according to the response message is further improved.
例如,如图5所示,第一标识列表包括:3::,2::,第一路径依次经过节点R1、R2、R3和R4;如图6所示,第二标识列表包括:2::,3::,第二路径依次经过节点R4、R3、R2和R1。此时,第二路径与第一路径经过相同的节点,第一路径和第二路径的一致度较高。For example, as shown in Figure 5, the first identification list includes: 3::, 2::, and the first path passes through nodes R1, R2, R3 and R4 in sequence; as shown in Figure 6, the second identification list includes: 2: :, 3::, the second path passes through nodes R4, R3, R2 and R1 in sequence. At this time, the second path and the first path pass through the same node, and the degree of consistency between the first path and the second path is high.
需要说明的是,本申请中第一路径与第二路径一致,此处的一致可以是严格的一致,如第一路径和第二路径所经过的节点完全相同,此处的一致也可以是非严格的一致,如第一路径和第二路径所经过的节点仅部分相同。It should be noted that, in this application, the first path is consistent with the second path, and the consistency here can be strict consistency. For example, the nodes traversed by the first path and the second path are exactly the same, and the consistency here can also be non-strict consistency. are consistent, for example, the nodes traversed by the first path and the second path are only partially the same.
可选地,该多个中间节点可以是第一路径上的部分或全部中间节点,本申请实施例对此不作限定。当该多个中间节点为第一路径上的全部中间节点时,该多个中间节点包括:第一路径中除第一节点和第二节点之外的其他节点。这种情况下,第一路径和第二路径的一致度较高。在S403中,第一节点可以根据第一标识列表中多个中间节点的标识,按照相反的顺序,获得第二标识列表,并将第二标识列表封装到回应报文中。其中,第一节点在将第二标识列表封装到回应报文中时,可以根据操作维护管理(Operation Administration and Maintenance,OAM)指示完成封装。Optionally, the multiple intermediate nodes may be some or all of the intermediate nodes on the first path, which is not limited in this embodiment of the present application. When the multiple intermediate nodes are all intermediate nodes on the first path, the multiple intermediate nodes include: other nodes in the first path except the first node and the second node. In this case, the degree of consistency between the first path and the second path is high. In S403, the first node may obtain the second identification list in reverse order according to the identifications of the plurality of intermediate nodes in the first identification list, and encapsulate the second identification list into the response message. Wherein, when the first node encapsulates the second identification list into the response message, the encapsulation can be completed according to an Operation Administration and Maintenance (OAM) instruction.
上述实施例中以第一标识列表和第二标识列表包括中间节点的标识为例。可选地,第一标识列表还可以包括第一节点的标识,第二标识列表还可以包括第二节点的标识。第一标识列表中节点的标识可以按照节点在第一路径上的顺序依次排布,第二标识列表中节点的标识可以按照节点在第二路径上的顺序依次排布。In the above embodiment, it is taken as an example that the first identification list and the second identification list include the identifications of the intermediate nodes. Optionally, the first identification list may further include the identification of the first node, and the second identification list may further include the identification of the second node. The identifiers of the nodes in the first identifier list may be sequentially arranged in the order of the nodes on the first path, and the identifiers of the nodes in the second identifier list may be sequentially arranged in the order of the nodes on the second path.
例如,以第一路径为图5中的路径1(节点R1→节点R2→节点R3→节点R4),第二路径为图6中的路径2(节点R4→节点R3→节点R2→节点R1)为例。那么,第一标识列表包括:4::,3::,2::,第二标识列表包括:1::,2::,3::。For example, the first path is path 1 in FIG. 5 (node R1→node R2→node R3→node R4), and the second path is path 2 in FIG. 6 (node R4→node R3→node R2→node R1) For example. Then, the first identification list includes: 4::, 3::, 2::, and the second identification list includes: 1::, 2::, 3::.
在第一标识列表包括:第一节点的标识以及第一路径上每个中间节点的标识,第二标识列表包括:第二节点的标识以及第一路径上每个中间节点的标识的情况下:In the case where the first identification list includes: the identification of the first node and the identification of each intermediate node on the first path, and the second identification list includes: the identification of the second node and the identification of each intermediate node on the first path:
在S403中,第一节点可以将第一标识列表中多个节点的标识按照相反的顺序排布,去掉第一节点的标识,添加第二节点的标识,从而得到第二标识列表。其中,第一节点在添加第二节点的标识时,若第一标识列表中各个节点的标识按照节点在第一路径上的排布顺序依次排布,则第一节点可以在去掉第一节点的标识后,将第二节点的标识添加在剩余的标识之前。若第一标识列表中各个节点的标识按照节点在第一路径上的排布顺序的相反顺序依次排布,则第一节点可以在去掉第一节点的标识后,将第二节点的标识添加在剩余的标识之后。In S403, the first node may arrange the identifiers of multiple nodes in the first identifier list in reverse order, remove the identifier of the first node, and add the identifier of the second node to obtain the second identifier list. Wherein, when the first node adds the identifier of the second node, if the identifiers of each node in the first identifier list are arranged in sequence according to the arrangement order of the nodes on the first path, the first node can remove the identifier of the first node After identification, the identification of the second node is added before the remaining identifications. If the identifiers of each node in the first identifier list are arranged in the reverse order of the arrangement order of the nodes on the first path, the first node can add the identifier of the second node after removing the identifier of the first node. After the rest of the logo.
例如,仍然以图5和图6为例,假设第一标识列表包括:4::,3::,2::,则第一节点可以先将这些标识按照相反的顺序排布,得到2::,3::,4::。之后,第一节点可以去除第一节点(节点R4)的标识4::,得到2::,3::。最后,第一节点可以将第二节点(R1)的标识1::添加在剩余的标识之前,得到1::,2::,3::。For example, still taking FIG. 5 and FIG. 6 as examples, assuming that the first identifier list includes: 4::, 3::, 2::, then the first node can first arrange these identifiers in reverse order to obtain 2: :, 3::, 4::. After that, the first node may remove the identifier 4:: of the first node (node R4) to obtain 2::, 3::. Finally, the first node can add the identifier 1:: of the second node (R1) before the remaining identifiers to obtain 1::, 2::, 3::.
又例如,仍然以图5和图6为例,假设第一标识列表包括:2::,3::,4::,则第一节点 可以先将这些标识按照相反的顺序排布,得到4::,3::,2::。之后,第一节点可以去除第一节点(节点R4)的标识4::,得到3::,2::。最后,第一节点可以将第二节点(R1)的标识1::添加在剩余的标识之后,得到3::,2::,1::。For another example, still taking FIG. 5 and FIG. 6 as examples, assuming that the first identifier list includes: 2::, 3::, 4::, then the first node can first arrange these identifiers in reverse order to obtain 4 ::, 3::, 2::. After that, the first node may remove the identifier 4:: of the first node (node R4) to obtain 3::, 2::. Finally, the first node may add the identifier 1:: of the second node (R1) after the remaining identifiers to obtain 3::, 2::, 1::.
在第二标识列表包括第二节点的标识时,第二节点的标识可以由第一节点采用任一种方式获得。When the second identification list includes the identification of the second node, the identification of the second node may be obtained by the first node in any manner.
示例地,第二节点发送的检测报文还携带有第二节点的地址(图5中未示出),第一节点可以根据该检测报文携带的第二节点的地址,确定第二节点的标识。可选地,第一节点中可以存储有节点的地址与标识的对应关系,第一节点可以根据该对应关系,确定第二节点的地址对应的第二节点的标识。For example, the detection packet sent by the second node also carries the address of the second node (not shown in FIG. 5 ), and the first node can determine the address of the second node according to the address of the second node carried in the detection packet. logo. Optionally, the first node may store a correspondence between the addresses of the nodes and the identifiers, and the first node may determine the identifier of the second node corresponding to the address of the second node according to the correspondence.
可选地,上述第一路径可以是SRv6隧道(也称SRv6 policy隧道)的路径,上述检测报文包括第一SRH,第一SRH携带有上述第一标识列表,上述回应报文包括第二SRH,第二SRH携带有上述第二标识列表。Optionally, the above-mentioned first path may be a path of an SRv6 tunnel (also referred to as an SRv6 policy tunnel), the above-mentioned detection packet includes the first SRH, the first SRH carries the above-mentioned first identification list, and the above-mentioned response packet includes the second SRH. , the second SRH carries the above-mentioned second identifier list.
示例地,图7为本申请实施例提供的一种SRH的结构示意图,如图7所示,SRH包括:下一个报文头类型(Next Header)字段、报文头长度(Hdr Ext Len)字段、路由头部类型(Routing Type)字段、到达目的节点的剩余段数(Segments Left,SL)字段、段列表最后元素索引(Last Entry)字段、标志字段、同组数据标识(Tag)字段、段路由列表字段以及可选内容部分(Optional Type Length Value Objects)字段,且该可选内容部分字段是变量(variable)。其中,在检测报文的第一SRH中,段路由列表字段可以携带有上述第一标识列表;在回应报文的第二SRH中,段路由列表字段可以携带有上述第二标识列表。For example, FIG. 7 is a schematic structural diagram of an SRH provided by an embodiment of the present application. As shown in FIG. 7 , the SRH includes: a next header type (Next Header) field and a header length (Hdr Ext Len) field , Routing Type field, the number of remaining segments (Segments Left, SL) to the destination node, the last element index of the segment list (Last Entry) field, the flag field, the same group data identification (Tag) field, segment routing List field and optional content part (Optional Type Length Value Objects) field, and the optional content part field is variable. Wherein, in the first SRH of the detection message, the segment routing list field may carry the foregoing first identification list; in the second SRH of the response message, the segment routing list field may carry the foregoing second identification list.
上述第一路径也可以不是SRv6隧道的路径,上述检测报文包括第一负载部分,第一负载部分携带有第一标识列表,上述回应报文包括第二负载部分,第二负载部分携带有第二标识列表。The above-mentioned first path may not be the path of the SRv6 tunnel, the above-mentioned detection packet includes the first load part, the first load part carries the first identification list, the above-mentioned response packet includes the second load part, and the second load part carries the first load part. 2. List of identities.
上述实施例中,第二节点生成的检测报文携带有第一标识列表(或者第一标识列表和第二节点的地址)。进一步地,该检测报文还携带有其他内容,以下将以检测报文携带的其他四种信息为例进行说明。In the above embodiment, the detection packet generated by the second node carries the first identification list (or the first identification list and the address of the second node). Further, the detection packet also carries other contents, and the following will take the other four kinds of information carried by the detection packet as an example for description.
(1)检测报文还可以携带有操作码,该操作码可以称为第一操作码。该第一操作码用于指示:生成携带有用于指示与第一路径一致且方向相反的标识列表的回应报文。在上述S403中,第一节点可以在检测报文携带有第一操作码时,生成回应报文。(1) The detection message may also carry an operation code, which may be referred to as a first operation code. The first operation code is used to instruct: to generate a response message carrying an identification list indicating the same and opposite directions as the first path. In the above S403, the first node may generate a response message when the detection message carries the first operation code.
例如,该第一操作码可以包括:FE。该第一操作码可以携带在该检测报文的SRH或者其他扩展头中。FE用于指示生成携带有用于指示与第一路径一致且方向相反的标识列表的回应报文。For example, the first opcode may include: FE. The first opcode may be carried in the SRH or other extension header of the detection packet. The FE is used to instruct to generate a response packet carrying an identification list indicating the same and opposite directions as the first path.
又例如,该第一操作码可以是第一节点的标识。当第一标识列表包括第一节点的标识时,作为第一操作码的第一节点的标识与第一标识列表中第一节点的标识可以相同也可以不同。比如,图5中作为第一操作码的第一节点的标识为4::FE,而第一标识列表中第一节点的标识为4::。该第一节点的标识作为第一操作码时,该第一节点的标识可以用于指示:生成携带有用于指示与第一路径一致且方向相反的标识列表的回应报文。For another example, the first opcode may be an identifier of the first node. When the first identification list includes the identification of the first node, the identification of the first node as the first operation code may be the same or different from the identification of the first node in the first identification list. For example, the identifier of the first node as the first opcode in FIG. 5 is 4::FE, and the identifier of the first node in the first identifier list is 4::. When the identifier of the first node is used as the first operation code, the identifier of the first node can be used to instruct: to generate a response message carrying an identifier list used to indicate that the identifier is consistent with the first path and in the opposite direction.
可选地,第一操作码可以是第二节点生成的,或者,由控制器发送给第二节点的。Optionally, the first opcode may be generated by the second node, or sent by the controller to the second node.
(2)检测报文还可以携带有SL。第一路径可以划分为依次排布的多个路径段,检测报文在第一路径上传输的过程中,会依次在该多个路径段上传输。SL用于指示到达目的节点的剩余段索引个数,该个数等于第一路径中检测报文还未传输的路径段的数量。(2) The detection packet may also carry the SL. The first path may be divided into multiple path segments arranged in sequence, and the detection packet will be sequentially transmitted on the multiple path segments during the process of transmission on the first path. SL is used to indicate the number of remaining segment indices to reach the destination node, and the number is equal to the number of path segments in the first path where the detection packet has not been transmitted.
例如,如图5所示,路径1(第一路径)划分为依次排布的:路径段1(节点R1→节点R2)、路径段2(节点R2→节点R3)和路径段3(节点R3→节点R4),图5中并未标出这三个路径段。节点R1发出的检测报文还需在这三个路径段上传输,因此,节点R1发出的检测报文中的SL=3。节点R2在接收到节点R1发送的检测报文后,可以根据第一标识列表确定检测报文还需在路径段2和路径段3上传输,因此,节点R2会将该检测报文中的SL=3改为SL=2,再传输至节点R3。节点R3在接收到节点R2发送的检测报文后,可以根据第一标识列表确定检测报文还需在路径段3上传输,因此,节点R3会将该检测报文中的SL=2改为SL=1,再传输至节点R4。For example, as shown in FIG. 5, path 1 (the first path) is divided into sequentially arranged: path segment 1 (node R1→node R2), path segment 2 (node R2→node R3), and path segment 3 (node R3) →Node R4), these three path segments are not marked in FIG. 5 . The detection packet sent by the node R1 also needs to be transmitted on the three path segments, therefore, SL=3 in the detection packet sent by the node R1. After receiving the detection packet sent by node R1, node R2 can determine that the detection packet needs to be transmitted on path segment 2 and path segment 3 according to the first identifier list. Therefore, node R2 will determine the SL in the detection packet. =3 is changed to SL=2, and then transmitted to node R3. After receiving the detection packet sent by node R2, node R3 can determine that the detection packet needs to be transmitted on path segment 3 according to the first identification list. Therefore, node R3 will change SL=2 in the detection packet to SL=1, and then transmit to node R4.
(3)检测报文还可以携带有目的地址(Destination Address,DA)。DA表示检测报文在第一路径中需要传输至的下一个节点的地址。(3) The detection packet may also carry a destination address (Destination Address, DA). DA indicates the address of the next node to which the detection message needs to be transmitted in the first path.
例如,如图5所示,路径1为:(节点R1→节点R2→节点R3→节点R4),节点R1需要将检测报文传输至节点R2,若节点R2的标识为节点R2的地址,则节点R1发出的检测报文中的DA=2::(节点R2的标识)。节点R2在接收到节点R1发送的检测报文后,可以根据第一标识列表确定检测报文需要传输至节点R3,若节点R3的标识为节点R3的地址,则节点R2会将该检测报文中的DA=2::改为DA=3::(节点R3的标识),再传输至节点R3。节点R3在接收到节点R2发送的检测报文后,可以根据第一标识列表确定检测报文需要传输至节点R4,若节点R4的标识为节点R4的地址,则节点R3会将该检测报文中的DA=3::改为DA=4::(节点R4的标识),再传输至节点R4。For example, as shown in Figure 5, path 1 is: (node R1→node R2→node R3→node R4), node R1 needs to transmit the detection message to node R2, if the identifier of node R2 is the address of node R2, then DA=2:: (identity of node R2) in the detection message sent by node R1. After receiving the detection packet sent by the node R1, the node R2 can determine that the detection packet needs to be transmitted to the node R3 according to the first identification list. If the identification of the node R3 is the address of the node R3, the node R2 will send the detection packet to the node R2. DA=2:: in DA=3:: (identity of node R3), and then transmit to node R3. After receiving the detection packet sent by the node R2, the node R3 can determine that the detection packet needs to be transmitted to the node R4 according to the first identification list. If the identification of the node R4 is the address of the node R4, the node R3 will send the detection packet to the node R3. DA=3:: in DA=4:: (identity of node R4), and then transmit to node R4.
可选地,在第一路径是SRv6隧道的路径时,DA可以是第六版互联网协议(Internet Protocol version 6,IPv6)DA。Optionally, when the first path is the path of the SRv6 tunnel, the DA may be an Internet Protocol version 6 (Internet Protocol version 6, IPv6) DA.
(4)如图5所示,当上述检测报文是SBFD报文时,检测报文可以携带有SBFD负载(payload)。(4) As shown in FIG. 5 , when the detection packet is an SBFD packet, the detection packet may carry an SBFD payload (payload).
上述实施例中,第一节点获得的回应报文携带有第二标识列表。进一步地,与检测报文类似,该回应报文还携带有其他内容,以下将以回应报文携带的其他四种信息为例进行说明。In the above embodiment, the response message obtained by the first node carries the second identification list. Further, similar to the detection message, the response message also carries other contents, and the following will take the other four kinds of information carried by the response message as an example for description.
(1)回应报文也可以携带有操作码,该操作码称为第二操作码。第二操作码用于指示:根据回应报文对第一路径进行故障检测。(1) The response message may also carry an opcode, which is called a second opcode. The second operation code is used to indicate: perform fault detection on the first path according to the response message.
例如,回应报文中的第二操作码可以包括:FF。该第二操作码可以携带在该检测报文的SRH或者其他扩展头中。FF用于指示根据回应报文对第一路径进行故障检测。For example, the second operation code in the response message may include: FF. The second opcode may be carried in the SRH or other extension headers of the detection packet. FF is used to instruct to perform fault detection on the first path according to the response packet.
又例如,第二操作码可以是第二节点的标识。当第二标识列表包括第二节点的标识时,作为第二操作码的第二节点的标识与第二标识列表中第二节点的标识可以相同也可以不同。比如,图6中作为第二操作码的第二节点的标识为1::FF,而第二标识列表中第二节点的标识为1::。该第二节点的标识作为第二操作码时,该第二节点的标识可以用于指示:根据回应报文对第一路径进行故障检测。For another example, the second opcode may be an identification of the second node. When the second identification list includes the identification of the second node, the identification of the second node as the second operation code may be the same as or different from the identification of the second node in the second identification list. For example, the identifier of the second node as the second operation code in FIG. 6 is 1::FF, and the identifier of the second node in the second identifier list is 1::. When the identifier of the second node is used as the second operation code, the identifier of the second node may be used to indicate: perform fault detection on the first path according to the response message.
可选地,第二操作码可以是第一节点生成的,或者,由控制器发送给第一节点的。Optionally, the second opcode may be generated by the first node, or sent by the controller to the first node.
(2)回应报文也还可以携带有SL。第二路径可以划分为依次排布的多个路径段,回应 报文在第二路径上传输的过程中,会依次在该多个路径段上传输。SL用于指示该第二路径中回应报文还未传输的路径段的数量。(2) The response message may also carry SL. The second path may be divided into multiple path segments arranged in sequence, and the response packet will be transmitted on the multiple path segments in sequence during the process of transmission on the second path. The SL is used to indicate the number of path segments in the second path for which the response packet has not been transmitted.
例如,如图6所示,路径2(第二路径)划分为依次排布的:路径段3(节点R3→节点R4)、路径段2(节点R2→节点R3)和路径段1(节点R1→节点R2),图6中并未标注出这三个路径段。节点R4发出的回应报文还需在这三个路径段上传输,因此,节点R4发出的回应报文中的SL=3。节点R3在接收到节点R4发送的回应报文后,可以根据第二标识列表确定回应报文还需在路径段2和路径段1上传输,因此,节点R3会将该回应报文中的SL=3改为SL=2,再传输至节点R2。节点R2在接收到节点R3发送的回应报文后,可以根据第二标识列表确定回应报文还需在路径段1上传输,因此,节点R2会将该回应报文中的SL=2改为SL=1,再传输至节点R1。For example, as shown in FIG. 6, path 2 (second path) is divided into sequentially arranged: path segment 3 (node R3→node R4), path segment 2 (node R2→node R3), and path segment 1 (node R1) →Node R2), these three path segments are not marked in FIG. 6 . The response message sent by the node R4 still needs to be transmitted on these three path segments, therefore, SL=3 in the response message sent by the node R4. After receiving the response message sent by node R4, node R3 can determine that the response message needs to be transmitted on path segment 2 and path segment 1 according to the second identification list. Therefore, node R3 will use the SL in the response message. =3 is changed to SL=2, and then transmitted to node R2. After the node R2 receives the response message sent by the node R3, it can determine that the response message needs to be transmitted on the path segment 1 according to the second identification list. Therefore, the node R2 will change the SL=2 in the response message to SL=1, and then transmit to node R1.
(3)回应报文也还可以携带有DA。(3) The response message may also carry DA.
例如,如图6所示,路径2为:(节点R4→节点R3→节点R2→节点R1),节点R4需要将回应报文传输至节点R3,因此节点R4发出的回应报文中的DA=3::(节点R3的标识)。节点R3在接收到节点R4发送的回应报文后,可以根据第二标识列表确定回应报文需要传输至节点R2,因此,节点R3会将该回应报文中的DA=3::改为DA=2::(节点R2的标识),再传输至节点R2。节点R2在接收到节点R3发送的回应报文后,可以根据第二标识列表确定回应报文需要传输至节点R1,因此,节点R2会将该回应报文中的DA=2::改为DA=1::(节点R1的标识),再传输至节点R1。For example, as shown in Figure 6, the path 2 is: (node R4→node R3→node R2→node R1), node R4 needs to transmit the response message to node R3, so the response message sent by node R4 DA= 3:: (identification of node R3). After the node R3 receives the response message sent by the node R4, it can determine that the response message needs to be transmitted to the node R2 according to the second identification list. Therefore, the node R3 will change the DA=3:: in the response message to DA =2::(identity of node R2), and then transmitted to node R2. After the node R2 receives the response message sent by the node R3, it can determine that the response message needs to be transmitted to the node R1 according to the second identification list. Therefore, the node R2 will change the DA=2:: in the response message to DA =1::(identity of node R1), and then transmitted to node R1.
可选地,在第一路径是SRv6隧道的路径时,DA可以是第六版互联网协议(Internet Protocol version 6,IPv6)DA。Optionally, when the first path is the path of the SRv6 tunnel, the DA may be an Internet Protocol version 6 (Internet Protocol version 6, IPv6) DA.
(4)如图6所示,当上述检测报文是SBFD报文时,回应报文也为SBFD报文,回应报文也携带有SBFD包。(4) As shown in FIG. 6 , when the above detection packet is an SBFD packet, the response packet is also an SBFD packet, and the response packet also carries an SBFD packet.
上述实施例中,检测报文可以携带有第一操作码,回应报文可以携带有第二操作码。In the above embodiment, the detection message may carry the first operation code, and the response message may carry the second operation code.
一方面,检测报文中的第一操作码可以包括在第一标识列表中,并且,该第一操作码可以紧跟第一节点的标识。In one aspect, the first operation code in the detection packet may be included in the first identification list, and the first operation code may be immediately followed by the identification of the first node.
示例地,当第一节点的标识为第一标识列表中排在最后的一个标识时,第一操作码可以排在第一节点的标识之后;当第一节点的标识为第一标识列表中排在最前的一个标识时,第一操作码可以排在第一节点的标识之前。Exemplarily, when the identifier of the first node is the last identifier in the first identifier list, the first operation code may be arranged after the identifier of the first node; when the identifier of the first node is the identifier ranked in the first identifier list In the case of the first flag, the first opcode may be ordered before the flag of the first node.
例如,图5中以第一操作码(4::FE)位于第一标识列表外为例,可选地,图5中的第一操作码(4::FE)也可以包括在第一标识列表中,此时,第一标识列表可以包括:4::FE,4::,3::,2::,或者,2::,3::,4::,4::FE。For example, the first opcode (4::FE) in FIG. 5 is taken as an example outside the first identifier list. Optionally, the first opcode (4::FE) in FIG. 5 may also be included in the first identifier. In the list, at this time, the first identification list may include: 4::FE, 4:::, 3::, 2::, or, 2::, 3::, 4::, 4::FE.
另一方面,与检测报文类似,回应报文中的第二操作码也可以包括在第二标识列表中,并且,该第二操作码可以紧跟第二节点的标识。On the other hand, similar to the detection packet, the second operation code in the response packet may also be included in the second identification list, and the second operation code may be followed by the identification of the second node.
示例地,当第二节点的标识为第二标识列表中排在最后的一个标识时,第二操作码可以排在第二节点的标识之后;当第二节点的标识为第二标识列表中排在最前的一个标识时,第二操作码可以排在第二节点的标识之前。Exemplarily, when the identifier of the second node is the last identifier in the second identifier list, the second operation code may be ranked after the identifier of the second node; when the identifier of the second node is the identifier ranked in the second identifier list The second opcode may be queued before the identification of the second node when the first one is identified.
例如,图6中以第二操作码(1::FF)位于第二标识列表外为例,可选地,图6中的第二操作码(1::FF)可以包括在第二标识列表中,此时,第二标识列表可以包括:1::FF, 1::,2::,3::,或者,3::,2::,1::,1::FF。For example, the second opcode (1::FF) in FIG. 6 is taken as an example outside the second identification list. Optionally, the second opcode (1::FF) in FIG. 6 may be included in the second identification list. , at this time, the second identification list may include: 1::FF, 1::, 2::, 3::, or, 3::, 2::, 1::, 1::FF.
在第一标识列表包括第一操作码、第一节点的标识以及第一路径上每个中间节点的标识,第二标识列表包括第二操作码、第二节点的标识以及第一路径上每个中间节点的标识的情况下:在S403中,第一节点可以将第一标识列表中的内容(包括第一操作码和节点的标识)按照相反的顺序排布,去掉第一操作码和第一节点的标识,添加第二节点的标识以及第二操作码,从而得到第二标识列表。The first identifier list includes the first opcode, the identifier of the first node, and the identifier of each intermediate node on the first path, and the second identifier list includes the second opcode, the identifier of the second node, and the identifier of each intermediate node on the first path. In the case of the identification of the intermediate node: in S403, the first node may arrange the contents in the first identification list (including the first operation code and the identification of the node) in the reverse order, and remove the first operation code and the first operation code. The identifier of the node, the identifier of the second node and the second operation code are added to obtain the second identifier list.
进一步地,在上述检测报文为SBFD报文时,在S401之前,第一节点还可以向第二节点发送第一SBFD控制报文,该第一SBFD控制报文携带有第一节点的SBFD描述符(Discriminator)等信息。第二节点也可以向第一节点发送第二SBFD控制报文,该第二SBFD控制报文携带有第二节点的SBFD描述符等信息。其中,节点的SBFD描述符可以是节点的地址等信息。Further, when the above detection packet is an SBFD packet, before S401, the first node may also send a first SBFD control packet to the second node, where the first SBFD control packet carries the SBFD description of the first node Discriminator and other information. The second node may also send a second SBFD control packet to the first node, where the second SBFD control packet carries information such as the SBFD descriptor of the second node. The SBFD descriptor of the node may be information such as the address of the node.
第一节点可以记录第一节点的SBFD描述符与第二节点的SBFD描述符的匹配关系。上述检测报文中可以携带有第二节点的SBFD描述符,在上述S403之前,第一节点可以根据记录的该匹配关系,判断该检测报文携带的第二节点的SBFD描述符与第一节点的SBFD描述符是否匹配。在检测报文携带的第二节点的SBFD描述符与第一节点的SBFD描述符匹配,且第一节点处于工作状态时,第一节点才执行上述S403。The first node may record the matching relationship between the SBFD descriptor of the first node and the SBFD descriptor of the second node. The detection packet may carry the SBFD descriptor of the second node. Before the above-mentioned S403, the first node may determine, according to the recorded matching relationship, that the SBFD descriptor of the second node carried in the detection packet is the same as that of the first node. Whether the SBFD descriptors match. The first node performs the foregoing S403 only when the SBFD descriptor of the second node carried in the detection packet matches the SBFD descriptor of the first node, and the first node is in a working state.
需要说明的是,上述实施例中以第一路径中的中间节点在发送检测报文时,不对第一标识列表进行调整为例。可选地,中间节点在发送检测报文时,还可以对第一标识列表进行调整。It should be noted that, in the above embodiment, the intermediate node in the first path does not adjust the first identification list when sending the detection packet as an example. Optionally, when sending the detection message, the intermediate node may further adjust the first identification list.
示例地,图8为本申请实施例提供的另一种报文传输方法的流程图,如图8所示,该报文传输方法包括:Exemplarily, FIG. 8 is a flowchart of another message transmission method provided by an embodiment of the present application. As shown in FIG. 8 , the message transmission method includes:
S801、第二节点生成检测报文,检测报文携带有第一标识列表,第一标识列表用于指示第二节点到第一节点的第一路径,第一标识列表包括:第一路径上第一中间节点的初始标识。S801. The second node generates a detection packet, where the detection packet carries a first identification list, where the first identification list is used to indicate a first path from the second node to the first node, and the first identification list includes: the first identification list on the first path An initial identification of an intermediate node.
S801可以参考S401,本申请实施例在此不做赘述。For S801, reference may be made to S401, and details are not described here in this embodiment of the present application.
第一中间节点的初始标识可以是第一中间节点的节点标识。The initial identification of the first intermediate node may be the node identification of the first intermediate node.
S802、第二节点向第一中间节点发送检测报文。S802. The second node sends a detection packet to the first intermediate node.
第二节点向第一中间节点发送检测报文的过程,可以参考图4所示实施例中第二节点发送检测报文的过程。For the process of sending the detection packet by the second node to the first intermediate node, reference may be made to the process of sending the detection packet by the second node in the embodiment shown in FIG. 4 .
S803、第一中间节点将第一标识列表中的初始标识更新为第一中间节点的第一标识,得到更新后的检测报文。S803. The first intermediate node updates the initial identifier in the first identifier list to the first identifier of the first intermediate node to obtain an updated detection message.
初始标识与第一标识为第一中间节点的两种不同标识。当节点的标识为节点的SID时,初始标识和第一标识为第一中间节点的两种不同的SID。The initial identification and the first identification are two different identifications of the first intermediate node. When the identifier of the node is the SID of the node, the initial identifier and the first identifier are two different SIDs of the first intermediate node.
在一个示例中,初始标识包括:第一中间节点的节点标识,该节点标识可以为Node SID,第一标识包括:第一中间节点接收检测报文的端口或链路的标识,如该第一标识可以为End.X SID。In an example, the initial identification includes: a node identification of the first intermediate node, where the node identification may be a Node SID, and the first identification includes: an identification of a port or link where the first intermediate node receives the detection packet, such as the first intermediate node. The ID can be an End.X SID.
例如,假设第一路径为图9所示的路径1(节点R1→节点R2→节点R3→节点R4),节点R2和节点R3均为第一中间节点,节点R1发出的检测报文中第一标识列表与图5中的第 一标识列表相同,均包括4::,3::,2::。For example, assuming that the first path is path 1 shown in FIG. 9 (node R1→node R2→node R3→node R4), node R2 and node R3 are both the first intermediate nodes, and the first intermediate node in the detection packet sent by node R1 is the first The identification list is the same as the first identification list in FIG. 5 , including 4::, 3::, and 2::.
若节点R2具有端口1、2和3,节点R2在从端口1接收到检测报文后,可以将该第一标识列表中节点R2的初始标识(也即节点R2的节点标识2::)更新为节点R2中端口1的标识(2::1),更新后的检测报文中第一标识列表包括:4::,3::,2::1。If the node R2 has ports 1, 2 and 3, after receiving the detection message from the port 1, the node R2 can update the initial identification of the node R2 in the first identification list (that is, the node identification 2:: of the node R2) is the identifier (2::1) of the port 1 in the node R2, and the first identifier list in the updated detection message includes: 4::, 3::, 2::1.
若节点R3具有端口1和2,节点R3在从端口1接收到节点R2发送的检测报文后,可以将该第一标识列表中节点R3的初始标识(也即节点R3的节点标识3::)更新为节点R3中端口1的标识(3::1),更新后的检测报文中第一标识列表包括:4::,3::1,2::1。If the node R3 has ports 1 and 2, after receiving the detection message sent by the node R2 from the port 1, the node R3 can use the initial identification of the node R3 in the first identification list (that is, the node identification 3 of the node R3: ) is updated to the identifier (3::1) of port 1 in node R3, and the first identifier list in the updated detection message includes: 4::, 3::1, and 2::1.
在另一个示例中,初始标识可以是第一中间节点发送检测报文的出端口对应的第一End.X SID,第一标识可以为第一中间节点接收该检测报文的入端口对应的第二End.X SID。In another example, the initial identifier may be the first End.X SID corresponding to the egress port through which the first intermediate node sends the detection packet, and the first identifier may be the first SID corresponding to the ingress port through which the first intermediate node receives the detection packet. Two End.X SIDs.
例如,假设第一路径为图9所示的路径1(节点R1→节点R2→节点R3→节点R4),节点R2和节点R3均为第一中间节点,节点R1发出的检测报文中第一标识列表包括4::,3::2,2::2。其中,2::2表示节点R2中发送检测报文的出端口2对应的第一End.X SID,3::2表示节点R3中发送检测报文的出端口2对应的第一End.X SID。For example, assuming that the first path is path 1 shown in FIG. 9 (node R1→node R2→node R3→node R4), node R2 and node R3 are both the first intermediate nodes, and the first intermediate node in the detection packet sent by node R1 is the first The list of identities includes 4::, 3::2, 2::2. Among them, 2::2 represents the first End.X SID corresponding to the outgoing port 2 in the node R2 that sends the detection message, and 3::2 represents the first End.X corresponding to the outbound port 2 in the node R3 that sends the detection message SID.
若节点R2从其入端口1接收到检测报文,则节点R2可以将该第一标识列表中节点R2中发送检测报文的出端口2对应的第一End.X SID(如2::2)更新为节点R2接收该检测报文的入端口1对应的第二End.X SID(2::1),更新后的检测报文中第一标识列表包括:4::,3::2,2::1。If the node R2 receives the detection packet from its ingress port 1, the node R2 can use the first End.X SID (eg 2::2) corresponding to the outbound port 2 of the node R2 in the first identification list to send the detection packet. ) is updated to the second End.X SID (2::1) corresponding to the ingress port 1 where the node R2 receives the detection message, and the first identifier list in the updated detection message includes: 4::, 3::2 , 2::1.
若节点R3从其入端口1接收到检测报文,则节点R3可以将第一标识列表中节点R3中发送检测报文的出端口2对应的第一End.X SID(如3::2)更新为节点R3接收该检测报文的入端口1对应的第二End.X SID(3::1),更新后的检测报文中第一标识列表包括:4::,3::1,2::1。If the node R3 receives the detection packet from its ingress port 1, the node R3 can use the first End.X SID (such as 3::2) corresponding to the outbound port 2 of the node R3 in the first identification list to send the detection packet. Update the second End.X SID (3::1) corresponding to the ingress port 1 where the node R3 receives the detection packet, and the first identifier list in the updated detection packet includes: 4::, 3::1, 2::1.
S804、第一中间节点向第一节点发送更新后的检测报文。S804. The first intermediate node sends the updated detection message to the first node.
第一中间节点在得到更新后的检测报文后,可以根据该更新后的检测报文中的第一标识列表发送该更新后的检测报文。After obtaining the updated detection packet, the first intermediate node may send the updated detection packet according to the first identification list in the updated detection packet.
例如,如图9所示,节点R2作为第一中间节点,可以根据更新后的检测报文中的第一标识列表向节点R3发送该更新后的检测报文;节点R3作为第一中间节点,可以根据更新后的检测报文中的第一标识列表向节点R4发送该更新后的检测报文。For example, as shown in FIG. 9, node R2, as the first intermediate node, can send the updated detection message to node R3 according to the first identification list in the updated detection message; node R3, as the first intermediate node, The updated detection message may be sent to the node R4 according to the first identification list in the updated detection message.
S805、第一节点获得检测报文的回应报文,回应报文携带有第二标识列表,第二标识列表是根据第一标识列表获得的,第二标识列表用于指示第一节点到第二节点的第二路径,第二标识列表包括第一标识。S805, the first node obtains a response message of the detection message, the response message carries a second identification list, the second identification list is obtained according to the first identification list, and the second identification list is used to indicate the first node to the second identification list The second path of the node, the second identification list includes the first identification.
S805可以参考S403,本申请实施例在此不做赘述。For S805, reference may be made to S403, and details are not described herein in this embodiment of the present application.
第一节点在获得回应报文时,可以根据该第一标识列表得到第二标识列表,并将该第二标识列表封装在回应报文中。When the first node obtains the response message, it can obtain the second identification list according to the first identification list, and encapsulate the second identification list in the response message.
需要说明的是,在本申请实施例中,第一节点接收到的检测报文是被第一中间节点更新后的检测报文,该检测报文中的第一标识列表携带有第一中间节点的第一标识,该第一标识为第一中间节点的端口或链路的标识。所以,第一节点得到的第二标识列表中第一中间节点的标识也为该第一标识。It should be noted that, in this embodiment of the present application, the detection packet received by the first node is the detection packet updated by the first intermediate node, and the first identification list in the detection packet carries the first intermediate node The first identifier is the identifier of the port or link of the first intermediate node. Therefore, the identifier of the first intermediate node in the second identifier list obtained by the first node is also the first identifier.
例如,如图10所示,节点R4作为第一节点,节点R4生成的回应报文中的第二标识列表包括:1::,2::1,3::1。For example, as shown in FIG. 10 , the node R4 is the first node, and the second identifier list in the response message generated by the node R4 includes: 1::, 2::1, and 3::1.
S806、第一节点向第一中间节点发送回应报文。S806. The first node sends a response message to the first intermediate node.
S807、第一中间节点向第二节点发送回应报文。S807. The first intermediate node sends a response message to the second node.
S806和S807可以参考S404,本申请实施例在此不做赘述。For S806 and S807, reference may be made to S404, and details are not described here in this embodiment of the present application.
由于本申请实施例中第二标识列表包括:第一中间节点的第一标识,且第一标识为第一中间节点接收检测报文的端口或链路的标识,因此,第一中间节点在根据第二标识列表发送回应报文时,可以从该第一中间节点中的该端口或链路发送回应报文。这样一来,就保证了第一中间节点接收检测报文和发送回应报文的端口或链路相同,从而进一步提升了检测报文的传输路径与回应报文的传输路径的一致性。Since the second identifier list in this embodiment of the present application includes: the first identifier of the first intermediate node, and the first identifier is the identifier of the port or link through which the first intermediate node receives the detection packet, the first intermediate node is based on When the second identification list sends the response message, the response message may be sent from the port or link in the first intermediate node. In this way, it is ensured that the first intermediate node receives the detection packet and sends the response packet through the same port or link, thereby further improving the consistency of the transmission path of the detection packet and the transmission path of the response packet.
示例地,图10中回应报文中的第二标识列表包括:1::,2::1,3::1,节点R2和R3均为第一中间节点。节点R4可以将回应报文发送至节点R3,节点R3根据该第二标识列表中的3::1,可以从节点R3的端口1向节点R2发送该回应报文。节点R2可以根据该第二标识列表中的2::1,从节点R2的端口1向节点R1发送该回应报文。可见,检测报文的传输路径与回应报文的传输路径相同。For example, the second identification list in the response message in FIG. 10 includes: 1::, 2::1, 3::1, and nodes R2 and R3 are both first intermediate nodes. The node R4 can send the response message to the node R3, and the node R3 can send the response message from the port 1 of the node R3 to the node R2 according to 3::1 in the second identification list. The node R2 may send the response message from the port 1 of the node R2 to the node R1 according to 2::1 in the second identification list. It can be seen that the transmission path of the detection message is the same as the transmission path of the response message.
可选地,上述检测报文还可以携带有:第一指示(如图9中的SF=1),第一指示用于指示第一中间节点:在检测报文携带有第一指示时,将初始标识更新为第一标识。相应地,第一中间节点在上述S803中可以在检测报文携带有第一指示时,将第一标识列表中的初始标识更新为第一中间节点的第一标识。在检测报文并未携带有第一指示时,第一中间节点可以不对该初始标识进行更改。这样一来,第一中间节点便可以根据该第一指示来判定是否需要对报文中的标识进行更改,从而避免了第一中间节点对接收到的每个报文中的标识进行更改,降低了第一中间节点的功耗。Optionally, the above detection message may also carry: a first indication (SF=1 in FIG. 9 ), the first indication is used to indicate the first intermediate node: when the detection message carries the first indication, the The initial identification is updated to the first identification. Correspondingly, the first intermediate node may update the initial identification in the first identification list to the first identification of the first intermediate node when the detection packet carries the first indication in the above S803. When the detection packet does not carry the first indication, the first intermediate node may not change the initial identification. In this way, the first intermediate node can determine whether the identifier in the message needs to be changed according to the first instruction, thereby preventing the first intermediate node from changing the identifier in each received packet, reducing the need for power consumption of the first intermediate node.
第一指示可以携带在检测报文中的任意位置,可选地,检测报文的报文头中的标志字段携带有该第一指示。示例地,图7中的标志字段可以包括0~7这8个比特位(图7中未示出这几个比特位),其中,比特位7可以用于携带该第一指示。当比特位7的值为1时,比特位7携带有第一指示。第一中间节点可以根据该比特位7的值来确定该检测报文是否携带有第一指示,进而判定是否需要对检测报文中的标识进行更改。The first indication may be carried at any position in the detection packet. Optionally, the flag field in the header of the detection packet may carry the first indication. For example, the flag field in FIG. 7 may include 8 bits from 0 to 7 (these bits are not shown in FIG. 7 ), wherein bit 7 may be used to carry the first indication. When the value of bit 7 is 1, bit 7 carries the first indication. The first intermediate node can determine whether the detection packet carries the first indication according to the value of the bit 7, and then determines whether the identifier in the detection packet needs to be changed.
第一节点在获得检测报文的回应报文时,可以将检测报文中的第一指示进行更改。比如,第一指示为图9中的SF=1时,第一节点将SF=1改为图10中的SF=0;又比如,第一节点可以将图7中标志字段中比特位7的值由1改为0。因此,第一中间节点在发送该回应报文时,并不会对该回应报文中第二标识列表中的标识进行更改。When obtaining the response message of the detection message, the first node may change the first indication in the detection message. For example, when the first indication is SF=1 in FIG. 9, the first node changes SF=1 to SF=0 in FIG. 10; for another example, the first node may change the bit 7 of the flag field in FIG. 7 to SF=0. Value changed from 1 to 0. Therefore, when the first intermediate node sends the response message, the identifier in the second identifier list in the response message will not be changed.
进一步地,由于图8所示的实施例中第一中间节点对第一标识列表中的标识进行了更改,所以,在回应报文携带有DA,且回应报文向第一中间节点传输时,该回应报文中的DA所表示的标识为:该第一中间节点的第一标识,如第一中间节点中接收检测报文的端口或链路的标识。Further, because the first intermediate node in the embodiment shown in FIG. 8 has changed the identification in the first identification list, so, when the response message carries DA, and the response message is transmitted to the first intermediate node, The identifier represented by the DA in the response packet is: the first identifier of the first intermediate node, such as the identifier of the port or link in the first intermediate node that receives the detection packet.
例如,如图10所示,假设第二路径为:(节点R4→节点R3→节点R2→节点R1),节点R4需要将回应报文传输至节点R3的端口1,因此节点R4发出的回应报文中的DA=3::1(节点R3中端口1的标识)。节点R3在接收到节点R4发送的回应报文后,可以根据第二标识列表确定回应报文需要传输至节点R2的端口1,因此,节点R3会将该回应报文中的DA=3::1改为DA=2::1(节点R2的端口1的标识),再通过节点R3的端口1传输至节点R2。节点R2在接收到节点R3发送的回应报文后,可以根据第二标识列表确定回应报文需要传输至 节点R1,因此,节点R2会将该回应报文中的DA=2::1改为DA=1::(节点R1的节点标识),再从节点R2的端口1传输至节点R1。For example, as shown in Figure 10, assuming that the second path is: (node R4→node R3→node R2→node R1), node R4 needs to transmit the response message to port 1 of node R3, so the response message sent by node R4 In the text, DA=3::1 (identification of port 1 in node R3). After receiving the response message sent by node R4, node R3 can determine that the response message needs to be transmitted to port 1 of node R2 according to the second identification list. Therefore, node R3 will set DA=3 in the response message: 1 is changed to DA=2::1 (identification of port 1 of node R2), and then transmitted to node R2 through port 1 of node R3. After the node R2 receives the response message sent by the node R3, it can determine that the response message needs to be transmitted to the node R1 according to the second identification list. Therefore, the node R2 will change the DA=2::1 in the response message to DA=1::(node ID of node R1), and then transmitted from port 1 of node R2 to node R1.
需要说明的是,在图8所示的实施例中,第二节点生成的检测报文携带的第一标识列表包括:第一中间节点的初始标识。由于第一中间节点将第一中间节点的初始标识更新为第一标识,所以,第一节点接收到的检测报文携带的第一标识列表包括:第一中间节点的第一标识。可见,第二节点生成的检测报文中第一中间节点的初始标识,与第一节点接收到的检测报文中第一中间节点的第一标识不同。It should be noted that, in the embodiment shown in FIG. 8 , the first identifier list carried in the detection packet generated by the second node includes: the initial identifier of the first intermediate node. Since the first intermediate node updates the initial identification of the first intermediate node to the first identification, the first identification list carried in the detection packet received by the first node includes: the first identification of the first intermediate node. It can be seen that the initial identifier of the first intermediate node in the detection packet generated by the second node is different from the first identifier of the first intermediate node in the detection packet received by the first node.
在图4所示的实施例中,第二节点生成的检测报文携带的第一标识列表包括:第一中间节点的第一标识。第一节点接收到的检测报文携带的第一标识列表包括:第一中间节点的第一标识。可见,第二节点生成的检测报文中第一中间节点的标识,与第一节点接收到的检测报文中第一中间节点的标识相同。在图4所示的实施例中,若将第二节点生成的检测报文中第一中间节点的第一标识称为初始标识,则在图4所示的实施例中,第二节点生成的检测报文中第一中间节点的初始标识,与第一节点接收到的检测报文中第一中间节点的第一标识相同。In the embodiment shown in FIG. 4 , the first identifier list carried in the detection packet generated by the second node includes: the first identifier of the first intermediate node. The first identifier list carried in the detection packet received by the first node includes: the first identifier of the first intermediate node. It can be seen that the identifier of the first intermediate node in the detection packet generated by the second node is the same as the identifier of the first intermediate node in the detection packet received by the first node. In the embodiment shown in FIG. 4 , if the first identifier of the first intermediate node in the detection packet generated by the second node is called the initial identifier, then in the embodiment shown in FIG. 4 , the first identifier generated by the second node The initial identifier of the first intermediate node in the detection packet is the same as the first identifier of the first intermediate node in the detection packet received by the first node.
在图8所示的实施例中,第一路径上的第一中间节点可以对检测报文进行更新,可选地,第一路径上的第一节点在接收到检测报文后,也可以对该检测报文进行更新。第一节点对检测报文进行更新的过程可以参考上述第一中间节点对检测报文进行更新的过程,本申请实施例在此不做赘述。In the embodiment shown in FIG. 8 , the first intermediate node on the first path may update the detection packet. Optionally, after receiving the detection packet, the first node on the first path may also update the detection packet. The detection message is updated. For the process of updating the detection message by the first node, reference may be made to the above-mentioned process of updating the detection message by the first intermediate node, which is not repeated in this embodiment of the present application.
在这种情况下,第一路径上的第一中间节点和第一节点均可以称为第三节点,该第三节点能够在接收到检测报文后,将第一标识列表中携带的第三节点的初始标识更新为第三节点的第一标识,得到更新后的检测报文,之后再对该更新后的检测报文进行处理。In this case, both the first intermediate node and the first node on the first path may be called a third node, and the third node can, after receiving the detection packet, convert the third node carried in the first identification list to the third node. The initial identification of the node is updated to the first identification of the third node, and an updated detection packet is obtained, and then the updated detection packet is processed.
当第三节点是第一节点时,第三节点对更新后的检测报文进行处理可以包括:第三节点根据该更新后的检测报文生成回应报文。当第三节点是第一中间节点时,第三节点对更新后的检测报文进行处理可以包括:第三节点发送该更新后的检测报文。When the third node is the first node, processing the updated detection message by the third node may include: the third node generates a response message according to the updated detection message. When the third node is the first intermediate node, processing the updated detection message by the third node may include: sending the updated detection message by the third node.
上文中结合图1至图10,详细描述了本申请所提供的报文传输方法,可以理解的是,节点为了实现上述各方法所描述的功能,其需包含执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各方法的执行过程,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方式来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The message transmission method provided by the present application is described in detail above with reference to FIGS. 1 to 10 . It can be understood that, in order to implement the functions described by the above methods, a node needs to include hardware and/or corresponding hardware for executing each function. software module. In conjunction with the execution process of each method described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different ways to implement the described functionality for each particular application in conjunction with the embodiments, but such implementations should not be considered beyond the scope of this application.
本实施例可以根据上述方法实施例对相应的设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,具体作为一种逻辑功能可能的划分方式,实际实现时可以有另外的划分方式。In this embodiment, the corresponding device may be divided into functional modules according to the above method embodiments. For example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic, and specifically as a possible division manner of logical functions, there may be other division manners in actual implementation.
当采用功能模块划分方式时,下面将结合图11、图12和图13描述本申请所提供的报文传输设备。When the function module division method is adopted, the message transmission device provided by the present application will be described below with reference to FIG. 11 , FIG. 12 and FIG. 13 .
图11为本申请实施例提供的一种报文传输设备的框图,该报文传输设备例如可以属于前述各实施例中的第一节点。如图11所示,该报文传输设备包括:接收模块1101、获得模块 1102和发送模块1103。FIG. 11 is a block diagram of a message transmission device provided by an embodiment of the present application, and the message transmission device may belong to the first node in the foregoing embodiments, for example. As shown in FIG. 11 , the message transmission device includes: a receiving module 1101, an obtaining module 1102 and a sending module 1103.
接收模块1101用于接收检测报文,检测报文携带有第一标识列表,第一标识列表用于指示第二节点到第一节点的第一路径,第一标识列表包括:第一路径上第一中间节点的第一标识。接收模块1101用于执行的操作可以参考上述S402和S804中与第一节点相关的内容。The receiving module 1101 is configured to receive a detection packet, the detection packet carries a first identification list, the first identification list is used to indicate the first path from the second node to the first node, and the first identification list includes: the first identification list on the first path. A first identification of an intermediate node. For operations performed by the receiving module 1101, reference may be made to the content related to the first node in the foregoing S402 and S804.
获得模块1102用于获得检测报文的回应报文,回应报文携带有第二标识列表,第二标识列表是根据第一标识列表获得的,第二标识列表用于指示第一节点到第二节点的第二路径,第二标识列表包括第一标识。获得模块1102用于执行的操作可以参考上述S403和S805中与第一节点相关的内容。The obtaining module 1102 is used to obtain a response message of the detection message, the response message carries a second identification list, the second identification list is obtained according to the first identification list, and the second identification list is used to indicate the first node to the second identification list. The second path of the node, the second identification list includes the first identification. For the operation performed by the obtaining module 1102, reference may be made to the content related to the first node in the foregoing S403 and S805.
发送模块1103用于根据第二标识列表,发送回应报文。发送模块1103用于执行的操作可以参考上述S404和S805中与第一节点相关的内容。The sending module 1103 is configured to send a response message according to the second identification list. For the operations performed by the sending module 1103, reference may be made to the content related to the first node in the foregoing S404 and S805.
在第一标识列表和第二标识列表均包括第一中间节点的第一标识时,第一路径和第二路径均经过该第一标识所指示的第一中间节点,且第一路径和第二路径的头尾节点相反,因此,第二路径与第一路径的一致度较高。所以,回应报文的传输路径与检测报文的传输路径的一致度较高,回应报文的传输情况与检测报文的传输情况较为一致,回应报文的传输情况能够反映第一路径的故障情况,第二节点根据该回应报文确定第一路径是否故障的准确度较高。When both the first identifier list and the second identifier list include the first identifier of the first intermediate node, both the first path and the second path pass through the first intermediate node indicated by the first identifier, and the first path and the second path pass through the first intermediate node indicated by the first identifier. The head and tail nodes of the path are opposite, so the second path has a higher degree of consistency with the first path. Therefore, the transmission path of the response packet is highly consistent with the transmission path of the detection packet, the transmission status of the response packet is relatively consistent with the transmission status of the detection packet, and the transmission status of the response packet can reflect the failure of the first path. In this case, the accuracy of the second node determining whether the first path is faulty according to the response message is relatively high.
并且,由于第二节点确定第一路径是否故障的准确度较高,因此,降低了第二节点在第一路径并未故障时切换路径而导致业务中断的概率,提升了用户体验。In addition, since the second node has high accuracy in determining whether the first path is faulty, the probability of service interruption caused by the second node switching paths when the first path is not faulty is reduced, and user experience is improved.
可选地,检测报文携带有:操作码,操作码用于指示:生成携带有用于指示与第一路径一致且方向相反的标识列表的回应报文;获得模块用于:在检测报文携带有操作码时,生成回应报文。在检测报文携带有操作码时,第一节点可以根据该操作码的指示,生成回应报文,这样一来,可以提升第一节点在接收到检测报文后生成回应报文的效率。该检测报文中也可以不携带有操作码,本申请对此不作限定。Optionally, the detection message carries: an operation code, and the operation code is used to indicate: generate a response message carrying an identification list used to indicate that the first path is consistent and opposite to the direction; the obtaining module is used for: carrying in the detection message When there is an opcode, a response message is generated. When the detection packet carries an operation code, the first node may generate a response packet according to the instruction of the operation code, so that the efficiency of generating the response packet after the first node receives the detection packet can be improved. The detection message may also not carry an operation code, which is not limited in this application.
可选地,第一标识列表包括:第一路径上多个中间节点的标识;第二标识列表也包括:多个中间节点的标识;多个中间节点的标识在第二标识列表中的排列顺序,与多个中间节点的标识在第一标识列表中的排列顺序相反。在这种情况下,第一路径和第二路径的一致度进一步提升,第二节点根据回应报文确定第一路径是否故障的准确度也进一步提升。Optionally, the first identification list includes: identifications of multiple intermediate nodes on the first path; the second identification list also includes: identifications of multiple intermediate nodes; the order in which the identifications of multiple intermediate nodes are arranged in the second identification list , which is opposite to the order in which the identifiers of the multiple intermediate nodes are arranged in the first identifier list. In this case, the consistency between the first path and the second path is further improved, and the accuracy with which the second node determines whether the first path is faulty according to the response message is further improved.
可选地,多个中间节点包括:第一路径中除第一节点和第二节点之外的其他节点。这种情况下,第一路径和第二路径的一致度较高。Optionally, the plurality of intermediate nodes include: other nodes in the first path except the first node and the second node. In this case, the degree of consistency between the first path and the second path is high.
可选地,获得模块用于:根据第一标识列表中包括的多个中间节点的标识,按照相反的顺序,获得第二标识列表;将第二标识列表封装到回应报文中。Optionally, the obtaining module is configured to: obtain the second identification list in reverse order according to the identifications of the plurality of intermediate nodes included in the first identification list; and encapsulate the second identification list into the response message.
可选地,第一标识包括:第一中间节点接收检测报文的端口或链路的标识。或者,该第一标识也可以是第一中间节点的节点标识,本申请对此不作限定。需要说明的是,在第一标识包括:第一中间节点接收检测报文的端口或链路的标识时,第一中间节点在根据第二标识列表发送回应报文时,可以从该第一中间节点中的该端口或链路发送回应报文。这样一来,就保证了第一中间节点接收检测报文和发送回应报文的端口或链路相同,从而进一步提升了检测报文的传输路径与回应报文的传输路径的一致性。Optionally, the first identifier includes: an identifier of a port or link where the first intermediate node receives the detection packet. Alternatively, the first identifier may also be the node identifier of the first intermediate node, which is not limited in this application. It should be noted that, when the first identification includes: when the first intermediate node receives the identification of the port or link of the detection packet, when the first intermediate node sends the response packet according to the second identification list, the first intermediate node can send the response packet from the first intermediate node. The port or link in the node sends a response packet. In this way, it is ensured that the first intermediate node receives the detection packet and sends the response packet through the same port or link, thereby further improving the consistency of the transmission path of the detection packet and the transmission path of the response packet.
在第一节点接收到的检测报文中的第一标识为第一中间节点的端口或链路的标识时,第二节点发出的检测报文中第一中间节点的标识可以与该第一标识不同,第一中间节点在接收到检测报文后,需要将该检测报文中第一中间节点的标识更新为上述第一标识。When the first identifier in the detection packet received by the first node is the identifier of the port or link of the first intermediate node, the identifier of the first intermediate node in the detection packet sent by the second node may be the same as the first identifier Differently, after receiving the detection packet, the first intermediate node needs to update the identifier of the first intermediate node in the detection packet to the above-mentioned first identifier.
可选地,第二标识列表还可以包括第二节点的标识。在第二标识列表包括第二节点的标识时,第二节点的标识可以由第一节点采用任一种方式获得。示例地,检测报文还携带有第二节点的地址,报文传输设备还包括:确定模块(图11中未示出),用于在获得回应报文之前,根据第二节点的地址,确定第二节点的标识,回应报文包括:第二节点的标识。第一节点中可以存储有节点的地址与标识的对应关系,第一节点可以根据该对应关系,确定第二节点的地址对应的第二节点的标识。确定模块的功能可以参考上述各个实施例中确定第二节点的标识的过程。Optionally, the second identification list may further include the identification of the second node. When the second identification list includes the identification of the second node, the identification of the second node may be obtained by the first node in any manner. Exemplarily, the detection message also carries the address of the second node, and the message transmission device further includes: a determination module (not shown in FIG. 11 ), configured to determine, according to the address of the second node, before obtaining the response message The identifier of the second node, and the response message includes: the identifier of the second node. The first node may store a correspondence between the addresses of the nodes and the identifiers, and the first node may determine the identifier of the second node corresponding to the address of the second node according to the correspondence. For the function of the determining module, reference may be made to the process of determining the identifier of the second node in the foregoing embodiments.
可选地,检测报文包括第一SRH,第一SRH携带有第一标识列表;回应报文包括第二SRH,第二SRH携带有第二标识列表;或者,检测报文包括第一负载部分,第一负载部分携带有第一标识列表;回应报文包括第二负载部分,第二负载部分携带有第二标识列表。Optionally, the detection packet includes a first SRH, and the first SRH carries a first identification list; the response packet includes a second SRH, and the second SRH carries a second identification list; or, the detection packet includes a first load part , the first load part carries the first identification list; the response message includes the second load part, and the second load part carries the second identification list.
可选地,检测报文为:SBFD报文。检测报文还可以是其他类型的报文,本申请对此不作限定。Optionally, the detection message is: SBFD message. The detection message may also be other types of messages, which are not limited in this application.
图12为本申请实施例提供的另一种报文传输设备的框图,该报文传输设备例如可以属于前述各实施例中的第二节点。如图12所示,该报文传输设备包括:生成模块1201和发送模块1202。FIG. 12 is a block diagram of another message transmission device provided by an embodiment of the present application. For example, the message transmission device may belong to the second node in the foregoing embodiments. As shown in FIG. 12 , the message transmission device includes: a generating module 1201 and a sending module 1202 .
生成模块1201用于生成检测报文,检测报文携带有第一标识列表,第一标识列表用于指示第二节点到第一节点的第一路径,第一标识列表包括:第一路径上第一中间节点的初始标识。生成模块1201用于执行的操作可以参考上述S401和S801中与第二节点相关的内容。The generating module 1201 is configured to generate a detection packet, the detection packet carries a first identification list, the first identification list is used to indicate the first path from the second node to the first node, and the first identification list includes: the first identification list on the first path. An initial identification of an intermediate node. For the operations performed by the generation module 1201, reference may be made to the content related to the second node in the foregoing S401 and S801.
发送模块1202用于向第一节点发送检测报文;检测报文用于指示第一节点:获得检测报文的回应报文,回应报文携带有第二标识列表;第二标识列表是第一节点根据第一标识列表获得的,第二标识列表用于指示第一节点到第二节点的第二路径,第二标识列表包括:第一中间节点的第一标识。发送模块1202用于执行的操作可以参考上述S402和S802中与第二节点相关的内容。The sending module 1202 is used to send a detection message to the first node; the detection message is used to instruct the first node to obtain a response message of the detection message, and the response message carries a second identification list; the second identification list is the first The node is obtained according to the first identification list, the second identification list is used to indicate the second path from the first node to the second node, and the second identification list includes: the first identification of the first intermediate node. For operations performed by the sending module 1202, reference may be made to the content related to the second node in the foregoing S402 and S802.
在第一标识列表和第二标识列表均包括第一中间节点的第一标识时,第一路径和第二路径均经过该第一标识所指示的第一中间节点,且第一路径和第二路径的头尾节点相反,因此,第二路径与第一路径的一致度较高。所以,回应报文的传输路径与检测报文的传输路径的一致度较高,回应报文的传输情况与检测报文的传输情况较为一致,回应报文的传输情况能够反映第一路径的故障情况,第二节点根据该回应报文确定第一路径是否故障的准确度较高。When both the first identifier list and the second identifier list include the first identifier of the first intermediate node, both the first path and the second path pass through the first intermediate node indicated by the first identifier, and the first path and the second path pass through the first intermediate node indicated by the first identifier. The head and tail nodes of the path are opposite, so the second path has a higher degree of consistency with the first path. Therefore, the transmission path of the response packet is highly consistent with the transmission path of the detection packet, the transmission status of the response packet is relatively consistent with the transmission status of the detection packet, and the transmission status of the response packet can reflect the failure of the first path. In this case, the accuracy of the second node determining whether the first path is faulty according to the response message is relatively high.
并且,由于第二节点确定第一路径是否故障的准确度较高,因此,降低了第二节点在第一路径并未故障时切换路径而导致业务中断的概率,提升了用户体验。In addition, since the second node has high accuracy in determining whether the first path is faulty, the probability of service interruption caused by the second node switching paths when the first path is not faulty is reduced, and user experience is improved.
可选地,检测报文携带有:操作码;操作码用于指示:生成携带有用于指示与第一路径一致且方向相反的标识列表的回应报文。在检测报文携带有操作码时,第一节点可以根据该操作码的指示,生成回应报文,这样一来,可以提升第一节点在接收到检测报文后生成回应报文的效率。该检测报文中也可以不携带有操作码,本申请对此不作限定。Optionally, the detection message carries: an operation code; the operation code is used to instruct: to generate a response message carrying an identification list used to indicate that the first path is consistent and opposite in direction. When the detection packet carries an operation code, the first node may generate a response packet according to the instruction of the operation code, so that the efficiency of generating the response packet after the first node receives the detection packet can be improved. The detection message may also not carry an operation code, which is not limited in this application.
可选地,第一标识列表包括:第一路径上多个中间节点的标识;第二标识列表也包括:多个中间节点的标识;多个中间节点的标识在第二标识列表中的排列顺序,与多个中间节点的标识在第一标识列表中的排列顺序相反。在这种情况下,第一路径和第二路径的一致度进一步提升,第二节点根据回应报文确定第一路径是否故障的准确度也进一步提升。Optionally, the first identification list includes: identifications of multiple intermediate nodes on the first path; the second identification list also includes: identifications of multiple intermediate nodes; the order in which the identifications of multiple intermediate nodes are arranged in the second identification list , which is opposite to the order in which the identifiers of the multiple intermediate nodes are arranged in the first identifier list. In this case, the consistency between the first path and the second path is further improved, and the accuracy with which the second node determines whether the first path is faulty according to the response message is further improved.
可选地,检测报文还携带有:第一指示;第一指示用于指示第一中间节点:在检测报文携带有第一指示时,将初始标识更新为第一标识。相应地,第一中间节点可以在检测报文携带有第一指示时,将第一标识列表中的初始标识更新为第一中间节点的第一标识。在检测报文并未携带有第一指示时,第一中间节点可以不对该初始标识进行更改。这样一来,第一中间节点便可以根据该第一指示来判定是否需要对报文中的标识进行更改,从而避免了第一中间节点对接收到的每个报文中的标识进行更改,降低了第一中间节点的功耗。Optionally, the detection packet further carries: a first indication; the first indication is used to instruct the first intermediate node: when the detection packet carries the first indication, the initial identification is updated to the first identification. Correspondingly, the first intermediate node may update the initial identification in the first identification list to the first identification of the first intermediate node when the detection packet carries the first indication. When the detection packet does not carry the first indication, the first intermediate node may not change the initial identification. In this way, the first intermediate node can determine whether the identifier in the message needs to be changed according to the first instruction, thereby preventing the first intermediate node from changing the identifier in each received packet, reducing the need for power consumption of the first intermediate node.
可选地,检测报文的报文头中的标志字段携带有第一指示。Optionally, the flag field in the packet header of the detection packet carries the first indication.
可选地,检测报文包括第一SRH,第一SRH携带有第一标识列表;或者,检测报文包括第一负载部分,第一负载部分携带有第一标识列表。Optionally, the detection packet includes a first SRH, and the first SRH carries a first identification list; or, the detection packet includes a first load part, and the first load part carries the first identification list.
图13为本申请实施例提供的又一种报文传输设备的框图,该报文传输设备例如可以属于图8所示实施例中第一路径上的第三节点,第一路径为第二节点到第一节点的路径。如图13所示,该报文传输设备包括:第一接收模块1301、更新模块1302和处理模块1303。FIG. 13 is a block diagram of another message transmission device provided by an embodiment of the present application. For example, the message transmission device may belong to the third node on the first path in the embodiment shown in FIG. 8 , and the first path is the second node Path to the first node. As shown in FIG. 13 , the message transmission device includes: a first receiving module 1301 , an updating module 1302 and a processing module 1303 .
第一接收模块1301用于接收检测报文;检测报文携带有第一标识列表,第一标识列表用于指示第一路径,第一标识列表包括第三节点的初始标识。第一接收模块1301用于执行的操作可以参考上述S802中与第一中间节点相关的内容。The first receiving module 1301 is configured to receive a detection packet; the detection packet carries a first identification list, the first identification list is used to indicate the first path, and the first identification list includes the initial identification of the third node. For operations performed by the first receiving module 1301, reference may be made to the content related to the first intermediate node in S802 above.
更新模块1302用于将第一标识列表中的初始标识更新为第三节点的第一标识,得到更新后的检测报文。更新模块1302用于执行的操作可以参考上述S803中与第一中间节点相关的内容。The updating module 1302 is configured to update the initial identifier in the first identifier list to the first identifier of the third node to obtain the updated detection message. For the operation performed by the update module 1302, reference may be made to the content related to the first intermediate node in the foregoing S803.
处理模块1303用于对更新后的检测报文进行处理。处理模块1303用于执行的操作可以参考上述S804中与第一中间节点相关的内容。The processing module 1303 is configured to process the updated detection message. For operations performed by the processing module 1303, reference may be made to the content related to the first intermediate node in S804 above.
第三节点可以是第一路径上的第一节点,也可以是第一路径上的第一中间节点。该第一中间节点是第一路径上的任一中间节点。当第三节点是第一节点时,处理模块1303用于根据该更新后的检测报文生成回应报文。当第三节点是第一中间节点时,处理模块1303用于发送该更新后的检测报文。The third node may be the first node on the first path, or may be the first intermediate node on the first path. The first intermediate node is any intermediate node on the first path. When the third node is the first node, the processing module 1303 is configured to generate a response message according to the updated detection message. When the third node is the first intermediate node, the processing module 1303 is configured to send the updated detection message.
当第三节点是第一中间节点时,由于第一中间节点对检测报文中第一中间节点的标识进行了更新,因此,第一节点根据该检测报文生成的回应报文中的第二标识列表包括:第一中间节点的第一标识,且第一标识为第一中间节点接收检测报文的端口或链路的标识,因此,第一中间节点在根据第二标识列表发送回应报文时,可以从该第一中间节点中的该端口或链路发送回应报文。这样一来,就保证了第一中间节点接收检测报文和发送回应报文的端口或链路相同,从而进一步提升了检测报文的传输路径与回应报文的传输路径的一致性。When the third node is the first intermediate node, since the first intermediate node has updated the identifier of the first intermediate node in the detection packet, the second intermediate node in the response packet generated by the first node according to the detection packet The identification list includes: the first identification of the first intermediate node, and the first identification is the identification of the port or link where the first intermediate node receives the detection message. Therefore, the first intermediate node sends the response message according to the second identification list. , a response message can be sent from the port or link in the first intermediate node. In this way, it is ensured that the first intermediate node receives the detection packet and sends the response packet through the same port or link, thereby further improving the consistency of the transmission path of the detection packet and the transmission path of the response packet.
上述第三节点的初始标识与第一标识不同,可选地,初始标识包括:第三节点的节点标识,如该节点标识可以为Node SID;第一标识包括:第三节点接收检测报文的端口或链路的标识,如该第一标识可以为End.X SID。The initial identification of the above-mentioned third node is different from the first identification. Optionally, the initial identification includes: the node identification of the third node, for example, the node identification may be the Node SID; the first identification includes: the third node receives the detection message. The identifier of the port or link, such as the first identifier can be End.X SID.
可选地,检测报文还携带有:第一指示,更新模块用于:在检测报文携带有第一指示时,将初始标识更新为第一标识。这样一来,第三节点便可以根据该第一指示来判定是否需要对报文中的标识进行更改,从而避免了第三节点对接收到的每个报文中的标识进行更改,降低了第三节点的功耗。Optionally, the detection message further carries: a first indication, and the updating module is configured to: when the detection message carries the first indication, update the initial identification to the first identification. In this way, the third node can determine whether the identifier in the message needs to be changed according to the first instruction, thereby preventing the third node from changing the identifier in each received message, reducing the Power consumption of three nodes.
可选地,报文传输设备还包括:第二接收模块和发送模块(图13中未示出这两个模块)。 其中,第二接收模块用于在根据第一标识列表,发送更新后的检测报文之后,接收检测报文的回应报文;回应报文携带有第二标识列表,第二标识列表用于指示第一节点到第二节点的第二路径,第二标识列表包括第一标识;发送模块用于根据第二标识列表,发送回应报文。第二接收模块用于执行的操作可以参考上述S806中与第一中间节点相关的内容,发送模块用于执行的操作可以参考上述S807中与第一中间节点相关的内容。Optionally, the message transmission device further includes: a second receiving module and a sending module (these two modules are not shown in FIG. 13 ). The second receiving module is configured to receive a response message of the detection message after sending the updated detection message according to the first identification list; the response message carries a second identification list, and the second identification list is used to indicate The second path from the first node to the second node, the second identification list includes the first identification; the sending module is configured to send a response message according to the second identification list. For the operations performed by the second receiving module, reference may be made to the content related to the first intermediate node in the above S806, and the operation performed by the sending module may refer to the content related to the first intermediate node in the above S807.
在采用集成的单元的情况下,本申请所提供的用于第一节点、第二节点或第三节点的报文传输设备可以包括处理模块、存储模块和通信模块。其中,处理模块可以用于对报文传输设备的动作进行控制管理,例如,可以用于支持报文传输设备执行上述S401至S404中由第一节点或第二节点执行的动作,或者,可以用于支持报文传输设备执行上述S801至S807中由第一节点、第二节点或第一中间节点执行的动作。存储模块可以用于支持报文传输设备执行存储程序代码和数据等。通信模块,可以用于报文传输设备与其他设备的通信。In the case of using an integrated unit, the message transmission device for the first node, the second node or the third node provided by the present application may include a processing module, a storage module and a communication module. The processing module may be used to control and manage the actions of the message transmission device, for example, it may be used to support the message transmission device to perform the actions performed by the first node or the second node in the above S401 to S404, or it may use The actions performed by the first node, the second node or the first intermediate node in the foregoing S801 to S807 are performed on the device supporting message transmission. The storage module can be used to support the message transmission device to execute stored program codes and data. The communication module can be used for the communication between the message transmission device and other devices.
其中,处理模块可以是处理器或控制器。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理(digital signal processing,DSP)和微处理器的组合等等。存储模块可以是存储器。通信模块具体可以为射频电路、蓝牙芯片、Wi-Fi芯片等与其他设备交互的设备。The processing module may be a processor or a controller. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and the like. The storage module may be a memory. The communication module may specifically be a device that interacts with other devices, such as a radio frequency circuit, a Bluetooth chip, and a Wi-Fi chip.
在一个实施例中,当处理模块为处理器,存储模块为存储器,通信模块为通信接口时,本实施例所涉及的报文传输设备可以为具有图2所示结构的通信设备。在一种实现方式中,本报文传输设备中包括的上述各个模块等可以为存储器中存储的计算机程序,并由处理器调用以实现各个模块相应的执行功能。In one embodiment, when the processing module is a processor, the storage module is a memory, and the communication module is a communication interface, the message transmission device involved in this embodiment may be a communication device having the structure shown in FIG. 2 . In an implementation manner, the above-mentioned modules and the like included in the message transmission device may be computer programs stored in the memory and invoked by the processor to implement the corresponding execution functions of the modules.
根据以上内容可知,本申请实施例提供的通信系统包括:第一节点和第二节点。该第一节点可以包括图11所示的报文传输设备,该第二节点可以包括图12所示的报文传输设备。According to the above content, the communication system provided by the embodiments of the present application includes: a first node and a second node. The first node may include the message transmission device shown in FIG. 11 , and the second node may include the message transmission device shown in FIG. 12 .
示例地,第二节点用于生成检测报文,以及向第一节点发送检测报文。其中,第二节点生成的检测报文携带有第一标识列表,第一标识列表用于指示第二节点到第一节点的第一路径,第一标识列表包括:第一路径上第一中间节点的初始标识。Exemplarily, the second node is configured to generate the detection packet and send the detection packet to the first node. The detection packet generated by the second node carries a first identification list, the first identification list is used to indicate the first path from the second node to the first node, and the first identification list includes: the first intermediate node on the first path initial identification.
第一节点用于:接收检测报文,获得检测报文的回应报文,以及根据回应报文携带的第二标识列表,发送回应报文。其中,第一节点接收到的检测报文携带有第一标识列表,该第一标识列表用于指示第二节点到第一节点的第一路径,该第一标识列表包括:第一路径上第一中间节点的第一标识;回应报文携带有第二标识列表,第二标识列表是第一节点根据第一标识列表获得的,第二标识列表用于指示第一节点到第二节点的第二路径,第二标识列表包括第一标识。The first node is used to: receive the detection packet, obtain a response packet of the detection packet, and send the response packet according to the second identification list carried in the response packet. The detection packet received by the first node carries a first identification list, and the first identification list is used to indicate the first path from the second node to the first node, and the first identification list includes: the first identification list on the first path A first identifier of an intermediate node; the response message carries a second identifier list, the second identifier list is obtained by the first node according to the first identifier list, and the second identifier list is used to indicate the first node to the second node. Two paths, the second identifier list includes the first identifier.
可选地,检测报文携带有:操作码,操作码用于指示:生成携带有用于指示与第一路径一致且方向相反的标识列表的回应报文;第一节点用于在检测报文携带有操作码时,生成回应报文。Optionally, the detection packet carries: an operation code, and the operation code is used to indicate: generate a response packet that carries an identification list that is consistent with the first path and in the opposite direction; the first node is used to carry in the detection packet When there is an opcode, a response message is generated.
可选地,第一标识列表包括:第一路径上多个中间节点的标识;第二标识列表也包括:多个中间节点的标识;多个中间节点的标识在第二标识列表中的排列顺序,与多个中间节点的标识在第一标识列表中的排列顺序相反。Optionally, the first identification list includes: identifications of multiple intermediate nodes on the first path; the second identification list also includes: identifications of multiple intermediate nodes; the order in which the identifications of multiple intermediate nodes are arranged in the second identification list , which is opposite to the order in which the identifiers of the multiple intermediate nodes are arranged in the first identifier list.
可选地,多个中间节点包括:第一路径中除第一节点和第二节点之外的其他节点。Optionally, the plurality of intermediate nodes include: other nodes in the first path except the first node and the second node.
可选地,第一节点用于:根据第一标识列表中包括的多个中间节点的标识,按照相反的顺序,获得第二标识列表;之后,再将第二标识列表封装到回应报文中。Optionally, the first node is used to: obtain the second identification list in reverse order according to the identifications of multiple intermediate nodes included in the first identification list; and then encapsulate the second identification list into the response message .
可选地,检测报文还携带有第二节点的地址,第一节点还用于:在获得回应报文之前,根据第二节点的地址,确定第二节点的标识,回应报文包括:第二节点的标识。Optionally, the detection message also carries the address of the second node, and the first node is further configured to: before obtaining the response message, determine the identifier of the second node according to the address of the second node, and the response message includes: The identifier of the second node.
可选地,检测报文包括第一SRH,第一SRH携带有第一标识列表;回应报文包括第二SRH,第二SRH携带有第二标识列表;或者,检测报文包括第一负载部分,第一负载部分携带有第一标识列表;回应报文包括第二负载部分,第二负载部分携带有第二标识列表。Optionally, the detection packet includes a first SRH, and the first SRH carries a first identification list; the response packet includes a second SRH, and the second SRH carries a second identification list; or, the detection packet includes a first load part , the first load part carries the first identification list; the response message includes the second load part, and the second load part carries the second identification list.
可选地,检测报文为:SBFD报文。Optionally, the detection message is: SBFD message.
可选地,本申请实施例提供的通信系统还包括上述第一路径上的第一中间节点。第一中间节点可以包括图13所示的报文传输设备。Optionally, the communication system provided in this embodiment of the present application further includes a first intermediate node on the above-mentioned first path. The first intermediate node may include the message transmission device shown in FIG. 13 .
示例地,第一中间节点用于:接收检测报文,该检测报文携带有第一标识列表,第一标识列表用于指示第一路径,第一标识列表包括第一中间节点的初始标识。第一中间节点还用于在接收检测报文后,将第一标识列表中的初始标识更新为第一中间节点的第一标识,得到更新后的检测报文,并根据第一标识列表,发送更新后的检测报文。Exemplarily, the first intermediate node is configured to: receive a detection packet, where the detection packet carries a first identification list, the first identification list is used to indicate the first path, and the first identification list includes the initial identification of the first intermediate node. The first intermediate node is further configured to update the initial identification in the first identification list to the first identification of the first intermediate node after receiving the detection packet, obtain the updated detection packet, and send the updated detection packet according to the first identification list. The updated detection message.
可选地,初始标识包括:第一中间节点的节点标识;第一标识包括:第一中间节点接收检测报文的端口或链路的标识。Optionally, the initial identification includes: a node identification of the first intermediate node; the first identification includes: an identification of a port or a link where the first intermediate node receives the detection message.
可选地,检测报文还携带有:第一指示,第一中间节点用于:在检测报文携带有第一指示时,将初始标识更新为第一标识。Optionally, the detection packet further carries: a first indication, and the first intermediate node is configured to: when the detection packet carries the first indication, update the initial identification to the first identification.
可选地,第一中间节点还用于:在根据第一标识列表,发送更新后的检测报文之后,接收检测报文的回应报文,并根据回应报文携带的第二标识列表,发送回应报文。其中,回应报文携带有第二标识列表,第二标识列表用于指示第一节点到第二节点的第二路径,第二标识列表包括第一标识。Optionally, the first intermediate node is further configured to: after sending the updated detection message according to the first identification list, receive a response message of the detection message, and send the response message according to the second identification list carried in the response message. response message. Wherein, the response message carries a second identification list, the second identification list is used to indicate the second path from the first node to the second node, and the second identification list includes the first identification.
根据以上内容可知,第一中间节点可以对检测报文进行更新,可选地,第一路径上的第一节点在接收到检测报文后,也可以对该检测报文进行更新。第一节点对检测报文进行更新的过程可以参考上述第一中间节点对检测报文进行更新的过程,本申请实施例在此不做赘述。According to the above content, the first intermediate node may update the detection packet, and optionally, the first node on the first path may also update the detection packet after receiving the detection packet. For the process of updating the detection message by the first node, reference may be made to the above-mentioned process of updating the detection message by the first intermediate node, which is not repeated in this embodiment of the present application.
在这种情况下,第一路径上的第一中间节点和第一节点均可以称为第三节点,该第三节点能够在接收到检测报文后,将第一标识列表中携带的第三节点的初始标识更新为第三节点的第一标识,得到更新后的检测报文,之后再对该更新后的检测报文进行处理。In this case, both the first intermediate node and the first node on the first path may be called a third node, and the third node can, after receiving the detection packet, convert the third node carried in the first identification list to the third node. The initial identification of the node is updated to the first identification of the third node, and an updated detection packet is obtained, and then the updated detection packet is processed.
当第三节点是第一节点时,第三节点对更新后的检测报文进行处理可以包括:第三节点根据该更新后的检测报文生成回应报文。当第三节点是第一中间节点时,第三节点对更新后的检测报文进行处理可以包括:第三节点发送该更新后的检测报文。When the third node is the first node, processing the updated detection message by the third node may include: the third node generates a response message according to the updated detection message. When the third node is the first intermediate node, processing the updated detection message by the third node may include: sending the updated detection message by the third node.
可见,通信系统中的第一中间节点和第二节点中的至少一个节点为:图13所示的报文传输设备所属的第三节点。It can be seen that at least one of the first intermediate node and the second node in the communication system is: the third node to which the message transmission device shown in FIG. 13 belongs.
本申请实施例提供了一种计算机存储介质,所述存储介质内存储有计算机程序;所述计算机程序在计算机上运行时,使得计算机执行本申请实施例提供的任一种报文传输方法中由第一节点、第二节点或第一中间节点执行的方法。The embodiments of the present application provide a computer storage medium, in which a computer program is stored; when the computer program runs on the computer, the computer program enables the computer to execute any of the message transmission methods provided by the embodiments of the present application. A method performed by a first node, a second node or a first intermediate node.
本申请实施例还提供了一种包含指令的计算机程序产品,当计算机程序产品在报文传输 设备上运行时,使得报文传输设备执行本申请实施例提供的任一种报文传输方法中由第一节点、第二节点或第一中间节点执行的方法。The embodiment of the present application also provides a computer program product including instructions, when the computer program product runs on the message transmission device, the message transmission device is made to execute any of the message transmission methods provided by the embodiments of the present application. A method performed by a first node, a second node or a first intermediate node.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现,所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机的可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者包含一个或多个可用介质集成的服务器、数据中心等数据存储装置。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质,或者半导体介质(例如固态硬盘)等。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product comprising one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer may be a general purpose computer, a computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be downloaded from a website, computer, server, or data The center transmits to another website site, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line) or wireless (eg, infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that includes one or more available media integrated. The usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media, or semiconductor media (eg, solid state drives), and the like.
在本申请中,术语“第一”和“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。术语“至少一个”指一个或多个,“多个”指两个或两个以上,除非另有明确的限定。In this application, the terms "first" and "second" etc. are used for descriptive purposes only and should not be construed to indicate or imply relative importance. The term "at least one" refers to one or more, and "plurality" refers to two or more, unless expressly limited otherwise.
本申请实施例提供的方法实施例和设备实施例等不同类型的实施例均可以相互参考,本申请实施例对此不做限定。本申请实施例提供的方法实施例操作的先后顺序能够进行适当调整,操作也能够根据情况进行相应增减,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化的方法,都应涵盖在本申请的保护范围之内,因此不再赘述。Different types of embodiments such as method embodiments and device embodiments provided in the embodiments of the present application may refer to each other, which is not limited in the embodiments of the present application. The sequence of operations of the method embodiments provided in the embodiments of the present application can be appropriately adjusted, and the operations can also be increased or decreased according to the situation. All methods should be covered within the protection scope of the present application, and therefore will not be repeated here.
在本申请提供的相应实施例中,应该理解到,所揭露的系统和设备等可以通过其它的构成方式实现。例如,以上所描述的设备实施例仅仅是示意性的,例如,模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,设备或模块的间接耦合或通信连接,可以是电性或其它的形式。In the corresponding embodiments provided in the present application, it should be understood that the disclosed systems, devices, etc. may be implemented by other structural manners. For example, the device embodiments described above are only illustrative. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another A system, or some feature, can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or modules, and may be in electrical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元描述的部件可以是或者也可以不是物理单元,既可以位于一个地方,或者也可以分布到多个设备上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。Units described as separate components may or may not be physically separated, and components described as units may or may not be physical units, and may be located in one place or distributed to multiple devices. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalents within the technical scope disclosed in the present application. Modifications or substitutions shall be covered by the protection scope of this application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (45)

  1. 一种报文传输方法,其特征在于,所述方法由第一节点执行,所述方法包括:A message transmission method, characterized in that the method is performed by a first node, and the method includes:
    接收检测报文,所述检测报文携带有第一标识列表,所述第一标识列表用于指示第二节点到所述第一节点的第一路径,所述第一标识列表包括:所述第一路径上第一中间节点的第一标识;Receive a detection packet, where the detection packet carries a first identification list, where the first identification list is used to indicate the first path from the second node to the first node, and the first identification list includes: the the first identifier of the first intermediate node on the first path;
    获得所述检测报文的回应报文,所述回应报文携带有第二标识列表,所述第二标识列表是根据所述第一标识列表获得的,所述第二标识列表用于指示所述第一节点到所述第二节点的第二路径,所述第二标识列表包括所述第一标识;The response message of the detection message is obtained, and the response message carries a second identification list, and the second identification list is obtained according to the first identification list, and the second identification list is used to indicate the a second path from the first node to the second node, and the second identification list includes the first identification;
    发送所述回应报文。Send the response message.
  2. 根据权利要求1所述的方法,其特征在于,所述检测报文携带有:操作码,所述操作码用于指示:生成携带有用于指示与所述第一路径一致且方向相反的标识列表的回应报文;The method according to claim 1, wherein the detection message carries: an operation code, and the operation code is used to instruct: to generate a list of identifiers carrying an identifier that is used to indicate that the first path is consistent and opposite to the direction response message;
    获得所述检测报文的回应报文,包括:Obtain the response message of the detection message, including:
    在所述检测报文携带有所述操作码时,生成所述回应报文。When the detection message carries the operation code, the response message is generated.
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一标识列表包括:所述第一路径上多个中间节点的标识;所述第二标识列表也包括:所述多个中间节点的标识;The method according to claim 1 or 2, wherein the first identifier list includes: identifiers of multiple intermediate nodes on the first path; the second identifier list also includes: the multiple intermediate nodes the identifier of the node;
    所述多个中间节点的标识在所述第二标识列表中的排列顺序,与所述多个中间节点的标识在所述第一标识列表中的排列顺序相反。The order in which the identifiers of the plurality of intermediate nodes are arranged in the second identifier list is opposite to the order in which the identifiers of the plurality of intermediate nodes are arranged in the first identifier list.
  4. 根据权利要求3所述的方法,其特征在于,所述多个中间节点包括:所述第一路径中除所述第一节点和所述第二节点之外的其他节点。The method according to claim 3, wherein the plurality of intermediate nodes comprise: other nodes in the first path except the first node and the second node.
  5. 根据权利要求3或4所述的方法,其特征在于,所述获得检测报文的回应报文,包括:The method according to claim 3 or 4, wherein the obtaining the response message of the detection message comprises:
    根据所述第一标识列表中包括的所述多个中间节点的标识,按照相反的顺序,获得所述第二标识列表;According to the identifiers of the plurality of intermediate nodes included in the first identifier list, in a reverse order, obtain the second identifier list;
    将所述第二标识列表封装到所述回应报文中。The second identification list is encapsulated into the response message.
  6. 根据权利要求1至5任一所述的方法,其特征在于,所述第一标识包括:所述第一中间节点接收所述检测报文的端口或链路的标识。The method according to any one of claims 1 to 5, wherein the first identifier comprises: an identifier of a port or a link where the first intermediate node receives the detection packet.
  7. 根据权利要求1至6任一所述的方法,其特征在于,所述检测报文还携带有所述第二节点的地址,所述方法还包括:The method according to any one of claims 1 to 6, wherein the detection packet further carries the address of the second node, and the method further comprises:
    在获得所述回应报文之前,根据所述第二节点的地址,确定所述第二节点的标识,所述回应报文包括:所述第二节点的标识。Before obtaining the response message, the identifier of the second node is determined according to the address of the second node, and the response message includes: the identifier of the second node.
  8. 根据权利要求1至7任一所述的方法,其特征在于,所述检测报文包括第一段路由扩展头SRH,所述第一SRH携带有所述第一标识列表;所述回应报文包括第二SRH,所述第 二SRH携带有所述第二标识列表;The method according to any one of claims 1 to 7, wherein the detection message includes a first segment route extension header SRH, and the first SRH carries the first identification list; the response message Including a second SRH, the second SRH carries the second identification list;
    或者,所述检测报文包括第一负载部分,所述第一负载部分携带有所述第一标识列表;所述回应报文包括第二负载部分,所述第二负载部分携带有所述第二标识列表。Or, the detection message includes a first load part, and the first load part carries the first identification list; the response message includes a second load part, and the second load part carries the first identification list. 2. List of identities.
  9. 根据权利要求1至8任一所述的方法,其特征在于,所述检测报文为:无缝双向转发检测SBFD报文。The method according to any one of claims 1 to 8, wherein the detection packet is a seamless bidirectional forwarding detection SBFD packet.
  10. 一种报文传输方法,其特征在于,所述方法由第二节点执行,所述方法包括:A message transmission method, characterized in that the method is performed by a second node, and the method includes:
    生成检测报文,所述检测报文携带有第一标识列表,所述第一标识列表用于指示所述第二节点到第一节点的第一路径,所述第一标识列表包括:所述第一路径上第一中间节点的初始标识;A detection packet is generated, where the detection packet carries a first identification list, the first identification list is used to indicate the first path from the second node to the first node, and the first identification list includes: the the initial identifier of the first intermediate node on the first path;
    向第一节点发送所述检测报文;sending the detection message to the first node;
    其中,所述检测报文用于指示所述第一节点:获得所述检测报文的回应报文,所述回应报文携带有第二标识列表;所述第二标识列表是所述第一节点根据所述第一标识列表获得的,所述第二标识列表用于指示所述第一节点到所述第二节点的第二路径,所述第二标识列表包括:所述第一中间节点的第一标识。The detection packet is used to instruct the first node to obtain a response packet of the detection packet, and the response packet carries a second identification list; the second identification list is the first The node is obtained according to the first identification list, the second identification list is used to indicate the second path from the first node to the second node, and the second identification list includes: the first intermediate node the first identification.
  11. 根据权利要求10所述的方法,其特征在于,所述检测报文携带有:操作码;The method according to claim 10, wherein the detection message carries: an operation code;
    所述操作码用于指示:生成携带有用于指示与所述第一路径一致且方向相反的标识列表的回应报文。The operation code is used to instruct: to generate a response message carrying an identification list that is used to indicate that the first path is consistent with and opposite to the direction.
  12. 根据权利要求10或11所述的方法,其特征在于,所述第一标识列表包括:所述第一路径上多个中间节点的标识;所述第二标识列表也包括:所述多个中间节点的标识;The method according to claim 10 or 11, wherein the first identifier list includes: identifiers of multiple intermediate nodes on the first path; the second identifier list also includes: the multiple intermediate nodes the identifier of the node;
    所述多个中间节点的标识在所述第二标识列表中的排列顺序,与所述多个中间节点的标识在所述第一标识列表中的排列顺序相反。The order in which the identifiers of the plurality of intermediate nodes are arranged in the second identifier list is opposite to the order in which the identifiers of the plurality of intermediate nodes are arranged in the first identifier list.
  13. 根据权利要求10至12任一所述的方法,其特征在于,所述检测报文还携带有:第一指示;The method according to any one of claims 10 to 12, wherein the detection message further carries: a first indication;
    所述第一指示用于指示所述第一中间节点:在所述检测报文携带有所述第一指示时,将所述初始标识更新为所述第一标识。The first indication is used to instruct the first intermediate node: when the detection packet carries the first indication, update the initial identifier to the first identifier.
  14. 根据权利要求13所述的方法,其特征在于,所述检测报文的报文头中的标志字段携带有所述第一指示。The method according to claim 13, wherein a flag field in a packet header of the detection packet carries the first indication.
  15. 根据权利要求10至14任一所述的方法,其特征在于,所述检测报文包括第一段路由扩展头SRH,所述第一SRH携带有所述第一标识列表;The method according to any one of claims 10 to 14, wherein the detection message includes a first segment route extension header SRH, and the first SRH carries the first identifier list;
    或者,所述检测报文包括第一负载部分,所述第一负载部分携带有所述第一标识列表。Or, the detection packet includes a first payload part, and the first payload part carries the first identification list.
  16. 一种报文传输方法,其特征在于,所述方法由第一路径上的第三节点执行,所述第一 路径为第二节点到第一节点的路径,所述方法包括:A message transmission method, characterized in that the method is performed by a third node on a first path, and the first path is a path from a second node to the first node, the method comprising:
    接收检测报文;所述检测报文携带有第一标识列表,所述第一标识列表用于指示所述第一路径,所述第一标识列表包括所述第三节点的初始标识;receiving a detection packet; the detection packet carries a first identification list, the first identification list is used to indicate the first path, and the first identification list includes the initial identification of the third node;
    将所述第一标识列表中的所述初始标识更新为所述第三节点的第一标识,得到更新后的所述检测报文;updating the initial identification in the first identification list to the first identification of the third node to obtain the updated detection message;
    对更新后的所述检测报文进行处理。The updated detection message is processed.
  17. 根据权利要求16所述的方法,其特征在于,所述初始标识包括:所述第三节点的节点标识;The method according to claim 16, wherein the initial identification comprises: a node identification of the third node;
    所述第一标识包括:所述第三节点接收所述检测报文的端口或链路的标识。The first identifier includes: an identifier of the port or link where the third node receives the detection message.
  18. 根据权利要求16或17所述的方法,其特征在于,所述第一标识为链路段标识End.X SID。The method according to claim 16 or 17, wherein the first identifier is a link segment identifier End.X SID.
  19. 根据权利要求16至18任一项所述的方法,其特征在于,所述检测报文还携带有:第一指示,将所述第一标识列表中的所述初始标识更新为所述第三节点的第一标识,包括:The method according to any one of claims 16 to 18, wherein the detection message further carries: a first instruction to update the initial identifier in the first identifier list to the third The first identifier of the node, including:
    在所述检测报文携带有所述第一指示时,将所述初始标识更新为所述第一标识。When the detection packet carries the first indication, the initial identifier is updated to the first identifier.
  20. 根据权利要求16至19任一所述的方法,其特征在于,所述对更新后的所述检测报文进行处理,包括:The method according to any one of claims 16 to 19, wherein the processing the updated detection message comprises:
    发送更新后的所述检测报文;sending the updated detection message;
    在所述对更新后的所述检测报文进行处理之后,所述方法还包括:After the updated detection message is processed, the method further includes:
    接收所述检测报文的回应报文;所述回应报文携带有第二标识列表,所述第二标识列表用于指示所述第一节点到所述第二节点的第二路径,所述第二标识列表包括所述第一标识;Receive a response message of the detection message; the response message carries a second identification list, and the second identification list is used to indicate the second path from the first node to the second node, the The second identification list includes the first identification;
    发送所述回应报文。Send the response message.
  21. 一种报文传输设备,其特征在于,所述报文传输设备属于第一节点,所述报文传输设备包括:A message transmission device, characterized in that the message transmission device belongs to a first node, and the message transmission device includes:
    接收模块,用于接收检测报文,所述检测报文携带有第一标识列表,所述第一标识列表用于指示第二节点到所述第一节点的第一路径,所述第一标识列表包括:所述第一路径上第一中间节点的第一标识;a receiving module, configured to receive a detection packet, where the detection packet carries a first identification list, the first identification list is used to indicate the first path from the second node to the first node, the first identification The list includes: the first identifier of the first intermediate node on the first path;
    获得模块,用于获得所述检测报文的回应报文,所述回应报文携带有第二标识列表,所述第二标识列表是根据所述第一标识列表获得的,所述第二标识列表用于指示所述第一节点到所述第二节点的第二路径,所述第二标识列表包括所述第一标识;The obtaining module is used to obtain the response message of the detection message, the response message carries a second identification list, and the second identification list is obtained according to the first identification list, and the second identification list is obtained according to the first identification list. a list for indicating a second path from the first node to the second node, and the second identification list includes the first identification;
    发送模块,用于发送所述回应报文。A sending module, configured to send the response message.
  22. 根据权利要求21所述的报文传输设备,其特征在于,所述检测报文携带有:操作码,所述操作码用于指示:生成携带有用于指示与所述第一路径一致且方向相反的标识列表的回应报文;The message transmission device according to claim 21, wherein the detection message carries: an operation code, and the operation code is used to indicate that the generation and carry are used to indicate that the detection message is consistent with the first path and in an opposite direction The response message of the identification list;
    所述获得模块用于:在所述检测报文携带有所述操作码时,生成所述回应报文。The obtaining module is configured to: generate the response message when the detection message carries the operation code.
  23. 根据权利要求21或22所述的报文传输设备,其特征在于,所述第一标识列表包括:所述第一路径上多个中间节点的标识;所述第二标识列表也包括:所述多个中间节点的标识;The message transmission device according to claim 21 or 22, wherein the first identifier list includes: identifiers of multiple intermediate nodes on the first path; the second identifier list also includes: the Identification of multiple intermediate nodes;
    所述多个中间节点的标识在所述第二标识列表中的排列顺序,与所述多个中间节点的标识在所述第一标识列表中的排列顺序相反。The order in which the identifiers of the plurality of intermediate nodes are arranged in the second identifier list is opposite to the order in which the identifiers of the plurality of intermediate nodes are arranged in the first identifier list.
  24. 根据权利要求23所述的报文传输设备,其特征在于,所述多个中间节点包括:所述第一路径中除所述第一节点和所述第二节点之外的其他节点。The message transmission device according to claim 23, wherein the plurality of intermediate nodes comprise: other nodes in the first path except the first node and the second node.
  25. 根据权利要求23或24所述的报文传输设备,其特征在于,所述获得模块用于:The message transmission device according to claim 23 or 24, wherein the obtaining module is used for:
    根据所述第一标识列表中包括的所述多个中间节点的标识,按照相反的顺序,获得所述第二标识列表;According to the identifiers of the plurality of intermediate nodes included in the first identifier list, in a reverse order, obtain the second identifier list;
    将所述第二标识列表封装到所述回应报文中。The second identification list is encapsulated into the response message.
  26. 根据权利要求21至25任一所述的报文传输设备,其特征在于,所述第一标识包括:所述第一中间节点接收所述检测报文的端口或链路的标识。The message transmission device according to any one of claims 21 to 25, wherein the first identifier comprises: an identifier of a port or a link where the first intermediate node receives the detection message.
  27. 根据权利要求21至26任一所述的报文传输设备,其特征在于,所述检测报文还携带有所述第二节点的地址,所述报文传输设备还包括:The message transmission device according to any one of claims 21 to 26, wherein the detection message further carries the address of the second node, and the message transmission device further comprises:
    确定模块,用于在获得所述回应报文之前,根据所述第二节点的地址,确定所述第二节点的标识,所述回应报文包括:所述第二节点的标识。The determining module is configured to determine the identifier of the second node according to the address of the second node before obtaining the response message, where the response message includes: the identifier of the second node.
  28. 根据权利要求21至27任一所述的报文传输设备,其特征在于,所述检测报文包括第一段路由扩展头SRH,所述第一SRH携带有所述第一标识列表;所述回应报文包括第二SRH,所述第二SRH携带有所述第二标识列表;The message transmission device according to any one of claims 21 to 27, wherein the detection message includes a first segment route extension header SRH, and the first SRH carries the first identification list; the The response message includes a second SRH, and the second SRH carries the second identification list;
    或者,所述检测报文包括第一负载部分,所述第一负载部分携带有所述第一标识列表;所述回应报文包括第二负载部分,所述第二负载部分携带有所述第二标识列表。Or, the detection message includes a first load part, and the first load part carries the first identification list; the response message includes a second load part, and the second load part carries the first identification list. 2. List of identities.
  29. 根据权利要求21至28任一所述的报文传输设备,其特征在于,所述检测报文为:无缝双向转发检测SBFD报文。The message transmission device according to any one of claims 21 to 28, wherein the detection message is a seamless bidirectional forwarding detection SBFD message.
  30. 一种报文传输设备,其特征在于,所述报文传输设备属于第二节点,所述报文传输设备包括:A message transmission device, characterized in that the message transmission device belongs to a second node, and the message transmission device includes:
    生成模块,用于生成检测报文,所述检测报文携带有第一标识列表,所述第一标识列表用于指示所述第二节点到第一节点的第一路径,所述第一标识列表包括:所述第一路径上第一中间节点的初始标识;A generating module, configured to generate a detection packet, where the detection packet carries a first identification list, and the first identification list is used to indicate the first path from the second node to the first node, and the first identification The list includes: the initial identifier of the first intermediate node on the first path;
    发送模块,用于向第一节点发送所述检测报文;a sending module, configured to send the detection message to the first node;
    其中,所述检测报文用于指示所述第一节点:获得所述检测报文的回应报文,所述回应 报文携带有第二标识列表;所述第二标识列表是所述第一节点根据所述第一标识列表获得的,所述第二标识列表用于指示所述第一节点到所述第二节点的第二路径,所述第二标识列表包括:所述第一中间节点的第一标识。The detection packet is used to instruct the first node to obtain a response packet of the detection packet, and the response packet carries a second identification list; the second identification list is the first The node is obtained according to the first identification list, the second identification list is used to indicate the second path from the first node to the second node, and the second identification list includes: the first intermediate node the first identification.
  31. 根据权利要求30所述的报文传输设备,其特征在于,所述检测报文携带有:操作码;The message transmission device according to claim 30, wherein the detection message carries: an operation code;
    所述操作码用于指示:生成携带有用于指示与所述第一路径一致且方向相反的标识列表的回应报文。The operation code is used to instruct: to generate a response message carrying an identification list that is used to indicate that the first path is consistent with and opposite to the direction.
  32. 根据权利要求30或31所述的报文传输设备,其特征在于,所述第一标识列表包括:所述第一路径上多个中间节点的标识;所述第二标识列表也包括:所述多个中间节点的标识;The message transmission device according to claim 30 or 31, wherein the first identifier list includes: identifiers of multiple intermediate nodes on the first path; the second identifier list also includes: the Identification of multiple intermediate nodes;
    所述多个中间节点的标识在所述第二标识列表中的排列顺序,与所述多个中间节点的标识在所述第一标识列表中的排列顺序相反。The order in which the identifiers of the plurality of intermediate nodes are arranged in the second identifier list is opposite to the order in which the identifiers of the plurality of intermediate nodes are arranged in the first identifier list.
  33. 根据权利要求30至32任一所述的报文传输设备,其特征在于,所述检测报文还携带有:第一指示;The message transmission device according to any one of claims 30 to 32, wherein the detection message further carries: a first indication;
    所述第一指示用于指示所述第一中间节点:在所述检测报文携带有所述第一指示时,将所述初始标识更新为所述第一标识。The first indication is used to instruct the first intermediate node: when the detection packet carries the first indication, update the initial identifier to the first identifier.
  34. 根据权利要求33所述的报文传输设备,其特征在于,所述检测报文的报文头中的标志字段携带有所述第一指示。The packet transmission device according to claim 33, wherein a flag field in a packet header of the detection packet carries the first indication.
  35. 根据权利要求30至34任一所述的报文传输设备,其特征在于,所述检测报文包括第一段路由扩展头SRH,所述第一SRH携带有所述第一标识列表;The message transmission device according to any one of claims 30 to 34, wherein the detection message includes a first segment route extension header SRH, and the first SRH carries the first identifier list;
    或者,所述检测报文包括第一负载部分,所述第一负载部分携带有所述第一标识列表。Or, the detection packet includes a first payload part, and the first payload part carries the first identification list.
  36. 一种报文传输设备,其特征在于,所述报文传输设备属于第一路径上的第三节点,所述第一路径为第二节点到第一节点的路径,所述报文传输设备包括:A message transmission device, characterized in that the message transmission device belongs to a third node on a first path, the first path is a path from a second node to a first node, and the message transmission device includes :
    第一接收模块,用于接收检测报文;所述检测报文携带有第一标识列表,所述第一标识列表用于指示所述第一路径,所述第一标识列表包括所述第三节点的初始标识;a first receiving module, configured to receive a detection packet; the detection packet carries a first identification list, the first identification list is used to indicate the first path, and the first identification list includes the third identification list the initial identification of the node;
    更新模块,用于将所述第一标识列表中的所述初始标识更新为所述第三节点的第一标识,得到更新后的所述检测报文;an update module, configured to update the initial identification in the first identification list to the first identification of the third node to obtain the updated detection message;
    处理模块,用于对更新后的所述检测报文进行处理。A processing module, configured to process the updated detection message.
  37. 根据权利要求36所述的报文传输设备,其特征在于,所述初始标识包括:所述第三节点的节点标识;The message transmission device according to claim 36, wherein the initial identification comprises: a node identification of the third node;
    所述第一标识包括:所述第三节点接收所述检测报文的端口或链路的标识。The first identifier includes: an identifier of the port or link where the third node receives the detection message.
  38. 根据权利要求36或37所述的报文传输设备,其特征在于,所述第一标识为链路段标识End.X SID。The message transmission device according to claim 36 or 37, wherein the first identifier is a link segment identifier End.X SID.
  39. 根据权利要求36至38任一所述的报文传输设备,其特征在于,所述检测报文还携带有:第一指示,所述更新模块用于:The message transmission device according to any one of claims 36 to 38, wherein the detection message further carries: a first indication, and the update module is configured to:
    在所述检测报文携带有所述第一指示时,将所述初始标识更新为所述第一标识。When the detection packet carries the first indication, the initial identifier is updated to the first identifier.
  40. 根据权利要求36至39任一所述的报文传输设备,其特征在于,所述处理模块用于:发送更新后的所述检测报文;The message transmission device according to any one of claims 36 to 39, wherein the processing module is configured to: send the updated detection message;
    所述报文传输设备还包括:The message transmission device further includes:
    第二接收模块,用于在所述处理模块对更新后的所述检测报文进行处理之后,接收所述检测报文的回应报文;所述回应报文携带有第二标识列表,所述第二标识列表用于指示所述第一节点到所述第二节点的第二路径,所述第二标识列表包括所述第一标识;The second receiving module is configured to receive a response packet of the detection packet after the processing module processes the updated detection packet; the response packet carries a second identification list, the The second identification list is used to indicate the second path from the first node to the second node, and the second identification list includes the first identification;
    发送模块,用于发送所述回应报文。A sending module, configured to send the response message.
  41. 一种通信设备,其特征在于,所述通信设备包括:处理器和存储器,所述存储器中存储有程序;A communication device, characterized in that the communication device comprises: a processor and a memory, wherein a program is stored in the memory;
    所述处理器用于调用所述存储器中存储的程序,以使得所述通信设备执行如权利要求1至9任一项所述的报文传输方法;The processor is configured to call a program stored in the memory, so that the communication device executes the message transmission method according to any one of claims 1 to 9;
    或者,所述处理器用于调用所述存储器中存储的程序,以使得所述通信设备执行如权利要求10至15任一项所述的报文传输方法;Or, the processor is configured to call a program stored in the memory, so that the communication device executes the message transmission method according to any one of claims 10 to 15;
    或者,所述处理器用于调用所述存储器中存储的程序,以使得所述通信设备执行如权利要求16至20任一项所述的报文传输方法。Alternatively, the processor is configured to call a program stored in the memory, so that the communication device executes the message transmission method according to any one of claims 16 to 20.
  42. 一种通信系统,其特征在于,所述通信系统包括第一节点和第二节点;A communication system, characterized in that the communication system includes a first node and a second node;
    所述第一节点包括:权利要求21至29任一所述的报文传输设备;The first node includes: the message transmission device according to any one of claims 21 to 29;
    所述第二节点包括:权利要求30至35任一所述的报文传输设备。The second node includes: the message transmission device according to any one of claims 30 to 35.
  43. 根据权利要求42所述的通信系统,其特征在于,所述通信系统还包括:第一中间节点;The communication system according to claim 42, wherein the communication system further comprises: a first intermediate node;
    所述第一中间节点和所述第二节点中的至少一个节点为:权利要求36至40任一所述的报文传输设备所述的第三节点。At least one of the first intermediate node and the second node is: the third node described in the message transmission device according to any one of claims 36 to 40.
  44. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当所述指令在计算机上运行时,使得计算机执行如权利要求1至20任一项所述的方法。A computer-readable storage medium, characterized in that the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to execute the method according to any one of claims 1 to 20 .
  45. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得计算机执行如权利要求1至20任一项所述的方法。A computer program product comprising instructions, characterized in that, when the computer program product is run on a computer, the computer is caused to perform the method according to any one of claims 1 to 20.
PCT/CN2021/139554 2020-12-21 2021-12-20 Packet transmission method, device and system WO2022135321A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202011517278.8 2020-12-21
CN202011517278 2020-12-21
CN202110267901.7 2021-03-11
CN202110267901.7A CN114726754A (en) 2020-12-21 2021-03-11 Message transmission method, device and system

Publications (1)

Publication Number Publication Date
WO2022135321A1 true WO2022135321A1 (en) 2022-06-30

Family

ID=82157380

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/139554 WO2022135321A1 (en) 2020-12-21 2021-12-20 Packet transmission method, device and system

Country Status (1)

Country Link
WO (1) WO2022135321A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102204169A (en) * 2011-05-12 2011-09-28 华为技术有限公司 Fault detection method, route node and system
CN102624609A (en) * 2012-02-28 2012-08-01 华为技术有限公司 Method for transmitting reverse bidirectional forwarding detection (BFD) messages, method for notifying paths and device for notifying paths
US20130022046A1 (en) * 2011-07-22 2013-01-24 Cisco Technology, Inc. Diverse path forwarding through trial and error
CN108768788A (en) * 2018-06-26 2018-11-06 新华三技术有限公司合肥分公司 Path failure detection method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102204169A (en) * 2011-05-12 2011-09-28 华为技术有限公司 Fault detection method, route node and system
US20130022046A1 (en) * 2011-07-22 2013-01-24 Cisco Technology, Inc. Diverse path forwarding through trial and error
CN102624609A (en) * 2012-02-28 2012-08-01 华为技术有限公司 Method for transmitting reverse bidirectional forwarding detection (BFD) messages, method for notifying paths and device for notifying paths
CN108768788A (en) * 2018-06-26 2018-11-06 新华三技术有限公司合肥分公司 Path failure detection method and device

Similar Documents

Publication Publication Date Title
US11979322B2 (en) Method and apparatus for providing service for traffic flow
US10757231B2 (en) Providing network efficiencies in forwarding packets among provider networks and applying segment routing policies
CN109873760B (en) Method and device for processing route, and method and device for data transmission
US10237177B2 (en) Transfer device and transfer system
JP5345942B2 (en) Ethernet OAM in intermediate nodes of PBT network
EP3742685B1 (en) Packet processing method and device
US10931530B1 (en) Managing routing resources of a network
JP2020520612A (en) Packet transmission method, edge device, and machine-readable storage medium
WO2021088433A1 (en) Message processing method, device and system
WO2022042503A1 (en) Message transmission method, apparatus, and system
US20230067091A1 (en) Method and device for segment routing service processing, routing equipment, and storage medium
US11356372B2 (en) Data traffic processing method, device, and system
WO2022222750A1 (en) Packet forwarding method and apparatus, network device, and storage medium
WO2022057810A1 (en) Service packet forwarding method, sr policy sending method, device, and system
JP2024506089A (en) Packet forwarding methods, devices, and systems
WO2024001701A1 (en) Data processing method, apparatus and system
JP2023529639A (en) Packet processing methods, devices and systems
WO2022135321A1 (en) Packet transmission method, device and system
CN111447131B (en) Message de-encapsulation method and device and message encapsulation method and device
WO2023078031A1 (en) Message sending method and apparatus
CN114726754A (en) Message transmission method, device and system
WO2023078144A1 (en) Message processing method, apparatus and system
CN113497794B (en) Method and device for switching route
WO2024174668A1 (en) Information transmission method and related device
JP7442694B2 (en) Fault detection method, device and PE device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21909317

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21909317

Country of ref document: EP

Kind code of ref document: A1