WO2015168948A1 - 路径检测方法和通信节点 - Google Patents

路径检测方法和通信节点 Download PDF

Info

Publication number
WO2015168948A1
WO2015168948A1 PCT/CN2014/077185 CN2014077185W WO2015168948A1 WO 2015168948 A1 WO2015168948 A1 WO 2015168948A1 CN 2014077185 W CN2014077185 W CN 2014077185W WO 2015168948 A1 WO2015168948 A1 WO 2015168948A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
path
path detection
communication node
detection
Prior art date
Application number
PCT/CN2014/077185
Other languages
English (en)
French (fr)
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
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201480025685.3A priority Critical patent/CN105324962B/zh
Priority to PCT/CN2014/077185 priority patent/WO2015168948A1/zh
Publication of WO2015168948A1 publication Critical patent/WO2015168948A1/zh

Links

Definitions

  • the embodiments of the present invention relate to the field of communications technologies, and in particular, to a path detection method and a communication node. Background technique
  • IP Internet Protocol
  • ICC Internet Control Message Protocol
  • IP Internet Protocol
  • the Internet Control Message Protocol can be used to detect the path through which IP packets are transmitted in an IP network, that is, in an IP network. Information about each node through which an IP packet passes.
  • the node A if the node A needs to know the path between the node F and the node F, the node A can send the ICMP message to the destination node as the first node, and the ICMP message includes the lifetime of the IP packet header.
  • the TTL of the IP header in the ICMP message sent by the node A to the destination node is increased by 1, for example: IP header included in the ICMP message sent by the node A to the node F for the first time.
  • the TTL is 1, and the TTL of the IP header included in the ICMP message sent by the node A to the node F for the second time is 2, and then the node A sends an ICMP message to the destination node, and so on.
  • each node between node A and node F returns its own information (for example, an IP address) to node A, so that node A acquires the path with node F.
  • a heterogeneous network such as an IP network and a Multi-Protocol Label Switch (MPLS) network or an IP tunnel coexisting
  • MPLS Multi-Protocol Label Switch
  • IP tunnel coexisting
  • the path detection initiator is located in an IP network
  • the MPLS network or IP tunnel is located.
  • the ingress node in the MPLS network or IP tunnel of the PiPe (tunnel) mode receives the path detection message
  • the path detection message is encapsulated, and the encapsulated message carries a large MPLS label.
  • the encapsulated message will be transmitted in the MPLS network or IP tunnel until the egress node, the egress node decapsulates the encapsulated message to obtain the path detection message, if the egress node detects If the TTL of the IP header in the path detection message is 1, the information of the egress node is returned to the path detection initiating node; if the egress node detects that the TTL of the IP header in the subsequent path detection message is not 1, the The path detection message is passed down, so that it is at the exit node and the way.
  • Each node between the path detection termination nodes receives a path detection message with a TTL of 1 for the IP header, and feeds back information of each node to the path detection initiation node.
  • the path detection initiating node can only detect the information of each node located in the IP network, and cannot detect the information of each node in the MPLS network and the IP tunnel in the PiPe mode.
  • the embodiment of the invention provides a path detection method and a communication node, which are used to implement that the path detection node in the first network can obtain information about each node in the second network.
  • an embodiment of the present invention provides a path detection method, including:
  • the first communication node receives the first path detection message sent by the second communication node as the path detection initiation node by using the first network, where the first path detection message is used to indicate that the first communication node is performed by the second communication node.
  • Path detection the first path detection message includes an internet protocol IP address of the path detection termination node, the first communication node is a first node of the second network, the first network is an IP network, and the second network is Multi-protocol label switching protocol MPLS network or IP tunnel;
  • the first communication node as a proxy path detection initiation node, acquires information of other nodes in the path between the path detection initiation node and the path detection termination node in the second network;
  • the first communication node sends a proxy detection return message to the second communication node, where the proxy detection return message includes a path between the path detection initiation node and the path detection termination node in the second network. Information about other nodes.
  • the first path reply message further includes: proxy detection waiting information; or
  • the method further includes:
  • the first communication node sends a proxy detection wait message to the second communication node, where the proxy detection wait message includes proxy detection wait information;
  • the agent detection waiting information is used to indicate that: the second communication node does not receive the location Maintaining a path detection state and the second communication node before the information of the other nodes on the path between the path detection initiation node and the path detection termination node in the second network sent by the first communication node
  • the information of the other nodes on the path between the path detection initiation node and the path detection termination node in the second network is locked after the information of the first communication node.
  • the received first path detection message includes a first value of The time-to-live TTL is 1 for indicating that the first communication node is used for path detection by the second communication node.
  • the first path detection message is an Internet Control Message Protocol ICMP message or an ICMPv6 message or an empty transmission control protocol. TCP packet or empty user data protocol UDP packet.
  • the first path detection message is a TCP packet or a UDP packet
  • the method further includes: determining, by the first communication node, the check value according to the check value in the TCP packet or the UDP packet Detection is a failure.
  • the first path detection message is an IP packet that includes a path detection option, where the path is Detecting an option for indicating that the first communication node is path-joined by the second communication node, the first aspect or the first to fifth implementation manners of the first aspect,
  • the first communication node is used as a path detection initiation node of the second network, and the path detection initiation node and the path detection termination in the second network are obtained. Before the information of other nodes on the path between nodes, it also includes:
  • the first communication node replaces the source IP address in the first path detection message with the IP address of the second communication node as the IP address of the first communication node, and obtains a second path detection message;
  • the first communication node sends the second path detection message according to a protocol of the second network Encapsulating, obtaining the encapsulated second path detection message, where the encapsulated second path detection message includes a second TTL;
  • the first communication node receives a second path detection reply message sent by another node in the path between the path detection initiation node and the path detection termination node in the second network; the first communication node acts as The proxy path detection initiating node obtains information about other nodes in the second network, including:
  • the first communication node acquires the second according to the second path detection reply message sent by another node on the path between the path detection initiation node and the path detection termination node in the second network.
  • a seventh possible implementation manner of the first aspect when the first communications node receives the information sent by the same node in the second network at least twice When the second path detection reply message is described, or when the first communication node does not receive the second path detection reply message within a preset time, the first communication node stops sending the second path detection. Message.
  • the embodiment of the present invention further provides a path detection method, including:
  • the second communication node as the path detection initiating node, sends a path detection message to the path detection termination node through the first network according to the Internet Protocol IP address of the path detection termination node, where the first network is an Internet Protocol IP network,
  • the first path detection message is used to indicate that the first communication node is performing path detection;
  • the first path reply message includes information of the first communication node;
  • the second communication node receives a proxy detection return message sent by the first communication node, where the proxy detection return message includes a path between the path detection initiation node and the path detection termination node in the second network. Information about other nodes on;
  • the second communication node locks information of other nodes in the path between the path detection initiation node and the path detection termination node in the second network after the information of the first communication node.
  • the first path reply message further includes: proxy detection waiting information; or
  • the second communications node After receiving the first path reply message sent by the first communications node, the second communications node further includes:
  • the agent detection waiting information is used to indicate that: the second communication node does not receive the path detection initiation node and the path detection termination node in the second network sent by the first communication node.
  • the information of the other nodes on the inter-path remains the path detection state and the information of the other nodes in the second network on the path between the path detection initiation node and the path detection termination node Locked after the information of the first communication node;
  • the second communication node after the information of the other node in the path between the path detection initiation node and the path detection termination node in the second network is locked to the information of the first communication node, includes:
  • the second communication node locks, according to the proxy detection waiting information, information of other nodes in the path between the path detection initiation node and the path detection termination node in the second network to the first After the communication node's information.
  • the second communications node is located in the second network, where the path detection initiating node is located After the information of the other nodes on the path between the path detection termination nodes is locked to the information of the first communication node, the method further includes:
  • the second communication node determines that the path reply message sent by the path detection termination node has been received, or when the second communication node determines that the path reply is not received within a preset time In the message, the second communication node stops the path detection according to the proxy detection waiting information.
  • the path detection initiating node sends a path detection message to the path detection termination node by using the network to detect the Internet Protocol IP address of the termination node according to the path, including:
  • the second communication node detects the IP address of the terminating node according to the path, and sends at least three path detection messages to the path detecting termination node by using the first network, where the path detection message includes the first survival.
  • the time TTL is that the first TTL included in the path detection message that is sent for the first time is 1, and the first TTL included in the path detection message that is sent each time is incremented by an interval TTL of 1.
  • the path detection message is an Internet Control Message Protocol ICMP message or an ICMPv6 message or an empty Transmission Control Protocol TCP packet. Or an empty User Data Protocol UDP packet.
  • the path detection message is a TCP packet or a UDP packet, where the TCP packet or the UDP packet is included
  • the check value, the detection result of the check value is a failure.
  • the path detection initiating node sends a path detection message to the path detection termination node by using the network to detect the Internet Protocol IP address of the termination node according to the path, including:
  • the second communication node acts as a path detection initiation node, and detects an IP address of the termination node according to the path, and sends an IP packet including a path detection option to the path detection termination node by using the first network, where the path detection option is used. Instructing the second communication node to perform path detection.
  • an embodiment of the present invention provides a communication node, where the communication node is a first communication node, including:
  • a receiving unit configured to receive, by the second communication node, a first path detection message that is sent by the path detection initiation node by using the first network, where the first path detection message is used to indicate that the first communication node is used by the second communication node Performing path detection, the first path detection message includes an Internet Protocol IP address of the path detection termination node, the first communication node is a first node of the second network, the first network is an IP network, and the second network is Multi-protocol label switching protocol MPLS network or IP tunnel;
  • a sending unit configured to send a first path reply message to the second communications node, where the path reply message includes information of the first communications node;
  • a processing unit configured to: when the first communication node is used as a proxy path detection initiation node, acquire information about other nodes in the path between the path detection initiation node and the path detection termination node in the second network;
  • the sending unit is further configured to send a proxy detection return message to the second communication node, where the proxy detection return message includes a path between the path detection initiation node and the path detection termination node in the second network. Information about other nodes on it.
  • the first path reply message sent by the sending unit further includes proxy detection waiting information;
  • the sending unit is further configured to send a proxy detection waiting message to the second communication node before sending the first path reply message to the second communication node, where the proxy detection waiting message includes proxy detection waiting information;
  • the agent detection waiting information is used to indicate that: the second communication node does not receive the path detection initiation node and the path detection termination node in the second network sent by the first communication node.
  • the information of the other nodes on the inter-path remains the path detection state and the information of the other nodes in the second network that are located on the path between the path detection initiation node and the path detection node Information locked to the first communication node
  • the first path detection message received by the receiving unit includes a value of 1.
  • the first time-to-live TTL is 1 for indicating that the first communication node is used for path detection by the second communication node.
  • the first path detection message received by the receiving unit is an Internet Control Message Protocol (ICMP) message or an ICMPv6 message. Either an empty Transmission Control Protocol TCP packet or an empty User Data Protocol UDP packet.
  • ICMP Internet Control Message Protocol
  • the first path detection message received by the receiving unit is a TCP packet or a UDP package
  • the processing unit is further configured to: before the sending unit sends a path reply message to the second communication node, determine, according to the check value in the TCP packet or the UDP packet, that the check value is detected as a failure. .
  • the first path detection message received by the receiving unit is a path detection option
  • the IP packet, the path detection option is used to indicate that the first communication node is used for path detection by the second communication node.
  • the processing unit is further used Before acquiring the information of the other nodes in the path between the path detection initiation node and the path detection termination node in the second network, the source IP address in the first path detection message is used by the first The IP address of the second communication node is replaced with the IP address of the first communication node, and the second path detection message is obtained; and the second path detection message is encapsulated according to the protocol of the second network, and the encapsulated The second path detection message, the encapsulated second path detection message includes a second TTL;
  • the sending unit is further configured to: according to the destination IP address in the encapsulated second path detection message, at least twice to the path between the path detection initiation node and the path detection termination node in the second network And sending, by the other node, the encapsulated second path detection message, where the second TTL included in the encapsulated second path detection message sent for the first time is 1, and the Encapsulating the second TTL included in the second path detection message according to the interval
  • TTL is incremented by 1
  • the receiving unit is further configured to receive a second path detection reply message sent by another node in the path between the path detection initiation node and the path detection termination node in the second network;
  • the processing unit acquires information about other nodes in the path between the path detection initiation node and the path detection termination node in the second network, specifically: the processing unit is located according to the second network. And the second path detection reply message sent by the other node on the path between the path detection initiation node and the path detection termination node, acquiring the path detection initiation node and the path detection in the second network. Terminate other nodes on the path between nodes I Ft self.
  • the sending unit is further configured to: when the receiving unit receives the second network at least twice When the second path detection reply message is sent by the same node, or when the receiving unit does not receive the second path detection reply message within a preset time, the second path detection message is stopped.
  • the embodiment of the present invention further provides a communication node, where the communication node is a second communication node, including:
  • the communication node is configured as a second communication node, and includes:
  • a sending unit configured to send, by the first network, a path detection message to the path detection termination node according to the Internet Protocol IP address of the path detection termination node, where the second communication node is used as the path detection initiation node, where the first network sends In the Internet Protocol IP network, the first path detection message is used to indicate that the first communication node is performing path detection;
  • a receiving unit configured to receive a first path reply message sent by the first communications node, where the first communications node is a first node of the second network, and the second network is a multi-protocol label switching protocol MPLS network or an IP tunnel.
  • the first path reply message includes information of the first communication node; and receiving a proxy detection return message sent by the first communication node, where the proxy detection return message includes the path detection initiated in the second network Information about other nodes on the path between the node and the path detection termination node;
  • a processing unit configured to lock information of the other nodes in the path between the path detection initiation node and the path detection termination node in the second network after the information of the first communication node.
  • the first path reply message received by the receiving unit further includes proxy detection waiting information;
  • the receiving unit is further configured to: after receiving the first path reply message sent by the first communications node, receive an agent detection waiting message sent by the first communications node, where the proxy detecting waiting message includes proxy detecting waiting information;
  • the agent detection waiting information is used to indicate that: the second communication node does not receive the path detection initiation node and the path detection termination node in the second network sent by the first communication node. Keep the path detection status and the information before the information of other nodes on the path. The second communication node locks information of the other nodes in the path between the path detection initiation node and the path detection termination node in the second network after the information of the first communication node;
  • the processing unit is specifically configured to: lock, according to the proxy detection waiting information, information of other nodes in a path between the path detection initiation node and the path detection termination node in the second network, After the information of the first communication node.
  • the processing unit is further configured to: After the information of the other nodes on the path between the path detection termination nodes is locked to the information of the first communication node, when it is determined that the receiving unit has received the path reply message sent by the path detection termination node, or When it is determined that the receiving unit does not receive the path reply message within the preset time, stopping the path detection according to the agent detecting waiting information.
  • the path detection termination node sends at least three path detection messages to the path detection termination node by using the first network, where the path detection message includes a lifetime TTL; wherein the first TTL included in the path detection message sent for the first time is 1, and the first TTL included in the path detection message sent each time is TTL according to an interval Increment.
  • the path detection message sent by the sending unit is an Internet Control Message Protocol ICMP message or an ICMPv6 message or The Transmission Control Protocol TCP packet or the empty User Data Protocol UDP packet.
  • the path detection message sent by the sending unit is a TCP packet or a UDP packet, or the TCP packet or The UDP packet includes a check value, and the detection result of the check value is a failure.
  • the second communication node functions as a path detection initiation node, detecting an IP address of the termination node according to the path, and sending the path to the path detection termination node by using the first network at a time
  • the IP packet of the path detection option is used to indicate that the second communication node is performing the fifth aspect
  • the embodiment of the present invention further provides a communication node, where the communication node is used as the first communication node, including :
  • a receiver configured to receive, by the second communication node, a first path detection message sent by the path detection initiation node by using the first network, where the first path detection message is used to indicate that the first communication node is used by the second communication node Performing path detection, the first path detection message includes an Internet Protocol IP address of the path detection termination node, the first communication node is a first node of the second network, the first network is an IP network, and the second network is Multi-protocol label switching protocol MPLS network or IP tunnel;
  • a transmitter configured to send a first path reply message to the second communications node, where the path reply message includes information of the first communications node;
  • a processor configured to: when the first communication node is used as a proxy path detection initiation node, acquire information about other nodes in the path between the path detection initiation node and the path detection termination node in the second network;
  • the transmitter is further configured to send a proxy detection return message to the second communication node, where the proxy detection return message includes a path between the path detection initiation node and the path detection termination node in the second network. Information about other nodes on it.
  • the first path reply message sent by the sender further includes proxy detection waiting information;
  • the transmitter is further configured to send a proxy detection wait message to the second communication node before sending the first path reply message to the second communication node, where the proxy detection wait message includes proxy detection wait information;
  • the agent detection waiting information is used to indicate that: the second communication node does not receive the path detection initiation node and the path detection termination node in the second network sent by the first communication node.
  • the information of the other nodes on the inter-path remains the path detection state and the information of the other nodes in the second network on the path between the path detection initiation node and the path detection termination node Locked after the information of the first communication node.
  • the second aspect of the fifth aspect In combination with the fifth aspect or the first possible implementation of the fifth aspect, the second aspect of the fifth aspect In a possible implementation manner, the first path detection message received by the receiver includes a value
  • the first time-to-live TTL of the first TTL is 1 for indicating that the first communication node is used for path detection by the second communication node.
  • the first path detection message received by the receiver is an Internet Control Message Protocol (ICMP) message or an ICMPv6 message. Either an empty Transmission Control Protocol TCP packet or an empty User Data Protocol UDP packet.
  • ICMP Internet Control Message Protocol
  • the first path detection message received by the receiver is a TCP packet or a UDP packet;
  • the device is further configured to determine that the check value is detected as a failure according to the check value in the TCP packet or the UDP packet before the transmitter sends a path reply message to the second communication node.
  • the first path detection message received by the receiver is a path detection option
  • the IP packet, the path detection option is used to indicate that the first communication node is path-detected by the second communication node.
  • the processor is further used Before acquiring the information of the other nodes in the path between the path detection initiation node and the path detection termination node in the second network, the source IP address in the first path detection message is used by the first The IP address of the second communication node is replaced with the IP address of the first communication node, and the second path detection message is obtained; and the second path detection message is encapsulated according to the protocol of the second network, and the encapsulated The second path detection message, the encapsulated second path detection message includes a second TTL;
  • the transmitter is further configured to: according to the destination IP address in the encapsulated second path detection message, at least twice to the path between the path detection initiation node and the path detection termination node in the second network And sending, by the other node, the encapsulated second path detection message, where the second TTL included in the encapsulated second path detection message sent for the first time is 1, and the The second TTL included in the encapsulated second path detection message is incremented according to an interval TTL of 1;
  • the receiver is further configured to receive a second path detection reply message sent by another node in the path between the path detection initiation node and the path detection termination node in the second network;
  • the information about the other nodes in the path between the path detection initiation node and the path detection termination node in the second network is specifically: the processor is located in the second network according to the path detection initiation node. And the second path detection reply message sent by another node on the path between the path detection termination node, and acquiring the path between the path detection initiation node and
  • the transmitter is further configured to: when the receiver receives the second network at least twice When the second path detection reply message is sent by the same node, or when the receiver does not receive the second path detection reply message within a preset time, the second path detection message is stopped.
  • the embodiment of the present invention further provides a communication node, where the communication node is a second communication node, including:
  • a transmitter configured to send, by the first network, a path detection message to the path detection termination node according to the Internet Protocol IP address of the path detection termination node, when the second communication node is used as the path detection initiation node, the first network In the Internet Protocol IP network, the first path detection message is used to indicate that the first communication node is performing path detection;
  • a receiver configured to receive a first path reply message sent by the first communications node, where the first communications node is a first node of the second network, and the second network is a multi-protocol label switching protocol MPLS network or an IP tunnel, where The first path reply message includes information of the first communication node; and receiving a proxy detection return message sent by the first communication node, where the proxy detection return message includes the path detection initiated in the second network Information about other nodes on the path between the node and the path detection termination node;
  • a processor configured to lock information of the other nodes in the path between the path detection initiation node and the path detection termination node in the second network after the information of the first communication node.
  • the first path reply message received by the receiver further includes proxy detection waiting information; or The receiver is further configured to: after receiving the first path reply message sent by the first communications node, receive an agent detection waiting message sent by the first communications node, where the proxy detecting waiting message includes proxy detecting waiting information;
  • the agent detection waiting information is used to indicate that: the second communication node does not receive the path detection initiation node and the path detection termination node in the second network sent by the first communication node.
  • the information of the other nodes on the inter-path remains the path detection state and the information of the other nodes in the second network on the path between the path detection initiation node and the path detection termination node Locked after the information of the first communication node;
  • the processor is specifically configured to: lock, according to the proxy detection waiting information, information of other nodes located in a path between the path detection initiation node and the path detection termination node in the second network, After the information of the first communication node.
  • the processor is further configured to: After the information of the other nodes on the path between the path detection termination nodes is locked to the information of the first communication node, when it is determined that the receiver has received the path reply message sent by the path detection termination node, or When it is determined that the receiver does not receive the path reply message within the preset time, stopping the path detection according to the proxy detection waiting information.
  • the path detection termination node sends at least three path detection messages to the path detection termination node by using the first network, where the path detection message includes a lifetime TTL; wherein the first TTL included in the path detection message sent for the first time is 1, and the first TTL included in the path detection message sent each time is TTL according to an interval Increment.
  • the path detection message sent by the sender is an Internet Control Message Protocol ICMP message or an ICMPv6 message or The Transmission Control Protocol TCP packet or the empty User Data Protocol UDP packet.
  • the path detection message sent by the sender is a TCP packet or a UDP packet
  • the TCP packet or the UDP packet includes a check value
  • the detection result of the check value is a failure
  • a sixth possible implementation manner of the sixth aspect When the second communication node functions as a path detection initiation node, detecting an IP address of the termination node according to the path, and transmitting, by the first network, an IP packet including a path detection option to the path detection termination node, the path The detection option is used to indicate that the second communication node is performing the path r.
  • the path detection method and the communication node provided by the embodiment of the present invention, when the first communication node determines that it is used as the second communication node of the path detection initiation node to perform path detection.
  • the first communication node Transmitting, by the first communication node, the information of the first communication node to the second communication node, and the first communication node as the proxy path detection initiation node, acquiring the path of the path detection initiation node to the path detection termination node in the second network Information of other nodes, and then sent to the second communication node in the second network
  • the path detection initiates information from the node to the other nodes on the path of the path detection termination node.
  • the second communication node in the first network can obtain information of each node on the path of the path detection initiation node to the path detection termination node in the second network, which solves the problems in the prior art.
  • FIG. 1 is an application scenario diagram of a prior art path detection method
  • FIG. 2 is a first application scenario diagram of a path detection method according to the present invention.
  • Embodiment 3 is a flowchart of Embodiment 1 of a path detecting method according to the present invention.
  • Embodiment 4 is a flowchart of Embodiment 2 of a path detection method according to the present invention.
  • FIG. 6 is a flowchart of Embodiment 4 of a path detecting method according to the present invention.
  • FIG. 7 is a second application scenario diagram of a path detection method according to the present invention.
  • Embodiment 8 is a flowchart of Embodiment 5 of a path detection method according to the present invention
  • 9 is a flowchart of Embodiment 6 of a path detecting method according to the present invention
  • Embodiment 1 of a communication node is a schematic structural diagram of Embodiment 1 of a communication node according to the present invention.
  • Embodiment 11 is a schematic structural diagram of Embodiment 2 of a communication node according to the present invention.
  • Embodiment 3 of a communication node is a schematic structural diagram of Embodiment 3 of a communication node according to the present invention.
  • FIG. 13 is a schematic structural diagram of Embodiment 4 of a communication node according to the present invention.
  • the technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention.
  • the embodiments are a part of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
  • FIG. 2 is a first application scenario diagram of a path detection method according to the present invention.
  • a second communication node is located in a first network
  • a fourth communication node is located in a third network
  • a first communication node and a third communication node are located.
  • the first network and the third network may be an IP network
  • the second network node may serve as a path detection initiation node
  • the fourth communication node may serve as a path detection termination node
  • the second communication node may initiate detection of the second network.
  • a path between the communication node and the fourth communication node that is, a node through which the IP data packet sent by the second communication node to the fourth communication node passes can be detected.
  • the IP data packet sent by the second communication node to the fourth communication node passes through the second network, and the transmission manner of the second network is different from the transmission of the first network and the third network.
  • the second network may be an MPLS network or an IP tunnel
  • the first communication node is the first of the second network on a path between the second network node and the fourth communication node.
  • a node, the third communication node being a tail node of the second network.
  • any number of communication nodes may exist between the second communication node and the first communication node, and any number of communication nodes may exist between the first communication node and the third communication node.
  • FIG. 3 is a flowchart of Embodiment 1 of the path detection method of the present invention. As shown in FIG. 3, the method in this embodiment may include:
  • the first communication node receives the second communication node as a path detection initiation node, and the The fourth communication node serves as a first path detection message sent by the path detection termination node.
  • the first path detection message is used to indicate that the first communication node is used for path detection by the second communication node.
  • the first path detection message includes an IP address of a fourth communication node that is a path detection termination node.
  • the first communication node is a first node of the second network, the first network is an IP network, and the second network is an MPLS network or an IP tunnel.
  • the fourth communication node is located in a third network, and the third network is heterogeneous with the second network.
  • the first communication node may receive the first path detection message from the upstream node of the first communication node through the first network.
  • the first network is an IP network
  • the source IP address of the first path detection message is an IP address of the path detection initiation node (that is, an IP address of the second communication node)
  • the destination IP address of the first path detection message is a path. Detecting the IP address of the terminating node (ie, the IP address of the fourth communication node).
  • the first communication node may determine, according to the source IP address of the first path detection message, that the first communication node is used for path detection by the second communication node that is the path detection initiation node, that is, the second communication node needs to obtain the first Information of the communication node, the information of the first communication node including the IP address of the first communication node.
  • the first path detection message may further include an incidental request for path detection, where the incidental request may be one or more of a bandwidth and a congestion level required by the receiver of the first path detection message.
  • the information of the first communication node further includes the bandwidth of the first communication node and the first communication.
  • the degree of congestion of the node is not limited thereto.
  • the first communication node is a first node of the second network, gP, and the first communication node is a first node of the second network in a path direction of the second communication node to the path detection termination node, and the second node
  • the network is an MPLS network or an IP tunnel.
  • the first communications node sends a first path reply message to the second communications node, where the first path reply message includes information of the first communications node.
  • the first communication node determines that the first communication node is used for path detection by the second communication node, and the first communication node carries the information of the first communication node in the first path reply message and sends the message to the first communication node.
  • the second communication node determines that the first communication node is used for path detection by the second communication node, and the first communication node carries the information of the first communication node in the first path reply message and sends the message to the first communication node.
  • the second communication node is the first communication node.
  • the first communications node as a proxy path detection initiating node, obtains information of other nodes in the second network that are located on a path between the path detecting initiating node and the path detecting terminating node.
  • the first communication node detects the originating node as a proxy path, and may The other nodes in the path between the path detection initiation node and the path detection termination node in the second network perform path detection, so that the second communication node and the path detection termination node can be acquired. Information about other nodes in the second network on the path.
  • the first communications node sends a proxy detection return message to the second communications node, where the proxy detecting return message includes the path between the path detecting initiating node and the path detecting termination node in the second network. Information about other nodes on the path.
  • the first communication node after acquiring information about other nodes in the path between the path detection initiation node and the path detection termination node in the second network, the first communication node is configured to perform other information in the second network.
  • the information of the node is carried in the proxy detection return message and sent to the second communication node, so that the second communication node can obtain the path detection initiation node and the path in the second network from the proxy detection return message. Detecting information of other nodes on the path between the termination nodes, and locking information of other nodes in the path between the path detection initiation node and the path detection termination node in the second network to the first communication node After the information.
  • the second communication node receives the first path reply message sent by the first communications node, and then receives, by the second communications node, the first communications node sends the
  • the second communication node may be located in the second network included in the proxy detection return message sent by the first communication node, where the path detection initiation node and the path detection are located. The information on the path between the terminating nodes is locked after the information of the first communication node.
  • the first path reply message sent by the first communications node to the second communications node further includes proxy detection waiting information.
  • the first communication node after the first communication node sends the first path reply message to the second communication node, the first communication node further sends a proxy detection wait message to the second communication node, where the proxy detection wait message includes The agent detects waiting information.
  • the proxy detection wait message is used to indicate:
  • the first communication node as the proxy path detection initiating node acquires the other nodes in the path between the path detection initiation node and the path detection termination node in the second network
  • the second communication node does not receive another section of the second network that is sent by the first communication node on a path between the path detection initiation node and the path detection termination node. Keep the path detection status before the point information, and
  • the second communication node locks information of other nodes in the path between the path detection initiation node and the path detection termination node in the second network after the information of the first communication node .
  • the second communication node may learn, according to the proxy detection waiting information, that the first communication node acts as a proxy detection node to detect that the second communication node passes through the second network in the second network. Node information.
  • the path detection initiating node acquires the information of the path detection termination node or does not receive the path reply message within a preset time
  • the path detection process is terminated, and in the embodiment of the present invention, the first communication The node will act as a proxy detection node to initiate path detection between the second communication node in the second network to the path detection termination node, and there may be a first communication node that does not send a proxy detection return to the second communication node.
  • the second communication node Before the message, the second communication node has received the information of the path detection termination node, or the second communication node does not receive the other communication node (the communication node other than the first communication node) returned within the preset time.
  • a path reply message therefore, in order to ensure that the second communication node can detect, as the second, information of other nodes on the path between the second communication node and the path detection termination node in the second network in the proxy return message Part of the result of the path detection initiated by the communication node, the agent needs to refer to the waiting information Path detecting holding state before the second communication node does not receive the second node a second communications network of the first communication node transmits the information to the other nodes on the path between the path detection terminating node.
  • the result of the path detection is that the second communication node sequentially sorts the information of the received nodes, and in the embodiment of the present invention, the second communication node may receive the The information of the other nodes in the second network has previously received the information sent by the tail node on the path between the second communication node and the path detection termination node in the second network or the node after the tail node, and the information And other nodes on the path between the second communication node and the path detection termination node in the second network are adjacent to the first communication node and are located after the first communication node, in order to ensure the second communication node in the second network
  • the information of the other nodes on the path between the path detection termination nodes is located at a position after the information of the first communication node in the result of the path detection, and the agent detection waiting information further needs to indicate the second communication in the second network.
  • the information of the other nodes on the path between the node and the path detection termination node needs to be locked to the information of the first communication node. After that, in the path detection result, the nodes on the path between the second communication node and the path detection termination node can be ensured in the path detection result.
  • the order of the information is consistent with the order of the nodes on the path of the second communication node to the path detection termination node.
  • the first communication node when the first communication node determines that the first communication node is used as the second communication node of the path detection initiation node for path detection, the first communication node sends the first communication node to the second communication node. And the first communication node as the proxy path detection initiation node acquires information of the other nodes on the path of the second communication node to the path detection termination node in the second network, and then sends the information to the second communication The node transmits information of the second communication node in the second network to other nodes on the path of the path detection termination node. Thereby, the second communication node in the first network can obtain information of each node in the second network.
  • FIG. 4 is a flowchart of Embodiment 2 of the path detection method of the present invention. As shown in FIG. 4, the method in this embodiment may include:
  • the second communication node as a path detection initiation node, sends a path detection message to the path detection termination node according to an IP address of the fourth communication node that is a path detection termination node, where the first network is an IP network,
  • the path detection message is used to indicate that the first communication node is performing path detection.
  • the second communication node when the second communication node (in the first network) needs to detect a path between the fourth communication node (in the third network), the second communication node may serve as a path detection initiation node, and The fourth communication node serves as a path detection termination node, and sends a path detection message to the path detection termination node according to the IP address of the fourth communication node, where the source IP address in the path detection message is an IP address of the path detection initiation node ( That is, the IP address of the second communication node, the destination IP address is the IP address of the path detection termination node (ie, the IP address of the fourth communication node), and the path detection message needs to pass the first before reaching the path detection termination node.
  • Each node on the path between the second communication node and the fourth communication node each node on the path between the second communication node and the fourth communication node receives the path detection message sent by the second communication node.
  • the second communications node receives the first path reply message sent by the first communications node, where the first communications node is a first node of the second network, and the second network is an MPLS network or an IP tunnel,
  • the first path reply message includes information of the first communication node.
  • the second network exists on the path between the second communication node and the fourth communication node, and the path detection message sent by the second communication node passes through the second network, where the second network is an MPLS network or IP tunnel, when the first node of the second network (ie, the first communication node) receives
  • the path detection message is that the second communication node is performing path detection
  • the first communication node carries the information of the first communication node in the first path reply message and sends the information to the second communication node, so that the first communication node
  • the second communication node receives the first path reply message sent by the first communication node, and acquires information of the first communication node.
  • the second communication node receives a proxy detection return message sent by the first communication node, where the proxy detection return message includes the second network being located on a path between the path detection initiation node and a path detection termination node. Information about other nodes.
  • the first communication node learns that the second communication node is performing path detection, and the path between the second communication node and the path detection termination node (ie, the fourth communication node) passes through the first communication node.
  • a second network where the first communication node can act as a proxy path to detect an initiating node, between the path detection initiating node (ie, the second communication node) and the path detection termination node (ie, the fourth communication node) Path detection is performed on other paths in the path and also in the second network, so that information of other nodes in the second network on the path between the second communication node and the fourth communication node can be acquired, and then the first communication The node carries the information of the other nodes in the second network in the proxy detection return message and sends the information to the second communication node, so that the second communication node can receive the proxy detection return message sent by the first communication node, and from the proxy Detecting a return message, obtaining the first communication node and the fourth communication in the second network Information about
  • the second communication node locks information of other nodes in the path between the path detection initiation node and the path detection termination node in the second network after the information of the first communication node.
  • the second communication node may return the proxy detection.
  • the information of the other nodes located in the path between the path detection initiation node and the path detection termination node in the second network included in the message is locked after the information of the first communication node.
  • the second communication node receives the first path reply message sent by the first communication node, and the second communication node receives the
  • the proxy may detect the path between the path detection initiation node and the path detection termination node in the second network included in the return message. The information is locked after the information of the first communication node.
  • the receiving, by the second communications node, the first path reply message sent by the first communications node further includes proxy detection waiting information.
  • the second communications node after receiving the first path reply message sent by the first communications node, the second communications node further receives an agent detection waiting message sent by the first communications node, where the proxy detects the waiting message.
  • the agent detection wait message is included.
  • the proxy detection wait message is used to indicate:
  • the first communication node as the proxy path detection initiating node acquires information of other nodes in the path between the path detection initiation node and the path detection termination node in the second network
  • the second communication node does not receive the information of the other nodes in the path between the path detection initiation node and the path detection termination node in the second network sent by the first communication node. Keep the path detection status, and
  • the second communication node locks information of other nodes in the path between the path detection initiation node and the path detection termination node in the second network after the information of the first communication node .
  • the second communication node may learn, according to the proxy detection waiting information, that the first communication node acts as a proxy detection node to detect between the second communication node and the path detection termination node (ie, the fourth communication node). Information located at other nodes in the second network.
  • the path detection initiating node acquires the information of the path detection termination node or does not receive the path reply message within a preset time
  • the path detection process is terminated, and in the embodiment of the present invention, the first communication The node will detect the originating node as a proxy path to initiate path detection between the second communication node in the second network to the path detection termination node, and there may be that the first communication node does not send proxy detection to the second communication node.
  • the second communication node Before returning the message, the second communication node has received the information of the path detection termination node, or the second communication node does not receive other communication nodes (communication nodes other than the first communication node) within a preset time.
  • Path reply message therefore, in order to ensure that the second communication node can detect, in the second network in the return message, the information of the other node on the path between the second communication node and the path detection termination node in the second network as the first Part of the result of the path detection initiated by the second communication node, the agent detects the waiting information To indicate that the second communication in the second network node is not received in the first communication node sent the second node to the communication
  • the path detection terminates the path detection state before the information of the other nodes on the path between the termination nodes, so the second communication node maintains the path detection state before receiving the proxy detection return message sent by the first communication node.
  • the result of the path detection is that the second communication node sequentially sorts the information of the received nodes, and in the embodiment of the present invention, the second communication node may receive the Before the information of the other nodes in the second network, the information sent by the tail node on the path between the second communication node and the path detection termination node in the second network or the node after the tail node has been received, and
  • the other node on the path between the second communication node and the path detection termination node in the second network is adjacent to the first communication node and located after the first communication node, in order to ensure the second communication in the second network
  • the information of the other nodes on the path between the node and the path detection termination node is located at a position after the information of the first communication node in the path detection result, and the agent detection waiting information further needs to indicate the first in the second network.
  • the information of the other nodes on the path between the two communication nodes and the path detection termination node is locked to the information of the first communication node.
  • the second communication node After receiving the proxy detection return message sent by the first communication node, the second communication node sends the second communication node in the second network to the path between the path detection termination nodes according to the proxy detection waiting information.
  • the information of the other node locks the information of the first communication node, and the location of the information of the first communication node in the result of the path detection and the path between the second communication node and the path detection termination node in the second network
  • the information of other nodes is adjacent in the result of the path detection.
  • the order of the information of the nodes on the path between the second communication node and the path detection termination node in the path detection result and the path of each node on the path of the second communication node to the path detection termination node are ensured.
  • the order is the same.
  • the second communication node After the second communication node locks information of the other nodes on the path between the second communication node and the path detection termination node in the second network to the information of the first communication node, when the second communication node When the second communication node determines that the path reply message sent by the path detection termination node has been received, or when the second communication node determines that the path reply message sent by the other communication node is not received within the preset time, the second communication The node detects the waiting information according to the agent, and stops the path detection. The second communication node determines that the path reply message sent by the path detection termination node has been received, for example: the second communication node may receive the path detection before or after acquiring information of other nodes in the second network. Terminate the path reply message sent by the node.
  • the second communication node determines that the path reply message sent by the other communication node is not received within the preset time, for example: the second communication node may obtain the information of other nodes in the second network or Previously, the path reply message sent by other communication nodes was not received within the preset time.
  • the second communication node is used as the path detection initiating node, and according to the IP address of the path detection termination node, the path detection message is sent to the path detection termination node by using the first network, and the first node of the second network is sent. a path reply message, and then the first node as the proxy path detects that the initiating node acquires information of other nodes on the path of the second communication node to the path detection termination node in the second network, and the second communication node receives the first node again Information sent by the second communication node in the second network to the other nodes on the path of the path detection termination node.
  • the second communication node in the first network can obtain information of other nodes in the second network.
  • FIG. 5 is a flowchart of Embodiment 3 of the path detection method of the present invention. As shown in FIG. 5, the method in this embodiment may include:
  • the second communication node as the path detection initiation node, sends at least three path detection messages to the path detection termination node according to the IP address of the fourth communication node that is the path detection termination node, where the path detection message includes a TTL; the first TTL included in the path detection message sent by the first time is 1, and the first TTL included in the path detection message sent each time is incremented by an interval TTL of 1.
  • the second communication node may terminate the path detection according to the destination IP.
  • the IP address of the node is sent to the path detection termination node to send at least three path detection messages, where the path detection message includes a first TTL, and the first TTL is a TTL of the IP header, where the value of the first TTL is transmitted in the path detection message.
  • the process is continuously decreasing: the value of the first TLL is decremented by one every time the communication node is in the first network or the third network.
  • the value of the first TTL in the path detection message sent by the second communication node as the path detection initiation point is continuously increasing.
  • the downstream node of the second communication node is the first communication node (which is the first node of the second network)
  • the downstream node of the first communication node is the tail node of the second network
  • the tail node of the second network is a path detection termination node (ie, the fourth communication node).
  • the second communication node needs to obtain path information with the path detection termination node, and the second communication node needs to send at least three times to carry the destination.
  • the IP address is a path detection message for the IP address of the path detection termination node.
  • the path detection message sent by the second communication node for the first time includes a first TTL of 1, Then the first communication node receives the first path included in the path detection message sent by the second communication node.
  • the TTL is 1, and the first TTL is 1 to indicate that the second communication node performs path detection on the first communication node, because the first communication node receives the path detection message, according to the first TTL included in the path detection message.
  • the first TTL is decremented by 1 to 0.
  • the first communication node may determine that the second communication node performs path detection on the first communication node according to the first TTL minus 1 and 0.
  • the path detection message is in the first
  • the communication node terminates, and then the first communication node carries the information of the first communication node in the first path reply message and sends the information to the second communication node.
  • the first TTL included in the path detection message sent by the second communication node is 2, and the first TTL included in the path detection message sent by the second communication node is 3.
  • the second communication node sends a path detection message at least three times, and the specific number of transmissions is between the second communication node and the path detection termination node.
  • the number of nodes is related.
  • the path detection message may be a first TTL.
  • An ICMP message or an ICMPv6 message so that each node on the path between the second communication node and the fourth communication node determines that the node is the first one by receiving an ICMP message or an ICMPv6 message including the first TTL of 1.
  • the path detection message may be an empty TCP packet including a first TTL or a UDP packet including a first TTL, so as to be between the second communication node and the fourth communication node.
  • Each node on the path receives an empty TCP packet or an empty UDP packet including a first TTL of 1, and determines that each node is detected by the second communication node path.
  • the path detection message may be a UDP packet including a first TTL or a TCP packet including a first TTL, and the UDP packet or the TCP packet includes a checksum. And the detection result of the check value is a failure, so that each node on the path between the second communication node and the fourth communication node receives the TCP packet or the UDP packet including the first TTL of 1,
  • the TCP packet or the check value in the UDP packet is detected, and it is determined that the check value detection result is a failure, it may be determined that each node is detected by the second communication node path S302, and the first communication node receives the first Two communication nodes are sent as path detection initiators
  • the first communication node may receive the path detection message sent by the second communication node. If the path detection message includes the first TTL with a value of 1, the path detection message may be referred to as the first path. Detect messages. The first communication node subtracts 1 from the first TTL with a value of 1, and obtains 0. At this time, the first communication node may determine, according to the subtraction, 0 that the first communication node is used for path detection by the second communication node.
  • the first communications node when the first communications node receives an ICMP message or an ICMPv6 message that is sent by the second communications node and includes a first TTL with a value of 1, the first communications node may determine the first A communication node is detected by the second communication node path.
  • the first communications node receives an empty TCP packet that includes the first TTL with a value of 1 sent by the second communications node or an empty UDP packet that includes a first TTL with a value of 1.
  • the first communication node may determine that the first communication node is detected by the second communication node path.
  • the first communications node when the first communications node receives the TCP packet that includes the first TTL with a value of 1 or the UDP packet that includes the first TTL with a value of 1, And the first communication node determines, according to the check value in the TCP packet or the UDP packet, that the detection result of the check value is a failure, the first communication node may determine that the first communication node is determined by the second communication node. Path detection.
  • the first communications node sends a first path reply message to the second communications node, where the first path reply message includes information of the first communications node.
  • the first communication node determines, according to the first path detection message, that the first communication node is detected by the second communication node path
  • the first communication node carries the information of the first communication node in the first
  • a path reply message is sent to the second communication node.
  • the second communication node receives the first path reply message sent by the first communication node, and obtains information of the first communication node from the first path reply message.
  • the first communications node sends a proxy detection waiting message to the second communications node, where the proxy detecting waiting message includes proxy detecting waiting information.
  • the first communication node may further send a proxy detection wait message to the second communication node, where the proxy detection wait message includes proxy detection wait information, and the proxy detection wait information is used to indicate:
  • the first communication node as the proxy path detection initiating node acquires the bit in the second network I ⁇ from the other nodes on the path between the path detection initiation node and the path detection termination node,
  • the second communication node does not receive the information of the other nodes in the path between the path detection initiation node and the path detection termination node in the second network sent by the first communication node. Keep the path detection status, and
  • the second communication node locks information of other nodes in the path between the path detection initiation node and the path detection termination node in the second network after the information of the first communication node .
  • the second communication node after receiving the proxy detection waiting message sent by the first communication node, the second communication node is located in the second network that is not received by the first communication node according to the proxy detection waiting information. Maintaining a path detection state before the information of the other nodes on the path between the path detection initiation node and the path detection termination node, while being located after the location of the information of the first communication node and adjacent to the information of the first communication node. The location presets an adjacent location for locking information of other nodes in the second network acquired by the first communication node on a path between the path detection initiation node and the path detection termination node.
  • the first communication node replaces a source IP address in the first path detection message with an IP address of the second communication node to an IP address of the first communication node, to obtain a second path detection message.
  • the first communication node encapsulates the second path detection message according to the protocol of the second network, and obtains a second path detection message after the encapsulation, where the encapsulated second path detection message includes Two TTL.
  • the first communication node sends the encapsulated second path detection message to the other nodes in the second network at least twice according to the destination IP address in the encapsulated second path detection message.
  • the second TTL included in the encapsulated second path detection message sent by the first time is 1 and the second TTL included in the encapsulated second path detection message is incremented by the interval TTL 1 .
  • the first communications node receives a second path detection reply message sent by another node in the second network.
  • the first communications node acquires, according to the second path detection reply message sent by another node in the second network, the path detection initiation node and the Path detection terminates information about other nodes on the path between nodes.
  • the proxy path detection initiation node acquires the path detection initiation node and the path detection termination node in the second network.
  • Information about other nodes on the path Specifically, the source IP address in the first path detection message received by the first communication node is an IP address of the second communication node, and the first communication node needs to obtain the second network according to the first path detection message.
  • the first communication node changes the source IP address in the first path detection message to the first communication
  • the IP address of the node obtains the second path detection message, where the source IP address in the second path detection message is the IP address of the first communication node, and the destination IP address is the IP address of the path detection termination node.
  • the second path detection message further includes a first TTL.
  • the first communication node further encapsulates the second path detection message according to the protocol of the second network, and obtains the encapsulated second path detection message, and the encapsulated second path detection message further includes a second TTL.
  • the second TTL is the TTL of the MPLS label or the TTL of the IP tunnel encapsulation header. Therefore, the encapsulated second path detection message includes the first TTL and the second TTL. It should be noted that the second TTL is after the encapsulation.
  • the second network of the second path detection message changes during the transmission process. The second TTL is decremented by one every hop, and the first TTL does not change during the delivery process. Moreover, the value of the second TTL in the encapsulated second path detection message sent by the first communication node as the proxy detection initiation point is continuously increasing.
  • the downstream node of the first communication node is the tail node of the second network (ie, the third communication node)
  • the first communication node needs to acquire the path between the first communication node and the path detection termination node.
  • Information of other nodes located in the second network the first communication node needs to send at least two encapsulated second path detection messages.
  • the first TTL included in the encapsulated second path detection message sent by the first communication node is 1, and the tail node of the second network receives the encapsulated second sent by the first communication node.
  • the path check message reduces the second TTL by 0, and the encapsulated second path detection message is terminated at the tail node of the second network, and the tail node of the second network can detect the encapsulated second path.
  • the tail node of the second network sends the information of the tail node of the second network to the first communication section by using a second path detection reply message Point.
  • the second communication node After receiving the second path detection reply message sent by the tail node of the second network, the second communication node sends the encapsulated second path detection message, that is, the second time sent by the first communication node.
  • the encapsulated second path detection message includes a second TTL of 2, and the tail node of the second network receives the encapsulated second path check message sent by the first communication node, because the tail of the second network
  • the node is the last hop communication node in the second network, and the tail node of the second network can directly decapsulate the encapsulated second path detection message, obtain a second path detection message, and then detect according to the second path.
  • the first TTL included in the message is 1 to determine that the first communication node performs path detection on the tail node of the second network, and the tail node of the second network detects the information of the tail node of the second network by using the second path.
  • a message is sent to the first communication node.
  • the first communication node may acquire information of the tail node of the second network twice, that is, when the first communication node receives the second path detection reply message sent by the same node in the second network at least twice, the first The second communication node stops resending the encapsulated second path detection message.
  • the first communications node stops resending the encapsulated second path detection message.
  • any number of communication nodes may exist between the first communication node and the tail node of the second network, and therefore, the specific number of times of the encapsulated second path detection message of the first communication node is The number of nodes between the first communication node and the tail node of the second network is related.
  • the first communications node sends a proxy detection return message to the second communications node, where the proxy detecting return message includes the path between the path detecting initiating node and the path detecting termination node in the second network. Information about other nodes on the path.
  • the first communication node receives the second path detection reply message sent by another node in the path between the path detection initiation node and the path detection termination node in the second network, and obtains After the information of the other nodes on the path between the path detection initiation node and the path detection termination node in the second network, the first communication node locates the path detection initiation node and the location in the second network The information of the other nodes on the path between the path detection termination nodes is carried in the proxy detection return message and sent to the second communication node. The information of the other nodes in the path between the path detection initiation node and the path detection termination node in the second network is arranged in the order of receiving the second path detection reply message sent by each node.
  • the second communication node may receive the proxy detection return message sent by the first communication node.
  • S311 The second communication node locks information of other nodes in the path between the path detection initiation node and the path detection termination node in the second network after the information of the first communication node.
  • the second communication node locks information of other nodes in the path between the path detection initiation node and the path detection termination node in the second network to the first communication node in the path detection result. After the information, and the information of the other nodes in the path between the path detection initiation node and the path detection termination node in the second network is adjacent to the information of the first communication node. Therefore, the order of the information of the nodes on the path between the second communication node and the path detection termination node in the path detection result and the path of each node on the path of the second communication node to the path detection termination node are ensured. The order is the same.
  • the method further includes: when the second communication node determines that the path has been received When detecting the path reply message sent by the terminating node, or when the second communication node determines that the path reply message is not received within the preset time, the second communication node stops the path detection according to the agent detecting waiting information. Thereby completing the entire path detection process.
  • the first communication node when the first communication node determines that the first communication node is used as the second communication node of the path detection initiation node for path detection, the first communication node sends the first communication node to the second communication node.
  • Information, and the first communication node as the proxy path detection initiating node acquires information of the other nodes in the path of the second communication node to the path detection termination node in the second network, and then sends the information to the second communication node Sending information of the second communication node in the second network to other nodes on the path of the path detection termination node.
  • the information that the second communication node in the first network can acquire the path in the second network is realized.
  • FIG. 6 is a flowchart of Embodiment 4 of the path detection method of the present invention. As shown in FIG. 6, the method in this embodiment may include:
  • the second communication node functions as a path detection initiation node, and sends an IP packet including a path detection option to the path detection termination node according to an IP address of the fourth communication node that is a path detection termination node, where the path detection option is In the embodiment for indicating that the second communication node is performing path check, if the second communication node needs to acquire path information between the path detection termination node (ie, the fourth communication node) as the path detection initiation node, The second communication node can be rooted According to the destination IP, the IP address of the termination node is detected by the path, and the path detection message is sent to the path detection termination node, that is, the second communication node sends an IP packet to the path detection termination node, where the IP packet carries the path detection.
  • the path detection option is used to indicate that the second communication node is performing path detection, and the second communication node needs to send an IP packet to the path detection termination node once.
  • Each node on the path between the second communication node and the path detection termination node receives the IP packet sent by the second communication node, and determines according to the path detection option carried in the IP packet.
  • the second communication node performs path detection, and each node sends the IP packet to the downstream node until the IP packet arrives at the path detection termination node.
  • the first communications node receives the IP packet that is sent by the second communications node as a path detecting initiating node and carries the path detecting option.
  • the first communication node may receive the path detection message sent by the second communication node, where the path detection message received by the first communication node is referred to as a first path detection message, and the first path detection message is IP packet for carrying path detection options.
  • the second communication node may determine that the second communication node performs path detection.
  • the first communications node sends a first path reply message to the second communications node, where the first path reply message includes information of the first communications node.
  • the first communications node sends a proxy detection waiting message to the second communications node, where the proxy detecting waiting message includes proxy detecting waiting information.
  • the first communication node replaces a source IP address in the first path detection message with an IP address of the second communication node as an IP address of the first communication node, to obtain a second path detection message.
  • the first communications node encapsulates the first path detection message according to the protocol of the second network, and obtains a second path detection message after the encapsulation, where the encapsulated second path detection message includes Two TTL.
  • the first communications node sends the encapsulated second path detection message to other nodes in the second network at least twice according to the destination IP address in the encapsulated second path detection message.
  • the second TTL included in the encapsulated second path detection message sent for the first time If the value is 1, the second TTL included in the encapsulated second path detection message sent each time is incremented by the interval TTL 1.
  • the first communications node receives a second path detection reply message sent by another node in the second network.
  • the first communications node acquires, according to the second path detection reply message sent by other nodes in the second network, the path detection initiation node and the path detection termination node in the second network. Information about other nodes on the path.
  • the proxy path detection initiation node acquires the path detection initiation node and the path detection termination node in the second network.
  • Information about other nodes on the path Specifically, the source IP address in the first path detection message received by the first communication node is an IP address of the second communication node, and the first communication node needs to obtain the second network according to the first path detection message.
  • the first communication node changes the source IP address in the first path detection message to the first communication
  • the IP address of the node obtains the second path detection message, where the source IP address in the second path detection message is the IP address of the first communication node, and the destination IP address is the IP address of the path detection termination node.
  • the first communication node further encapsulates the second path detection message according to the protocol of the second network, and obtains the encapsulated second path detection message, and the encapsulated second path detection message includes a second TTL, which needs to be explained.
  • the second TTL is changed during the transmission of the encapsulated second network, and the second TTL is decremented by one every one hop.
  • the downstream node of the first communication node is the tail node of the second network (ie, the third communication node)
  • the first communication node needs to acquire the path between the first communication node and the path detection termination node.
  • Information of other nodes located in the second network the first communication node needs to send at least two encapsulated second path detection messages.
  • the first TTL included in the encapsulated second path detection message sent by the first communication node is 1, and the tail node of the second network receives the encapsulated second sent by the first communication node.
  • a path check message the tail node of the second network may directly decapsulate the encapsulated second path detection message, obtain a second path detection message, and then determine the path according to the path detection option included in the second path detection message.
  • the first communication node performs path detection on the tail node of the second network, and the tail node of the second network sends the information of the tail node of the second network to the first communication node by using the second path detection reply message.
  • the second communication node is After receiving the second path detection reply message sent by the tail node of the second network, sending the encapsulated second path detection message, that is, the encapsulated second path sent by the first communication node for the second time.
  • the detection message includes a second TTL of 2, and the tail node of the second network receives the encapsulated second path check message sent by the first communication node, because the tail node of the second network is the second network.
  • the tail node of the second network may directly decapsulate the second path detection message, obtain a second path detection message, and then determine the first communication according to the path detection option included in the second path detection message
  • the node performs path detection on the tail node of the second network, and the tail node of the second network sends the information of the tail node of the second network to the first communication node by using the second path detection reply message. Therefore, the first communication node may acquire information of the tail node of the second network twice, that is, when the first communication node receives the second path detection reply message sent by the same node in the second network at least twice, the first The second communication node stops resending the second path detection message. Optionally, when the first communications node does not receive the second path check reply message within the preset time, the first communications node stops sending the second path detection message.
  • any number of communication nodes may exist between the first communication node and the tail node of the second network, and therefore, the specific number of times of the encapsulated second path detection message of the first communication node is The number of nodes between the first communication node and the tail node of the second network is related.
  • the first communications node sends a proxy detection return message to the second communications node, where the proxy detecting return message includes the path between the path detecting initiating node and the path detecting termination node in the second network. Information about other nodes on the path.
  • the second communication node locks information of other nodes in the path between the path detection initiation node and the path detection termination node in the second network after the information of the first communication node.
  • the specific implementation process of S410 and S411 is similar to the specific implementation process of S310 and S311 in Embodiment 3 of the method of the present invention, and details are not described herein again.
  • the first communication node when the first communication node determines that the first communication node is used as the second communication node of the path detection initiation node to perform path detection, the first communication node sends the first communication node to the second communication node. And the first communication node as the proxy path detection initiation node acquires information of the other nodes on the path of the second communication node to the path detection termination node in the second network, and then sends the information to the second communication Sending, by the node, the second communication section in the second network Point to the path to detect information about other nodes on the path of the terminating node. Thereby, the second communication node in the first network may obtain information of each node in the second network.
  • the second network is located in the path detection initiation. Information about other nodes on the path between the node and the path detection termination node.
  • the first node of the second network receives the information of the node sent by the same node twice, the first node of the second network stops acting as The proxy path detection node continues the path detection and then transmits the information of all the received nodes to the second communication node.
  • the second communication node receives the information of the first node of the second network sent by the first node of the second network, and only receives the proxy detection return message sent by the first node of the second network, so the second The communication node may determine that there is a fault on the path between the second communication node and the path detection termination node, and the second communication node may determine the information according to the information of the last node carried in the proxy detection return message.
  • the downstream node of the last node has failed, or the path between the last node and the downstream node of the last node has failed.
  • FIG. 7 is a second application scenario diagram of a path detection method according to the present invention.
  • node A is located in a first network
  • a first network is an IP network
  • a node F is located in a third network
  • a third network is an IP network
  • a slave node There are a node 8, a node C, a node D and a node E between the node A and the node E.
  • the node B, the node, the node D and the node E are located in the second network, and the second network is an MPLS network or an IP tunnel, wherein the node B is The second network is also located in the first network (ie, the IP network), and the node E is located in the second network and also in the third network (ie, the IP network); in the direction from the node A to the node F, the node B is the second network.
  • the first node, node E is the tail node of the second network.
  • the node A needs to obtain the information about the path between the node A and the node F, that is, the information of the node B, the node C, the node D, and the node E.
  • the specific implementation process can be as follows.
  • FIG. 8 is a flowchart of Embodiment 5 of the path detection method of the present invention. As shown in FIG. 8, the method in this embodiment may include:
  • the node A sends a path detection message including the first TTL to the node F according to the destination IP address being the IP address of the node F.
  • the node B receives the path detection message that is sent by the node A and includes the first TTL of 1.
  • the node B sends a first path reply message carrying the information of the node B to the node A.
  • the node A when the node A needs to obtain the information about the path between the node A and the node F, the node A sends a path detection message to the node F, and the node A sends the path detection to the node F for the first time.
  • the message, the path detection message includes a first TTL (TTL of IP) with a value of 1, and the path detection message sent by the node A for the first time is first received by the node B, and the node B detects the path in the message.
  • TTL TTL of IP
  • the first TTL minus 1 (ie, 1 minus 1) is 0, the path detection message is terminated at the Node B, and the Node B determines the IP address of the node A according to the source IP address in the path detection message.
  • the node A is performing path detection, and the node B sends the information of the node B to the node A through the first path reply message, where the source IP address included in the first path reply message is the IP address of the node B, and the destination IP address.
  • the address is the IP address of the node A.
  • the path detection message may further include an incidental requirement for path detection, where the incidental request may be one or more of the bandwidth and congestion level required by the receiver of the first path detection message.
  • the information of the Node B further includes the bandwidth of the Node B and the congestion procedure of the Node B.
  • the node A receives the first path reply message sent by the node B, and obtains information about the node B included in the first path reply message, so that the node A can obtain the path between the node A and the node F.
  • the information includes: Information of the Node B.
  • the node B sends a proxy detection waiting message to the node A.
  • the node B determines that the node A performs path detection, and the path between the node A and the node F needs to pass through the second network, and the node B sends a proxy detection waiting message to the node A, the proxy The detection waiting message includes proxy detection waiting information, and the proxy detection waiting information is used to indicate that: the node A as the proxy path detection initiating node acquires other nodes in the path between the node A and the node F in the second network.
  • Information that the node A does not receive the information of the other nodes in the path between the node A and the node F in the second network sent by the node B, and maintains the path detection state and the node A will The information of other nodes in the path between the node A and the node F in the second network is locked after the information of the node B. Then, the Node B needs to detect the originating node as a proxy path, and acquire information of the node C, the node D, and the node E in the second network.
  • the node A receives the proxy detection waiting message sent by the node B, and determines, according to the proxy detection waiting information, that the node B will acquire other nodes in the path between the node A and the node F in the second network. The information is then processed according to the agent detection waiting information. S504.
  • the Node B detects the originating node as a proxy path, and acquires information about the node C, the node D, and the node E.
  • the node B detects the originating node as a proxy path, and the source IP address in the first path detection message including the first TTL 1 received from the node A is changed from the IP address of the node A to the
  • the second path detection message is obtained by the IP address of the node B, and the second path detection message is encapsulated according to the protocol of the second network (for example, the MPLS protocol or the IP tunneling protocol), and the encapsulated second path detection message is obtained.
  • the encapsulated second path detection message further includes a second TTL, for example: the encapsulated second path detection message includes: an MPLS header including a second TTL + a path detection message including a first TTL of 1, or includes The second TTL IP tunnel header includes a path detection message with a first TTL of 1.
  • the encapsulated second path detection message includes a source IP address that is an IP address of the Node B, and the encapsulated second path detection message.
  • the destination IP address included is the IP address of the node F.
  • the Node B sets the second TTL included in the encapsulated second path detection message sent to the node F for the first time to be 1, and the second TTL included in the second TTL of the Node B is sent by the Node B.
  • the path detection message is first received by the node C, and the node C decrements the second TTL in the encapsulated second path detection message by 1 (also 1 minus 1), and the encapsulated second path detection message Terminating at the node c, and then the node C decapsulates the encapsulated second path detection message, that is, removing the MPLS header and the IP tunnel header, and obtaining a second path detection message, according to the second path detection message.
  • a TTL of 1 determines that the Node B performs path detection on the Node C, and then the Node C carries the information of the Node C in the second path reply message and sends the information to the Node B, where the Node B receives the Node C.
  • the second path reply message acquires information of the node C, thereby obtaining information of each node in the path of the node B to the node F in the second network: information of the node C.
  • the node B After receiving the second path reply message sent by the node C, the node B adds the second TTL in the encapsulated second path detection message that is sent for the first time to obtain the second encapsulated second transmission.
  • the path detection message, the second TTL included in the encapsulated second path detection message sent by the second time is 2, and the encapsulated second path detection message is sent to the node C, where the node C receives the node
  • the encapsulated second path detection message sent by the B, the second TTL of the encapsulated second path detection message is decremented by 1 (that is, 2 is subtracted by 1) to obtain 1, and then the node C will include the subtracted
  • the encapsulated second path detection message of the second TTL (1) is sent to the node D, and the node D receives the encapsulated second path detection message including the second TTL of 1, and the second The TTL minus 1 (also 1 minus 1) is 0, the encapsulated second path detection message is terminated at the node
  • the Node B sends to the Node B in the second path reply message, the Node B receives the second path reply message sent by the node D, and obtains the information of the node D, thereby obtaining the node B in the second network.
  • Information of each node on the path of the node F information of the node C, information of the node D.
  • the node B After receiving the second path reply message sent by the node D, the node B adds the second TTL in the encapsulated second path detection message sent in the second time to obtain the encapsulated second after the third transmission.
  • a path detection message the second TTL included in the encapsulated second path detection message sent by the third time is 3, and the encapsulated second path detection message is sent to the node C, where the node C receives the node
  • the encapsulated second path detection message sent by the B, the second TTL of the encapsulated second path detection message is decremented by 1 (that is, 3 is subtracted by 1) to obtain 2, and the node C will include the subtracted first
  • the second TTL (2) encapsulated second path detection message is sent to the node D, and the node D receives the encapsulated second path detection message sent by the node C, including the second TTL 2.
  • the second TTL in the second path detection message is decremented by 1 (i.e., 2 is subtracted by 1) to obtain 1, and then the node D will include the encapsulated second path detection message of the second TTL (which is 1) after subtraction.
  • the section The E receives the encapsulated second path detection message including the second TTL of 1, and decrements the second TTL by 1 (that is, 1 minus 1) to 0, and the encapsulated second path detection message is at the node E.
  • the node E decapsulates the second path detection message, that is, the MPLS header and the IP tunnel header are removed, and the second path detection message is obtained, and the node B is determined according to the first TTL of the second path detection message being 1 Performing path detection on the node E, and then carrying the information of the node E in the second path reply message and sending the message to the node B.
  • the node B receives the second path reply message sent by the node E, and obtains the The information of the node E, thereby obtaining information of each node in the path of the node B to the node F in the second network: information of the node C, information of the node D, and information of the node E.
  • the node B After receiving the second path reply message sent by the node E, the node B adds the second TTL in the encapsulated second path detection message sent in the third time to obtain the encapsulated second path of the fourth transmission. Detecting a message, the second included in the encapsulated second path detection message sent in the fourth time The second TTL is 4, and the encapsulated second path detection message is sent to the node C.
  • the node C receives the encapsulated second path detection message sent by the node B, and the encapsulated second path detection is performed.
  • the second TTL of the message is decremented by 1 (that is, 4 is subtracted by 1) to obtain 3, and the node C sends the encapsulated second path detection message including the subtracted second TTL (3) to the node D.
  • the node D receives the encapsulated second path detection message that is sent by the node C and includes the second TTL of 3, and reduces the second TTL of the encapsulated second path detection message by 1 (that is, 3 is subtracted by 1). 2.
  • the node D sends the encapsulated second path detection message including the subtracted second TTL (2) to the node E, and the node E receives the encapsulated second path detection sent by the node D.
  • the message, the second TTL is decremented by 1 (that is, 2 is subtracted by 1) to obtain 1, because the node E is the tail node of the second network, and the node E can solve the encapsulated second path detection message.
  • Encapsulating that is, removing the MPLS header and the IP tunnel header, obtaining a second path detection message, according to the The first TTL of the second path detection message is determined to be 1.
  • the node B performs path detection on the node E, and then carries the information of the node E in the second path reply message and sends the information to the node B, where the node B receives the node.
  • the second path reply message sent by the node B the node B determines that the second path reply message sent by the node E is received twice, and the node B stops resending the encapsulated second path detection message, that is, the node B terminates.
  • the proxy path detection process the information obtained by the node B in the second network on the path of the node B to the node F is: information of the node C, information of the node D, and information of the node E.
  • the Node B carries the information of the node C, the information of the node D, and the information of the node E in a proxy detection return message and sends the message to the node A.
  • the node B carries the acquired information of the node C in the second network, the information of the node D, and the information of the node E in the proxy detection return message, and sends the message to the node A.
  • the node A receives the proxy detection return message sent by the node B, and locks the information of the node C, the information of the node D, and the information of the node E to the information of the node B.
  • the node A receives the proxy detection return message sent by the node B, and the proxy detects the information of the node C carried in the return message, the information of the node D, and the information of the node E as the node B.
  • the node C, the node D, and the node E are located after the node B, and the information carried in the proxy detection return message received by the node A from the node B is locked to the information of the node B, and may be Obtained as follows: information of the node B, information of the node C, The information of the node D and the information of the node E.
  • the node A sends a path detection message including the first TTL to the node F according to the destination IP address being the IP address of the node F.
  • the node A after the node A receives the path detection reply message sent by the node B, because the first TTL in the path detection message sent by the node A is 1, the current (that is, the second time) node The first TTL obtained by adding 1 to the first TTL in the path detection message is 2, and the path detection message including the first TTL 2 is sent to the node F.
  • the Node B first receives the path detection message sent by the node A, including the first TTL of 2, and decrements the first TTL in the path detection message by 1 (also 2 minus 1), and then includes the first TTL.
  • the path detection message is encapsulated to obtain a encapsulated path detection message, and the encapsulated path detection message further includes a second TTL.
  • the Node B copies the value of the first TTL in the path detection message before the encapsulation into the value of the second TTL in the encapsulated path detection message, that is, the obtained by the Node B.
  • the second TTL included in the encapsulated path detection message is 1.
  • the node B sends the encapsulated path detection message to the node C, where the node C includes the second TTL included in the encapsulated path detection message.
  • Subtract 1 (also 1 minus 1) to 0, the encapsulated path detection message is terminated at the node C, and the node C decapsulates to obtain a path detection message before encapsulation, according to the path detection message before the encapsulation
  • the first TTL minus 1 (that is, 1 minus 1) is 0, and the node A is learned to perform path detection, so that the node C carries the information of the node C in the path reply message and sends the information to the node A, so that the node A acquires the information of the node C, and places the information of the node C after the information of the node B.
  • the Node B sets the second TTL in the encapsulated path detection message to a larger value (such as 255), that is, the encapsulated path detection message includes The second TTL is 225, the Node B sends the encapsulated path detection message to the node C, and the node C decrements the second TTL included in the encapsulated path detection message by 254, and the node C
  • the encapsulated path detection message including the second TTL of 254 is sent to the node D, and the node D decrements the second TTL included in the encapsulated path detection message by 253, and the node D will include the second TTL.
  • the encapsulated path detection message of 253 is sent to the node E, and the node E decapsulates the path detection message before the encapsulation, and subtracts 1 from the second TTL (1) included in the path detection message before the encapsulation.
  • the node E carries the information of the node E in the path reply message and sends the information to the node A, so that the node A obtains the information of the node E, and the information of the node E is placed after the information of the node B, and obtains: The information of the node B and the information of the node E.
  • the node A sends a path detection message including the first TTL to the node F according to the destination IP address being the IP address of the node F.
  • the current time (ie, the third time) Node A adds 1 to the first TTL in the path detection message to obtain a first TTL of 3, and sends a path detection message including the first TTL to 3 to the node F.
  • the Node B first receives the path detection message including the first TTL of 3 sent by the node A, and subtracts 1 from the first TTL of the path detection message to 2, and then includes the path with the first TTL of 2.
  • the detection message is encapsulated to obtain a encapsulated path detection message, and the encapsulated path detection message further includes a second TTL.
  • the Node B copies the value of the first TTL in the path detection message before the encapsulation into the value of the second TTL in the encapsulated path detection message, that is, the path detection after the encapsulation.
  • the second TTL included in the message is sent by the node B to the node C, and the node C decrements the second TTL included in the encapsulated path detection message by 1 (also 2 Subtract 1 to get 1, the node C sends a encapsulated path detection message including a second TTL of 1 to the node D, and the node D decrements the second TTL included in the encapsulated path detection message by 0.
  • the encapsulated path detection message is terminated at the node D, the node D is decapsulated, the path detection message is obtained, and the value of the second TTL is copied into the value of the first TTL included in the path detection message, thereby obtaining The first TTL is 1, and the first TTL is decremented by 1 (i.e., 1 is decremented by 1).
  • the node D learns that the node A performs path detection, so that the node D carries the information of the node D in the path reply message. Sent to the node A, so that the node A obtains Information node D, node D to the information after the information is placed in the Node-B.
  • the node A After the node A receives the information of the node D, the node A sends a path detection message including the first TTL 4 to the node F, and the node E receives the encapsulated path detection message.
  • the node E copies the value of the second TTL to the value of the first TTL (1), thereby the node E
  • the information is sent to the node A.
  • the node A receives the information of the node E, and sends a path detection message including the first TTL of 5 to the node F, and the node E receives the encapsulated path detection.
  • the message when the second TTL in the encapsulated path detection message received by the node E is 2, since the node E is the tail node of the second network, the node E is decapsulated, and the second TTL is The value is copied to the value of the first TTL (2), and the value of the first TTL is decremented by 1 (i.e., 2 is decremented by 1), and finally, the path detection message including the subtracted first TTL (1) is included.
  • the node F is sent, so that the node A receives the node F to send a path reply message.
  • the Node B sets the second TTL in the encapsulated path detection message to a larger value (such as 255), that is, the path detection message encapsulated by the Node B.
  • the second TTL included in the TTL is 225, and the Node B sends the encapsulated path detection message to the node C, and the node C decrements the second TTL included in the encapsulated path detection message by 254, the node C Transmitting the encapsulated path detection message including the second TTL 254 to the node D, the node D decrements the second TTL included in the encapsulated path detection message by 253, and the node D will include the second TTL.
  • the encapsulated path detection message for 253 is sent to the node E, and the node E decapsulates the path detection message before the encapsulation, and the first TTL included in the path detection message before the encapsulation is 2 minus one,
  • the node E sends a path detection message including the subtracted first TTL (1) (ie, the encapsulated path detection message) to the node F, and the node F will receive the path detection from the node E.
  • the first TTL of the information is decremented by 1 (that is, 1 minus 1) is 0.
  • the path detection message is terminated at the node F, and the node F learns the node according to the destination IP address of the path detection message as the IP address of the node F.
  • A performs path detection on the node F, so that the node F carries the information of the node F in the path reply message and sends the information to the node A, so that the node A acquires the information of the node F, and the information of the node F is placed.
  • the information of the node E the information of the node B, the information of the node E, and the information of the node F are obtained.
  • the node A obtains the information of the node F, it indicates that the path detection message has arrived at the node F, so that the node A stops resending the path detection message.
  • the information obtained by the node A after executing S506 is: information of the Node B, information of the node C, information of the node D, and information of the node E.
  • the information obtained after the execution of S507 is: information of the Node B, information of the node C, information of the node D, information of the node E, information of the node E, because there are two information of the same node, only One of them may be obtained, thereby obtaining: information of the Node B, information of the node C, information of the node D, and information of the node E.
  • the information obtained after executing S508 is: Information of the Node B, information of the Node C, information of the Node D, information of the Node E, and information of the Node F.
  • the information obtained by the node A after executing S507 is: information of the node B, information of the node E.
  • the information obtained after the execution of S506 is: information of the Node B, information of the node C, information of the node D, information of the node E, information of the node E, because there are two information of the same node, only One of them may be obtained, thereby obtaining: information of the Node B, information of the node C, information of the node D, and information of the node E.
  • the information obtained after the execution of S508 is: information of the node B, information of the node C, information of the node D, information of the node E, and information of the node F.
  • the node B is used as the proxy path detection node of the node A, and the information of the node C, the node D, and the node E is obtained, and the return message is sent to the node A through the proxy detection, and the node A is implemented.
  • the node A can acquire information of each node in the MPLS network or the IP tunnel.
  • the node B detects the initiating node as a proxy path, and the node B sends the encapsulated second path including the second TTL of 1. After detecting the message, the information of the node C sent by the node C will not be received, and the node B sends a proxy detection return message to the node A, and the proxy detection return message includes null information, indicating that the node B is not acquired. Information to any node after the node B, so that the node A will confirm that the downstream node (ie, the C node) of the node B has failed or the path between the node B and the node C has failed.
  • the downstream node ie, the C node
  • the node B detects the originating node as a proxy path, and the node B sends the encapsulated second path including the second TTL of 1. After detecting the message, receiving the information of the node C sent by the node C, and then the node B sends the encapsulated second path detection message including the second TTL of 2, the node B does not receive the information returned by any node.
  • the node B sends a proxy detection return message to the node A, where the proxy detects that the return message includes the information of the node C, and the node A also does not receive the information sent by any node after the node C, so that the node According to the information of the node C in the proxy return message, A will confirm that the downstream node of the node C (ie, the D node) has failed or the path between the node C and the node D has failed.
  • the proxy detects that the return message includes the information of the node C
  • the node A also does not receive the information sent by any node after the node C, so that the node According to the information of the node C in the proxy return message, A will confirm that the downstream node of the node C (ie, the D node) has failed or the path between the node C and the node D has failed.
  • the node B detects the initiating node as the proxy path, and after receiving the encapsulated second path detection message with the second TTL of 1, the node B receives the information of the node C sent by the node C, and then the node B sends the information. After the second path detection message with the second TTL of 2 is received, the information of the node D sent by the node D is received, and then the node B sends the encapsulated second path detection message including the second TTL of 3.
  • the node B If the node B does not receive any information returned by the node, the node B sends a proxy detection return message to the node A, and the proxy detects the information including the information of the node C and the information of the node D, and the node A also The information sent by any node after the node D is not received, so that the node A will confirm the downstream node of the node D (ie, the E node) according to the information of the node C in the proxy return message and the information of the node D. A fault has occurred or the path between the node D and the node E has failed.
  • FIG. 9 is a flowchart of Embodiment 6 of the path detection method of the present invention. As shown in FIG. 9, the method in this embodiment may include:
  • the node A sends an IP packet including a path detection option to the node F according to the destination IP address being the IP address of the node F.
  • the Node B receives the IP packet that is sent by the Node A and includes a path detection option, and the Node B sends a first path reply message carrying the information of the Node B to the Node A.
  • the node A when the node A needs to obtain the information about the path between the node F, the node A sends a path detection message to the node F, where the path detection message is an IP packet including a path detection option, and the node B first Receiving an IP packet sent by the node A, including a path detection option, the node B determines, according to the path detection option, that the node A is performing path detection, and the node B sends the information of the node B to the first path reply message to the node
  • the node A, the source IP address included in the first path reply message is the IP address of the node B, and the destination IP address is the IP address of the node A.
  • the path detection message further includes an incidental requirement for path detection, where the incidental request may be one or more of requesting the receiver of the first path detection message to provide bandwidth and congestion.
  • the information of the Node B further includes the bandwidth of the Node B and the congestion procedure of the Node B.
  • the node A receives the first path reply message sent by the node B, and obtains the information of the node B included in the first path reply message, so that the node A can obtain the path information between the node A and the node F. : Information about this Node B.
  • the Node B sends a proxy detection waiting message to the node A.
  • the specific implementation process of S603 is similar to the specific implementation process of S503 in Embodiment 5 of the method of the present invention, and details are not described herein again.
  • the node B detects the initiating node as a proxy path, and acquires information about the node C, the node D, and the node E.
  • the node B is used as the proxy path detection initiating node, and the source IP address in the IP packet including the path detection option is changed from the IP address of the node A to the IP address of the node B, and the second path detection message is obtained.
  • the encapsulated second path detection message includes: an MPLS header including a second TTL + an IP packet including a path detection option, or an IP tunnel header including a second TTL + an IP packet including a path detection option
  • the encapsulated second path detection message includes a source IP address that is an IP address of the node B, and the encapsulated second path detection message includes a destination IP address that is an IP address of the node F.
  • the Node B sets the second TTL included in the encapsulated second path detection message sent to the node F for the first time to be 1, and the second path detection message that is sent by the Node B and includes the second TTL is 1.
  • the node C decrements the second TTL in the encapsulated second path detection message by 1 (that is, 1 minus 1) to 0, and the encapsulated second path detection message is at the node C.
  • the node C decapsulates the encapsulated second path detection message, that is, removes the MPLS header and the IP tunnel header, and obtains a second path detection message, which is determined according to the path detection option included in the second path detection message.
  • the node B performs path detection on the node B, and then carries the information of the node C in the second path reply message and sends the information to the node B.
  • the node B receives the second path reply message sent by the node C, and obtains the node C.
  • the node B After receiving the second path reply message sent by the node C, the node B adds the second TTL in the encapsulated second path detection message that is sent for the first time to obtain the second encapsulated second transmission.
  • the path detection message, the second TTL included in the encapsulated second path detection message sent by the second time is 2, and the encapsulated second path detection message is sent to the node C, where the node C receives the node
  • the encapsulated second path detection message sent by the B, the second TTL of the encapsulated second path detection message is decremented by 1 (that is, 2 is subtracted by 1) to obtain 1, and then the node C will include the subtracted
  • the encapsulated second path detection message of the second TTL (1) is sent to the node D, The node D receives the encapsulated second path detection message including the second TTL of 1, and decrements the second TTL by 1 (that is, 1 minus 1) to 0.
  • the encapsulated second path detection message is in the The node D terminates, and then the node D decapsulates the encapsulated second path detection message, that is, removes the MPLS header and the IP tunnel header, and obtains a second path detection message, where the node D includes the second path detection message according to the second path detection message.
  • the path detection option determines that the node B performs path detection on the node D, and then carries the information of the node D in the second path reply message and sends the information to the node B, and the node B receives the second sent by the node D.
  • the path reply message acquires the information of the node D, thereby obtaining information of each node in the path of the node B to the node F in the second network: information of the node C, and information of the node D.
  • the node B After receiving the second path reply message sent by the node D, the node B adds the second TTL value in the encapsulated second path detection message sent in the second time to obtain the encapsulated third transmission.
  • a second path detection message where the second TTL included in the encapsulated second path detection message is 3, and the encapsulated second path detection message is sent to the node C, where the node C receives the
  • the second TTL of the encapsulated second path detection message is decremented by 1 (that is, 3 is subtracted by 1) to obtain 2
  • the node C will include the subtracted
  • the encapsulated second path detection message of the second TTL (which is 2) is sent to the node D, and the node D receives the encapsulated second path detection message that is sent by the node C and includes the second TTL of 2, and the The second TTL of the encapsulated second path detection message is decremented by 1 (i.e., 2 is subtracted by 1) to obtain 1,
  • the message is sent to the node E, the section Point E receives the encapsulated second path detection message including the second TTL of 1, and decrements the second TTL by 1 (that is, 1 minus 1) to 0, and the encapsulated second path detection message is at the node E.
  • B performs path detection on the node E, and then carries the information of the node E in the second path reply message and sends the message to the node B.
  • the node B receives the second path reply message sent by the node E, and obtains the node.
  • the information of E thereby obtaining information of each node in the path of the node B to the node F in the second network: information of the node C, information of the node D, and information of the node E.
  • the node B After receiving the second path reply message sent by the node E, the node B adds the second TTL value in the encapsulated second path detection message sent in the third time to obtain the fourth transmission after the encapsulation.
  • the second path detection message, the second TTL included in the encapsulated second path detection message sent by the fourth time is 4, and the encapsulated second path detection message is sent to the node C, where the node C receives Sending the encapsulated second path detection message to the Node B, and decrementing the second TTL in the encapsulated second path detection message by 1 (that is, subtracting 1 from 4) to obtain 3, the node C including the phase
  • the encapsulated second path detection message of the second TTL (which is 3) is sent to the node D, and the node D receives the encapsulated second path detection message that is sent by the node C and includes the second TTL of 3.
  • the second TTL of the encapsulated second path detection message is decremented by 1 (i.e., 3 is subtracted by 1) to obtain 2, and the node D will include the encapsulated second path of the subtracted second TTL (2).
  • the detection message is sent to the node E, and the node E receives the encapsulated second path detection message sent by the node D, and decrements the second TTL by 1 (also 2 minus 1) to obtain 1, because the node E is the The tail node of the second network, at which point the node E can detect the second path after the encapsulation Decapsulating the message, that is, removing the MPLS header and the IP tunnel header, obtaining a second path detection message, detecting a path detection option included in the message according to the second path, and then carrying the information of the node E in the second path reply message To the node B, the node B receives the second path reply message sent by the node E, and the node B determines that the second path reply message sent by the node E has
  • the encapsulated second path detection message that is, the node B terminates the proxy path detection process, and finally the node B obtains the information of each node on the path of the node B to the node F in the second network as: information of the node C
  • the Node B carries the information of the node C, the information of the node D, and the information of the node E in a proxy detection return message and sends the message to the node A.
  • the node B carries the acquired information of the node C in the second network, the information of the node D, and the information of the node E in the proxy detection return message, and sends the message to the node A.
  • the node A receives the proxy detection return message sent by the node B, and locks the information of the node C, the information of the node D, and the information of the node E after the information of the node B.
  • the node A receives the proxy detection return message sent by the node B, and the proxy detects the information of the node C carried in the return message, the information of the node D, and the information of the node E as the node B.
  • the node C, the node D, and the node E are after the node B, and the information carried by the node A from the node B to the return message is locked to the information of the node B, such as : information of the node B, information of the node C, the node D Information and information about the node E.
  • the node B encapsulates and sends the IP packet including the path detection option to the node F according to the destination IP address being the IP address of the node F.
  • the node A receives the path reply message sent by the node E and the node F, respectively.
  • the Node B continues to transmit the IP packet to the node F. Since the IP packet is to be transmitted in the second network, Node B will encapsulate the IP packet and then send it.
  • the Node B sets the second TTL in the encapsulated IP packet to a larger value (such as 255), that is, the path detection message encapsulated by the Node B.
  • the second TTL is 225, and the Node B sends the encapsulated path detection message to the node C, and the node C decrements the second TTL included in the encapsulated path detection message by 254, and the node C
  • the encapsulated path detection message including the second TTL of 254 is sent to the node D, and the node D decrements the second TTL included in the encapsulated path detection message by 253, and the node D includes the second TTL.
  • the encapsulated path detection message for 253 is sent to the node E, and the node E decapsulates the IP packet including the path detection option, and the node E learns that the node A performs path detection according to the path detection option and the source IP address. Therefore, the node E carries the information of the node E in the path reply message and sends the information to the node A, so that the node A acquires the information of the node E, and the information of the node E is placed on the node B. Thereafter, to give: the information of the node B, information of the node E.
  • the node E sends an IP packet including a path detection option to the node F according to the destination IP address as the IP address of the node F, and the node F is the IP address of the node F and the path according to the destination IP address of the IP packet.
  • the node A is configured to perform path detection on the node F, so that the node F carries the information of the node F in the path reply message and sends the information to the node A, so that the node A acquires the information of the node F, and the node A acquires the information of the node F.
  • the information of the node F is placed after the information of the node E, and the information of the node B, the information of the node E, and the information of the node F are obtained. After the node A obtains the information of the node F, it indicates that the path detection message has arrived at the node F.
  • the information obtained by the node A after executing S606 is: information of the Node B, information of the node C, information of the node D, and information of the node E.
  • the information obtained after the execution of S607 is: information of the Node B, information of the node C, information of the node D, information of the node E, information of the node E, and information of the node F, Only one of the information of the two identical nodes can be obtained, thereby obtaining: information of the Node B, information of the node C, information of the node D, and information of the node E.
  • the information obtained by the node A after executing S607 is: information of the node B, information of the node E, and information of the node F.
  • the information obtained after the execution of S606 is: information of the Node B, information of the node C, information of the node D, information of the node E, information of the node E, information of the node F, due to the existence of two Only one of the information of the same node can be obtained, thereby obtaining: information of the Node B, information of the node C, information of the node D, and information of the node E.
  • the node B is used as the proxy path detection node of the node A, and the information of the node C, the node D, and the node E is obtained, and the return message is sent to the node A through the proxy detection, and the node A is implemented.
  • the node A can acquire information of each node in the MPLS network or the IP tunnel.
  • the node B detects the initiating node as a proxy path, and the node B sends the encapsulated second path including the second TTL of 1. After detecting the message, the information of the node C sent by the node C will not be received, and the node B sends a proxy detection return message to the node A, and the proxy detection return message includes null information, indicating that the node B is not acquired. Information to any node after the Node B, such that the Node A will confirm that the next node of the Node B (ie, the Node C) has failed or that the path between the Node B and the Node C has failed.
  • the node B detects the originating node as a proxy path, and the node B sends the encapsulated second path including the second TTL of 1. After detecting the message, receiving the information of the node C sent by the node C, and then the node B sends the encapsulated second path detection message including the second TTL of 2, the node B does not receive the information returned by any node.
  • the node B sends a proxy detection return message to the node A, and the proxy detects that the return message includes the information of the node C, and the node A also does not receive the information sent by any node after the node B, so that the node According to the information of the node C in the proxy return message, A will confirm that the next node of the node C (ie, the node D) has failed or the path between the node C and the node D has failed.
  • the node B detects the originating node as a proxy path, and the node B sends the second TTL included to be 1
  • the information of the node C sent by the node C is received, and then the node B sends the encapsulated second path detection message including the second TTL of 2, and then receives the node D.
  • the node B After transmitting the information of the node D, and then the node B sends the encapsulated second path detection message including the second TTL of 3, the node B does not receive any information returned by the node, and the node B sends the node A to the node A.
  • the sending proxy detects a return message, and the proxy detects that the information of the node C and the information of the node D are included in the return message, and the node A also does not receive the information sent by any node after the node D, so that the node A according to the proxy Returning the information of the node C in the message and the information of the node D, it will confirm that the next node of the node D (ie, the node E) has failed or the path between the node D and the node E has failed.
  • the proxy detects that the information of the node C and the information of the node D are included in the return message, and the node A also does not receive the information sent by any node after the node D, so that the node A according to the proxy Returning the information of the node C in the message and the information of the node D, it will confirm that the next node of the node D (ie, the node E) has failed or the path between the node D and the node E has failed.
  • FIG. 10 is a schematic structural diagram of Embodiment 1 of a communication node according to the present invention.
  • the communication node in this embodiment may include: a receiving unit 11, a sending unit 12, and a processing unit 13, where The unit 11 is configured to receive, by the second communication node, a first path detection message that is sent by the path detection initiation node by using the first network, where the first path detection message is used to indicate that the first communication node is performed by the second communication node.
  • Path detection the first path detection message includes an IP address of the path detection termination node
  • the first communication node is a first node of the second network
  • the first network is an IP network
  • the second network is an MPLS network.
  • the sending unit 12 is configured to send a first path reply message to the second communications node, where the path reply message includes information of the first communications node; and the processing unit 13 is configured to serve as the first communications node
  • the proxy path detects the initiating node acquiring, in the second network, the path detecting initiating node and the The path detection terminates information of other nodes on the path between the nodes;
  • the sending unit 12 is further configured to send a proxy detection return message to the second communication node, where the proxy detection return message includes the path located in the second network Information of other nodes on the path between the originating node and the path detection terminating node is detected.
  • the first path reply message sent by the sending unit 12 further includes proxy detection waiting information; or
  • the sending unit 12 is further configured to send a proxy detection waiting message to the second communications node before sending the first path reply message to the second communications node, where the proxy detecting waiting message includes proxy detection waiting information;
  • the agent detection waiting information is used to indicate that: the second communication node does not receive the path detection initiation node and the path in the second network that is sent by the first communication node. Maintaining a path detection state before the path detection terminates information of other nodes on the path between the nodes and the second communication node is located on the path between the path detection initiation node and the path detection termination node in the second network The information of the other nodes is locked after the information of the first communication node.
  • the first path detection message received by the receiving unit 11 includes a first value of 1.
  • the first TTL is 1 for indicating that the first communication node is used for path detection by the second communication node.
  • the first path detection message received by the receiving unit 11 is an Internet Control Message Protocol (ICMP) message or an ICMPv6 message or an empty TCP packet or an empty UDP packet.
  • ICMP Internet Control Message Protocol
  • the first path detection message received by the receiving unit 11 is a TCP packet or a UDP packet; the processing unit 13 is further configured to: before the sending unit 12 sends a path reply message to the second communication node, according to the TCP The check value in the packet or the UDP packet determines that the check value is detected as a failure.
  • the first path detection message received by the receiving unit 11 is an IP packet including a path detection option, and the path detection option is used to indicate that the first communication node is used for path detection by the second communication node.
  • the processing unit 13 is further configured to detect the first path before acquiring information about other nodes in the path between the path detection initiation node and the path detection termination node in the second network.
  • the source IP address in the message is replaced by the IP address of the second communication node to the IP address of the first communication node, obtaining a second path detection message; and according to the protocol of the second network, the second The path detection message is encapsulated, and the encapsulated second path detection message is obtained, where the encapsulated second path detection message includes a second TTL;
  • the sending unit 12 is further configured to detect, according to the encapsulated second path, a destination IP address in the message, at least twice in a path between the path detection initiation node and the path detection termination node in the second network. And sending, by the other node, the encapsulated second path detection message, where the second TTL included in the encapsulated second path detection message sent for the first time is 1, and the package is sent each time The second TTL included in the second path detection message is incremented by an interval TTL of 1;
  • the receiving unit 11 is further configured to receive a second path detection reply sent by another node in the path between the path detection initiation node and the path detection termination node in the second network.
  • the processing unit 13 acquires information about other nodes in the path between the path detection initiation node and the path detection termination node in the second network, specifically: the processing unit 13 is located according to the second network. And the second path detection reply message sent by the other node on the path between the path detection initiation node and the path detection termination node, where the path detection initiation node and the path detection termination node are located in the second network. Information between other nodes on the path.
  • the sending unit 12 is further configured to: when the receiving unit 11 receives the second path detection reply message sent by the same node in the second network at least twice, or when the receiving unit 11 is at a preset time When the second path detection reply message is not received, the second path detection message is stopped.
  • the communication node of this embodiment may be used to perform the technical solution executed by the first communication node in the foregoing method embodiment of the present invention, and the implementation principle and the technical effect are similar, and details are not described herein again.
  • FIG. 11 is a schematic structural diagram of Embodiment 2 of a communication node according to the present invention.
  • the communication node in this embodiment may include: a receiver 21, a transmitter 22, and a processor 23;
  • the device 21 is configured to receive, by the second communication node, a first path detection message that is sent by the path detection initiation node by using the first network, where the first path detection message is used to indicate that the first communication node is performed by the second communication node.
  • Path detection the first path detection message includes an IP address of the path detection termination node
  • the first communication node is a first node of the second network
  • the first network is an IP network
  • the second network is an MPLS network.
  • the transmitter 22 is configured to send a first path reply message to the second communications node, where the path reply message includes information of the first communications node; and the processor 23 is configured by the first communications node When the proxy path detects the initiating node, acquiring the path detecting initiating node and the path detecting termination section in the second network Information about other nodes on the path between the points; the transmitter 22 is further configured to send a proxy detection return message to the second communication node, where the proxy detection return message includes the path detection initiation node in the second network Information about other nodes on the path between the termination nodes is detected with the path.
  • the first path reply message sent by the transmitter 22 further includes proxy detection waiting information; or
  • the transmitter 22 is further configured to send a first path reply message to the second communication node,
  • the second communication node sends a proxy detection wait message, and the proxy detection wait message includes proxy detection wait information;
  • the agent detection waiting information is used to indicate that: the second communication node does not receive the path detection initiation node and the path detection termination node in the second network sent by the first communication node.
  • the information of the other nodes on the inter-path remains the path detection state and the information of the other nodes in the second network on the path between the path detection initiation node and the path detection termination node Locked after the information of the first communication node.
  • the first path detection message received by the receiver 21 includes a first TTL with a value of 1, and the first TTL is 1 for indicating that the first communication node is performed by the second communication node. Path detection.
  • the first path detection message received by the receiver 21 is an ICMP message or an ICMPv6 message or an empty TCP packet or an empty UDP packet.
  • the first path detection message received by the receiver 21 is a TCP packet or a UDP packet; the processor 23 is further configured to: before the transmitter 22 sends a path reply message to the second communication node, according to the TCP The check value in the packet or the UDP packet determines that the check value is detected as a failure.
  • the first path detection message received by the receiver 21 is an IP packet including a path detection option, and the path detection option is used to indicate that the first communication node is used for path detection by the second communication node.
  • the processor 23 is further configured to detect the first path before acquiring information about other nodes in the path between the path detection initiation node and the path detection termination node in the second network.
  • the source IP address in the message is replaced by the IP address of the second communication node to the IP address of the first communication node, obtaining a second path detection message; and according to the protocol of the second network, the second The path detection message is encapsulated, and the encapsulated second path detection message is obtained, where the encapsulated second path detection message includes a second TTL;
  • the transmitter 22 is further configured to detect, according to the encapsulated second path, a destination IP address in the message, at least twice in a path between the path detection initiation node and the path detection termination node in the second network. And sending, by the other node, the encapsulated second path detection message, where the second TTL included in the encapsulated second path detection message sent for the first time is 1, and the package is sent each time The second TTL included in the second path detection message is in accordance with the interval TTL is incremented by 1;
  • the receiver 21 is further configured to receive a second path detection reply message sent by another node in the path between the path detection initiation node and the path detection termination node in the second network, where the processor 23 acquires the
  • the information of the other nodes in the path between the path detection initiation node and the path detection termination node in the second network is specifically: the processor 23 is located in the second network according to the path detection initiation node and the The second path detection reply message sent by another node on the path between the path detection termination node, and acquiring other nodes in the path between the path detection initiation node and the path detection termination node in the second network.
  • Information is specifically: the processor 23 is located in the second network according to the path detection initiation node and the The second path detection reply message sent by another node on the path between the path detection termination node, and acquiring other nodes in the path between the path detection initiation node and the path detection termination node in the second network.
  • the transmitter 22 is further configured to: when the receiver 21 receives the second path detection reply message sent by the same node in the second network at least twice, or when the receiver 21 is at a preset time When the second path detection reply message is not received, the second path detection message is stopped.
  • the communication node of this embodiment may be used to perform the technical solution executed by the first communication node in the foregoing method embodiment of the present invention, and the implementation principle and the technical effect are similar, and details are not described herein again.
  • FIG. 12 is a schematic structural diagram of Embodiment 3 of a communication node according to the present invention.
  • the communication node in this embodiment may include: a sending unit 31, a receiving unit 32, and a processing unit 33;
  • the unit 31 sends a path detection message to the path detection termination node according to the IP address of the path detection termination node, where the first network is an Internet protocol.
  • the first path detection message is used to indicate that the first communication node is performing path detection
  • the receiving unit 32 is configured to receive a first path reply message sent by the first communication node, where the first communication node is a first node of the network, the second network is an MPLS network or an IP tunnel, the first path reply message includes information of the first communication node, and receives a proxy detection return message sent by the first communication node,
  • the proxy detection return message includes the path detection initiation section located in the second network Information about other nodes on the path between the path detection termination node;
  • the processing unit 33 is configured to use other nodes in the second network that are located on the path between the path detection initiation node and the path detection termination node The information is locked after the information of the first communication node.
  • the first path reply message received by the receiving unit 32 further includes proxy detection waiting information; or
  • the receiving unit 32 is further configured to receive the first path reply message sent by the first communications node. After receiving the proxy detection waiting message sent by the first communication node, the proxy detection waiting message includes proxy detection waiting information;
  • the agent detection waiting information is used to indicate that: the second communication node does not receive the path detection initiation node and the path detection termination node in the second network sent by the first communication node.
  • the information of the other nodes on the inter-path remains the path detection state and the information of the other nodes in the second network on the path between the path detection initiation node and the path detection termination node Locked after the information of the first communication node;
  • the processing unit 33 is specifically configured to: lock, according to the proxy detection waiting information, information of other nodes in the path between the path detection initiation node and the path detection termination node in the second network to the After the information of a communication node.
  • the processing unit 33 is further configured to: lock information of the other nodes located in the path between the path detection initiation node and the path detection termination node in the second network to the first communication node. After the information, when it is determined that the receiving unit 32 has received the path reply message sent by the path detection termination node, or when it is determined that the receiving unit 32 does not receive the path reply message within the preset time, the agent detects the waiting according to the agent. Information, stop path detection.
  • the sending unit 31 is specifically configured to: when the second communication node is used as the path detection initiating node, detect the IP address of the terminating node according to the path, and send the path to the path detecting termination node at least three times by using the first network. Detecting a message, the path detection message includes a first TTL, where the first TTL included in the path detection message sent for the first time is 1, and the path detection message included in each path is sent The first TTL is incremented by an interval TTL of 1.
  • the path detection message sent by the sending unit 31 is an ICMP message or an ICMPv6 message or an empty TCP packet or an empty UDP packet.
  • the path detection message sent by the sending unit 31 is a TCP packet or a UDP packet, and the TCP packet or the UDP packet includes a check value, and the detection result of the check value is a failure.
  • the sending unit 31 is specifically configured to: when the second communication node is used as the path detection initiating node, detect, according to the path, the IP address of the terminating node, and send the path to the path detecting termination node by using the first network at a time.
  • An IP packet of the path detection option, the path detection option is used to indicate that the second communication node is performing path detection.
  • the communication node of this embodiment may be used to perform the second communication in the foregoing method embodiment of the present invention.
  • the technical solution implemented by the node has similar implementation principles and technical effects, and will not be described here.
  • FIG. 13 is a schematic structural diagram of Embodiment 4 of a communication node according to the present invention.
  • the communication node in this embodiment may include: a transmitter 41, a receiver 42 and a processor 43;
  • the device detects that the IP address of the node is terminated according to the path, and sends a path detection message to the path detection termination node by using the first network, where the first network is an Internet protocol.
  • the IP network the first path detection message is used to indicate that the first communication node is performing path detection
  • the receiver 42 is configured to receive a first path reply message sent by the first communication node, where the first communication node is a first node of the network, the second network is an MPLS network or an IP tunnel, the first path reply message includes information of the first communication node, and receives a proxy detection return message sent by the first communication node,
  • the proxy detection return message includes the path detection initiation node and the path in the second network Detecting information of other nodes on the path between the termination nodes;
  • the processor 43 is configured to lock information of other nodes in the second network located on the path between the path detection initiation node and the path detection termination node After the information of the first communication node.
  • the first path reply message received by the receiver 42 further includes proxy detection waiting information; or
  • the receiver 42 is further configured to: after receiving the first path reply message sent by the first communications node, receive an agent detection waiting message sent by the first communications node, where the proxy detecting waiting message includes proxy detecting waiting information;
  • the agent detection waiting information is used to indicate that: the second communication node does not receive the path detection initiation node and the path detection termination node in the second network sent by the first communication node.
  • the information of the other nodes on the inter-path remains the path detection state and the information of the other nodes in the second network on the path between the path detection initiation node and the path detection termination node Locked after the information of the first communication node;
  • the processor 43 is specifically configured to: lock, according to the proxy detection waiting information, information of other nodes in the path between the path detection initiation node and the path detection termination node in the second network to the After the information of a communication node.
  • the processor 43 is further configured to: lock information of the other nodes located in the path between the path detection initiation node and the path detection termination node in the second network to the first pass After the information of the node is determined, when it is determined that the receiver 42 has received the path reply message sent by the path detection termination node, or when it is determined that the receiver 42 does not receive the path reply message within the preset time, according to the The agent detects the wait message and stops the path check.
  • the transmitter 41 is specifically configured to: when the second communication node is used as the path detection initiating node, detect the IP address of the terminating node according to the path, and send the path to the path detecting termination node by using the first network at least three times. Detecting a message, the path detection message includes a first TTL, where the first TTL included in the path detection message sent for the first time is 1, and the path detection message included in each path is sent The first TTL is incremented by an interval TTL of 1.
  • the path detection message sent by the sender 41 is an ICMP message or an ICMPv6 message or an empty TCP packet or an empty UDP packet.
  • the path detection message sent by the sender 41 is a TCP packet or a UDP packet, and the TCP packet or the UDP packet includes a check value, and the detection result of the check value is a failure.
  • the transmitter 41 is specifically configured to: when the second communication node is used as the path detection initiation node, detect, according to the path, the IP address of the termination node, and send the path detection termination node to the path through the first network.
  • An IP packet of the path detection option, the path detection option is used to indicate that the second communication node is performing path detection.
  • the communication node of this embodiment may be used to perform the technical solution executed by the second communication node in the foregoing method embodiment of the present invention, and the implementation principle and the technical effect are similar, and details are not described herein again.

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明实施例提供一种路径检测方法和通信节点,其中,该方法包括:第一通信节点接收第二通信节点作为路径检测发起节点通过第一网络发送的第一路径检测消息,所述第一通信节点为第二网络的首节点;向所述第二通信节点发送第一路径回复消息,所述路径回复消息包括所述第一通信节点的信息;作为代理路径检测发起节点,获取所述第二网络中位于所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节点的信息;向所述第二通信节点发送所述第二网络中位于所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节点的信息。从而实现第一网络中的路径检测发起节点可以获取第二网络中各节点的信息。

Description

路径检测方法和通信节点
技术领域
本发明实施例涉及通信技术领域, 尤其涉及一种路径检测方法和通信节 点。 背景技术
在目前的互联网协议(Internet Protocol, 简称: IP) 网络中, 可以通过互 联网控制消息协议 (Internet Control Message Protocol, 简称: ICMP) 来检测 IP网络中传输 IP数据包经过的路径, 即 IP网络中传输 IP数据包经过的各节 点的信息。 在图 1所示的网络架构中, 若节点 A需要获知与节点 F之间的路 径,那么节点 A可以作为首节点向目的节点为节点 F发送 ICMP消息,该 ICMP 消息中包括 IP包头的生存时间 (Time to Live, 简称: TTL) , 节点 A每次向 目的节点发送的 ICMP消息中的 IP包头的 TTL均逐浙增加 1, 例如: 节点 A 向节点 F首次发送的 ICMP消息中包括的 IP包头的 TTL为 1,节点 A向节点 F第二次发送的 ICMP消息中包括的 IP包头的 TTL为 2,然后节点 A每向目 的节点发送一次 ICMP消息, 以此类推。 从而节点 A与节点 F之间的各节点 会向节点 A返回自己的信息 (例如: IP地址) , 以使节点 A获取与节点 F 之间的路径。
若在异种网络中, 如: IP 网络与多协议标签交换 (Multi-Protocol Label Switch, 简称: MPLS ) 网络或者 IP 隧道共存的网络中, 若路径检测发起节 点位于 IP网络, MPLS网络或者 IP隧道位于整个 IP网络的中间位置,当 PiPe (隧道)模式的 MPLS网络或 IP隧道中的入节点接收到路径检测消息后, 将 路径检测消息进行封装, 封装后的消息中携带有一个较大的 MPLS 标签的 TTL或 IP隧道封装头的 TTL, 该封装后的消息会在 MPLS网络或者 IP隧道 中传递, 直至出节点, 出节点将该封装后的消息进行解封装, 获得路径检测 消息, 若出节点检测到路径检测消息中的 IP包头的 TTL为 1, 则向路径检测 发起节点返回该出节点的信息; 若出节点检测到后续的路径检测消息中的 IP 包头的 TTL不为 1, 则将该些路径检测消息向下传递, 从而处于出节点与路 径检测终止节点之间的各节点均会接收到 IP包头的 TTL为 1的路径检测消 息, 并各自向路径检测发起节点反馈各节点的信息。
然而, 路径检测发起节点只能检测到位于 IP网络中的各节点的信息, 无 法检测处于 PiPe模式的 MPLS网络和 IP隧道中的各节点的信息。 发明内容
本发明实施例提供一种路径检测方法和通信节点, 用于实现处于第一网 络中的路径检测节点可以获取第二网络中各节点的信息。
第一方面, 本发明实施例提供一种路径检测方法, 包括:
第一通信节点接收第二通信节点作为路径检测发起节点通过第一网络发 送的第一路径检测消息, 所述第一路径检测消息用于指示所述第一通信节点 被所述第二通信节点进行路径检测, 所述第一路径检测消息包括路径检测终 止节点的互联网协议 IP地址, 所述第一通信节点为第二网络的首节点, 所述 第一网络为 IP网络, 所述第二网络为多协议标签交换协议 MPLS网络或者 IP隧道;
所述第一通信节点向所述第二通信节点发送第一路径回复消息, 所述路 径回复消息包括所述第一通信节点的信息;
所述第一通信节点作为代理路径检测发起节点, 获取所述第二网络中位 于所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节点的 信息;
所述第一通信节点向所述第二通信节点发送代理检测返回消息, 所述代 理检测返回消息包括所述第二网络中位于所述路径检测发起节点与所述路径 检测终止节点之间路径上的其它节点的信息。
在第一方面的第一种可能的实现方式中, 所述第一路径回复消息还包括 代理检测等待信息; 或者,
所述第一通信节点向所述第二通信节点发送第一路径回复消息之前, 还 包括:
所述第一通信节点向所述第二通信节点发送代理检测等待消息, 所述代 理检测等待消息包括代理检测等待信息;
其中, 所述代理检测等待信息用于指示: 所述第二通信节点未接收到所 述第一通信节点发送的所述第二网络中位于所述路径检测发起节点与所述路 径检测终止节点之间路径上的其它节点的信息之前保持路径检测状态以及所 述第二通信节点将所述第二网络中位于所述路径检测发起节点与所述路径检 测终止节点之间路径上的其它节点的信息锁定于所述第一通信节点的信息之 后。
结合第一方面或第一方面的第一种可能的实现方式, 在第一方面的第二 种可能的实现方式中, 所述接收到的所述第一路径检测消息包括值为 1 的第 一生存时间 TTL,所述第一 TTL为 1用于指示所述第一通信节点被所述第二 通信节点进行路径检测。
结合第一方面的第二种可能的实现方式, 在第一方面的第三种可能的实 现方式中, 所述第一路径检测消息为互联网控制消息协议 ICMP 消息或者 ICMPv6消息或者空的传输控制协议 TCP包或者空的用户数据协议 UDP包。
结合第一方面的第二种可能的实现方式, 在第一方面的第四种可能的实 现方式中, 所述第一路径检测消息为 TCP包或者 UDP包;
所述第一通信节点向所述第二通信节点发送路径回复消息之前,还包括: 所述第一通信节点根据所述 TCP包或者所述 UDP包中的校验值, 确定 所述校验值检测为失败。
结合第一方面或第一方面的第一种可能的实现方式, 在第一方面的第五 种可能的实现方式中, 所述第一路径检测消息为包括路径检测选项的 IP包, 所述路径检测选项用于指示所述第一通信节点被所述第二通信节点进行路径 结合第一方面或第一方面的第一种至第五种实现方式中的任一种可能的 实现方式, 在第一方面的第六种可能的实现方式中, 所述第一通信节点作为 所述第二网络的路径检测发起节点, 获取所述第二网络中位于所述路径检测 发起节点与所述路径检测终止节点之间路径上的其它节点的信息之前, 还包 括:
所述第一通信节点将所述第一路径检测消息中的源 IP地址由所述第二通 信节点的 IP地址更换为所述第一通信节点的 IP地址, 获得第二路径检测消 息;
所述第一通信节点根据所述第二网络的协议, 将所述第二路径检测消息 进行封装, 获得封装后的所述第二路径检测消息, 所述封装后的第二路径检 测消息包括第二 TTL;
所述第一通信节点根据所述封装后的第二路径检测消息中目的 IP地址, 至少两次向所述第二网络中位于所述路径检测发起节点与所述路径检测终止 节点之间路径上的其它节点发送所述封装后的第二路径检测消息; 其中, 第 一次发送的所述封装后的第二路径检测消息中包括的所述第二 TTL为 1, 每 次发送的所述封装后的第二路径检测消息中包括的所述第二 TTL 按照间隔 TTL为 1递增;
所述第一通信节点接收所述第二网络中位于所述路径检测发起节点与所 述路径检测终止节点之间路径上的其它节点发送的第二路径检测回复消息; 所述第一通信节点作为代理路径检测发起节点, 获取所述第二网络中其 它节点的信息, 包括:
所述第一通信节点根据所述第二网络中位于所述路径检测发起节点与所 述路径检测终止节点之间路径上的其它节点发送的所述第二路径检测回复消 息, 获取所述第二网络中位于所述路径检测发起节点与所述路径检测终止节 点之间路径上的其它节点的信息。
结合第一方面的第六种可能的实现方式, 在第一方面的第七种可能的实 现方式中, 当所述第一通信节点至少两次接收到所述第二网络中同一节点发 送的所述第二路径检测回复消息时, 或者, 当所述第一通信节点在预设时间 内未收到所述第二路径检测回复消息时, 所述第一通信节点停止发送所述第 二路径检测消息。
第二方面, 本发明实施例还提供一种路径检测方法, 包括:
第二通信节点作为路径检测发起节点, 根据路径检测终止节点的互联网 协议 IP地址, 通过第一网络向所述路径检测终止节点发送路径检测消息, 所 述第一网络为互联网协议 IP网络, 所述第一路径检测消息用于指示所述第一 通信节点正进行路径检测;
所述第二通信节点接收第一通信节点发送的第一路径回复消息, 所述第 一通信节点为第二网络的首节点, 所述第二网络为多协议标签交换协议 MPLS网络或者 IP隧道, 所述第一路径回复消息包括所述第一通信节点的信 息; 所述第二通信节点接收所述第一通信节点发送的代理检测返回消息, 所 述代理检测返回消息包括所述第二网络中位于所述路径检测发起节点与所述 路径检测终止节点之间路径上的其它节点的信息;
所述第二通信节点将所述第二网络中位于所述路径检测发起节点与所述 路径检测终止节点之间路径上的其它节点的信息锁定于所述第一通信节点的 信息之后。
在第二方面的第一种可能的实现方式中, 所述第一路径回复消息还包括 代理检测等待信息; 或者,
所述第二通信节点接收所述第一通信节点发送的第一路径回复消息之 后, 还包括:
所述第二通信节点接收所述第一通信节点发送的代理检测等待消息, 所 述代理检测等待消息包括代理检测等待信息;
其中, 所述代理检测等待信息用于指示: 所述第二通信节点未接收到所 述第一通信节点发送的所述第二网络中位于所述路径检测发起节点与所述路 径检测终止节点之间路径上的其它节点的信息之前保持路径检测状态以及所 述第二通信节点将所述第二网络中位于所述路径检测发起节点与所述路径检 测终止节点之间路径上的其它节点的信息锁定于所述第一通信节点的信息之 后;
所述第二通信节点将所述第二网络中位于所述路径检测发起节点与所述 路径检测终止节点之间路径上的其它节点的信息锁定于所述第一通信节点的 信息之后, 包括:
所述第二通信节点根据所述代理检测等待信息, 将所述第二网络中位于 所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节点的信 息锁定于所述第一通信节点的信息之后。
结合第二方面的第一种可能的实现方式, 在第二方面的第二种可能的实 现方式中, 所述第二通信节点将所述第二网络中位于所述路径检测发起节点 与所述路径检测终止节点之间路径上的其它节点的信息锁定于所述第一通信 节点的信息之后, 还包括:
当所述第二通信节点确定已接收到所述路径检测终止节点发送的路径回 复消息时, 或者, 当所述第二通信节点确定在预设时间内未接收到路径回复 消息时, 所述第二通信节点根据所述代理检测等待信息, 停止路径检测。 结合第二方面或第二方面的第一种可能的实现方式或第二方面的第二种 可能的实现方式, 在第二方面的第三种可能的实现方式中, 所述第二通信节 点作为路径检测发起节点, 根据路径检测终止节点的互联网协议 IP地址, 通 过第一网络向所述路径检测终止节点发送路径检测消息, 包括:
所述第二通信节点作为路径检测发起节点, 根据所述路径检测终止节点 的 IP地址,通过第一网络向所述路径检测终止节点至少发送三次路径检测消 息, 所述路径检测消息包括第一生存时间 TTL; 其中, 第一次发送的所述路 径检测消息中包括的所述第一 TTL为 1, 每次发送的所述路径检测消息中包 括的所述第一 TTL按照间隔 TTL为 1递增。
结合第二方面的第三种可能的实现方式, 在第二方面的第四种可能的实 现方式中,所述路径检测消息为互联网控制消息协议 ICMP消息或者 ICMPv6 消息或者空的传输控制协议 TCP包或者空的用户数据协议 UDP包。
结合第二方面的第三种可能的实现方式, 在第二方面的第五种可能的实 现方式中, 所述路径检测消息为 TCP包或者 UDP包, 所述 TCP包或者所述 UDP包中包括校验值, 所述校验值的检测结果为失败。
结合第二方面或第二方面的第一种可能的实现方式或第二方面的第二种 可能的实现方式, 在第二方面的第六种可能的实现方式中, 所述第二通信节 点作为路径检测发起节点, 根据路径检测终止节点的互联网协议 IP地址, 通 过第一网络向所述路径检测终止节点发送路径检测消息, 包括:
所述第二通信节点作为路径检测发起节点, 根据所述路径检测终止节点 的 IP地址,通过第一网络一次向所述路径检测终止节点发送包括路径检测选 项的 IP包, 所述路径检测选项用于指示所述第二通信节点正进行路径检测。
第三方面, 本发明实施例提供一种通信节点, 所述通信节点作为第一通 信节点, 包括:
接收单元, 用于接收第二通信节点作为路径检测发起节点通过第一网络 发送的第一路径检测消息, 所述第一路径检测消息用于指示所述第一通信节 点被所述第二通信节点进行路径检测, 所述第一路径检测消息包括路径检测 终止节点的互联网协议 IP地址, 所述第一通信节点为第二网络的首节点, 所 述第一网络为 IP网络, 所述第二网络为多协议标签交换协议 MPLS网络或 者 IP隧道;
发送单元, 用于向所述第二通信节点发送第一路径回复消息, 所述路径 回复消息包括所述第一通信节点的信息;
处理单元, 用于所述第一通信节点作为代理路径检测发起节点时, 获取 所述第二网络中位于所述路径检测发起节点与所述路径检测终止节点之间路 径上的其它节点的信息;
所述发送单元还用于向所述第二通信节点发送代理检测返回消息, 所述 代理检测返回消息包括所述第二网络中位于所述路径检测发起节点与所述路 径检测终止节点之间路径上的其它节点的信息。
在第三方面的第一种可能的实现方式中, 所述发送单元发送的所述第一 路径回复消息还包括代理检测等待信息; 或者,
所述发送单元还用于在向所述第二通信节点发送第一路径回复消息之 前, 向所述第二通信节点发送代理检测等待消息, 所述代理检测等待消息包 括代理检测等待信息;
其中, 所述代理检测等待信息用于指示: 所述第二通信节点未接收到所 述第一通信节点发送的所述第二网络中位于所述路径检测发起节点与所述路 径检测终止节点之间路径上的其它节点的信息之前保持路径检测状态以及所 述第二通信节点将所述第二网络中位于所述路径检测发起节点与所述路径检 止节点之间路径上的其它节点的信息锁定于所述第一通信节点的信息之
Figure imgf000009_0001
结合第三方面或第三方面的第一种可能的实现方式, 在第三方面的第二 种可能的实现方式中, 所述接收单元接收到的所述第一路径检测消息包括值 为 1的第一生存时间 TTL,所述第一 TTL为 1用于指示所述第一通信节点被 所述第二通信节点进行路径检测。
结合第三方面的第二种可能的实现方式, 在第三方面的第三种可能的实 现方式中, 所述接收单元接收的所述第一路径检测消息为互联网控制消息协 议 ICMP消息或者 ICMPv6消息或者空的传输控制协议 TCP包或者空的用户 数据协议 UDP包。
结合第三方面的第二种可能的实现方式, 在第三方面的第四种可能的实 现方式中, 所述接收单元接收的所述第一路径检测消息为 TCP包或者 UDP 包;
所述处理单元还用于在所述发送单元向所述第二通信节点发送路径回复 消息之前, 根据所述 TCP包或者所述 UDP包中的校验值, 确定所述校验值 检测为失败。
结合第三方面或第三方面的第一种可能的实现方式, 在第三方面的第五 种可能的实现方式中, 所述接收单元接收的所述第一路径检测消息为包括路 径检测选项的 IP包, 所述路径检测选项用于指示所述第一通信节点被所述第 二通信节点进行路径检测。
结合第三方面或第三方面的第一种至第五种实现方式中的任一种可能的 实现方式, 在第三方面的第六种可能的实现方式中, 所述处理单元, 还用于 在获取所述第二网络中位于所述路径检测发起节点与所述路径检测终止节点 之间路径上的其它节点的信息之前, 将所述第一路径检测消息中的源 IP地址 由所述第二通信节点的 IP地址更换为所述第一通信节点的 IP地址, 获得第 二路径检测消息; 以及根据所述第二网络的协议, 将所述第二路径检测消息 进行封装, 获得封装后的所述第二路径检测消息, 所述封装后的第二路径检 测消息包括第二 TTL;
所述发送单元还用于根据所述封装后的第二路径检测消息中目的 IP 地 址, 至少两次向所述第二网络中位于所述路径检测发起节点与所述路径检测 终止节点之间路径上的其它节点发送所述封装后的第二路径检测消息;其中, 第一次发送的所述封装后的第二路径检测消息中包括的所述第二 TTL为 1, 每次发送的所述封装后的第二路径检测消息中包括的所述第二 TTL按照间隔
TTL为 1递增;
所述接收单元还用于接收所述第二网络中位于所述路径检测发起节点与 所述路径检测终止节点之间路径上的其它节点发送的第二路径检测回复消 息;
所述处理单元获取所述第二网络中位于所述路径检测发起节点与所述路 径检测终止节点之间路径上的其它节点的信息, 具体为: 所述处理单元根据 所述第二网络中位于所述路径检测发起节点与所述路径检测终止节点之间路 径上的其它节点发送的所述第二路径检测回复消息, 获取所述第二网络中位 于所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节点的 I Ft自、。
结合第三方面的第六种可能的实现方式, 在第三方面的第七种可能的实 现方式中, 所述发送单元还用于, 当所述接收单元至少两次接收到所述第二 网络中同一节点发送的所述第二路径检测回复消息时, 或者, 当所述接收单 元在预设时间内未收到所述第二路径检测回复消息时, 停止发送所述第二路 径检测消息。
第四方面, 本发明实施例还提供一种通信节点, 所述通信节点作为第二 通信节点, 包括:
所述通信节点作为第二通信节点, 其特征在于, 包括:
发送单元, 用于所述第二通信节点作为路径检测发起节点时, 根据路径 检测终止节点的互联网协议 IP地址, 通过第一网络向所述路径检测终止节点 发送路径检测消息, 所述第一网络为互联网协议 IP网络, 所述第一路径检测 消息用于指示所述第一通信节点正进行路径检测;
接收单元, 用于接收第一通信节点发送的第一路径回复消息, 所述第一 通信节点为第二网络的首节点, 所述第二网络为多协议标签交换协议 MPLS 网络或者 IP隧道, 所述第一路径回复消息包括所述第一通信节点的信息; 以 及接收所述第一通信节点发送的代理检测返回消息, 所述代理检测返回消息 包括所述第二网络中位于所述路径检测发起节点与所述路径检测终止节点之 间路径上的其它节点的信息;
处理单元, 用于将所述第二网络中位于所述路径检测发起节点与所述路 径检测终止节点之间路径上的其它节点的信息锁定于所述第一通信节点的信 息之后。
在第四方面的第一种可能的实现方式中, 所述接收单元接收的所述第一 路径回复消息还包括代理检测等待信息; 或者,
所述接收单元还用于在接收所述第一通信节点发送的第一路径回复消息 之后, 接收所述第一通信节点发送的代理检测等待消息, 所述代理检测等待 消息包括代理检测等待信息;
其中, 所述代理检测等待信息用于指示: 所述第二通信节点未接收到所 述第一通信节点发送的所述第二网络中位于所述路径检测发起节点与所述路 径检测终止节点之间路径上的其它节点的信息之前保持路径检测状态以及所 述第二通信节点将所述第二网络中位于所述路径检测发起节点与所述路径检 测终止节点之间路径上的其它节点的信息锁定于所述第一通信节点的信息之 后;
所述处理单元具体用于: 根据所述代理检测等待信息, 将所述第二网络 中位于所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节 点的信息锁定于所述第一通信节点的信息之后。
结合第四方面的第一种可能的实现方式, 在第四方面的第二种可能的实 现方式中, 所述处理单元还用于在将所述第二网络中位于所述路径检测发起 节点与所述路径检测终止节点之间路径上的其它节点的信息锁定于所述第一 通信节点的信息之后, 当确定所述接收单元已接收到所述路径检测终止节点 发送的路径回复消息时, 或者, 当确定所述接收单元在预设时间内未接收到 路径回复消息时, 根据所述代理检测等待信息, 停止路径检测。
结合第四方面或第四方面的第一种可能的实现方式或第四方面的第二种 可能的实现方式, 在第四方面的第三种可能的实现方式中, 所述发送单元具 体用于: 所述第二通信节点作为路径检测发起节点时, 根据所述路径检测终 止节点的 IP地址, 通过第一网络向所述路径检测终止节点至少发送三次路径 检测消息, 所述路径检测消息包括第一生存时间 TTL; 其中, 第一次发送的 所述路径检测消息中包括的所述第一 TTL为 1, 每次发送的所述路径检测消 息中包括的所述第一 TTL按照间隔 TTL为 1递增。
结合第四方面的第三种可能的实现方式, 在第四方面的第四种可能的实 现方式中, 所述发送单元发送的所述路径检测消息为互联网控制消息协议 ICMP消息或者 ICMPv6消息或者空的传输控制协议 TCP包或者空的用户数 据协议 UDP包。
结合第四方面的第三种可能的实现方式, 在第四方面的第五种可能的实 现方式中, 所述发送单元发送的所述路径检测消息为 TCP包或者 UDP包, 所述 TCP包或者所述 UDP包中包括校验值, 所述校验值的检测结果为失败。
结合第四方面或第四方面的第一种可能的实现方式或第四方面的第二种 可能的实现方式, 在第四方面的第六种可能的实现方式中, 所述发送单元具 体用于: 当所述第二通信节点作为路径检测发起节点时, 根据所述路径检测 终止节点的 IP地址, 通过第一网络一次向所述路径检测终止节点发送包括路 径检测选项的 IP包, 所述路径检测选项用于指示所述第二通信节点正进行路 第五方面, 本发明实施例还提供一种通信节点, 所述通信节点作为第一 通信节点, 包括:
接收器, 用于接收第二通信节点作为路径检测发起节点通过第一网络发 送的第一路径检测消息, 所述第一路径检测消息用于指示所述第一通信节点 被所述第二通信节点进行路径检测, 所述第一路径检测消息包括路径检测终 止节点的互联网协议 IP地址, 所述第一通信节点为第二网络的首节点, 所述 第一网络为 IP网络, 所述第二网络为多协议标签交换协议 MPLS网络或者 IP隧道;
发送器, 用于向所述第二通信节点发送第一路径回复消息, 所述路径回 复消息包括所述第一通信节点的信息;
处理器, 用于所述第一通信节点作为代理路径检测发起节点时, 获取所 述第二网络中位于所述路径检测发起节点与所述路径检测终止节点之间路径 上的其它节点的信息;
所述发送器还用于向所述第二通信节点发送代理检测返回消息, 所述代 理检测返回消息包括所述第二网络中位于所述路径检测发起节点与所述路径 检测终止节点之间路径上的其它节点的信息。
在第五方面的第一种可能的实现方式中, 所述发送器发送的所述第一路 径回复消息还包括代理检测等待信息; 或者,
所述发送器还用于在向所述第二通信节点发送第一路径回复消息之前, 向所述第二通信节点发送代理检测等待消息, 所述代理检测等待消息包括代 理检测等待信息;
其中, 所述代理检测等待信息用于指示: 所述第二通信节点未接收到所 述第一通信节点发送的所述第二网络中位于所述路径检测发起节点与所述路 径检测终止节点之间路径上的其它节点的信息之前保持路径检测状态以及所 述第二通信节点将所述第二网络中位于所述路径检测发起节点与所述路径检 测终止节点之间路径上的其它节点的信息锁定于所述第一通信节点的信息之 后。
结合第五方面或第五方面的第一种可能的实现方式, 在第五方面的第二 种可能的实现方式中, 所述接收器接收到的所述第一路径检测消息包括值为
1的第一生存时间 TTL, 所述第一 TTL为 1用于指示所述第一通信节点被所 述第二通信节点进行路径检测。
结合第五方面的第二种可能的实现方式, 在第五方面的第三种可能的实 现方式中, 所述接收器接收的所述第一路径检测消息为互联网控制消息协议 ICMP消息或者 ICMPv6消息或者空的传输控制协议 TCP包或者空的用户数 据协议 UDP包。
结合第五方面的第二种可能的实现方式, 在第五方面的第四种可能的实 现方式中, 所述接收器接收的所述第一路径检测消息为 TCP包或者 UDP包; 所述处理器还用于在所述发送器向所述第二通信节点发送路径回复消息 之前, 根据所述 TCP包或者所述 UDP包中的校验值, 确定所述校验值检测 为失败。
结合第五方面或第五方面的第一种可能的实现方式, 在第五方面的第五 种可能的实现方式中, 所述接收器接收的所述第一路径检测消息为包括路径 检测选项的 IP包,所述路径检测选项用于指示所述第一通信节点被所述第二 通信节点进行路径检测。
结合第五方面或第五方面的第一种至第五种实现方式中的任一种可能的 实现方式, 在第五方面的第六种可能的实现方式中, 所述处理器, 还用于在 获取所述第二网络中位于所述路径检测发起节点与所述路径检测终止节点之 间路径上的其它节点的信息之前, 将所述第一路径检测消息中的源 IP地址由 所述第二通信节点的 IP地址更换为所述第一通信节点的 IP地址, 获得第二 路径检测消息; 以及根据所述第二网络的协议, 将所述第二路径检测消息进 行封装, 获得封装后的所述第二路径检测消息, 所述封装后的第二路径检测 消息包括第二 TTL;
所述发送器还用于根据所述封装后的第二路径检测消息中目的 IP地址, 至少两次向所述第二网络中位于所述路径检测发起节点与所述路径检测终止 节点之间路径上的其它节点发送所述封装后的第二路径检测消息; 其中, 第 一次发送的所述封装后的第二路径检测消息中包括的所述第二 TTL为 1, 每 次发送的所述封装后的第二路径检测消息中包括的所述第二 TTL 按照间隔 TTL为 1递增; 所述接收器还用于接收所述第二网络中位于所述路径检测发起节点与所 述路径检测终止节点之间路径上的其它节点发送的第二路径检测回复消息; 所述处理器获取所述第二网络中位于所述路径检测发起节点与所述路径 检测终止节点之间路径上的其它节点的信息, 具体为: 所述处理器根据所述 第二网络中位于所述路径检测发起节点与所述路径检测终止节点之间路径上 的其它节点发送的所述第二路径检测回复消息, 获取所述第二网络中位于所 述路径检测发起节点与所述路径检测终止节点之间路径上的其它节点的信 息。
结合第五方面的第六种可能的实现方式, 在第五方面的第七种可能的实 现方式中, 所述发送器还用于, 当所述接收器至少两次接收到所述第二网络 中同一节点发送的所述第二路径检测回复消息时, 或者, 当所述接收器在预 设时间内未收到所述第二路径检测回复消息时, 停止发送所述第二路径检测 消息。
第六方面, 本发明实施例还提供一种通信节点, 所述通信节点作为第二 通信节点, 包括:
发送器, 用于所述第二通信节点作为路径检测发起节点时, 根据路径检 测终止节点的互联网协议 IP地址, 通过第一网络向所述路径检测终止节点发 送路径检测消息, 所述第一网络为互联网协议 IP网络, 所述第一路径检测消 息用于指示所述第一通信节点正进行路径检测;
接收器, 用于接收第一通信节点发送的第一路径回复消息, 所述第一通 信节点为第二网络的首节点,所述第二网络为多协议标签交换协议 MPLS网 络或者 IP隧道, 所述第一路径回复消息包括所述第一通信节点的信息; 以及 接收所述第一通信节点发送的代理检测返回消息, 所述代理检测返回消息包 括所述第二网络中位于所述路径检测发起节点与所述路径检测终止节点之间 路径上的其它节点的信息;
处理器, 用于将所述第二网络中位于所述路径检测发起节点与所述路径 检测终止节点之间路径上的其它节点的信息锁定于所述第一通信节点的信息 之后。
在第六方面的第一种可能的实现方式中, 所述接收器接收的所述第一路 径回复消息还包括代理检测等待信息; 或者, 所述接收器还用于在接收所述第一通信节点发送的第一路径回复消息之 后, 接收所述第一通信节点发送的代理检测等待消息, 所述代理检测等待消 息包括代理检测等待信息;
其中, 所述代理检测等待信息用于指示: 所述第二通信节点未接收到所 述第一通信节点发送的所述第二网络中位于所述路径检测发起节点与所述路 径检测终止节点之间路径上的其它节点的信息之前保持路径检测状态以及所 述第二通信节点将所述第二网络中位于所述路径检测发起节点与所述路径检 测终止节点之间路径上的其它节点的信息锁定于所述第一通信节点的信息之 后;
所述处理器具体用于: 根据所述代理检测等待信息, 将所述第二网络中 位于所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节点 的信息锁定于所述第一通信节点的信息之后。
结合第六方面的第一种可能的实现方式, 在第六方面的第二种可能的实 现方式中, 所述处理器还用于在将所述第二网络中位于所述路径检测发起节 点与所述路径检测终止节点之间路径上的其它节点的信息锁定于所述第一通 信节点的信息之后, 当确定所述接收器已接收到所述路径检测终止节点发送 的路径回复消息时, 或者, 当确定所述接收器在预设时间内未接收到路径回 复消息时, 根据所述代理检测等待信息, 停止路径检测。
结合第六方面或第六方面的第一种可能的实现方式或第六方面的第二种 可能的实现方式, 在第六方面的第三种可能的实现方式中, 所述发送器具体 用于: 所述第二通信节点作为路径检测发起节点时, 根据所述路径检测终止 节点的 IP地址, 通过第一网络向所述路径检测终止节点至少发送三次路径检 测消息, 所述路径检测消息包括第一生存时间 TTL; 其中, 第一次发送的所 述路径检测消息中包括的所述第一 TTL为 1, 每次发送的所述路径检测消息 中包括的所述第一 TTL按照间隔 TTL为 1递增。
结合第六方面的第三种可能的实现方式, 在第六方面的第四种可能的实 现方式中,所述发送器发送的所述路径检测消息为互联网控制消息协议 ICMP 消息或者 ICMPv6消息或者空的传输控制协议 TCP包或者空的用户数据协议 UDP包。
结合第六方面的第三种可能的实现方式, 在第六方面的第五种可能的实 现方式中, 所述发送器发送的所述路径检测消息为 TCP包或者 UDP包, 所 述 TCP包或者所述 UDP包中包括校验值, 所述校验值的检测结果为失败。
结合第六方面或第六方面的第一种可能的实现方式或第六方面的第二种 可能的实现方式, 在第六方面的第六种可能的实现方式中, 所述发送器具体 用于: 当所述第二通信节点作为路径检测发起节点时, 根据所述路径检测终 止节点的 IP地址, 通过第一网络一次向所述路径检测终止节点发送包括路径 检测选项的 IP包, 所述路径检测选项用于指示所述第二通信节点正进行路径 r 本发明实施例提供的路径检测方法和通信节点, 当第一通信节点确定其 被作为路径检测发起节点的第二通信节点进行路径检测时, 通过第一通信节 点向第二通信节点发送第一通信节点的信息, 并且第一通信节点作为代理路 径检测发起节点, 获取所述第二网络中路径检测发起节点到路径检测终止节 点的路径上的其它节点的信息, 再向所述第二通信节点发送所述第二网络中 路径检测发起节点到路径检测终止节点的路径上的其它节点的信息。 从而实 现第一网络中的第二通信节点可以获取第二网络中路径检测发起节点到路径 检测终止节点的路径上的各节点的信息, 解决了现有技术中的问题。 附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作一简单地介绍, 显而易见地, 下 面描述中的附图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在 不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。
图 1为现有技术路径检测方法的一种应用场景图;
图 2为本发明路径检测方法的第一种应用场景图;
图 3为本发明路径检测方法实施例一的流程图;
图 4为本发明路径检测方法实施例二的流程图;
图 5为本发明路径检测方法实施例三的流程图;
图 6为本发明路径检测方法实施例四的流程图;
图 7为本发明路径检测方法的第二种应用场景图;
图 8为本发明路径检测方法实施例五的流程图; 图 9为本发明路径检测方法实施例六的流程图;
图 10为本发明通信节点实施例一的结构示意图;
图 11为本发明通信节点实施例二的结构示意图;
图 12为本发明通信节点实施例三的结构示意图;
图 13为本发明通信节点实施例四的结构示意图。 具体实施方式 为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本发 明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于 本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提下所获 得的所有其他实施例, 都属于本发明保护的范围。
图 2为本发明路径检测方法的第一种应用场景图, 如图 2所示, 第二通 信节点位于第一网络, 第四通信节点位于第三网络, 第一通信节点和第三通 信节点位于第二网络。 所述第一网络和所述第三网络可以为 IP网络, 第二网 络节点可以作为路径检测发起节点, 第四通信节点作为路径检测终止节点, 所述第二通信节点可以发起检测所述第二通信节点与所述第四通信节点之间 的路径, 即可以检测所述第二通信节点向所述第四通信节点发送的 IP数据包 经过的节点。 其中, 所述第二通信节点向所述第四通信节点发送的 IP数据包 经过所述第二网络, 所述第二网络的传输方式不同于所述第一网络和所述第 三网络的传输方式, 比如所述第二网络可以为 MPLS网络或者 IP隧道, 在所 述第二网络节点与所述第四通信节点之间的路径上, 所述第一通信节点为所 述第二网络的首节点, 所述第三通信节点为所述第二网络的尾节点。 需要说 明的是, 所述第二通信节点与所述第一通信节点之间可以存在任意数量的通 信节点, 所述第一通信节点与所述第三通信节点之间可以存在任意数量的通 信节点, 所述第三通信节点与所述第四通信节点之间可以存在任意数量的通 信节点。
基于图 2所示的网络架构, 图 3为本发明路径检测方法实施例一的流程 图, 如图 3所示, 本实施例的方法可以包括:
S10 该第一通信节点接收该第二通信节点作为路径检测发起节点、 该 第四通信节点作为路径检测终止节点发送的第一路径检测消息。 所述第一路 径检测消息用于指示所述第一通信节点被所述第二通信节点进行路径检测。 所述第一路径检测消息包括作为路径检测终止节点的第四通信节点的 IP地 址。 所述第一通信节点为该第二网络的首节点, 所述第一网络为 IP网络, 所 述第二网络为 MPLS网络或者 IP隧道。 该第四通信节点位于第三网络, 该第 三网络与该第二网络异构。
本实施例中, 该第一通信节点可以从该第一通信节点的上游节点通过第 一网络接收该第一路径检测消息。 该第一网络为 IP网络, 该第一路径检测消 息的源 IP地址为路径检测发起节点的 IP地址(即该第二通信节点的 IP地址), 该第一路径检测消息的目的 IP地址为路径检测终止节点的 IP地址 (即该第 四通信节点的 IP地址) 。 该第一通信节点根据该第一路径检测消息的源 IP 地址可以确定该第一通信节点被作为路径检测发起节点的该第二通信节点进 行路径检测, 即该第二通信节点需要获取该第一通信节点的信息, 该第一通 信节点的信息包括该第一通信节点的 IP地址。 可选地, 该第一路径检测消息 中还可以包括路径检测的附带要求, 该附带要求可以是要求该第一路径检测 消息的接收方提供带宽、 拥塞程度中的一个或多个。 当该第一路径检测消息 中包括要求该第一路径检测消息的接收方提供带宽和拥塞程度的附带信息 时, 该第一通信节点的信息还包括该第一通信节点的带宽和该第一通信节点 的拥塞程度。 本实施例并不以此为限。 其中, 该第一通信节点为该第二网络 的首节点, gP, 该第一通信节点为该第二网络在该第二通信节点到路径检测 终止节点的路径方向上的首节点, 该第二网络为 MPLS网络或者 IP隧道。
5102、 所述第一通信节点向所述第二通信节点发送第一路径回复消息, 所述第一路径回复消息包括所述第一通信节点的信息。
本实施例中, 该第一通信节点确定该第一通信节点被第二通信节点进行 路径检测, 则该第一通信节点将该第一通信节点的信息携带在该第一路径回 复消息中发送给该第二通信节点。
5103、 所述第一通信节点作为代理路径检测发起节点, 获取所述第二网 络中位于所述路径检测发起节点与路径检测终止节点之间路径上的其他节点 的信息。
本实施例中, 该第一通信节点作为代理路径检测发起节点, 可以对同样 处于该第二网络中位于所述路径检测发起节点与所述路径检测终止节点之间 路径上的其它节点进行路径检测, 从而可以获取位于该第二通信节点与所述 路径检测终止节点之间的路径上的第二网络中其它节点的信息。
S104、 所述第一通信节点向所述第二通信节点发送代理检测返回消息, 所述代理检测返回消息包括所述第二网络中位于所述路径检测发起节点与所 述路径检测终止节点之间路径上的其它节点的信息。
本实施例中, 该第一通信节点在获取所述第二网络中位于所述路径检测 发起节点与所述路径检测终止节点之间路径上的其它节点的信息之后, 将该 第二网络中其它节点的信息携带在代理检测返回消息中发送给该第二通信节 点, 从而该第二通信节点可以从该代理检测返回消息中获取所述第二网络中 位于所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节点 的信息, 并将该第二网络中位于所述路径检测发起节点与所述路径检测终止 节点之间路径上的其它节点的信息锁定于第一通信节点的信息之后。
在第一种可选的实现方式中, 由于该第二通信节点之前已接收到该第一 通信节点发送的第一路径回复消息, 那么在该第二通信节点接收到该第一通 信节点发送的该代理检测返回消息时, 可以将该第二通信节点接收到的由该 第一通信节点发送的该代理检测返回消息中包括的该第二网络中位于所述路 径检测发起节点与所述路径检测终止节点之间路径上的信息锁定于该第一通 信节点的信息之后。
在第二种可选的实现方式中, 该第一通信节点发送给该第二通信节点的 该第一路径回复消息还包括代理检测等待信息。
在第三种可选的实现方式中, 该第一通信节点向该第二通信节点发送第 一路径回复消息之后, 还向该第二通信节点发送代理检测等待消息, 该代理 检测等待消息中包括代理检测等待信息。
该代理检测等待信息用于指示:
( 1 )该第一通信节点作为代理路径检测发起节点获取所述第二网络中位 于所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节点的 I Ή自、,
(2)所述第二通信节点未接收到所述第一通信节点发送的所述第二网络 中位于所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节 点的信息之前保持路径检测状态, 以及
(3 )所述第二通信节点将所述第二网络中位于所述路径检测发起节点与 所述路径检测终止节点之间路径上的其它节点的信息锁定于所述第一通信节 点的信息之后。
本实施例中, 该第二通信节点可以根据该代理检测等待信息获知该第一 通信节点作为代理检测节点去检测该第二通信节点到该路径检测终止节点所 经过的位于该第二网络中其他节点的信息。 现有技术中, 路径检测发起节点 在获取到路径检测终止节点的信息或者在预设时间内未接收到路径回复消息 后, 将终止路径检测过程, 而在本发明实施例中, 该第一通信节点将作为代 理检测节点去发起该第二网络中该第二通信节点到该路径检测终止节点之间 的路径检测, 有可能存在该第一通信节点在未向该第二通信节点发送代理检 测返回消息之前, 该第二通信节点已接收到路径检测终止节点的信息, 或者, 该第二通信节点在预设时间内未接收到其它通信节点 (除第一通信节点之外 的通信节点) 返回的路径回复消息, 因此, 为了保证该第二通信节点能够将 代理检测返回消息中的第二网络中该第二通信节点到该路径检测终止节点之 间的路径上的其它节点的信息作为该第二通信节点发起的路径检测的结果的 一部分, 则代理检测等待信息中需要指示该第二通信节点在未接收到该第一 通信节点发送的第二网络中该第二通信节点到该路径检测终止节点之间的路 径上的其它节点的信息之前保持路径检测状态。 现有技术中, 路径检测的结 果, 是该第二通信节点接照接收到的各节点的信息的前后顺序进行排序的, 而在本发明实施例中, 该第二通信节点可能在接收到该第二网络中其它节点 的信息之前已接收到该第二网络中该第二通信节点到该路径检测终止节点之 间的路径上的尾节点或该尾节点之后的节点发送的信息, 而且该第二网络中 该第二通信节点到该路径检测终止节点之间的路径上的其它节点与该第一通 信节点相邻并且位于该第一通信节点之后, 为了保证第二网络中该第二通信 节点到该路径检测终止节点之间的路径上的其它节点的信息位于路径检测的 结果中该第一通信节点的信息之后的位置, 该代理检测等待信息还需要指示 该第二网络中该第二通信节点到该路径检测终止节点之间的路径上的其它节 点的信息需要被锁定于所述第一通信节点的信息之后, 从而可以保证路径检 测结果中, 各该第二通信节点到该路径检测终止节点之间的路径上的节点的 信息的顺序与各节点在该第二通信节点到该路径检测终止节点的路径上的顺 序一致。
本实施例中, 当该第一通信节点确定该第一通信节点被作为路径检测发 起节点的第二通信节点进行路径检测时, 该第一通信节点向该第二通信节点 发送该第一通信节点的信息, 并且该第一通信节点作为代理路径检测发起节 点, 获取所述第二网络中该第二通信节点到该路径检测终止节点的路径上的 其它节点的信息, 再向所述第二通信节点发送所述第二网络中该第二通信节 点到该路径检测终止节点的路径上的其它节点的信息。 从而实现该第一网络 中的该第二通信节点可以获取该第二网络中各节点的信息。
基于图 2所示的网络架构, 图 4为本发明路径检测方法实施例二的流程 图, 如图 4所示, 本实施例的方法可以包括:
S20 该第二通信节点作为路径检测发起节点, 根据作为路径检测终止 节点的该第四通信节点的 IP地址, 向所述路径检测终止节点发送路径检测消 息, 所述第一网络为 IP网络, 所述路径检测消息用于指示所述第一通信节点 正进行路径检测。
本实施例中, 该第二通信节点 (处于第一网络) 需要检测与该第四通信 节点 (处于第三网络) 之间的路径时, 该第二通信节点就可以作为路径检测 发起节点, 将该第四通信节点作为路径检测终止节点, 根据该第四通信节点 的 IP地址, 向该路径检测终止节点发送路径检测消息, 该路径检测消息中的 源 IP地址为路径检测发起节点的 IP地址 (即该第二通信节点的 IP地址) 、 目的 IP地址为路径检测终止节点的 IP地址(即该第四通信节点的 IP地址), 该路径检测消息在到达路径检测终止节点之前, 需要经过该第二通信节点与 该第四通信节点之间路径上的各节点, 该第二通信节点与该第四通信节点之 间路径上的各节点均会接收到该第二通信节点发送的路径检测消息。
S202、所述第二通信节点接收该第一通信节点发送的第一路径回复消息, 所述第一通信节点为第二网络的首节点, 所述第二网络为 MPLS网络或者 IP 隧道, 所述第一路径回复消息包括所述第一通信节点的信息。
本实施例中, 该第二通信节点与该第四通信节点之间的路径上存在第二 网络, 那么第二通信节点发送的路径检测消息会经过第二网络, 该第二网络 为 MPLS网络或 IP隧道, 当第二网络的首节点(即该第一通信节点)接收到 该路径检测消息, 获知该第二通信节点正进行路径检测, 那么该第一通信节 点会将该第一通信节点的信息携带在第一路径回复消息中发送给该第二通信 节点,从而该第二通信节点接收到该第一通信节点发送的第一路径回复消息, 获取该第一通信节点的信息。
S203、 所述第二通信节点接收所述第一通信节点发送的代理检测返回消 息, 所述代理检测返回消息包括所述第二网络位于所述路径检测发起节点与 路径检测终止节点之间路径上的其它节点的信息。
本实施例中, 当该第一通信节点获知该第二通信节点正进行路径检测, 并且该第二通信节点与路径检测终止节点 (即第四通信节点) 之间的路径经 过该第一通信节点所在的第二网络, 那么该第一通信节点可以作为代理路径 检测发起节点, 对位于路径检测发起节点 (即该第二通信节点) 与路径检测 终止节点 (即该第四通信节点) 之间的路径上并且同样处于第二网络中其它 节点进行路径检测, 从而可以获取位于该第二通信节点与该第四通信节点之 间的路径上的第二网络中其它节点的信息, 然后该第一通信节点将该第二网 络中其它节点的信息携带在代理检测返回消息中发送给该第二通信节点, 从 而该第二通信节点可以接收该第一通信节点发送的代理检测返回消息, 并从 该代理检测返回消息中获取第二网络中位于该第一通信节点与该第四通信节 点之间路径上的其它节点的信息。
S204、 所述第二通信节点将所述第二网络中位于所述路径检测发起节点 与所述路径检测终止节点之间路径上的其它节点的信息锁定于所述第一通信 节点的信息之后。
本实施例中, 由于该第一通信节点为该第二通信节点到路径检测终止节 点 (即该第四通信节点) 的路径上第二网络的首节点, 该第二通信节点可以 将代理检测返回消息中包括的第二网络中位于所述路径检测发起节点与所述 路径检测终止节点之间路径上的其它节点的信息锁定于该第一通信节点的信 息之后。
在第一种可选的实现方式中, 由于该第二通信节点之前已接收到该第一 通信节点发送的第一路径回复消息, 那么该第二通信节点接收到该第一通信 节点发送的该代理检测返回消息时, 可以将该代理检测返回消息中包括的该 第二网络中位于所述路径检测发起节点与所述路径检测终止节点之间路径上 的信息锁定于该第一通信节点的信息之后。
在第二种可选的实现方式中, 该第二通信节点接收该第一通信节点发送 的该第一路径回复消息还包括代理检测等待信息。
在第三种可选的实现方式中, 该第二通信节点接收该第一通信节点发送 的第一路径回复消息之后,还接收该第一通信节点发送的代理检测等待消息, 该代理检测等待消息中包括代理检测等待信息。
该代理检测等待信息用于指示:
( 1 )该第一通信节点作为代理路径检测发起节点获取所述第二网络中位 于所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节点的 信息,
(2)所述第二通信节点未接收到所述第一通信节点发送的所述第二网络 中位于所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节 点的信息之前保持路径检测状态, 以及
(3 )所述第二通信节点将所述第二网络中位于所述路径检测发起节点与 所述路径检测终止节点之间路径上的其它节点的信息锁定于所述第一通信节 点的信息之后。
本实施例中, 该第二通信节点可以根据该代理检测等待信息获知该第一 通信节点作为代理检测节点去检测该第二通信节点与该路径检测终止节点 (即该第四通信节点)之间位于该第二网络中其它节点的信息。现有技术中, 路径检测发起节点在获取到路径检测终止节点的信息或者在预设时间内未接 收到路径回复消息后, 将终止路径检测过程, 而在本发明实施例中, 该第一 通信节点将作为代理路径检测发起节点去发起该第二网络中该第二通信节点 到该路径检测终止节点之间的路径检测, 有可能存在该第一通信节点在未向 第二通信节点发送代理检测返回消息之前, 该第二通信节点已接收到路径检 测终止节点的信息, 或者, 该第二通信节点在预设时间内未接收到其它通信 节点 (除第一通信节点之外的通信节点) 返回的路径回复消息, 因此, 为了 保证该第二通信节点能够将代理检测返回消息中的第二网络中该第二通信节 点到该路径检测终止节点之间的路径上的其它节点的信息作为该第二通信节 点发起的路径检测的结果的一部分, 则代理检测等待信息中需要指示该第二 通信节点在未接收到该第一通信节点发送的第二网络中该第二通信节点到该 路径检测终止节点之间的路径上的其它节点的信息之前保持路径检测状态, 因此该第二通信节点在未接收到该第一通信节点发送的代理检测返回消息之 前保持路径检测状态。 现有技术中, 路径检测的结果, 是该第二通信节点接 照接收到的各节点的信息的前后顺序进行排序的, 而在本发明实施例中, 该 第二通信节点可能在接收到该第二网络中其它节点的信息之前, 已接收到该 第二网络中该第二通信节点到该路径检测终止节点之间的路径上的尾节点或 该尾节点之后的节点发送的信息, 而且该第二网络中该第二通信节点到该路 径检测终止节点之间的路径上的其它节点与该第一通信节点相邻并且位于该 第一通信节点之后, 为了保证第二网络中该第二通信节点到该路径检测终止 节点之间的路径上的其它节点的信息位于路径检测结果中该第一通信节点的 信息之后的位置, 该代理检测等待信息还需要指示将所述第二网络中该第二 通信节点到该路径检测终止节点之间的路径上的其它节点的信息锁定于所述 第一通信节点的信息之后, 该第二通信节点在接收到该第一通信节点发送的 代理检测返回消息后, 根据该代理检测等待信息将第二网络中该第二通信节 点到该路径检测终止节点之间的路径上的其它节点的信息锁定第一通信节点 的信息之后, 并且第一通信节点的信息在路径检测的结果中的位置与第二网 络中该第二通信节点到该路径检测终止节点之间的路径上的其它节点的信息 在路径检测的结果中的位置相邻。 从而可以保证路径检测结果中, 各该第二 通信节点到该路径检测终止节点之间的路径上的节点的信息的顺序与各节点 在该第二通信节点到该路径检测终止节点的路径上的顺序一致。
在所述第二通信节点将所述第二网络中该第二通信节点到该路径检测终 止节点之间的路径上的其它节点的信息锁定于所述第一通信节点的信息之 后, 当该第二通信节点确定已接收到路径检测终止节点发送的路径回复消息 时, 或者, 当所述第二通信节点确定在预设时间内未接收到其它通信节点发 送的路径回复消息, 所述第二通信节点根据所述代理检测等待信息, 停止路 径检测。 其中, 该第二通信节点确定已接收到路径检测终止节点发送的路径 回复消息, 例如为: 该第二通信节点可以在获取该第二网络中其它节点的信 息之前或者之后, 接收到该路径检测终止节点发送的路径回复消息。 其中, 该第二通信节点确定在预设时间内未接收到其它通信节点发送的路径回复消 息, 例如为: 第二通信节点可以在获取第二网络中其它节点的信息之后或者 之前, 在预设时间内未接收到其它通信节点发送的路径回复消息。
本实施例, 通过该第二通信节点作为路径检测发起节点, 根据路径检测 终止节点的 IP地址, 通过第一网络向所述路径检测终止节点发送路径检测消 息, 接收第二网络的首节点发送的路径回复消息, 然后该首节点作为代理路 径检测发起节点获取该第二网络中该第二通信节点到该路径检测终止节点的 路径上的其它节点的信息, 该第二通信节点再接收该首节点发送的该第二网 络中该第二通信节点到该路径检测终止节点的路径上的其它节点的信息。 从 而实现该第一网络中的该第二通信节点可以获取该第二网络中其它节点的信 息。
基于图 2所示的网络架构, 图 5为本发明路径检测方法实施例三的流程 图, 如图 5所示, 本实施例的方法可以包括:
S301、 该第二通信节点作为路径检测发起节点, 根据作为路径检测终止 节点的该第四通信节点的 IP地址, 向所述路径检测终止节点至少发送三次路 径检测消息, 所述路径检测消息包括第一 TTL; 其中, 第一次发送的所述路 径检测消息中包括的第一 TTL为 1, 每次发送的所述路径检测消息中包括的 该第一 TTL按照间隔 TTL为 1递增。
本实施例中, 若该第二通信节点作为路径检测发起节点需要获取与路径 检测终止节点 (即该第四通信节点) 之间的路径信息, 则第二通信节点可以 根据目的 IP为路径检测终止节点的 IP地址, 向该路径检测终止节点至少发 送三次路径检测消息, 该路径检测消息包括第一 TTL, 第一 TTL为 IP包头 的 TTL, 其中, 第一 TTL的值在该路径检测消息的传递过程中是不断递减变 化的: 每经过处于第一网络或第三网络中的通信节点, 该第一 TLL的值就减 1。而且作为路径检测发起点的该第二通信节点每次发出的路径检测消息中第 一 TTL的值是不断递增变化的。
若该第二通信节点的下游节点为该第一通信节点 (为第二网络的首节 点) , 该第一通信节点的下游节点为该第二网络的尾节点, 该第二网络的尾 节点的下游节点为路径检测终止节点 (即该第四通信节点) , 这时, 该第二 通信节点要获取与该路径检测终止节点之间的路径信息, 该第二通信节点需 要发送至少三次携带有目的 IP地址为路径检测终止节点的 IP地址的路径检 测消息。 第一次该第二通信节点发送的路径检测消息包括的第一 TTL为 1, 那么该第一通信节点接收到该第二通信节点发送的路径检测消息包括的第一
TTL为 1, 该第一 TTL为 1可以指示第二通信节点对第一通信节点进行路径 检测, 这是由于该第一通信节点接收路径检测消息, 根据该路径检测消息中 包括的该第一 TTL, 将该第一 TTL减 1得 0, 该第一通信节点可以根据第一 TTL相减 1后得 0确定该第二通信节点对该第一通信节点进行路径检测, 该 路径检测消息在该第一通信节点处终止, 然后该第一通信节点将该第一通信 节点的信息携带在第一路径回复消息中发送给该第二通信节点。 第二次该第 二通信节点发送的路径检测消息中包括的第一 TTL为 2, 第三次该第二通信 节点发送的路径检测消息中包括的第一 TTL为 3。 需要说明的是, 该第二通 信节点与该第一通信节点之间可以存在任意数量的节点, 该第一通信节点与 该第二网络的尾节点之间存在任意数量的节点, 该第二网络的尾节点与该路 径检测终止节点之间存在任意数量的节点, 因此, 该第二通信节点至少三次 发送路径检测消息, 具体的发送次数与该第二通信节点和该路径检测终止节 点之间的节点数量有关。
在第一种可选的实现方式中, 该路径检测消息可以为包括第一 TTL的
ICMP消息或者 ICMPv6消息,以使处于该第二通信节点与该第四通信节点之 间的路径上的各节点在接收到包括第一 TTL为 1的 ICMP消息或 ICMPv6消 息确定各该节点被该第二通信节点路径检测。
在第二种可选的实现方式中, 该路径检测消息可以为包括第一 TTL的空 TCP包或者包括第一 TTL的 UDP包, 以使处于该第二通信节点与该第四通 信节点之间的路径上的各节点在接收到包括第一 TTL为 1的空 TCP包或者空 UDP包, 确定各该节点被该第二通信节点路径检测。
在第三种可选的实现方式中, 该路径检测消息可以为包括第一 TTL的 UDP包或者包括第一 TTL的 TCP包, 并且该 UDP包或者该 TCP包中包括 校验值 (checksum) , 并且该校验值的检测结果为失败, 以使处于该第二通 信节点与该第四通信节点之间的路径上的各节点在接收到包括第一 TTL为 1 的 TCP包或者 UDP包时, 对该 TCP包或者该 UDP包中的校验值进行检测, 确定该校验值检测结果为失败时, 即可确定各该节点被第二通信节点路径检 S302、 该第一通信节点接收该第二通信节点作为路径检测发起节点发送 的包括值为 1的第一 TTL的第一路径检测消息。
本实施例中, 该第一通信节点可以接收该第二通信节点发送的路径检测 消息, 若该路径检测消息中包括值为 1的第一 TTL时, 可以将该路径检测消 息称为第一路径检测消息。 该第一通信节点将值为 1的第一 TTL减去 1, 得 到 0, 此时该第一通信节点可以根据相减后得 0确定该第一通信节点被该第 二通信节点进行路径检测。
在第一种可选的实现方式中, 该第一通信节点接收到该第二通信节点发 送的包括值为 1的第一 TTL的 ICMP消息或者 ICMPv6消息时, 该第一通信 节点可以确定该第一通信节点被该第二通信节点路径检测。
在第二种可选的实现方式中, 该第一通信节点接收到该第二通信节点发 送的包括值为 1的第一 TTL的空 TCP包或者包括值为 1的第一 TTL的空 UDP 包时,该第一通信节点可以确定该第一通信节点被该第二通信节点路径检测。
在第三种可选的实现方式中, 该第一通信节点接收到该第二通信节点发 送的包括值为 1的第一 TTL的 TCP包或者包括值为 1的第一 TTL的 UDP包 时, 并且该第一通信节点根据该 TCP包或者该 UDP包中的校验值, 确定该 校检值的检测结果为失败时, 该第一通信节点可以确定该第一通信节点被该 第二通信节点路径检测。
S303、 所述第一通信节点向所述第二通信节点发送第一路径回复消息, 所述第一路径回复消息包括所述第一通信节点的信息。
本实施例中, 该第一通信节点根据该第一路径检测消息, 确定该第一通 信节点被该第二通信节点路径检测后, 该第一通信节点将该第一通信节点的 信息携带在第一路径回复消息中发送给该第二通信节点。 相应地, 该第二通 信节点接收该第一通信节点发送的该第一路径回复消息, 并从该第一路径回 复消息中获取该第一通信节点的信息。
S304、 所述第一通信节点向所述第二通信节点发送代理检测等待消息, 所述代理检测等待消息包括代理检测等待信息。
本实施例中, 该第一通信节点还可以向该第二通信节点发送代理检测等 待消息, 该代理检测等待消息包括代理检测等待信息, 该代理检测等待信息 用于指示:
( 1 )该第一通信节点作为代理路径检测发起节点获取所述第二网络中位 于所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节点的 I Ή自、,
(2)所述第二通信节点未接收到所述第一通信节点发送的所述第二网络 中位于所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节 点的信息之前保持路径检测状态, 以及
(3 )所述第二通信节点将所述第二网络中位于所述路径检测发起节点与 所述路径检测终止节点之间路径上的其它节点的信息锁定于所述第一通信节 点的信息之后。
相应地, 该第二通信节点接收到该第一通信节点发送的该代理检测等待 消息后, 根据该代理检测等待信息未接收到所述第一通信节点发送的所述第 二网络中位于所述路径检测发起节点与所述路径检测终止节点之间路径上的 其它节点的信息之前保持路径检测状态, 同时在该第一通信节点的信息的位 置之后并且与该第一通信节点的信息相邻的地方预设一个相邻位置, 该相邻 位置用于锁定该第一通信节点获取的第二网络中位于所述路径检测发起节点 与所述路径检测终止节点之间路径上的其它节点的信息。
5305、所述第一通信节点将所述第一路径检测消息中的源 IP地址由所述 第二通信节点的 IP地址更换为所述第一通信节点的 IP地址, 获得第二路径 检测消息。
5306、 所述第一通信节点根据所述第二网络的协议, 将所述第二路径检 测消息进行封装, 获得封装后的第二路径检测消息, 所述封装后的第二路径 检测消息包括第二 TTL。
5307、 所述第一通信节点根据所述封装后的第二路径检测消息中目的 IP 地址, 至少两次向所述第二网络中其它节点发送所述封装后的第二路径检测 消息;其中,第一次发送的所述封装后的第二路径检测消息中包括的第二 TTL 为 1, 每次发送的所述封装后的第二路径检测消息中包括的第二 TTL按照间 TTL 1递增。
5308、 所述第一通信节点接收所述第二网络中其它节点发送的第二路径 检测回复消息。
5309、 所述第一通信节点根据所述第二网络中其它节点发送的所述第二 路径检测回复消息, 获取所述第二网络中位于所述路径检测发起节点与所述 路径检测终止节点之间路径上的其它节点的信息。
本实施例中, 该第一通信节点向该第二通信节点发送代理检测等待消息 之后, 作为代理路径检测发起节点获取该第二网络中位于所述路径检测发起 节点与所述路径检测终止节点之间路径上的其它节点的信息。 具体地, 该第 一通信节点接收到的第一路径检测消息中的源 IP地址为该第二通信节点的 IP 地址, 该第一通信节点需要根据该第一路径检测消息来获取该第二网络中位 于所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节点的 信息, 因此, 该第一通信节点将该第一路径检测消息中的源 IP地址更改为该 第一通信节点的 IP地址, 获得第二路径检测消息, 其中, 该第二路径检测消 息中的源 IP地址为该第一通信节点的 IP地址、 目的 IP地址为上述的路径检 测终止节点的 IP地址, 该第二路径检测消息中还包括第一 TTL。第一通信节 点再根据第二网络的协议, 将第二路径检测消息进行封装, 获得封装后的第 二路径检测消息, 并且该封装后的第二路径检测消息中还包括有第二 TTL, 该第二 TTL为 MPLS标签的 TTL或 IP隧道封装头的 TTL, 因此, 封装后的 第二路径检测消息包括第一 TTL和第二 TTL, 需要说明的是, 该第二 TTL 在所述封装后第二路径检测消息的第二网络的传递过程中会发生变化, 每经 过一跳, 第二 TTL将减 1, 而第一 TTL在传递过程不会变化。 而且作为代理 检测发起点的该第一通信节点每次发出的封装后的第二路径检测消息中第二 TTL的值是不断递增变化的。
若该第一通信节点的下游节点为第二网络的尾节点(即第三通信节点), 这时, 该第一通信节点要获取该第一通信节点与该路径检测终止节点之间的 路径上位于第二网络的其它节点的信息, 该第一通信节点需要发送至少两次 封装后的第二路径检测消息。 第一次该第一通信节点发送的该封装后的第二 路径检测消息包括的第二 TTL为 1, 那么该第二网络的尾节点接收到该第一 通信节点发送的该封装后的第二路径检则消息, 将第二 TTL减 1得 0, 该封 装后的第二路径检测消息在该第二网络的尾节点终止, 该第二网络的尾节点 可以将该封装后的第二路径检测消息解封装, 获得该第二路径检测消息, 然 后根据该第二路径检测消息中包括的第一 TTL为 1和源 IP地址为第一通信 节点的 IP地址确定第一通信节点对其进行路径检测, 该第二网络的尾节点将 该第二网络的尾节点的信息通过第二路径检测回复消息发送给该第一通信节 点。 该第二通信节点在接收到该第二网络的尾节点发送的该第二路径检测回 复消息之后, 再发送一次封装后的第二路径检测消息, 即第二次该第一通信 节点发送的该封装后的第二路径检测消息包括的第二 TTL为 2, 那么该第二 网络的尾节点接收该第一通信节点发送的该封装后的第二路径检则消息, 由 于该第二网络的尾节点是第二网络中的最后一跳通信节点, 那么该第二网络 的尾节点可以直接将该封装后的第二路径检测消息解封装, 获得第二路径检 测消息, 然后根据该第二路径检测消息中包括的第一 TTL为 1确定该第一通 信节点对该第二网络的尾节点进行路径检测, 该第二网络的尾节点将该第二 网络的尾节点的信息通过第二路径检测回复消息发送给该第一通信节点。 从 而该第一通信节点可以获取两次该第二网络的尾节点的信息, 即当该第一通 信节点至少两次接收该第二网络中同一节点发送的第二路径检测回复消息 时, 该第二通信节点停止再发送封装后的第二路径检测消息。 可选地, 当该 第一通信节点在预设时间内未接收到第二路径检则回复消息时, 则该第一通 信节点停止再发送封装后的第二路径检测消息。
需要说明的是, 该第一通信节点与该第二网络的尾节点之间可以存在任 意数量的通信节点, 因此, 该第一通信节点的封装后的第二路径检测消息的 具体发送次数与该第一通信节点和该第二网络的尾节点之间的节点数目有 关。
S310、 所述第一通信节点向所述第二通信节点发送代理检测返回消息, 所述代理检测返回消息包括所述第二网络中位于所述路径检测发起节点与所 述路径检测终止节点之间路径上的其它节点的信息。
本实施例中, 该第一通信节点在接收到该第二网络中位于所述路径检测 发起节点与所述路径检测终止节点之间路径上的其它节点发送的第二路径检 测回复消息, 并获取该第二网络中位于所述路径检测发起节点与所述路径检 测终止节点之间路径上的其它节点的信息之后, 该第一通信节点将该第二网 络中位于所述路径检测发起节点与所述路径检测终止节点之间路径上的其它 节点的信息携带在代理检测返回消息发送给该第二通信节点。 该第二网络中 位于所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节点 的信息按照接收该各节点发送的第二路径检测回复消息的先后顺序排列。 相 应地,该第二通信节点可以接收该第一通信节点发送的该代理检测返回消息。 S311、 所述第二通信节点将所述第二网络中位于所述路径检测发起节点 与所述路径检测终止节点之间路径上的其它节点的信息锁定于所述第一通信 节点的信息之后。
本实施例中, 该第二通信节点将该第二网络中位于所述路径检测发起节 点与所述路径检测终止节点之间路径上的其它节点的信息锁定于路径检测结 果中该第一通信节点的信息之后, 并且该第二网络中位于所述路径检测发起 节点与所述路径检测终止节点之间路径上的其它节点的信息与该第一通信节 点的信息相邻。 从而可以保证路径检测结果中, 各该第二通信节点到该路径 检测终止节点之间的路径上的节点的信息的顺序与各节点在该第二通信节点 到该路径检测终止节点的路径上的顺序一致。
进一歩地, 所述第二通信节点将所述第二网络中其它节点的信息锁定于 所述第一通信节点的信息之后, 还包括: 当所述第二通信节点确定已接收到 所述路径检测终止节点发送的路径回复消息时, 或者, 当所述第二通信节点 确定在预设时间内未接收到路径回复消息, 所述第二通信节点根据所述代理 检测等待信息, 停止路径检测。 从而完成了整个路径检测过程。
本实施例, 当该第一通信节点确定该第一通信节点被作为路径检测发起 节点的第二通信节点进行路径检测时, 该第一通信节点向该第二通信节点发 送该第一通信节点的信息,并且该第一通信节点作为代理路径检测发起节点, 获取所述第二网络中该第二通信节点到该路径检测终止节点的路径上的其它 节点的信息, 再向所述第二通信节点发送所述第二网络中该第二通信节点到 该路径检测终止节点的路径上的其它节点的信息。 从而实现该第一网络中的 该第二通信节点可以获取处于该第二网络中的路径的信息。
基于图 2所示的网络架构, 图 6为本发明路径检测方法实施例四的流程 图, 如图 6所示, 本实施例的方法可以包括:
S401、 该第二通信节点作为路径检测发起节点, 根据作为路径检测终止 节点的该第四通信节点的 IP地址, 向所述路径检测终止节点发送包括路径检 测选项的 IP包,所述路径检测选项用于指示所述第二通信节点正进行路径检 本实施例中, 若该第二通信节点作为路径检测发起节点需要获取路径检 测终止节点 (即第四通信节点) 之间的路径信息, 则该第二通信节点可以根 据目的 IP为该路径检测终止节点的 IP地址, 向该路径检测终止节点发送一 次路径检测消息, 即该第二通信节点向该路径检测终止节点发送一个 IP包, 该 IP包中携带有路径检测选项, 该路径检测选项用于指示该第二通信节点正 进行路径检测, 该第二通信节点需要向该路径检测终止节点发送一次 IP包即 可。 处于该第二通信节点与该路径检测终止节点之间的路径上的各节点均会 接收到该第二通信节点发送的该 IP包, 并根据该 IP包中所携带的该路径检 测选项, 确定该第二通信节点进行路径检测, 同时各节点将该 IP包发送给下 游节点, 直至该 IP包到达该路径检测终止节点。
5402、 该第一通信节点接收该第二通信节点作为路径检测发起节点发送 的携带该路径检测选项的该 IP包。
本实施例中, 该第一通信节点可以接收该第二通信节点发送的路径检测 消息, 此处将第一通信节点接收到的路径检测消息称为第一路径检测消息, 该第一路径检测消息为携带路径检测选项的 IP包。当该第一通信节点接收到 该第二通信节点发送的该 IP包后, 确定该 IP包中携带该路径检测选项时, 即可确定该第二通信节点进行路径检测。
5403、 所述第一通信节点向所述第二通信节点发送第一路径回复消息, 所述第一路径回复消息包括所述第一通信节点的信息。
5404、 所述第一通信节点向所述第二通信节点发送代理检测等待消息, 所述代理检测等待消息包括代理检测等待信息。
本实施例中, S403和 S404的具体实现过程与本发明方法实施例三中 S303 和 S304的具体实现过程类似, 此处不再赘述。
5405、所述第一通信节点将所述第一路径检测消息中的源 IP地址由所述 第二通信节点的 IP地址更换为所述第一通信节点的 IP地址, 获得第二路径 检测消息。
S406、 所述第一通信节点根据所述第二网络的协议, 将所述第一路径检 测消息进行封装, 获得封装后的第二路径检测消息, 所述封装后的第二路径 检测消息包括第二 TTL。
S407、 所述第一通信节点根据所述封装后的第二路径检测消息中目的 IP 地址, 至少两次向所述第二网络中其它节点发送所述封装后的第二路径检测 消息;其中,第一次发送的所述封装后的第二路径检测消息中包括的第二 TTL 为 1, 每次发送的所述封装后的第二路径检测消息中包括的第二 TTL按照间 TTL 1递增。
S408、 所述第一通信节点接收所述第二网络中其它节点发送的第二路径 检测回复消息。
S409、 所述第一通信节点根据所述第二网络中其它节点发送的所述第二 路径检测回复消息, 获取所述第二网络中位于所述路径检测发起节点与所述 路径检测终止节点之间路径上的其它节点的信息。
本实施例中, 该第一通信节点向该第二通信节点发送代理检测等待消息 之后, 作为代理路径检测发起节点获取该第二网络中位于所述路径检测发起 节点与所述路径检测终止节点之间路径上的其它节点的信息。 具体地, 该第 一通信节点接收到的第一路径检测消息中的源 IP地址为该第二通信节点的 IP 地址, 该第一通信节点需要根据该第一路径检测消息来获取该第二网络中位 于所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节点的 信息, 因此, 该第一通信节点将该第一路径检测消息中的源 IP地址更改为该 第一通信节点的 IP地址, 获得第二路径检测消息, 其中, 该第二路径检测消 息中的源 IP地址为该第一通信节点的 IP地址、 目的 IP地址为上述的路径检 测终止节点的 IP地址。 该第一通信节点再根据第二网络的协议, 将第二路径 检测消息进行封装, 获得封装后的第二路径检测消息, 并且该封装后的第二 路径检测消息中包括第二 TTL, 需要说明的是, 该第二 TTL在所述封装后的 第二网络的传递过程中会发生变化, 每经过一跳, 第二 TTL将减 1。
若该第一通信节点的下游节点为第二网络的尾节点(即第三通信节点), 这时, 该第一通信节点要获取该第一通信节点与该路径检测终止节点之间的 路径上位于第二网络的其它节点的信息, 该第一通信节点需要发送至少两次 封装后的第二路径检测消息。 第一次该第一通信节点发送的该封装后的第二 路径检测消息包括的第二 TTL为 1, 那么该第二网络的尾节点接收到该第一 通信节点发送的该封装后的第二路径检则消息, 该第二网络的尾节点可以直 接将该封装后的第二路径检测消息解封装, 获得第二路径检测消息, 然后根 据该第二路径检测消息中包括的路径检测选项确定该第一通信节点对该第二 网络的尾节点进行路径检测, 该第二网络的尾节点将该第二网络的尾节点的 信息通过第二路径检测回复消息发送给该第一通信节点。 该第二通信节点在 接收到该第二网络的尾节点发送的该第二路径检测回复消息之后, 再发送一 次封装后的第二路径检测消息, 即第二次该第一通信节点发送的该封装后的 第二路径检测消息包括的第二 TTL为 2, 那么该第二网络的尾节点接收该第 一通信节点发送的该封装后的第二路径检则消息, 由于该第二网络的尾节点 为第二网络的最后一跳通信节点, 该第二网络的尾节点可以直接将该第二路 径检测消息解封装, 获得第二路径检测消息, 然后根据该第二路径检测消息 中包括的路径检测选项确定第一通信节点对该第二网络的尾节点进行路径检 测, 该第二网络的尾节点将该第二网络的尾节点的信息通过第二路径检测回 复消息发送给该第一通信节点。 从而该第一通信节点可以获取两次该第二网 络的尾节点的信息, 即当该第一通信节点至少两次接收该第二网络中同一节 点发送的第二路径检测回复消息时, 该第二通信节点停止再发送第二路径检 测消息。 可选地, 当该第一通信节点在预设时间内未接收到第二路径检则回 复消息时, 则该第一通信节点停止发送第二路径检测消息。
需要说明的是, 该第一通信节点与该第二网络的尾节点之间可以存在任 意数量的通信节点, 因此, 该第一通信节点的封装后的第二路径检测消息的 具体发送次数与该第一通信节点和该第二网络的尾节点之间的节点数目有 关。
S410、 所述第一通信节点向所述第二通信节点发送代理检测返回消息, 所述代理检测返回消息包括所述第二网络中位于所述路径检测发起节点与所 述路径检测终止节点之间路径上的其它节点的信息。
S41 所述第二通信节点将所述第二网络中位于所述路径检测发起节点 与所述路径检测终止节点之间路径上的其它节点的信息锁定于所述第一通信 节点的信息之后。
本实施例中, S410和 S411的具体实现过程与本发明方法实施例三中的 S310和 S311的具体实现过程类似, 此处不再赘述。
本实施例, 当该第一通信节点确定该第一通信节点被作为路径检测发起 节点的该第二通信节点进行路径检测时, 该第一通信节点向该第二通信节点 发送该第一通信节点的信息, 并且该第一通信节点作为代理路径检测发起节 点, 获取所述第二网络中该第二通信节点到该路径检测终止节点的路径上的 其它节点的信息, 再向所述第二通信节点发送所述第二网络中该第二通信节 点到该路径检测终止节点的路径上的其它节点的信息。 从而实现该第一网络 中的该第二通信节点可以可以获取处于该第二网络中的各节点的信息。
需要说明的是, 在图 5或图 6所示的实施例中, 若该第二网络的首节点 (即第一通信节点) 作为代理路径检测节点获取该第二网络中位于所述路径 检测发起节点与所述路径检测终止节点之间路径上的其它节点的信息, 当该 第二网络的首节点两次接收到同一个节点发送的该节点的信息时, 该第二网 络的首节点停止作为代理路径检测节点继续进行路径检测, 然后将所有接收 到的节点的信息发送给第二通信节点。 若该第二通信节点在接收到该第二网 络的首节点发送的该第二网络的首节点的信息之后, 并且只接收到该第二网 络的首节点发送的代理检测返回消息, 所以第二通信节点可以确定在该第二 通信节点与该路径检测终止节点之间的路径上有故障存在, 此时该第二通信 节点可以根据该代理检测返回消息中携带的最后一个节点的信息, 确定该最 后一个节点的下游节点出现了故障, 或者, 该最后一个节点与该最后一个节 点的下游节点之间的路径出现了故障。
下面将以图 7所示的路径检测方法的应用场景对本发明进行详细描述。 图 7为本发明路径检测方法的第二种应用场景图, 如图 7, 节点 A位于第一 网络, 第一网络为 IP网络, 节点 F位于第三网络, 第三网络为 IP网络, 从 节点 A到节点 F之间存在有节点8、 节点 C、 节点 D和节点 E, 节点 B、 节 点 、 节点 D和节点 E位于第二网络, 第二网络为 MPLS网络或者 IP隧道, 其中, 节点 B既位于第二网络也位于第一网络(即 IP网络) , 节点 E即位于 第二网络也位于第三网络(即 IP网络) ; 从节点 A到节点 F的方向上, 节点 B为第二网络的首节点, 节点 E为第二网络的尾节点。 节点 A需要获取该节 点 A与节点 F之间路径的信息, 也即获取节点 B、 节点 C、 节点 D和节点 E 的信息, 具体实现过程可以如下两个实施例所述。
基于图 7所示的网络架构, 图 8为本发明路径检测方法实施例五的流程 图, 如图 8所示, 本实施例的方法可以包括:
5501、 该节点 A根据目的 IP地址为该节点 F的 IP地址, 向该节点 F发 送包括第一 TTL为 1的路径检测消息。
5502、 该节点 B接收该节点 A发送的包括第一 TTL为 1的该路径检测 消息,该节点 B向该节点 A发送携带有该节点 B的信息的第一路径回复消息。 本实施例中,该节点 A需要获取该节点 A与该节点 F之间路径的信息时, 该节点 A向该节点 F发送路径检测消息,第一次该节点 A向该节点 F发送该 路径检测消息, 该路径检测消息包括值为 1的第一 TTL (IP的 TTL) , 该节 点 A第一次发送的该路径检测消息首先被该节点 B接收到,该节点 B将该路 径检测消息中的第一 TTL减去 1 (即将 1减去 1 )得 0, 该路径检测消息在该 节点 B终止, 同时该节点 B根据该路径检测消息中的源 IP地址为该节点 A 的 IP地址, 确定该节点 A正进行路径检测, 那么该节点 B将该节点 B的信 息通过第一路径回复消息发送给该节点 A, 该第一路径回复消息包括的源 IP 地址为该节点 B的 IP地址, 目的 IP地址为该节点 A的 IP地址。 可选地, 路 径检测消息中还可以包括路径检测的附带要求, 该附带要求可以是要求该第 一路径检测消息的接收方提供带宽、 拥塞程度中的一个或多个。 当该第一路 径检测消息中包括要求该第一路径检测消息的接收方提供带宽和拥塞程度的 附带信息时,该节点 B的信息还包括该节点 B的带宽和该节点 B的拥塞程序。 该节点 A接收到该节点 B发送的该第一路径回复消息, 获取该第一路径回复 消息中包括的该节点 B的信息,从而该节点 A可以得到该节点 A与该节点 F 之间的路径信息包括: 该节点 B的信息。
S503、 该节点 B向该节点 A发送代理检测等待消息。
本实施例中, 该节点 B确定该节点 A进行路径检测, 并且该节点 A与该 节点 F之间的路径需要经过该第二网络, 该节点 B向该节点 A发送代理检测 等待消息, 该代理检测等待消息包括代理检测等待信息, 该代理检测等待信 息用于指示: 该节点 A作为代理路径检测发起节点获取所述第二网络中位于 该节点 A与该节点 F之间路径上的其它节点的信息,该节点 A未接收到该节 点 B发送的所述第二网络中位于该节点 A与该节点 F之间的路径上的其它节 点的信息之前保持路径检测状态以及该节点 A将所述第二网络中位于该节点 A与该节点 F之间的路径上的其它节点的信息锁定于该节点 B的信息之后。 然后该节点 B需要作为代理路径检测发起节点,获取该第二网络中该节点 C、 该节点 D和该节点 E的信息。 相应地, 该节点 A接收到该节点 B发送的代理 检测等待消息, 并根据代理检测等待信息确定该节点 B将获取第二网络中位 于该节点 A与该节点 F之间的路径上的其它节点的信息, 然后根据代理检测 等待信息作相应的处理。 S504、 该节点 B作为代理路径检测发起节点, 获取该节点 C、 该节点 D 和该节点 E的信息。
本实施例中, 该节点 B作为代理路径检测发起节点, 将从该节点 A接收 到的包括第一 TTL为 1的第一路径检测消息中的源 IP地址由该节点 A的 IP 地址更改为该节点 B的 IP地址, 获得第二路径检测消息, 然后根据第二网络 的协议(例如 MPLS协议或 IP隧道协议),对该第二路径检测消息进行封装, 获得封装后的第二路径检测消息, 该封装后的第二路径检测消息还包括第二 TTL, 例如: 该封装后的第二路径检测消息包括: 包括第二 TTL的 MPLS头 +包括第一 TTL为 1的路径检测消息, 或者, 包括第二 TTL的 IP隧道头 +包 括第一 TTL为 1的路径检测消息,该封装后的第二路径检测消息包括的源 IP 地址为该节点 B的 IP地址, 该封装后的第二路径检测消息包括的目的 IP地 址为该节点 F的 IP地址。该节点 B设置第一次向该节点 F发送的该封装后的 第二路径检测消息中包括的该第二 TTL为 1,该节点 B发送的包括的第二 TTL 为 1的封装后的第二路径检测消息首先将被该节点 C接收, 该节点 C将该封 装后的第二路径检测消息中第二 TTL减 1 (也即将 1减去 1 )得 0, 该封装后 的第二路径检测消息在该节点 c处终止, 然后该节点 C对该封装后的第二路 径检测消息进行解封装, 即去掉 MPLS头和 IP隧道头, 获得第二路径检测消 息,根据该第二路径检测消息中第一 TTL为 1确定该节点 B对该节点 C进行 路径检测, 然后该节点 C将该节点 C的信息携带在第二路径回复消息中发送 给该节点 B, 该节点 B接收到该节点 C发送的第二路径回复消息, 获取该节 点 C的信息, 从而得到第二网络中位于该节点 B到该节点 F的路径上的各节 点的信息: 该节点 C的信息。
该节点 B接收到该节点 C发送的该第二路径回复消息之后, 将第一次发 送的封装后的第二路径检测消息中第二 TTL再加 1得到第二次发送的封装后 的第二路径检测消息, 该第二次发送的封装后的第二路径检测消息中包括的 第二 TTL为 2, 将该封装后的第二路径检测消息发送给该节点 C, 该节点 C 接收到该节点 B发送的该封装后的第二路径检测消息, 将该封装后的第二路 径检测消息中第二 TTL减 1 (也即将 2减去 1 ) 得到 1, 然后该节点 C将包 括相减后的第二 TTL (为 1 ) 的封装后的第二路径检测消息发送给该节点 D, 该节点 D接收到该包括第二 TTL为 1的封装后的第二路径检测消息,将第二 TTL减 1 (也即将 1减去 1 ) 得 0, 该封装后的第二路径检测消息在该节点 D 处终止, 然后该节点 D对该封装后的第二路径检测消息进行解封装, 即去掉 MPLS头和 IP隧道头, 获得第二路径检测消息, 该节点 D根据该第二路径检 测消息中第一 TTL为 1确定该节点 B对该节点 D进行路径检测, 然后将该 节点 D的信息携带在第二路径回复消息中发送给该节点 B, 该节点 B接收到 该节点 D发送的该第二路径回复消息, 并获取该节点 D的信息, 从而得到第 二网络中位于该节点 B到该节点 F的路径上各节点的信息:该节点 C的信息、 该节点 D的信息。
该节点 B接收到该节点 D发送的该第二路径回复消息之后,将第二次发 送的封装后的第二路径检测消息中第二 TTL再加 1得到第三次发送的封装后 的第二路径检测消息, 该第三次发送的封装后的第二路径检测消息中包括的 第二 TTL为 3, 将该封装后的第二路径检测消息发送给该节点 C, 该节点 C 接收到该节点 B发送的该封装后的第二路径检测消息, 将该封装后的第二路 径检测消息中第二 TTL减 1 (也即将 3减去 1 ) 得到 2, 该节点 C将包括相 减后的第二 TTL (为 2) 的封装后的第二路径检测消息发送给该节点 D, 该 节点 D接收到该节点 C发送的包括第二 TTL为 2的封装后的第二路径检测 消息, 将该封装后的第二路径检测消息中第二 TTL减 1 (也即将 2减去 1 ) 得到 1, 然后该节点 D将包括相减后的第二 TTL (为 1 ) 的封装后的第二路 径检测消息发送给该节点 E, 该节点 E接收到包括第二 TTL为 1的封装后的 第二路径检测消息, 将第二 TTL减 1 (也即将 1减去 1 )得 0, 该封装后的第 二路径检测消息在该节点 E处终止, 然后该节点 E对该第二路径检测消息进 行解封装, 即去掉 MPLS头和 IP隧道头, 获得第二路径检测消息, 根据该第 二路径检测消息中第一 TTL为 1确定该节点 B对其该节点 E进行路径检测, 然后将该节点 E的信息携带在第二路径回复消息中发送给该节点 B, 该节点 B接收到该节点 E发送的该第二路径回复消息, 并获取该节点 E的信息, 从 而得到第二网络中位于该节点 B到该节点 F的路径上的各节点的信息: 该节 点 C的信息、 该节点 D的信息、 该节点 E的信息。
该节点 B接收到该节点 E发送的第二路径回复消息之后, 将第三次发送 的封装后的第二路径检测消息中第二 TTL再加 1得到第四次发送的封装后的 第二路径检测消息, 该第四次发送的封装后的第二路径检测消息中包括的第 二 TTL为 4, 将该封装后的第二路径检测消息发送给该节点 C, 该节点 C接 收到该节点 B发送的该封装后的第二路径检测消息, 将该封装后的第二路径 检测消息中第二 TTL减 1 (也即将 4减去 1 ) 得到 3, 该节点 C将该包括相 减后第二 TTL (为 3 ) 的封装后的第二路径检测消息发送给该节点 D, 该节 点 D接收到该节点 C发送的包括第二 TTL为 3的封装后的第二路径检测消 息, 将该封装后的第二路径检测消息中第二 TTL减 1 (也即将 3减去 1 ) 得 到 2, 该节点 D将包括相减后的第二 TTL (为 2) 的封装后的第二路径检测 消息发送给该节点 E, 该节点 E接收到该节点 D发送的封装后的第二路径检 测消息, 将第二 TTL减 1 (也即将 2减去 1 )得到 1, 由于该节点 E是该第二 网络的尾节点, 此时该节点 E可以对该封装后的第二路径检测消息进行解封 装, 即去掉 MPLS头和 IP隧道头, 获得第二路径检测消息, 根据该第二路径 检测消息中第一 TTL为 1确定该节点 B对该节点 E进行路径检测,然后将该 节点 E的信息携带在第二路径回复消息中发送给该节点 B, 该节点 B接收到 该节点 E发送的第二路径回复消息, 该节点 B确定已接收到该节点 E两次发 送的第二路径回复消息,则该节点 B停止再发送封装后的第二路径检测消息, 即该节点 B终止代理路径检测过程, 最终该节点 B得到第二网络中位于该节 点 B到该节点 F的路径上的各节点的信息为: 该节点 C的信息、该节点 D的 信息和该节点 E的信息。
5505、 该节点 B将该节点 C的信息、 该节点 D的信息和该节点 E的信 息携带在代理检测返回消息发送给该节点 A。
本实施例中, 该节点 B将获取到的该第二网络中该节点 C的信息、 该节 点 D的信息和该节点 E的信息携带在代理检测返回消息, 发送给该节点 A。
5506、 该节点 A接收该节点 B发送的该代理检测返回消息, 将该节点 C 的信息、 该节点 D的信息和该节点 E的信息锁定于该节点 B的信息之后。
本实施例中, 该节点 A接收到该节点 B发送的该代理检测返回消息, 该 代理检测返回消息中携带的该节点 C的信息、该节点 D的信息和该节点 E的 信息为该节点 B获取的第二网络中位于该节点 A到该节点 F的路径上的其它 节点的信息。 而且该节点 C、 该节点 D和该节点 E处于该节点 B之后, 该节 点 A将从该节点 B处接收到的该代理检测返回消息中携带的信息, 锁定于该 节点 B的信息之后,可以得到如下所示:该节点 B的信息、该节点 C的信息、 该节点 D的信息和该节点 E的信息。
S507、 该节点 A根据目的 IP地址为该节点 F的 IP地址, 向该节点 F发 送包括第一 TTL为 2的路径检测消息。
本实施例中, 该节点 A接收到该节点 B发送的路径检测回复消息之后, 由于第一次该节点 A发送的路径检测消息中第一 TTL为 1, 则这一次(即第 二次)节点 A将路径检测消息中的第一 TTL再加 1得到的第一 TTL为 2, 向 该节点 F发送包括第一 TTL为 2的路径检测消息。该 B节点首先接收该节点 A发送的包括第一 TTL为 2的路径检测消息,将该路径检测消息中的第一 TTL 减 1 (也即将 2减去 1 )得 1, 然后将包括第一 TTL为 1的路径检测消息进行 封装, 获得封装后的路径检测消息, 该封装后的路径检测消息还包括一个第 二 TTL。
在 MPLS网络的 Uniform (统一) 模型中, 该节点 B将封装前的路径检 测消息中的第一 TTL的值复制成封装后的路径检测消息中的第二 TTL的值, 即该节点 B获得的该封装后的路径检测消息中包括的第二 TTL为 1, 该节点 B将该封装后的路径检测消息发送给该节点 C, 该节点 C将该封装后的路径 检测消息中包括的第二 TTL减 1 (也即将 1减去 1 )得 0, 该封装后的路径检 测消息在该节点 C处终止, 该节点 C解封装, 获得封装前的路径检测消息, 根据该封装前的路径检测消息中包括的第一 TTL减 1 (也即将 1减 1 ) 得 0, 获知该节点 A进行路径检测,从而该节点 C将该节点 C的信息携带在路径回 复消息中发送给该节点 A, 从而该节点 A获取该节点 C的信息, 将该节点 C 的信息放置在该节点 B的信息之后。
在 MPLS网络的 PiPe (管道) 模型或者 IP隧道中, 该节点 B将封装后 的路径检测消息中的第二 TTL设置为一较大值 (如 255 ) , 即该封装后的路 径检测消息中包括的第二 TTL为 225, 该节点 B将该封装后的路径检测消息 发送给该节点 C, 该节点 C将该封装后的路径检测消息中包括的第二 TTL减 1得 254, 该节点 C将包括第二 TTL为 254的封装后的路径检测消息发送给 该节点 D, 该节点 D将该封装后的路径检测消息中包括的第二 TTL减 1得 253 , 该节点 D将包括第二 TTL为 253的封装后的路径检测消息发送给该节 点 E, 该节点 E解封装, 获得封装前的路径检测消息, 根据该封装前的路径 检测消息中包括的第二 TTL (为 1 )减 1得 0, 获知该节点 A进行路径检测, 从而该节点 E将该节点 E的信息携带在路径回复消息中发送给该节点 A, 从 而该节点 A获取该节点 E的信息,将该节点 E的信息放置在该节点 B的信息 之后, 得到: 该节点 B的信息、 该节点 E的信息。
S508、 该节点 A根据目的 IP地址为该节点 F的 IP地址, 向该节点 F发 送包括第一 TTL为 3的路径检测消息。
本实施例中, 该节点 A接收到该节点 E发送的路径检测回复消息之后, 由于第二次该节点 A发送的路径检测消息中第一 TTL为 2, 则这一次(即第 三次)该节点 A将路径检测消息中的第一 TTL再加 1得第一 TTL为 3, 向该 节点 F发送包括第一 TTL为 3的路径检测消息。该 B节点首先接收该节点 A 发送的该包括第一 TTL为 3的路径检测消息, 将该路径检测消息中的第一 TTL为 3减去 1得 2, 然后将包括第一 TTL为 2的路径检测消息进行封装, 获得封装后的路径检测消息,该封装后的路径检测消息还包括一个第二 TTL。
在 MPLS网络的 Uniform (统一) 模型中, 该节点 B将封装前的路径检 测消息中的第一 TTL的值复制成封装后的路径检测消息中的第二 TTL的值, 即封装后的路径检测消息中包括的第二 TTL为 2, 该节点 B将该封装后的路 径检测消息发送给该节点 C, 该节点 C将该封装后的路径检测消息中包括的 第二 TTL减 1 (也即将 2减 1 ) 得 1, 该节点 C将包括第二 TTL为 1的封装 后的路径检测消息发送给该节点 D, 该节点 D将该封装后的路径检测消息中 包括的第二 TTL减 1得 0, 该封装后的路径检测消息在该节点 D处终止, 该 节点 D解封装, 获得路径检测消息, 并将第二 TTL的值复制为该路径检测消 息中包括的第一 TTL的值, 从而得到第一 TTL为 1, 并该第一 TTL减 1 (也 即将 1减 1 ) 得 0, 该节点 D获知该节点 A进行路径检测, 从而该节点 D将 该节点 D的信息携带在路径回复消息中发送给该节点 A, 从而该节点 A获取 该节点 D的信息, 将该节点 D的信息放置在该节点 B的信息之后。 在这种 Uniform模型中, 该节点 A接收到该节点 D的信息后, 该节点 A向该节点 F 发送包括第一 TTL为 4的路径检测消息,该节点 E会接收到封装后的路径检 测消息,当该节点 E接收到的该封装后的路径检测消息中的第二 TTL为 1时, 该节点 E将第二 TTL的值复制为第一 TTL的值(为 1 ), 从而将该节点 E的 信息发送给该节点 A。 该节点 A接收到该节点 E的信息, 再向该节点 F发送 包括第一 TTL为 5的路径检测消息,该节点 E会接收到该封装后的路径检测 消息, 当该节点 E接收到的该封装后的路径检测消息中的第二 TTL为 2时, 由于该节点 E是该第二网络的尾节点, 该节点 E解封装, 并将第二 TTL的值 复制为第一 TTL的值(为 2), 再将该第一 TTL的值减 1 (即将 2减 1 )得 1, 最后将包括相减后的第一 TTL (为 1 )的路径检测消息发送给该节点 F, 从而 该节点 A接收到该节点 F发送路径回复消息。
在 MPLS网络的 PiPe (管道) 模型或者 IP隧道中, 该节点 B将封装后 的路径检测消息中的第二 TTL设置为一较大值 (如 255 ) , 即该节点 B封装 后的路径检测消息中包括的第二 TTL为 225, 该节点 B将封装后的路径检测 消息发送给该节点 C,该节点 C将该封装后的路径检测消息中包括的第二 TTL 减 1得 254, 该节点 C将包括第二 TTL为 254的封装后的路径检测消息发送 给该节点 D,该节点 D将该封装后的路径检测消息中包括的第二 TTL减 1得 253 , 该节点 D将包括第二 TTL为 253的封装后的路径检测消息发送给该节 点 E, 该节点 E解封装, 获得封装前的路径检测消息, 根据该封装前的路径 检测消息中包括的第一 TTL为 2减 1得 1,该节点 E将包括相减后的第一 TTL (为 1 ) 的路径检测消息(即封装后的路径检测消息)发送给该节点 F, 该节 点 F将从该节点 E处接收到的路径检测消息中的第一 TTL减 1 (即将 1减 1 ) 得 0, 该路径检测消息在该节点 F终止, 该节点 F根据该路径检测消息的目 的 IP地址为该节点 F的 IP地址, 获知该节点 A对该节点 F进行路径检测, 从而该节点 F将该节点 F的信息携带在路径回复消息中发送给该节点 A, 从 而该节点 A获取该节点 F的信息,将该节点 F的信息放置在该节点 E的信息 之后, 得到: 该节点 B的信息、 该节点 E的信息、 该节点 F的信息。 在该节 点 A获取到该节点 F的信息之后, 表示路径检测消息已到达该节点 F, 从而 该节点 A停止再发送路径检测消息。
需要说明的是, S507和 S508与 S504-S506的执行顺序不分先后。
若 S506在 S507之前执行, 则该节点 A在执行完 S506后得到的信息为: 该节点 B的信息、 该节点 C的信息、 该节点 D的信息、 该节点 E的信息。 在 执行完 S507之后得到的信息为: 该节点 B的信息、 该节点 C的信息、 该节 点 D的信息、 该节点 E的信息、 该节点 E的信息, 由于存在两个相同节点的 信息, 只取其中之一即可, 从而得到: 该节点 B的信息、 该节点 C的信息、 该节点 D的信息、 该节点 E的信息。 在执行完 S508之后得到的信息为: 该 节点 B的信息、 该节点 C的信息、该节点 D的信息、 该节点 E的信息和该节 点 F的信息。
若 S507在 S506之前执行, 则该节点 A在执行完 S507后得到的信息为: 该节点 B的信息、 该节点 E的信息。 在执行完 S506之后得到的信息为: 该 节点 B的信息、 该节点 C的信息、 该节点 D的信息、 该节点 E的信息、 该节 点 E的信息, 由于存在两个相同节点的信息, 只取其中之一即可, 从而得到: 该节点 B的信息、 该节点 C的信息、 该节点 D的信息、 该节点 E的信息。 在 执行完 S508之后得到的信息为: 该节点 B的信息、 该节点 C的信息、 该节 点 D的信息、 该节点 E的信息和该节点 F的信息。
本实施例中, 通过该节点 B作为该节点 A的代理路径检测节点, 获取该 节点 C、 该节点 D和该节点 E的信息, 并通过代理检测返回消息发送给该节 点 A,实现该节点 A与该节点 F之间的路径经过 pipe模型的 MPLS网络或者 IP隧道时, 该节点 A能获取处于 MPLS网络或者 IP隧道中的各节点的信息。
若该节点 C出现故障或者该节点 B与该节点 C之间的路径出现了故障, 该节点 B作为代理路径检测发起节点, 该节点 B发送包括的第二 TTL为 1 的封装后的第二路径检测消息后, 将接收不到该节点 C发送的该节点 C的信 息, 则该节点 B向该节点 A发送代理检测返回消息, 该代理检测返回消息中 包括空信息, 即表示该节点 B未获取到该节点 B之后的任一节点的信息, 从 而该节点 A将确认该节点 B的下游节点(即 C节点)出现了故障或者该节点 B与该节点 C之间的路径出现了故障。
若该节点 D出现故障或者该节点 C与该节点 D之间的路径出现了故障, 该节点 B作为代理路径检测发起节点, 该节点 B发送包括的第二 TTL为 1 的封装后的第二路径检测消息后, 接收到该节点 C发送的该节点 C的信息, 然后该节点 B发送包括第二 TTL为 2的封装后的第二路径检测消息后,该节 点 B未接收到任何节点返回的信息,则该节点 B向该节点 A发送代理检测返 回消息, 该代理检测返回消息中包括该节点 C的信息, 该节点 A也接收不到 该节点 C之后的任一节点发送的信息, 从而该节点 A根据代理返回消息中该 节点 C的信息, 将确认该节点 C的下游节点(即该 D节点) 出现了故障或者 该节点 C与该节点 D之间的路径出现了故障。
若该节点 E出现故障或者该节点 D与该节点 E之间的路径出现了故障, 该节点 B作为代理路径检测发起节点, 该节点 B发送包括的第二 TTL为 1 的封装后的第二路径检测消息后, 接收到该节点 C发送的该节点 C的信息, 然后该节点 B发送包括第二 TTL为 2的封装后的第二路径检测消息后,接收 该节点 D发送的该节点 D的信息, 然后该节点 B发送包括第二 TTL为 3的 封装后的第二路径检测消息后, 该节点 B未接收到任何节点返回的信息, 则 该节点 B向该节点 A发送代理检测返回消息, 该代理检测返回消息中包括该 节点 C的信息和该节点 D的信息, 该节点 A也接收不到该节点 D之后的任 一节点发送的信息, 从而该节点 A根据代理返回消息中该节点 C的信息和该 节点 D的信息, 将确认该节点 D的下游节点(即该 E节点)出现了故障或者 该节点 D与该节点 E之间的路径出现了故障。
基于图 7所示的网络架构, 图 9为本发明路径检测方法实施例六的流程 图, 如图 9所示, 本实施例的方法可以包括:
S601、 该节点 A根据目的 IP地址为该节点 F的 IP地址, 向该节点 F发 送包括路径检测选项的 IP包。
S602、 该节点 B接收该节点 A发送的该包括路径检测选项的 IP包, 该 节点 B向该节点 A发送携带有该节点 B的信息的第一路径回复消息。
本实施例中, 该节点 A需要获取与该节点 F之间路径的信息时, 该节点 A向该节点 F发送路径检测消息, 该路径检测消息为包括路径检测选项的 IP 包, 该节点 B首先接收到该节点 A发送的包括路径检测选项的 IP包, 该节 点 B根据路径检测选项, 确定该节点 A正进行路径检测, 那么该节点 B将该 节点 B的信息通过第一路径回复消息发送给该节点 A, 该第一路径回复消息 包括的源 IP地址为该节点 B的 IP地址, 目的 IP地址为该节点 A的 IP地址。 可选地, 路径检测消息中还包括路径检测的附带要求, 该附带要求可以是要 求该第一路径检测消息的接收方提供带宽、 拥塞程度中的一个或多个。 当该 第一路径检测消息中包括要求该第一路径检测消息的接收方提供带宽和拥塞 程度的附带信息时,该节点 B的信息还包括该节点 B的带宽和该节点 B的拥 塞程序。 该节点 A接收到该节点 B发送的第一路径回复消息, 获取第一路径 回复消息中包括的该节点 B的信息,从而该节点 A可以得到该节点 A与该节 点 F之间的路径信息包括: 该节点 B的信息。
S603、 该节点 B向该节点 A发送代理检测等待消息。 本实施例中, S603的具体实现过程与本发明方法实施例五中的 S503的 具体实现过程类似, 此处不再赘述。
S604、 该节点 B作为代理路径检测发起节点, 获取该节点 C、 该节点 D 和该节点 E的信息。
本实施例中, 节点 B作为代理路径检测发起节点, 将包括路径检测选项 的 IP包中的源 IP地址由该节点 A的 IP地址更改为该节点 B的 IP地址, 获 得第二路径检测消息, 然后根据第二网络的协议(例如 MPLS协议或 IP隧道 协议) , 对该第二路径检测消息进行封装, 获得封装后的第二路径检测消息, 该封装后的第二路径检测消息还包括第二 TTL, 例如: 该封装后的该第二路 径检测消息包括: 包括第二 TTL的 MPLS头 +包括路径检测选项的 IP包, 或 者,包括第二 TTL的 IP隧道头 +包括路径检测选项的 IP包,该封装后的第二 路径检测消息包括的源 IP地址为该节点 B的 IP地址, 该封装后的第二路径 检测消息包括的目的 IP地址为该节点 F的 IP地址。 该节点 B设置第一次向 该节点 F发送的该封装后的第二路径检测消息中包括的第二 TTL为 1, 该节 点 B发送的包括的第二 TTL为 1的第二路径检测消息首先将被该节点 C接收, 该节点 C将该封装后的第二路径检测消息中第二 TTL减 1 (也即将 1减去 1 ) 得 0, 该封装后的第二路径检测消息在该节点 C处终止, 然后该节点 C对该 封装后的第二路径检测消息进行解封装, 即去掉 MPLS头和 IP隧道头, 获得 第二路径检测消息, 根据该第二路径检测消息包括的路径检测选项确定该节 点 B对其进行路径检测, 然后将该节点 C的信息携带在第二路径回复消息中 发送给该节点 B, 该节点 B接收到该节点 C发送的第二路径回复消息, 获取 该节点 C的信息, 从而得到第二网络中位于节点 B到节点 F的路径上的各节 点的信息: 该节点 C的信息。
该节点 B接收到该节点 C发送的该第二路径回复消息之后, 将第一次发 送的封装后的第二路径检测消息中第二 TTL再加 1得到第二次发送的封装后 的第二路径检测消息, 该第二次发送的封装后的第二路径检测消息中包括的 第二 TTL为 2, 将该封装后的第二路径检测消息发送给该节点 C, 该节点 C 接收到该节点 B发送的该封装后的第二路径检测消息, 将该封装后的第二路 径检测消息中第二 TTL减 1 (也即将 2减去 1 ) 得到 1, 然后该节点 C将包 括相减后的第二 TTL (为 1 ) 的封装后的第二路径检测消息发送给该节点 D, 该节点 D接收到该包括第二 TTL为 1的封装后的第二路径检测消息,将第二 TTL减 1 (也即将 1减去 1 ) 得 0, 该封装后的第二路径检测消息在该节点 D 处终止, 然后该节点 D对该封装后的第二路径检测消息进行解封装, 即去掉 MPLS头和 IP隧道头, 获得第二路径检测消息, 该节点 D根据该第二路径检 测消息包括的路径检测选项确定该节点 B对该节点 D进行路径检测, 然后将 该节点 D的信息携带在第二路径回复消息中发送给该节点 B, 该节点 B接收 到该节点 D发送的该第二路径回复消息, 获取该节点 D的信息, 从而得到第 二网络中位于该节点 B到该节点 F的路径上各节点的信息:该节点 C的信息、 该节点 D的信息。
该节点 B接收到该节点 D发送的该第二路径回复消息之后,将第二次发 送的封装后的第二路径检测消息中第二 TTL值再加 1得到第三次发送的封装 后的第二路径检测消息, 该第三次发送的封装后的第二路径检测消息中包括 的第二 TTL为 3, 将该封装后的第二路径检测消息发送给该节点 C, 该节点 C接收到该节点 B发送的该封装后的第二路径检测消息, 将该封装后的第二 路径检测消息中第二 TTL减 1 (也即将 3减去 1 ) 得到 2, 该节点 C将包括 相减后的第二 TTL (为 2) 的封装后的第二路径检测消息发送给该节点 D, 该节点 D接收到该节点 C发送的包括第二 TTL为 2的封装后的第二路径检 测消息, 将该封装后的第二路径检测消息中第二 TTL减 1 (也即将 2减去 1 ) 得到 1, 然后该节点 D将包括相减后的第二 TTL (为 1 ) 的封装后的第二路 径检测消息发送给该节点 E, 该节点 E接收到包括第二 TTL为 1的封装后的 第二路径检测消息, 将第二 TTL减 1 (也即将 1减去 1 )得 0, 该封装后的第 二路径检测消息在该节点 E处终止, 然后该节点 E对该第二路径检测消息进 行解封装, 即去掉 MPLS头和 IP隧道头, 获得第二路径检测消息, 根据该第 二路径检测消息中包括的路径检测选项确定该节点 B对该节点 E进行路径检 测, 然后将该节点 E的信息携带在第二路径回复消息中发送给该节点 B, 该 节点 B接收到该节点 E发送的该第二路径回复消息, 获取该节点 E的信息, 从而得到第二网络中位于该节点 B到该节点 F的路径上各节点的信息: 该节 点 C的信息、 该节点 D的信息、 该节点 E的信息。
该节点 B接收到该节点 E发送的第二路径回复消息之后, 将第三次发送 的封装后的第二路径检测消息中第二 TTL值再加 1得到第四次发送的封装后 的第二路径检测消息, 该第四次发送的封装后的第二路径检测消息中包括的 第二 TTL为 4, 将该封装后的第二路径检测消息发送给该节点 C, 该节点 C 接收到该节点 B发送的该封装后的第二路径检测消息, 将该封装后的第二路 径检测消息中第二 TTL减 1 (也即将 4减去 1 ) 得到 3, 该节点 C将该包括 相减后第二 TTL (为 3 ) 的封装后的第二路径检测消息发送给该节点 D, 该 节点 D接收到该节点 C发送的包括第二 TTL为 3的封装后的第二路径检测 消息, 将该封装后的第二路径检测消息中第二 TTL减 1 (也即将 3减去 1 ) 得到 2, 该节点 D将包括相减后的第二 TTL (为 2) 的封装后的第二路径检 测消息发送给该节点 E, 该节点 E接收到该节点 D发送的封装后的第二路径 检测消息, 将第二 TTL减 1 (也即将 2减去 1 )得到 1, 由于该节点 E是该第 二网络的尾节点, 此时该节点 E可以对该封装后的第二路径检测消息进行解 封装, 即去掉 MPLS头和 IP隧道头, 获得第二路径检测消息, 根据该第二路 径检测消息包括的路径检测选项, 然后将该节点 E的信息携带在第二路径回 复消息中发送给该节点 B, 该节点 B接收到该节点 E发送的该第二路径回复 消息, 该节点 B确定已接收到两次该节点 E发送的该第二路径回复消息, 则 该节点 B停止再发送封装后的第二路径检测消息, 即该节点 B终止代理路径 检测过程, 最终该节点 B得到第二网络中位于该节点 B到该节点 F的路径上 各节点的信息为: 该节点 C的信息、 该节点 D的信息和该节点 E的信息。
5605、 该节点 B将该节点 C的信息、 该节点 D的信息和该节点 E的信 息携带在代理检测返回消息发送给该节点 A。
本实施例中, 该节点 B将获取到的该第二网络中该节点 C的信息、 该节 点 D的信息和该节点 E的信息携带在代理检测返回消息, 发送给该节点 A。
5606、 该节点 A接收该节点 B发送的该代理检测返回消息, 将该节点 C 的信息、 该节点 D的信息和该节点 E的信息锁定于该节点 B的信息之后。
本实施例中, 该节点 A接收到该节点 B发送的该代理检测返回消息, 该 代理检测返回消息中携带的该节点 C的信息、该节点 D的信息和该节点 E的 信息为该节点 B获取的第二网络中位于该节点 A与该节点 F之间的路径上的 其它节点的信息。 而且该节点 C、 该节点 D和该节点 E处于该节点 B之后, 该节点 A将从该节点 B处接收到的该代理检测返回消息中携带的信息, 锁定 于该节点 B的信息之后, 如: 该节点 B的信息、 该节点 C的信息、 该节点 D 的信息和该节点 E的信息。
5607、 该节点 B根据目的 IP地址为该节点 F的 IP地址, 将该包括路径 检测选项的 IP包进行封装发送给该节点 F。
5608、 该节点 A分别接收该节点 E和该节点 F发送的路径回复消息。 本实施例中, 该节点 B接收到该节点 A发送的该包括路径检测选的 IP 后, 将该 IP包继续传输给该节点 F, 由于该 IP包要在第二网络中进行传输, 所以该节点 B要将该 IP包进行封装, 然后再发送。
在 MPLS网络的 PIPE (管道) 模型或者 IP隧道中, 该节点 B将封装后 的 IP包中的第二 TTL设置为一较大值(如 255 ), 即该节点 B封装后的路径 检测消息中包括的第二 TTL为 225, 该节点 B将封装后的路径检测消息发送 给该节点 C,该节点 C将封装后的路径检测消息中包括的第二 TTL减 1得 254, 该节点 C将该包括第二 TTL为 254的封装后的路径检测消息发送给该节点 D, 该节点 D将该封装后的路径检测消息中包括的第二 TTL减 1得 253, 该节点 D将该包括第二 TTL为 253的封装后的路径检测消息发送给该节点 E, 该节 点 E解封装,获得包括路径检测选项的 IP包, 该节点 E根据路径检测选项及 源 IP地址, 获知该节点 A进行路径检测, 从而该节点 E将该节点 E的信息 携带在路径回复消息中发送给该节点 A,从而该节点 A获取该节点 E的信息, 将该节点 E的信息放置在该节点 B的信息之后, 得到: 该节点 B的信息、 该 节点 E的信息。 该节点 E根据目的 IP地址为该节点 F的 IP地址, 将包括路 径检测选项的 IP包发送给该节点 F, 该节点 F根据该 IP包的目的 IP地址为 该节点 F的 IP地址和该路径检测选项, 获知该节点 A对该节点 F进行路径 检测, 从而该节点 F将该节点 F的信息携带在路径回复消息中发送给该节点 A, 从而该节点 A获取该节点 F的信息, 将该节点 F的信息放置在该节点 E 的信息之后, 得到: 该节点 B的信息、 该节点 E的信息、 该节点 F的信息。 在该节点 A获取到该节点 F的信息之后,表示路径检测消息已到达该节点 F。
需要说明的是, S607与 S604-S606的执行顺序不分先后。
若 S606在 S607之前执行, 则该节点 A在执行完 S606后得到的信息为: 该节点 B的信息、 该节点 C的信息、 该节点 D的信息、 该节点 E的信息。 在 执行完 S607之后得到的信息为: 该节点 B的信息、 该节点 C的信息、 该节 点 D的信息、 该节点 E的信息、 该节点 E的信息和该节点 F的信息, 由于存 在两个相同节点的信息, 只取其中之一即可, 从而得到: 该节点 B的信息、 该节点 C的信息、 该节点 D的信息、 该节点 E的信息。
若 S607在 S606之前执行, 则该节点 A在执行完 S607后得到的信息为: 该节点 B的信息、 该节点 E的信息和该节点 F的信息。 在执行完 S606之后 得到的信息为: 该节点 B的信息、 该节点 C的信息、 该节点 D的信息、 该节 点 E的信息、 该节点 E的信息、 该节点 F的信息, 由于存在两个相同节点的 信息, 只取其中之一即可, 从而得到: 该节点 B的信息、 该节点 C的信息、 该节点 D的信息、 该节点 E的信息。
本实施例中, 通过该节点 B作为该节点 A的代理路径检测节点, 获取该 节点 C、 该节点 D和该节点 E的信息, 并通过代理检测返回消息发送给该节 点 A,实现该节点 A与该节点 F之间的路径经过 pipe模型的 MPLS网络或者 IP隧道时, 该节点 A能获取处于 MPLS网络或者 IP隧道中的各节点的信息。
若该节点 C出现故障或者该节点 B与该节点 C之间的路径出现了故障, 该节点 B作为代理路径检测发起节点, 该节点 B发送包括的第二 TTL为 1 的封装后的第二路径检测消息后, 将接收不到该节点 C发送的该节点 C的信 息, 则该节点 B向该节点 A发送代理检测返回消息, 该代理检测返回消息中 包括空信息, 即表示该节点 B未获取到该节点 B之后的任一节点的信息, 从 而该节点 A将确认该节点 B的下一个节点 (即该节点 C) 出现了故障或者该 节点 B与该节点 C之间的路径出现了故障。
若该节点 D出现故障或者该节点 C与该节点 D之间的路径出现了故障, 该节点 B作为代理路径检测发起节点, 该节点 B发送包括的第二 TTL为 1 的封装后的第二路径检测消息后, 接收到该节点 C发送的该节点 C的信息, 然后该节点 B发送包括第二 TTL为 2的封装后的第二路径检测消息后,该节 点 B未接收到任何节点返回的信息,则该节点 B向该节点 A发送代理检测返 回消息, 该代理检测返回消息中包括该节点 C的信息, 该节点 A也接收不到 该节点 B之后的任一节点发送的信息, 从而该节点 A根据代理返回消息中该 节点 C的信息, 将确认该节点 C的下一个节点 (即该节点 D) 出现了故障或 者该节点 C与该节点 D之间的路径出现了故障。
若该节点 E出现故障或者该节点 D与该节点 E之间的路径出现了故障, 该节点 B作为代理路径检测发起节点, 该节点 B发送包括的第二 TTL为 1 的封装后的第二路径检测消息后, 接收到该节点 C发送的该节点 C的信息, 然后该节点 B发送包括第二 TTL为 2的封装后的第二路径检测消息后,接收 该节点 D发送的该节点 D的信息, 然后该节点 B发送包括第二 TTL为 3的 封装后的第二路径检测消息后, 该节点 B未接收到任何节点返回的信息, 则 该节点 B向该节点 A发送代理检测返回消息, 该代理检测返回消息中包括该 节点 C的信息和该节点 D的信息, 该节点 A也接收不到该节点 D之后的任 一节点发送的信息, 从而该节点 A根据代理返回消息中该节点 C的信息和该 节点 D的信息, 将确认该节点 D的下一个节点 (即该节点 E) 出现了故障或 者该节点 D与该节点 E之间的路径出现了故障。
图 10为本发明通信节点实施例一的结构示意图, 如图 10所示, 本实施 例的通信节点作为第一通信节点, 可以包括: 接收单元 11、 发送单元 12和 处理单元 13, 其中, 接收单元 11用于接收第二通信节点作为路径检测发起 节点通过第一网络发送的第一路径检测消息, 所述第一路径检测消息用于指 示所述第一通信节点被所述第二通信节点进行路径检测, 所述第一路径检测 消息包括路径检测终止节点的 IP地址, 所述第一通信节点为第二网络的首节 点, 所述第一网络为 IP网络, 所述第二网络为 MPLS网络或者 IP隧道; 发 送单元 12用于向所述第二通信节点发送第一路径回复消息,所述路径回复消 息包括所述第一通信节点的信息;处理单元 13用于所述第一通信节点作为代 理路径检测发起节点时, 获取所述第二网络中位于所述路径检测发起节点与 所述路径检测终止节点之间路径上的其它节点的信息;发送单元 12还用于向 所述第二通信节点发送代理检测返回消息, 所述代理检测返回消息包括所述 第二网络中位于所述路径检测发起节点与所述路径检测终止节点之间路径上 的其它节点的信息。
可选地,发送单元 12发送的所述第一路径回复消息还包括代理检测等待 信息; 或者,
发送单元 12还用于在向所述第二通信节点发送第一路径回复消息之前, 向所述第二通信节点发送代理检测等待消息, 所述代理检测等待消息包括代 理检测等待信息;
其中, 所述代理检测等待信息用于指示: 所述第二通信节点未接收到所 述第一通信节点发送的所述第二网络中位于所述路径检测发起节点与所述路 径检测终止节点之间路径上的其它节点的信息之前保持路径检测状态以及所 述第二通信节点将所述第二网络中位于所述路径检测发起节点与所述路径检 测终止节点之间路径上的其它节点的信息锁定于所述第一通信节点的信息之 后。
可选地,接收单元 11接收到的所述第一路径检测消息包括值为 1的第一
TTL, 所述第一 TTL为 1用于指示所述第一通信节点被所述第二通信节点进 行路径检测。
可选地,接收单元 11接收的所述第一路径检测消息为互联网控制消息协 议 ICMP消息或者 ICMPv6消息或者空的 TCP包或者空的 UDP包。
可选地, 接收单元 11接收的所述第一路径检测消息为 TCP包或者 UDP 包; 处理单元 13还用于在发送单元 12向所述第二通信节点发送路径回复消 息之前, 根据所述 TCP包或者所述 UDP包中的校验值, 确定所述校验值检 测为失败。
可选地,接收单元 11接收的所述第一路径检测消息为包括路径检测选项 的 IP包, 所述路径检测选项用于指示所述第一通信节点被所述第二通信节点 进行路径检测。
可选地,处理单元 13还用于在获取所述第二网络中位于所述路径检测发 起节点与所述路径检测终止节点之间路径上的其它节点的信息之前, 将所述 第一路径检测消息中的源 IP地址由所述第二通信节点的 IP地址更换为所述 第一通信节点的 IP地址, 获得第二路径检测消息; 以及根据所述第二网络的 协议, 将所述第二路径检测消息进行封装, 获得封装后的所述第二路径检测 消息, 所述封装后的第二路径检测消息包括第二 TTL;
发送单元 12还用于根据所述封装后的第二路径检测消息中目的 IP地址, 至少两次向所述第二网络中位于所述路径检测发起节点与所述路径检测终止 节点之间路径上的其它节点发送所述封装后的第二路径检测消息; 其中, 第 一次发送的所述封装后的第二路径检测消息中包括的所述第二 TTL为 1, 每 次发送的所述封装后的第二路径检测消息中包括的所述第二 TTL 按照间隔 TTL为 1递增;
接收单元 11 还用于接收所述第二网络中位于所述路径检测发起节点与 所述路径检测终止节点之间路径上的其它节点发送的第二路径检测回复消 处理单元 13 获取所述第二网络中位于所述路径检测发起节点与所述路 径检测终止节点之间路径上的其它节点的信息, 具体为: 处理单元 13根据所 述第二网络中位于所述路径检测发起节点与所述路径检测终止节点之间路径 上的其它节点发送的所述第二路径检测回复消息, 获取所述第二网络中位于 所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节点的信 息。
可选地, 发送单元 12还用于, 当接收单元 11至少两次接收到所述第二 网络中同一节点发送的所述第二路径检测回复消息时, 或者, 当接收单元 11 在预设时间内未收到所述第二路径检测回复消息时, 停止发送所述第二路径 检测消息。
本实施例的通信节点, 可以用于执行本发明上述方法实施例中第一通信 节点所执行的技术方案, 其实现原理和技术效果类似, 此处不再赘述。
图 11为本发明通信节点实施例二的结构示意图, 如图 11所示, 本实施 例的通信节点作为第一通信节点, 可以包括: 接收器 21、 发送器 22和处理 器 23; 其中, 接收器 21用于接收第二通信节点作为路径检测发起节点通过 第一网络发送的第一路径检测消息, 所述第一路径检测消息用于指示所述第 一通信节点被所述第二通信节点进行路径检测, 所述第一路径检测消息包括 路径检测终止节点的 IP地址, 所述第一通信节点为第二网络的首节点, 所述 第一网络为 IP网络, 所述第二网络为 MPLS网络或者 IP隧道; 发送器 22用 于向所述第二通信节点发送第一路径回复消息, 所述路径回复消息包括所述 第一通信节点的信息;处理器 23用于所述第一通信节点作为代理路径检测发 起节点时, 获取所述第二网络中位于所述路径检测发起节点与所述路径检测 终止节点之间路径上的其它节点的信息;发送器 22还用于向所述第二通信节 点发送代理检测返回消息, 所述代理检测返回消息包括所述第二网络中位于 所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节点的信 息。
可选地,发送器 22发送的所述第一路径回复消息还包括代理检测等待信 息; 或者,
发送器 22还用于在向所述第二通信节点发送第一路径回复消息之前, 向 所述第二通信节点发送代理检测等待消息, 所述代理检测等待消息包括代理 检测等待信息;
其中, 所述代理检测等待信息用于指示: 所述第二通信节点未接收到所 述第一通信节点发送的所述第二网络中位于所述路径检测发起节点与所述路 径检测终止节点之间路径上的其它节点的信息之前保持路径检测状态以及所 述第二通信节点将所述第二网络中位于所述路径检测发起节点与所述路径检 测终止节点之间路径上的其它节点的信息锁定于所述第一通信节点的信息之 后。
可选地, 接收器 21接收到的所述第一路径检测消息包括值为 1 的第一 TTL, 所述第一 TTL为 1用于指示所述第一通信节点被所述第二通信节点进 行路径检测。
可选地, 接收器 21 接收的所述第一路径检测消息为 ICMP 消息或者 ICMPv6消息或者空的 TCP包或者空的 UDP包。
可选地,接收器 21接收的所述第一路径检测消息为 TCP包或者 UDP包; 处理器 23还用于在发送器 22向所述第二通信节点发送路径回复消息之前, 根据所述 TCP包或者所述 UDP包中的校验值, 确定所述校验值检测为失败。
可选地,接收器 21接收的所述第一路径检测消息为包括路径检测选项的 IP包, 所述路径检测选项用于指示所述第一通信节点被所述第二通信节点进 行路径检测。
可选地,处理器 23还用于在获取所述第二网络中位于所述路径检测发起 节点与所述路径检测终止节点之间路径上的其它节点的信息之前, 将所述第 一路径检测消息中的源 IP地址由所述第二通信节点的 IP地址更换为所述第 一通信节点的 IP地址, 获得第二路径检测消息; 以及根据所述第二网络的协 议, 将所述第二路径检测消息进行封装, 获得封装后的所述第二路径检测消 息, 所述封装后的第二路径检测消息包括第二 TTL;
发送器 22还用于根据所述封装后的第二路径检测消息中目的 IP地址, 至少两次向所述第二网络中位于所述路径检测发起节点与所述路径检测终止 节点之间路径上的其它节点发送所述封装后的第二路径检测消息; 其中, 第 一次发送的所述封装后的第二路径检测消息中包括的所述第二 TTL为 1, 每 次发送的所述封装后的第二路径检测消息中包括的所述第二 TTL 按照间隔 TTL为 1递增;
接收器 21 还用于接收所述第二网络中位于所述路径检测发起节点与所 述路径检测终止节点之间路径上的其它节点发送的第二路径检测回复消息; 处理器 23 获取所述第二网络中位于所述路径检测发起节点与所述路径 检测终止节点之间路径上的其它节点的信息, 具体为: 处理器 23根据所述第 二网络中位于所述路径检测发起节点与所述路径检测终止节点之间路径上的 其它节点发送的所述第二路径检测回复消息, 获取所述第二网络中位于所述 路径检测发起节点与所述路径检测终止节点之间路径上的其它节点的信息。
可选地, 发送器 22还用于, 当接收器 21至少两次接收到所述第二网络 中同一节点发送的所述第二路径检测回复消息时, 或者, 当接收器 21在预设 时间内未收到所述第二路径检测回复消息时, 停止发送所述第二路径检测消 息。
本实施例的通信节点, 可以用于执行本发明上述方法实施例中第一通信 节点所执行的技术方案, 其实现原理和技术效果类似, 此处不再赘述。
图 12为本发明通信节点实施例三的结构示意图, 如图 12所示, 本实施 例的通信节点作为第二通信节点, 可以包括: 发送单元 31、 接收单元 32和 处理单元 33; 其中, 发送单元 31用于所述第二通信节点作为路径检测发起 节点时, 根据路径检测终止节点的 IP地址, 通过第一网络向所述路径检测终 止节点发送路径检测消息, 所述第一网络为互联网协议 IP网络, 所述第一路 径检测消息用于指示所述第一通信节点正进行路径检测;接收单元 32用于接 收第一通信节点发送的第一路径回复消息, 所述第一通信节点为第二网络的 首节点, 所述第二网络为 MPLS网络或者 IP隧道, 所述第一路径回复消息包 括所述第一通信节点的信息; 以及接收所述第一通信节点发送的代理检测返 回消息, 所述代理检测返回消息包括所述第二网络中位于所述路径检测发起 节点与所述路径检测终止节点之间路径上的其它节点的信息;处理单元 33用 于将所述第二网络中位于所述路径检测发起节点与所述路径检测终止节点之 间路径上的其它节点的信息锁定于所述第一通信节点的信息之后。
可选地,接收单元 32接收的所述第一路径回复消息还包括代理检测等待 信息; 或者,
接收单元 32 还用于在接收所述第一通信节点发送的第一路径回复消息 之后, 接收所述第一通信节点发送的代理检测等待消息, 所述代理检测等待 消息包括代理检测等待信息;
其中, 所述代理检测等待信息用于指示: 所述第二通信节点未接收到所 述第一通信节点发送的所述第二网络中位于所述路径检测发起节点与所述路 径检测终止节点之间路径上的其它节点的信息之前保持路径检测状态以及所 述第二通信节点将所述第二网络中位于所述路径检测发起节点与所述路径检 测终止节点之间路径上的其它节点的信息锁定于所述第一通信节点的信息之 后;
处理单元 33具体用于: 根据所述代理检测等待信息, 将所述第二网络中 位于所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节点 的信息锁定于所述第一通信节点的信息之后。
可选地,处理单元 33还用于在将所述第二网络中位于所述路径检测发起 节点与所述路径检测终止节点之间路径上的其它节点的信息锁定于所述第一 通信节点的信息之后,当确定接收单元 32已接收到所述路径检测终止节点发 送的路径回复消息时, 或者, 当确定接收单元 32在预设时间内未接收到路径 回复消息时, 根据所述代理检测等待信息, 停止路径检测。
可选地, 发送单元 31具体用于: 所述第二通信节点作为路径检测发起节 点时, 根据所述路径检测终止节点的 IP地址, 通过第一网络向所述路径检测 终止节点至少发送三次路径检测消息, 所述路径检测消息包括第一 TTL; 其 中, 第一次发送的所述路径检测消息中包括的所述第一 TTL为 1, 每次发送 的所述路径检测消息中包括的所述第一 TTL按照间隔 TTL为 1递增。
可选地,发送单元 31发送的所述路径检测消息为 ICMP消息或者 ICMPv6 消息或者空的 TCP包或者空的 UDP包。
可选地, 发送单元 31发送的所述路径检测消息为 TCP包或者 UDP包, 所述 TCP包或者所述 UDP包中包括校验值, 所述校验值的检测结果为失败。
可选地, 发送单元 31具体用于: 当所述第二通信节点作为路径检测发起 节点时, 根据所述路径检测终止节点的 IP地址, 通过第一网络一次向所述路 径检测终止节点发送包括路径检测选项的 IP包,所述路径检测选项用于指示 所述第二通信节点正进行路径检测。
本实施例的通信节点, 可以用于执行本发明上述方法实施例中第二通信 节点所执行的技术方案, 其实现原理和技术效果类似, 此处不再赘述。
图 13为本发明通信节点实施例四的结构示意图, 如图 13所示, 本实施 例的通信节点作为第二通信节点, 可以包括: 发送器 41、 接收器 42和处理 器 43; 其中, 发送器 41用于所述第二通信节点作为路径检测发起节点时, 根据路径检测终止节点的 IP地址, 通过第一网络向所述路径检测终止节点发 送路径检测消息, 所述第一网络为互联网协议 IP网络, 所述第一路径检测消 息用于指示所述第一通信节点正进行路径检测;接收器 42用于接收第一通信 节点发送的第一路径回复消息, 所述第一通信节点为第二网络的首节点, 所 述第二网络为 MPLS网络或者 IP隧道,所述第一路径回复消息包括所述第一 通信节点的信息; 以及接收所述第一通信节点发送的代理检测返回消息, 所 述代理检测返回消息包括所述第二网络中位于所述路径检测发起节点与所述 路径检测终止节点之间路径上的其它节点的信息;处理器 43用于将所述第二 网络中位于所述路径检测发起节点与所述路径检测终止节点之间路径上的其 它节点的信息锁定于所述第一通信节点的信息之后。
可选地,接收器 42接收的所述第一路径回复消息还包括代理检测等待信 息; 或者,
接收器 42 还用于在接收所述第一通信节点发送的第一路径回复消息之 后, 接收所述第一通信节点发送的代理检测等待消息, 所述代理检测等待消 息包括代理检测等待信息;
其中, 所述代理检测等待信息用于指示: 所述第二通信节点未接收到所 述第一通信节点发送的所述第二网络中位于所述路径检测发起节点与所述路 径检测终止节点之间路径上的其它节点的信息之前保持路径检测状态以及所 述第二通信节点将所述第二网络中位于所述路径检测发起节点与所述路径检 测终止节点之间路径上的其它节点的信息锁定于所述第一通信节点的信息之 后;
处理器 43具体用于: 根据所述代理检测等待信息, 将所述第二网络中位 于所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节点的 信息锁定于所述第一通信节点的信息之后。
可选地,处理器 43还用于在将所述第二网络中位于所述路径检测发起节 点与所述路径检测终止节点之间路径上的其它节点的信息锁定于所述第一通 信节点的信息之后,当确定接收器 42已接收到所述路径检测终止节点发送的 路径回复消息时, 或者, 当确定接收器 42在预设时间内未接收到路径回复消 息时, 根据所述代理检测等待信息, 停止路径检测。
可选地, 发送器 41具体用于: 所述第二通信节点作为路径检测发起节点 时, 根据所述路径检测终止节点的 IP地址, 通过第一网络向所述路径检测终 止节点至少发送三次路径检测消息, 所述路径检测消息包括第一 TTL; 其中, 第一次发送的所述路径检测消息中包括的所述第一 TTL为 1, 每次发送的所 述路径检测消息中包括的所述第一 TTL按照间隔 TTL为 1递增。
可选地, 发送器 41发送的所述路径检测消息为 ICMP消息或者 ICMPv6 消息或者空的 TCP包或者空的 UDP包。
可选地, 发送器 41发送的所述路径检测消息为 TCP包或者 UDP包, 所 述 TCP包或者所述 UDP包中包括校验值, 所述校验值的检测结果为失败。
可选地, 发送器 41具体用于: 当所述第二通信节点作为路径检测发起节 点时, 根据所述路径检测终止节点的 IP地址, 通过第一网络一次向所述路径 检测终止节点发送包括路径检测选项的 IP包, 所述路径检测选项用于指示所 述第二通信节点正进行路径检测。
本实施例的通信节点, 可以用于执行本发明上述方法实施例中第二通信 节点所执行的技术方案, 其实现原理和技术效果类似, 此处不再赘述。
本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分歩骤 可以通过程序指令相关的硬件来完成, 前述的程序可以存储于一计算机可读 取存储介质中, 该程序在执行时, 执行包括上述方法实施例的歩骤; 而前述 的存储介质包括: ROM、 RAM,磁碟或者光盘等各种可以存储程序代码的介 质。
最后应说明的是: 以上各实施例仅用以说明本发明的技术方案, 而非对 其限制; 尽管参照前述各实施例对本发明进行了详细的说明, 本领域的普通 技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改, 或者对其中部分或者全部技术特征进行等同替换; 而这些修改或者替换, 并 不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims

权 利 要 求 书
1、 一种路径检测方法, 其特征在于, 包括:
第一通信节点接收第二通信节点作为路径检测发起节点通过第一网络发 送的第一路径检测消息, 所述第一路径检测消息用于指示所述第一通信节点 被所述第二通信节点进行路径检测, 所述第一路径检测消息包括路径检测终 止节点的互联网协议 IP地址, 所述第一通信节点为第二网络的首节点, 所述 第一网络为 IP网络, 所述第二网络为多协议标签交换协议 MPLS网络或者 IP隧道;
所述第一通信节点向所述第二通信节点发送第一路径回复消息, 所述路 径回复消息包括所述第一通信节点的信息;
所述第一通信节点作为代理路径检测发起节点, 获取所述第二网络中位 于所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节点的
I Ft Ή自、 .,
所述第一通信节点向所述第二通信节点发送代理检测返回消息, 所述代 理检测返回消息包括所述第二网络中位于所述路径检测发起节点与所述路径 检测终止节点之间路径上的其它节点的信息。
2、 根据权利要求 1所述的方法, 其特征在于, 所述第一路径回复消息还 包括代理检测等待信息; 或者,
所述第一通信节点向所述第二通信节点发送第一路径回复消息之前, 还 包括:
所述第一通信节点向所述第二通信节点发送代理检测等待消息, 所述代 理检测等待消息包括代理检测等待信息;
其中, 所述代理检测等待信息用于指示: 所述第二通信节点未接收到所 述第一通信节点发送的所述第二网络中位于所述路径检测发起节点与所述路 径检测终止节点之间路径上的其它节点的信息之前保持路径检测状态以及所 述第二通信节点将所述第二网络中位于所述路径检测发起节点与所述路径检 测终止节点之间路径上的其它节点的信息锁定于所述第一通信节点的信息之 后。
3、 根据权利要求 1或 2所述的方法, 其特征在于, 所述接收到的所述第 一路径检测消息包括值为 1的第一生存时间 TTL,所述第一 TTL为 1用于指 示所述第一通信节点被所述第二通信节点进行路径检测。
4、 根据权利要求 3所述的方法, 其特征在于, 所述第一路径检测消息为 互联网控制消息协议 ICMP 消息或者 ICMPv6 消息或者空的传输控制协议
TCP包或者空的用户数据协议 UDP包。
5、 根据权利要求 3所述的方法, 其特征在于, 所述第一路径检测消息为
TCP包或者 UDP包;
所述第一通信节点向所述第二通信节点发送路径回复消息之前,还包括: 所述第一通信节点根据所述 TCP包或者所述 UDP包中的校验值, 确定 所述校验值检测为失败。
6、 根据权利要求 1或 2所述的方法, 其特征在于, 所述第一路径检测消 息为包括路径检测选项的 IP包, 所述路径检测选项用于指示所述第一通信节 点被所述第二通信节点进行路径检测。
7、 根据权利要求 1-6任意一项所述的方法, 其特征在于, 所述第一通信 节点作为所述第二网络的路径检测发起节点, 获取所述第二网络中位于所述 路径检测发起节点与所述路径检测终止节点之间路径上的其它节点的信息之 m , 还包括:
所述第一通信节点将所述第一路径检测消息中的源 IP地址由所述第二通 信节点的 IP地址更换为所述第一通信节点的 IP地址, 获得第二路径检测消 息;
所述第一通信节点根据所述第二网络的协议, 将所述第二路径检测消息 进行封装, 获得封装后的所述第二路径检测消息, 所述封装后的第二路径检 测消息包括第二 TTL;
所述第一通信节点根据所述封装后的第二路径检测消息中目的 IP地址, 至少两次向所述第二网络中位于所述路径检测发起节点与所述路径检测终止 节点之间路径上的其它节点发送所述封装后的第二路径检测消息; 其中, 第 一次发送的所述封装后的第二路径检测消息中包括的所述第二 TTL为 1, 每 次发送的所述封装后的第二路径检测消息中包括的所述第二 TTL 按照间隔 TTL为 1递增;
所述第一通信节点接收所述第二网络中位于所述路径检测发起节点与所 述路径检测终止节点之间路径上的其它节点发送的第二路径检测回复消息; 所述第一通信节点作为代理路径检测发起节点, 获取所述第二网络中其 它节点的信息, 包括:
所述第一通信节点根据所述第二网络中位于所述路径检测发起节点与所 述路径检测终止节点之间路径上的其它节点发送的所述第二路径检测回复消 息, 获取所述第二网络中位于所述路径检测发起节点与所述路径检测终止节 点之间路径上的其它节点的信息。
8、 根据权利要求 7所述的方法, 其特征在于, 当所述第一通信节点至少 两次接收到所述第二网络中同一节点发送的所述第二路径检测回复消息时, 或者, 当所述第一通信节点在预设时间内未收到所述第二路径检测回复消息 时, 所述第一通信节点停止发送所述第二路径检测消息。
9、 一种路径检测方法, 其特征在于, 包括:
第二通信节点作为路径检测发起节点, 根据路径检测终止节点的互联网 协议 IP地址, 通过第一网络向所述路径检测终止节点发送路径检测消息, 所 述第一网络为互联网协议 IP网络, 所述第一路径检测消息用于指示所述第一 通信节点正进行路径检测;
所述第二通信节点接收第一通信节点发送的第一路径回复消息, 所述第 一通信节点为第二网络的首节点, 所述第二网络为多协议标签交换协议 MPLS网络或者 IP隧道, 所述第一路径回复消息包括所述第一通信节点的信 息;
所述第二通信节点接收所述第一通信节点发送的代理检测返回消息, 所 述代理检测返回消息包括所述第二网络中位于所述路径检测发起节点与所述 路径检测终止节点之间路径上的其它节点的信息;
所述第二通信节点将所述第二网络中位于所述路径检测发起节点与所述 路径检测终止节点之间路径上的其它节点的信息锁定于所述第一通信节点的 信息之后。
10、 根据权利要求 9所述的方法, 其特征在于, 所述第一路径回复消息 还包括代理检测等待信息; 或者,
所述第二通信节点接收所述第一通信节点发送的第一路径回复消息之 后, 还包括:
所述第二通信节点接收所述第一通信节点发送的代理检测等待消息, 所 述代理检测等待消息包括代理检测等待信息;
其中, 所述代理检测等待信息用于指示: 所述第二通信节点未接收到所 述第一通信节点发送的所述第二网络中位于所述路径检测发起节点与所述路 径检测终止节点之间路径上的其它节点的信息之前保持路径检测状态以及所 述第二通信节点将所述第二网络中位于所述路径检测发起节点与所述路径检 测终止节点之间路径上的其它节点的信息锁定于所述第一通信节点的信息之 后;
所述第二通信节点将所述第二网络中位于所述路径检测发起节点与所述 路径检测终止节点之间路径上的其它节点的信息锁定于所述第一通信节点的 信息之后, 包括:
所述第二通信节点根据所述代理检测等待信息, 将所述第二网络中位于 所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节点的信 息锁定于所述第一通信节点的信息之后。
11、 根据权利要求 10所述的方法, 其特征在于, 所述第二通信节点将所 述第二网络中位于所述路径检测发起节点与所述路径检测终止节点之间路径 上的其它节点的信息锁定于所述第一通信节点的信息之后, 还包括:
当所述第二通信节点确定已接收到所述路径检测终止节点发送的路径回 复消息时, 或者, 当所述第二通信节点确定在预设时间内未接收到路径回复 消息时, 所述第二通信节点根据所述代理检测等待信息, 停止路径检测。
12、 根据权利要求 9-11任意一项所述的方法, 其特征在于, 所述第二通 信节点作为路径检测发起节点,根据路径检测终止节点的互联网协议 IP地址, 通过第一网络向所述路径检测终止节点发送路径检测消息, 包括:
所述第二通信节点作为路径检测发起节点, 根据所述路径检测终止节点 的 IP地址,通过第一网络向所述路径检测终止节点至少发送三次路径检测消 息, 所述路径检测消息包括第一生存时间 TTL; 其中, 第一次发送的所述路 径检测消息中包括的所述第一 TTL为 1, 每次发送的所述路径检测消息中包 括的所述第一 TTL按照间隔 TTL为 1递增。
13、 根据权利要求 12所述的方法, 其特征在于,
所述路径检测消息为互联网控制消息协议 ICMP消息或者 ICMPv6消息 或者空的传输控制协议 TCP包或者空的用户数据协议 UDP包。
14、 根据权利要求 12所述的方法, 其特征在于, 所述路径检测消息为 TCP包或者 UDP包, 所述 TCP包或者所述 UDP包中包括校验值, 所述校验 值的检测结果为失败。
15、 根据权利要求 9-11任意一项所述的方法, 其特征在于, 所述第二通 信节点作为路径检测发起节点,根据路径检测终止节点的互联网协议 IP地址, 通过第一网络向所述路径检测终止节点发送路径检测消息, 包括:
所述第二通信节点作为路径检测发起节点, 根据所述路径检测终止节点 的 IP地址,通过第一网络一次向所述路径检测终止节点发送包括路径检测选 项的 IP包, 所述路径检测选项用于指示所述第二通信节点正进行路径检测。
16、 一种通信节点, 所述通信节点作为第一通信节点, 其特征在于, 包 括:
接收单元, 用于接收第二通信节点作为路径检测发起节点通过第一网络 发送的第一路径检测消息, 所述第一路径检测消息用于指示所述第一通信节 点被所述第二通信节点进行路径检测, 所述第一路径检测消息包括路径检测 终止节点的互联网协议 IP地址, 所述第一通信节点为第二网络的首节点, 所 述第一网络为 IP网络, 所述第二网络为多协议标签交换协议 MPLS网络或 者 IP隧道;
发送单元, 用于向所述第二通信节点发送第一路径回复消息, 所述路径 回复消息包括所述第一通信节点的信息;
处理单元, 用于所述第一通信节点作为代理路径检测发起节点时, 获取 所述第二网络中位于所述路径检测发起节点与所述路径检测终止节点之间路 径上的其它节点的信息;
所述发送单元还用于向所述第二通信节点发送代理检测返回消息, 所述 代理检测返回消息包括所述第二网络中位于所述路径检测发起节点与所述路 径检测终止节点之间路径上的其它节点的信息。
17、 根据权利要求 16所述的通信节点, 其特征在于, 所述发送单元发送 的所述第一路径回复消息还包括代理检测等待信息; 或者,
所述发送单元还用于在向所述第二通信节点发送第一路径回复消息之 前, 向所述第二通信节点发送代理检测等待消息, 所述代理检测等待消息包 括代理检测等待信息; 其中, 所述代理检测等待信息用于指示: 所述第二通信节点未接收到所 述第一通信节点发送的所述第二网络中位于所述路径检测发起节点与所述路 径检测终止节点之间路径上的其它节点的信息之前保持路径检测状态以及所 述第二通信节点将所述第二网络中位于所述路径检测发起节点与所述路径检 测终止节点之间路径上的其它节点的信息锁定于所述第一通信节点的信息之 后。
18、 根据权利要求 16或 17所述的通信节点, 其特征在于, 所述接收单 元接收到的所述第一路径检测消息包括值为 1的第一生存时间 TTL, 所述第 一 TTL为 1用于指示所述第一通信节点被所述第二通信节点进行路径检测。
19、 根据权利要求 18所述的通信节点, 其特征在于, 所述接收单元接收 的所述第一路径检测消息为互联网控制消息协议 ICMP消息或者 ICMPv6消 息或者空的传输控制协议 TCP包或者空的用户数据协议 UDP包。
20、 根据权利要求 18所述的通信节点, 其特征在于, 所述接收单元接收 的所述第一路径检测消息为 TCP包或者 UDP包;
所述处理单元还用于在所述发送单元向所述第二通信节点发送路径回复 消息之前, 根据所述 TCP包或者所述 UDP包中的校验值, 确定所述校验值 检测为失败。
21、 根据权利要求 16或 17所述的通信节点, 其特征在于, 所述接收单 元接收的所述第一路径检测消息为包括路径检测选项的 IP包, 所述路径检测 选项用于指示所述第一通信节点被所述第二通信节点进行路径检测。
22、 根据权利要求 16-21任意一项所述的通信节点, 其特征在于, 所述 处理单元, 还用于在获取所述第二网络中位于所述路径检测发起节点与所述 路径检测终止节点之间路径上的其它节点的信息之前, 将所述第一路径检测 消息中的源 IP地址由所述第二通信节点的 IP地址更换为所述第一通信节点 的 IP地址, 获得第二路径检测消息; 以及根据所述第二网络的协议, 将所述 第二路径检测消息进行封装, 获得封装后的所述第二路径检测消息, 所述封 装后的第二路径检测消息包括第二 TTL;
所述发送单元还用于根据所述封装后的第二路径检测消息中目的 IP 地 址, 至少两次向所述第二网络中位于所述路径检测发起节点与所述路径检测 终止节点之间路径上的其它节点发送所述封装后的第二路径检测消息;其中, 第一次发送的所述封装后的第二路径检测消息中包括的所述第二 TTL为 1, 每次发送的所述封装后的第二路径检测消息中包括的所述第二 TTL按照间隔 TTL为 1递增;
所述接收单元还用于接收所述第二网络中位于所述路径检测发起节点与 所述路径检测终止节点之间路径上的其它节点发送的第二路径检测回复消 息;
所述处理单元获取所述第二网络中位于所述路径检测发起节点与所述路 径检测终止节点之间路径上的其它节点的信息, 具体为: 所述处理单元根据 所述第二网络中位于所述路径检测发起节点与所述路径检测终止节点之间路 径上的其它节点发送的所述第二路径检测回复消息, 获取所述第二网络中位 于所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节点的
I Ft自、。
23、 根据权利要求 22所述的通信节点, 其特征在于, 所述发送单元还用 于, 当所述接收单元至少两次接收到所述第二网络中同一节点发送的所述第 二路径检测回复消息时, 或者, 当所述接收单元在预设时间内未收到所述第 二路径检测回复消息时, 停止发送所述第二路径检测消息。
24、 一种通信节点, 所述通信节点作为第二通信节点, 其特征在于, 包 括:
发送单元, 用于所述第二通信节点作为路径检测发起节点时, 根据路径 检测终止节点的互联网协议 IP地址, 通过第一网络向所述路径检测终止节点 发送路径检测消息, 所述第一网络为互联网协议 IP网络, 所述第一路径检测 消息用于指示所述第一通信节点正进行路径检测;
接收单元, 用于接收第一通信节点发送的第一路径回复消息, 所述第一 通信节点为第二网络的首节点, 所述第二网络为多协议标签交换协议 MPLS 网络或者 IP隧道, 所述第一路径回复消息包括所述第一通信节点的信息; 以 及接收所述第一通信节点发送的代理检测返回消息, 所述代理检测返回消息 包括所述第二网络中位于所述路径检测发起节点与所述路径检测终止节点之 间路径上的其它节点的信息;
处理单元, 用于将所述第二网络中位于所述路径检测发起节点与所述路 径检测终止节点之间路径上的其它节点的信息锁定于所述第一通信节点的信 息之后。
25、 根据权利要求 24所述的通信节点, 其特征在于, 所述接收单元接收 的所述第一路径回复消息还包括代理检测等待信息; 或者,
所述接收单元还用于在接收所述第一通信节点发送的第一路径回复消息 之后, 接收所述第一通信节点发送的代理检测等待消息, 所述代理检测等待 消息包括代理检测等待信息;
其中, 所述代理检测等待信息用于指示: 所述第二通信节点未接收到所 述第一通信节点发送的所述第二网络中位于所述路径检测发起节点与所述路 径检测终止节点之间路径上的其它节点的信息之前保持路径检测状态以及所 述第二通信节点将所述第二网络中位于所述路径检测发起节点与所述路径检 测终止节点之间路径上的其它节点的信息锁定于所述第一通信节点的信息之 后;
所述处理单元具体用于: 根据所述代理检测等待信息, 将所述第二网络 中位于所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节 点的信息锁定于所述第一通信节点的信息之后。
26、 根据权利要求 25所述的通信节点, 其特征在于, 所述处理单元还用 于在将所述第二网络中位于所述路径检测发起节点与所述路径检测终止节点 之间路径上的其它节点的信息锁定于所述第一通信节点的信息之后, 当确定 所述接收单元已接收到所述路径检测终止节点发送的路径回复消息时,或者, 当确定所述接收单元在预设时间内未接收到路径回复消息时, 根据所述代理 检测等待信息, 停止路径检测。
27、 根据权利要求 24-26任意一项所述的通信节点, 其特征在于, 所述 发送单元具体用于: 所述第二通信节点作为路径检测发起节点时, 根据所述 路径检测终止节点的 IP地址, 通过第一网络向所述路径检测终止节点至少发 送三次路径检测消息, 所述路径检测消息包括第一生存时间 TTL; 其中, 第 一次发送的所述路径检测消息中包括的所述第一 TTL为 1, 每次发送的所述 路径检测消息中包括的所述第一 TTL按照间隔 TTL为 1递增。
28、 根据权利要求 27所述的通信节点, 其特征在于, 所述发送单元发送 的所述路径检测消息为互联网控制消息协议 ICMP消息或者 ICMPv6消息或 者空的传输控制协议 TCP包或者空的用户数据协议 UDP包。
29、 根据权利要求 27所述的通信节点, 其特征在于, 所述发送单元发送 的所述路径检测消息为 TCP包或者 UDP包,所述 TCP包或者所述 UDP包中 包括校验值, 所述校验值的检测结果为失败。
30、 根据权利要求 24-26任意一项所述的通信节点, 其特征在于, 所述 发送单元具体用于: 当所述第二通信节点作为路径检测发起节点时, 根据所 述路径检测终止节点的 IP地址, 通过第一网络一次向所述路径检测终止节点 发送包括路径检测选项的 IP包, 所述路径检测选项用于指示所述第二通信节 点正进行路径检测。
31、 一种通信节点, 所述通信节点作为第一通信节点, 其特征在于, 包 括:
接收器, 用于接收第二通信节点作为路径检测发起节点通过第一网络发 送的第一路径检测消息, 所述第一路径检测消息用于指示所述第一通信节点 被所述第二通信节点进行路径检测, 所述第一路径检测消息包括路径检测终 止节点的互联网协议 IP地址, 所述第一通信节点为第二网络的首节点, 所述 第一网络为 IP网络, 所述第二网络为多协议标签交换协议 MPLS网络或者 IP隧道;
发送器, 用于向所述第二通信节点发送第一路径回复消息, 所述路径回 复消息包括所述第一通信节点的信息;
处理器, 用于所述第一通信节点作为代理路径检测发起节点时, 获取所 述第二网络中位于所述路径检测发起节点与所述路径检测终止节点之间路径 上的其它节点的信息;
所述发送器还用于向所述第二通信节点发送代理检测返回消息, 所述代 理检测返回消息包括所述第二网络中位于所述路径检测发起节点与所述路径 检测终止节点之间路径上的其它节点的信息。
32、 根据权利要求 31所述的通信节点, 其特征在于, 所述发送器发送的 所述第一路径回复消息还包括代理检测等待信息; 或者,
所述发送器还用于在向所述第二通信节点发送第一路径回复消息之前, 向所述第二通信节点发送代理检测等待消息, 所述代理检测等待消息包括代 理检测等待信息;
其中, 所述代理检测等待信息用于指示: 所述第二通信节点未接收到所 述第一通信节点发送的所述第二网络中位于所述路径检测发起节点与所述路 径检测终止节点之间路径上的其它节点的信息之前保持路径检测状态以及所 述第二通信节点将所述第二网络中位于所述路径检测发起节点与所述路径检 测终止节点之间路径上的其它节点的信息锁定于所述第一通信节点的信息之 后。
33、 根据权利要求 31或 32所述的通信节点, 其特征在于, 所述接收器 接收到的所述第一路径检测消息包括值为 1的第一生存时间 TTL, 所述第一 TTL为 1用于指示所述第一通信节点被所述第二通信节点进行路径检测。
34、 根据权利要求 33所述的通信节点, 其特征在于, 所述接收器接收的 所述第一路径检测消息为互联网控制消息协议 ICMP消息或者 ICMPv6消息 或者空的传输控制协议 TCP包或者空的用户数据协议 UDP包。
35、 根据权利要求 33所述的通信节点, 其特征在于, 所述接收器接收的 所述第一路径检测消息为 TCP包或者 UDP包;
所述处理器还用于在所述发送器向所述第二通信节点发送路径回复消息 之前, 根据所述 TCP包或者所述 UDP包中的校验值, 确定所述校验值检测 为失败。
36、 根据权利要求 31或 32所述的通信节点, 其特征在于, 所述接收器 接收的所述第一路径检测消息为包括路径检测选项的 IP包, 所述路径检测选 项用于指示所述第一通信节点被所述第二通信节点进行路径检测。
37、 根据权利要求 31-36任意一项所述的通信节点, 其特征在于, 所述 处理器, 还用于在获取所述第二网络中位于所述路径检测发起节点与所述路 径检测终止节点之间路径上的其它节点的信息之前, 将所述第一路径检测消 息中的源 IP地址由所述第二通信节点的 IP地址更换为所述第一通信节点的 IP地址, 获得第二路径检测消息; 以及根据所述第二网络的协议, 将所述第 二路径检测消息进行封装, 获得封装后的所述第二路径检测消息, 所述封装 后的第二路径检测消息包括第二 TTL;
所述发送器还用于根据所述封装后的第二路径检测消息中目的 IP地址, 至少两次向所述第二网络中位于所述路径检测发起节点与所述路径检测终止 节点之间路径上的其它节点发送所述封装后的第二路径检测消息; 其中, 第 一次发送的所述封装后的第二路径检测消息中包括的所述第二 TTL为 1, 每 次发送的所述封装后的第二路径检测消息中包括的所述第二 TTL 按照间隔 TTL为 1递增;
所述接收器还用于接收所述第二网络中位于所述路径检测发起节点与所 述路径检测终止节点之间路径上的其它节点发送的第二路径检测回复消息; 所述处理器获取所述第二网络中位于所述路径检测发起节点与所述路径 检测终止节点之间路径上的其它节点的信息, 具体为: 所述处理器根据所述 第二网络中位于所述路径检测发起节点与所述路径检测终止节点之间路径上 的其它节点发送的所述第二路径检测回复消息, 获取所述第二网络中位于所 述路径检测发起节点与所述路径检测终止节点之间路径上的其它节点的信 息。
38、根据权利要求 37所述的通信节点,其特征在于,所述发送器还用于, 当所述接收器至少两次接收到所述第二网络中同一节点发送的所述第二路径 检测回复消息时, 或者, 当所述接收器在预设时间内未收到所述第二路径检 测回复消息时, 停止发送所述第二路径检测消息。
39、 一种通信节点, 所述通信节点作为第二通信节点, 其特征在于, 包 括:
发送器, 用于所述第二通信节点作为路径检测发起节点时, 根据路径检 测终止节点的互联网协议 IP地址, 通过第一网络向所述路径检测终止节点发 送路径检测消息, 所述第一网络为互联网协议 IP网络, 所述第一路径检测消 息用于指示所述第一通信节点正进行路径检测;
接收器, 用于接收第一通信节点发送的第一路径回复消息, 所述第一通 信节点为第二网络的首节点,所述第二网络为多协议标签交换协议 MPLS网 络或者 IP隧道, 所述第一路径回复消息包括所述第一通信节点的信息; 以及 接收所述第一通信节点发送的代理检测返回消息, 所述代理检测返回消息包 括所述第二网络中位于所述路径检测发起节点与所述路径检测终止节点之间 路径上的其它节点的信息;
处理器, 用于将所述第二网络中位于所述路径检测发起节点与所述路径 检测终止节点之间路径上的其它节点的信息锁定于所述第一通信节点的信息 之后。
40、 根据权利要求 39所述的通信节点, 其特征在于, 所述接收器接收的 所述第一路径回复消息还包括代理检测等待信息; 或者,
所述接收器还用于在接收所述第一通信节点发送的第一路径回复消息之 后, 接收所述第一通信节点发送的代理检测等待消息, 所述代理检测等待消 息包括代理检测等待信息;
其中, 所述代理检测等待信息用于指示: 所述第二通信节点未接收到所 述第一通信节点发送的所述第二网络中位于所述路径检测发起节点与所述路 径检测终止节点之间路径上的其它节点的信息之前保持路径检测状态以及所 述第二通信节点将所述第二网络中位于所述路径检测发起节点与所述路径检 止节点之间路径上的其它节点的信息锁定于所述第一通信节点的信息之
Figure imgf000070_0001
所述处理器具体用于: 根据所述代理检测等待信息, 将所述第二网络中 位于所述路径检测发起节点与所述路径检测终止节点之间路径上的其它节点 的信息锁定于所述第一通信节点的信息之后。
41、 根据权利要求 40所述的通信节点, 其特征在于, 所述处理器还用于 在将所述第二网络中位于所述路径检测发起节点与所述路径检测终止节点之 间路径上的其它节点的信息锁定于所述第一通信节点的信息之后, 当确定所 述接收器已接收到所述路径检测终止节点发送的路径回复消息时, 或者, 当 确定所述接收器在预设时间内未接收到路径回复消息时, 根据所述代理检测 等待信息, 停止路径检测。
42、 根据权利要求 39-41任意一项所述的通信节点, 其特征在于, 所述 发送器具体用于: 所述第二通信节点作为路径检测发起节点时, 根据所述路 径检测终止节点的 IP地址, 通过第一网络向所述路径检测终止节点至少发送 三次路径检测消息, 所述路径检测消息包括第一生存时间 TTL; 其中, 第一 次发送的所述路径检测消息中包括的所述第一 TTL为 1, 每次发送的所述路 径检测消息中包括的所述第一 TTL按照间隔 TTL为 1递增。
43、 根据权利要求 42所述的通信节点, 其特征在于, 所述发送器发送的 所述路径检测消息为互联网控制消息协议 ICMP消息或者 ICMPv6消息或者 空的传输控制协议 TCP包或者空的用户数据协议 UDP包。
44、 根据权利要求 42所述的通信节点, 其特征在于, 所述发送器发送的 所述路径检测消息为 TCP包或者 UDP包,所述 TCP包或者所述 UDP包中包 括校验值, 所述校验值的检测结果为失败。
45、 根据权利要求 39-41任意一项所述的通信节点, 其特征在于, 所述 发送器具体用于: 当所述第二通信节点作为路径检测发起节点时, 根据所述 路径检测终止节点的 IP地址, 通过第一网络一次向所述路径检测终止节点发 送包括路径检测选项的 IP包, 所述路径检测选项用于指示所述第二通信节点 正进行路径检测。
PCT/CN2014/077185 2014-05-09 2014-05-09 路径检测方法和通信节点 WO2015168948A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201480025685.3A CN105324962B (zh) 2014-05-09 2014-05-09 路径检测方法和通信节点
PCT/CN2014/077185 WO2015168948A1 (zh) 2014-05-09 2014-05-09 路径检测方法和通信节点

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/077185 WO2015168948A1 (zh) 2014-05-09 2014-05-09 路径检测方法和通信节点

Publications (1)

Publication Number Publication Date
WO2015168948A1 true WO2015168948A1 (zh) 2015-11-12

Family

ID=54392029

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/077185 WO2015168948A1 (zh) 2014-05-09 2014-05-09 路径检测方法和通信节点

Country Status (2)

Country Link
CN (1) CN105324962B (zh)
WO (1) WO2015168948A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101124785A (zh) * 2005-03-04 2008-02-13 思科技术公司 用于网络可达性检测的系统和方法
CN101155054A (zh) * 2006-09-28 2008-04-02 华为技术有限公司 自治系统域间pce路径自动探测和计算的方法和装置
CN102437931A (zh) * 2011-12-29 2012-05-02 华为技术有限公司 一种业务路径的探测方法及设备
EP2720420A1 (en) * 2012-10-12 2014-04-16 Alcatel Lucent Method for exchanging information for establishing a path between two nodes of a communication network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101124785A (zh) * 2005-03-04 2008-02-13 思科技术公司 用于网络可达性检测的系统和方法
CN101155054A (zh) * 2006-09-28 2008-04-02 华为技术有限公司 自治系统域间pce路径自动探测和计算的方法和装置
CN102437931A (zh) * 2011-12-29 2012-05-02 华为技术有限公司 一种业务路径的探测方法及设备
EP2720420A1 (en) * 2012-10-12 2014-04-16 Alcatel Lucent Method for exchanging information for establishing a path between two nodes of a communication network

Also Published As

Publication number Publication date
CN105324962B (zh) 2018-10-12
CN105324962A (zh) 2016-02-10

Similar Documents

Publication Publication Date Title
US10560352B2 (en) Subscriber-aware TWAMP data monitoring in computer networks
US10791053B2 (en) Service function chain SFC-based communication method, and apparatus
KR102063231B1 (ko) IPV6(Internet Protocol version 6) 네트워크에서의 데이터 패킷 전송 방법 및 장치
US20170149675A1 (en) Packet retransmission method and apparatus
WO2016058245A1 (zh) 操作、管理和维护oam报文处理方法及装置
US9967193B2 (en) Method and system for increasing data flow transmission
US8130775B2 (en) Mechanism for protecting a pseudo-wire
EP4221102A1 (en) Data processing method and apparatus, storage medium, and electronic apparatus
CN110535768B (zh) 组播数据传输方法及相关设备
JP5363658B1 (ja) 中継装置、中継装置の制御方法、及び、ネットワークシステム
WO2013071801A1 (zh) 多协议标签交换环网的检测方法、装置及系统
WO2016050177A1 (zh) 确定隧道最大传输单元的方法、网络设备和系统
EP3151487A1 (en) Pim source discovery by last hop router on shared tree
US11363123B2 (en) Supporting internet protocol version 4 (IPv4) extension headers
KR20140017678A (ko) 다중경로 오버레이 네트워크 및 그의 다중경로 관리 프로토콜
US11849493B2 (en) Modified methods and system of transmitting and receiving transmission control protocol segments over internet protocol packets
WO2019052264A1 (zh) 传输报文的方法、网络组件和计算机可读存储介质
CN108234269A (zh) 组播报文转发方法和装置
WO2015168948A1 (zh) 路径检测方法和通信节点
US20140369189A1 (en) Method of controlling packet transmission in network system and network system transmitting packet using pseudo-tcp agent
KR20170103927A (ko) 점대 다중점 서비스 전송 방법 및 장치
KR101002811B1 (ko) Ip 멀티캐스팅 패킷 터널링 제공 방법 및 장치
WO2018205884A1 (zh) 信令配置方法及装置
US20170041215A1 (en) Path checking method, sink node device, and communications system
JP2007110654A (ja) ブリッジ装置及びブリッジ装置の制御方法

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201480025685.3

Country of ref document: CN

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

Ref document number: 14891355

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: 14891355

Country of ref document: EP

Kind code of ref document: A1