[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

WO2011144114A2 - Method, device and system for detecting path information - Google Patents

Method, device and system for detecting path information Download PDF

Info

Publication number
WO2011144114A2
WO2011144114A2 PCT/CN2011/074804 CN2011074804W WO2011144114A2 WO 2011144114 A2 WO2011144114 A2 WO 2011144114A2 CN 2011074804 W CN2011074804 W CN 2011074804W WO 2011144114 A2 WO2011144114 A2 WO 2011144114A2
Authority
WO
WIPO (PCT)
Prior art keywords
node
information
hop
packet
path
Prior art date
Application number
PCT/CN2011/074804
Other languages
French (fr)
Chinese (zh)
Other versions
WO2011144114A3 (en
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 PCT/CN2011/074804 priority Critical patent/WO2011144114A2/en
Priority to CN201180000807.XA priority patent/CN102217378B/en
Publication of WO2011144114A2 publication Critical patent/WO2011144114A2/en
Publication of WO2011144114A3 publication Critical patent/WO2011144114A3/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/26Route discovery packet

Definitions

  • the present invention relates to mobile communication technologies, and in particular, to a method, device and system for detecting path information. Background technique
  • IP network requirements are known, controllable, and configurable. For example, in a wireless carrier network, the service requirements are high, and the endpoint is required to perform transmission and reception control according to network traffic and path state, and it is necessary to understand the status of each hop of the network forwarding. At this time, you need to understand the forwarding behavior of the data flow inside the network. For example, you can know which routers have passed through the end-to-end forwarding process, and what parameters or behaviors these routers have.
  • the perception of the IP route is generally performed by using the tracerouter (TraceRouter).
  • the maximum transmission unit (MTU) of the router is detected by the Path MTU (PMTU).
  • the TraceRouter technology uses the Internet to control the Internet Protocol Message Protocol (ICMP) message.
  • ICMP Internet Protocol Message Protocol
  • the time-to-live (TTL) is used to make the intermediate router unable to forward the service packet.
  • the ICMP timeout error is replied to the source.
  • the source is transmitted. Analyze the source IP address of the ICMP packet to learn the IP address of the intermediate router. Because the intermediate router or the destination host may not open the ICMP error handling reply, it may cause the addresses of some routers to be unavailable.
  • the reply time of the ICMP message cannot be determined.
  • the timeout mechanism is used to increase the TTL. If the hop count is large, it takes a long time.
  • the above-mentioned sensing methods are based on the timeout mechanism.
  • the sending end changes the packet and obtains the routing information after multiple times of detection. As a result, the detection time is long and may not be successful. Summary of the invention
  • the embodiment of the invention provides a method, a device and a system for detecting path information, which ensure the success of the path detection and reduce the time required.
  • the embodiment of the invention provides a method for detecting path information, including:
  • the source node generates a path information probe packet, where the path information probe packet includes a hop-by-hop option, a source address, and a destination address;
  • the source node sends the path information detection packet to the destination node by using the to-be-detected path corresponding to the source address and the destination address, where the path information detection packet passes through a node that needs to record node information in the to-be-detected path.
  • the node that needs to record the node information records its own node information in the hop-by-hop option;
  • the source node receives the path information response packet that is sent by the destination node and includes the node information, and determines the information of the to-be-detected path according to the node information included in the path information response packet, where the path information is in the response packet.
  • the node information includes node information recorded in the hop-by-hop option acquired by the destination node.
  • the embodiment of the invention provides a method for detecting path information, including:
  • the node that needs to record the node information receives the path information probe packet sent by the source node, where the path information probe packet includes a hop-by-hop option, a source address, and a destination address.
  • the node that needs to record the node information records its own node information in the hop-by-hop option, and forwards the path information probe packet in which the node information is recorded to the next hop node in the to-be-detected path corresponding to the source address and the destination address. .
  • An embodiment of the present invention provides an apparatus for detecting path information, including:
  • a generating module configured to generate a path information detecting packet, where the path information detecting packet includes a hop-by-hop option, a source address, and a destination address;
  • a sending module configured to send the path information detection packet to the destination node by using the to-be-detected path corresponding to the source address and the destination address, where the path information detection packet passes through a node that needs to record node information in the to-be-detected path , the node that needs to record the node information to set its own node Information is recorded in the hop-by-hop option;
  • An acquiring module configured to receive a path information response packet that is sent by the destination node and that includes the node information, and determine information about the to-be-detected path according to the node information included in the path information response packet, where the path information is in the response packet
  • the node information includes node information recorded in the hop-by-hop option acquired by the destination node.
  • An embodiment of the present invention provides an apparatus for detecting path information, including:
  • a receiving module configured to receive a path information probe packet sent by the source node, where the path information probe packet includes a hop-by-hop option, a source address, and a destination address;
  • the recording module is configured to record the node information of the node in the hop-by-hop option, and forward the path information probe packet that records the node information to the next hop node in the path to be detected corresponding to the source address and the destination address.
  • the embodiment of the invention provides a system for detecting path information, including:
  • the path information of the node is carried in the hop-by-hop option, and the path hopping can be implemented according to the hop-by-hop option to avoid the problem that the timeout mechanism is long and not necessarily successful.
  • FIG. 1 is a schematic flow chart of a method according to a first embodiment of the present invention
  • FIG. 2 is a schematic diagram of a process 1 of path information detection according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of a process 2 of path information detection according to an embodiment of the present invention.
  • FIG. 4 is a schematic flow chart of a method according to a second embodiment of the present invention.
  • 5 is a schematic diagram of a format 1 of a path information detection packet according to an embodiment of the present invention;
  • FIG. 6 is a schematic diagram of a format 2 of a path information detection packet according to an embodiment of the present invention;
  • FIG. 7 is a schematic flowchart of processing a received packet by a router according to an embodiment of the present invention
  • FIG. 8 is a schematic diagram of recording path information in a TLV format according to an embodiment of the present invention
  • FIG. 9 is a schematic flowchart of a method according to a third embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of a device according to a fourth embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of a device according to a fifth embodiment of the present invention.
  • FIG. 12 is a schematic structural diagram of a system according to a sixth embodiment of the present invention. detailed description
  • FIG. 1 is a schematic flowchart of a method according to a first embodiment of the present invention, including:
  • Step 11 The source node generates a path information probe packet, where the path information probe packet includes a hop-by-hop option, a source address, and a destination address.
  • Step 12 The source node sends a path information detection packet to the destination node by using the to-be-detected path corresponding to the source address and the destination address.
  • the path information detection packet passes through the node that needs to record the node information in the path to be detected, the node information needs to be recorded.
  • the node records its own node information in a hop-by-hop option;
  • Step 13 The source node receives the path information response packet that is sent by the destination node and includes the node information, and determines information about the path to be detected according to the node information included in the path information response packet, where the node information in the path information response packet includes the destination node. Get the node information recorded in the hop-by-hop option.
  • the Hop by hop options header is a type of extension header that is located immediately after the IPv6 packet header.
  • Each route router recognizes and processes the hop-by-hop option (referred to as ⁇ ).
  • the path information of the node is carried by using the hop-by-hop option.
  • the embodiment of the present invention can be applied to a one-way detection process, and can also be applied to a loopback detection process.
  • FIG. 2 is a schematic diagram of a process 1 of path information detection according to an embodiment of the present invention. Referring to Figure 2, for one-way detection, only the node information in the one-way path is recorded.
  • FIG. 3 is a schematic diagram of a second process of path information detection according to an embodiment of the present invention.
  • the path information of the node in the returned path also needs to be recorded in the path detection packet.
  • the payload portion of the path information response packet may include node information, and the source address and the destination address of the path information response packet are exchanged with the source address and the destination address of the path information probe packet.
  • the path information response packet does not include a hop-by-hop option, so that the node on the return path does not record its own information into the path information response packet.
  • the router 3 does not record its own information to the path.
  • the path information response packet in the loopback path detection, includes a hop-by-hop option, and the node in the return path that needs to record the node information records its own node information in the hop-by-hop option of the path information response packet.
  • Router 3 records its own information into the Path Information Response Packet.
  • the path information of the node is carried in the hop-by-hop option, and the path detection can be implemented according to the hop-by-hop option, which avoids the problem that the timeout mechanism is long and is not necessarily successful.
  • a source node and a destination node are respectively a source host and a destination host, and a destination host and an intermediate node are routers as an example.
  • this embodiment includes:
  • Step 41 The source host generates a path information probe packet, which is then sent to the router.
  • FIG. 5 is a schematic diagram of a format 1 of a path information detection packet according to an embodiment of the present invention.
  • the packet used for recording node information in the format is an ICMP format.
  • the path information detection package includes: an IPv6 header, a header, an ICMP header, and an ICMP content portion, and path information is recorded in the ICMP content portion.
  • FIG. 6 is a schematic diagram of a format 2 of a path information detection packet according to an embodiment of the present invention.
  • the message used for recording node information in the format is a User Datagram Protocol (UDP) format.
  • UDP User Datagram Protocol
  • the path information detection packet includes: an IPv6 header, an HBH header, a UDP header, and a UDP content part, and the path information is recorded in the UDP content part.
  • the path information detection packet shown in FIG. 5 or FIG. 6 includes: a source address and a destination address of the path to be detected, and an example port, which is represented by a Source Address and a Destination Address of the IPv6 header, so that the path information detection packet is to be detected. Forward on the path by hop.
  • a route warning (RouterAlert) option can be included in the hop-by-hop option to instruct the router to resolve the payload portion of the path information probe packet.
  • the packet used to record the node information may include the information of the request-filled node (Information-Request-Flag), the termination (EndHop) field, the start (InitHop) field, and the hop count ( CurrentHop ) domain, current location ( CurrentPoint ) domain, and padding domain.
  • the padding domain is used to record node information, and the node information may include at least one of the following items: the address of the router, the MTU of the router, the congestion status of the router, and the Differentiated Services Code Point (DSCP) of the router.
  • Remarking for example, "Router 1 (Address, MTU, Congestion, DSCP-Remarking in Figure 5 or 6) See Table 1 for a description of other fields.
  • Step 42 After receiving the packet, the router processes the received packet, records its own node information in the path information detection packet, and then forwards the path information detection packet of the recorded node information.
  • Step 43 After receiving the path information probe packet, the destination host records its own node information (for the destination host and also the endpoint information) in the path information probe packet.
  • the destination node may record the endpoint information according to the manner in which the router records its own node information.
  • Step 44 The destination host obtains the recorded node information from the path information detection packet, and carries the acquired node information in the path information response packet and sends the information to the source host.
  • the source information and the destination address of the path information response packet and the path information probe packet are interchanged.
  • the returned path information response packet no longer records the path information of the node in the return path; if the two-way detection is performed, the returned path information response packet also needs to record the path information of the node in the return path.
  • the process of returning the path node processing message can also The flow shown in Figure 7 is employed.
  • Step 45 The source host determines the information of the path to be detected according to the received node information and the node information carried in the packet.
  • the node information carried in the path information response packet may include: node information acquired by the destination node from the path information detection packet, and further, when loopback detection, further includes returning recorded in the hop-by-hop option of the path information response packet. Node information on the path.
  • Determining the information of the path to be detected may include: obtaining which routers have passed, addresses, MTUs, congestion status, DSCP-Remaking, etc. of the routers.
  • the path information of the router is carried in the hop-by-hop option, and the path hopping can be implemented according to the hop-by-hop option, which avoids the problem that the timeout mechanism is long and is not necessarily successful. You can use ICMP packets or UDP packets to detect packets.
  • FIG. 7 is a schematic diagram of a process in which a router processes a received path information detection packet (which may be simply referred to as a “message”) according to an embodiment of the present disclosure.
  • a received path information detection packet which may be simply referred to as a “message”
  • an ICMP format is used as an example. Referring to FIG. 7, this embodiment includes:
  • Step 701 Receive a message.
  • Step 702 Determine whether the received message includes a hop-by-hop option. If yes, go to step 703. Otherwise, go to step 714.
  • Step 703 Determine that the hop-by-hop option includes an ICMP packet, and if yes, execute step 704, no, and perform step 715.
  • Step 704 Determine whether the ICMP message is used to record node information. If yes, go to step 705. Otherwise, go to step 716.
  • the ICMP message may be used in the header to indicate that the ICMP message is used to record node information.
  • the "RouterAlert" option is used in the header to identify the content to be parsed.
  • a specific value can be defined for the Value corresponding to the "RouterAlert” option, which indicates that the ICMP message is used to record node information.
  • TraceRoute the specific value (the specific value is the value of the preset type) indicates that the ICMP message is used to record the node information, that is, the payload part of the path information probe packet is the message for recording the node information.
  • Step 706 Determine whether the updated hop Hop is greater than or equal to the initial hop count InitHop, and if yes, go to step 707, otherwise go to step 712.
  • Step 707 Determine whether the number of termination hops EndHop in the received message is 0. If yes, go to step 708, otherwise go to step 712.
  • Step 708 The node information InformationRequestFlag filled according to the request in the received message acquires its own node information, and determines the length required for its own node information.
  • InformationRequestFlag can use a bit identifier to identify whether to request a certain type of information.
  • the InformationRequestFlag is 16 bits and can request 16 kinds of information.
  • InformationRequestFlag is used to indicate the address of the requesting router, the router obtains its own address and determines the length required for its own address.
  • Step 709 Determine whether the padding field is sufficient according to the required length. If yes, go to step 710, otherwise go to step 713.
  • Step 710 Record its own node information in the padding domain.
  • FIG. 8 is a schematic diagram of recording path information in a TLV format according to an embodiment of the present invention.
  • the Type and Length can both be 1 byte, and the Value is not fixed.
  • the path information of each node can be 4 in length. Integer multiples of bytes, therefore, END usually appears at the very end of 4-byte alignment. However, END can also not appear at the very end, in this case, the bytes need to be padded to ensure the path information of each node. Aligned in 4 bytes.
  • the router can use the value of the CurrentPoint of the packet as the starting point of the recording location. For example, if the value of the CurrentPoint is 1, the node that records its own from the first digit of the padding domain. information.
  • the "HOP" of the starting point in the above TLV format is the hop count Hop of the current node update.
  • Step 711 Calculate and refresh the current position of the CurrentPoint field.
  • the value of the CurrentPoint needs to be updated after recording its own node information, so that subsequent nodes can record smoothly. For example, if the value of the CurrentPoint in the packet received by the current node is 1 and the length of the current path information of the current node is 4 bytes, the value of the CurrentPoint is updated to be the starting bit of the 5th byte, that is, in bits.
  • the unit time value is 33.
  • Step 712 Forward the packet according to the normal process.
  • Step 713 Update the value of the end hop count EndHop field to the updated hop count Hop. After that, step 712 is performed. Since the padding field is not enough to record the path information, the current node is the terminating node and is recorded as the number of hops after the current update.
  • Step 714 Perform a non-HBH process flow.
  • Step 715 Perform a non-ICMP processing flow.
  • Step 716 Perform other ICMP processing procedures.
  • the router can record its own information into the hop-by-hop option by the above processing, so as to detect the path information according to the information recorded in the hop-by-hop option.
  • FIG. 9 is a schematic flowchart of a method according to a third embodiment of the present invention.
  • an execution flow of a node that needs to record node information is taken as an example.
  • the embodiment includes: Step 91: The node that needs to record the node information receives the path information probe packet sent by the source node, where the path information probe packet includes a hop-by-hop option, a source address, and a destination address.
  • Step 92 The node that needs to record the node information records its own node information in the hop-by-hop option, and forwards the path information probe packet that records the node information to the next hop in the to-be-detected path corresponding to the source address and the destination address. node.
  • the node that needs to record the node information may be specifically a router.
  • the path information detection packet is forwarded to the next hop node from the source node to the destination node. If the node that needs to record the node information is the destination node, the destination node further obtains the recorded node information from the path information detection packet after recording the node information of the node, and then carries the node information in the path information response packet. Give the source node.
  • the router may identify a hop-by-hop option, if it is determined according to the hop-by-hop option that the payload portion of the path information probe packet needs to be parsed, and the payload portion is determined to be a packet for recording node information, and is used for recording the node.
  • the message of the information is filled with its own node information.
  • the hop-by-hop option includes a route warning option, it is determined that the payload portion of the path information probe packet needs to be parsed.
  • the type of the ICMP format packet is determined. If the type is a preset packet type for recording node information, determining the payload portion is used for recording. The packet of the node information; or, if the format of the packet used for recording the node information is UDP format, the destination port number of the packet in the UDP format is determined, if the destination port number is the packet used for recording the node information. If the port number is preset, it is determined that the payload portion is a message for recording node information.
  • the packet for recording the node information may include: a hop field, a start field, a termination field, a node information to be filled, a padding field, and a current padding field.
  • the node information of the padding itself may include: The current value in the increment is increased by 1; if the value of the added hop count field is greater than or equal to the value of the start field, and the termination field indicates no termination, then the node information corresponding to the requested fill is obtained.
  • the value in the terminating domain is updated to a value indicating termination.
  • Self node information can be added to the padding domain in TLV format.
  • the recorded node information may include at least one of the following: an address of the router, an MTU of the router, a congestion status of the router, and a DSCP reset information of the router.
  • the path information of the node is carried in the hop-by-hop option, and the path detection can be implemented according to the hop-by-hop option, which avoids the problem that the timeout mechanism is long and is not necessarily successful.
  • FIG. 10 is a schematic structural diagram of a device according to a fourth embodiment of the present invention, including a generating module 101, a sending module 102, and an obtaining module 103.
  • the generating module 101 is configured to generate a path information detecting packet, where the path information detecting packet includes a hop-by-hop option, a source address, and a destination address.
  • the sending module 102 is configured to send the path to the destination node by using the to-be-detected path corresponding to the source address and the destination address.
  • the information detection packet when the path information detection packet passes through the node that needs to record the node information in the path to be detected, the node that needs to record the node information records its own node information in the hop-by-hop option; the obtaining module 103 is configured to: Receiving, by the destination node, a path information response packet that includes the node information, and determining information about the to-be-detected path according to the node information included in the path information response packet, where the node information in the path information response packet includes the destination node acquired The node information recorded in this hop-by-hop option.
  • the path information response packet received by the obtaining module 103 does not include a hop-by-hop option; or, if the loopback path detection is performed, the path information response packet received by the obtaining module 103 includes The hop option, and the node in the return path that needs to record the node information records its own node information in the hop-by-hop option of the path information response packet.
  • the above-mentioned nodes that need to record node information may include: an intermediate node and a router in the destination node.
  • the payload portion of the path information response packet includes node information, and the source address and the destination address of the path information response packet are interchanged with the source address and the destination address of the path information probe packet. Add the description of the source node in the above method.
  • the path information of the node is carried in the hop-by-hop option, and the path detection can be implemented according to the hop-by-hop option, which avoids the problem that the timeout mechanism is long and is not necessarily successful.
  • FIG. 11 is a schematic structural diagram of a device according to a fifth embodiment of the present invention, including a receiving module 111 and a recording module 112.
  • the receiving module 111 is configured to receive a path information detecting packet sent by a source node, where the path information detecting packet includes a hop-by-hop option and a source.
  • the recording module 112 is configured to record the node information of the node in the hop-by-hop option, and forward the path information probe packet that records the node information to the next path in the path to be detected corresponding to the source address and the destination address. Jump the node.
  • the recording module 112 may be specifically configured to identify the hop-by-hop option, if it is determined according to the hop-by-hop option that the payload portion of the path information probe packet needs to be parsed, and the payload portion is determined to be a packet for recording node information, where The message used to record the node information is filled with its own node information.
  • the recording module 112 can include a first determining unit, configured to determine, when the routing warning option is included in the hop-by-hop option, that the payload portion of the path information probe packet needs to be parsed.
  • the recording module includes a second determining unit, where the second determining unit is configured to: if the packet format used to record the node information is an ICMP format, determine the payload portion as a recording node by: Information packet: determining the type of the ICMP format message, if the type is a preset message type for recording node information, determining that the payload portion is a message for recording node information; or, if The packet format for recording the node information is the UDP format, and the payload portion is determined to be a packet for recording node information by: determining a destination port number of the UDP format packet, if the destination port number As a preset port number of the packet for recording the node information, it is determined that the payload portion is a message for recording node information.
  • the recording module includes a recording unit, where the recording unit is configured to increase the current value in the hop field by one; if the value of the increased hop field is greater than or equal to the value of the starting field, and according to the When the termination field indicates no termination, the node information corresponding to the node information filled by the request is obtained, and when the padding domain is sufficient, the node information is recorded in the padding domain according to the value of the current padding field. And after recording the self node information, updating the value of the current padding location field to the next padding location.
  • the record unit can also be used to update the value in the terminating domain to a value indicating termination if the padding field is not sufficient.
  • the recording unit may be specifically configured to add the own node information to the padding domain by using a type length value TLV format.
  • the foregoing node that needs to record node information may include: a router, the node information including at least one of the following: an address of the router, an MTU of the router, a congestion status of the router, and a DSCP reset information of the router. Add the description of the router in the above method.
  • the path information of the node is carried in the hop-by-hop option, and the path hopping can be implemented according to the hop-by-hop option, which avoids the problem that the timeout mechanism is long and is not necessarily successful.
  • the hop-by-hop option with or without the hop-by-hop option in the path information response packet can be applied to one-way or loopback detection. You can use ICMP packets or UDP packets to detect packets.
  • FIG. 12 is a schematic structural diagram of a system according to a sixth embodiment of the present invention, including a source node 121 and a node 122 that needs to record node information.
  • the source node 121 may be specifically as shown in FIG. 10, and the node 122 that needs to record node information may be specifically as shown in FIG. Figure 11 shows.
  • the path information of the node is carried in the hop-by-hop option, and the path hopping can be implemented according to the hop-by-hop option, which avoids the problem that the timeout mechanism is long and is not necessarily successful.
  • “first”, “second”, and the like in the above embodiments are used to distinguish the embodiments, and do not represent the advantages and disadvantages of the embodiments.
  • the foregoing program may be stored in a computer readable storage medium, and when executed, the program includes The foregoing steps of the method embodiment; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Landscapes

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

Abstract

A method, device and system for detecting path information are provided in the present invention. The method includes: a source node generates a path information detection packet, in which a hop-by-hop option is included; the source node transmits the path information detection packet to a destination node, and the node which is required to record node information records the node information of itself in the hop-by-hop option; the source node receives the path information response packet which includes the node information from the destination node, and determines, according to the node information, the information of the path which is to be detected. With the embodiments of the invention, the problem of long time and uncertain success caused by adopting an overtime mechanism can be solved.

Description

探测路径信息的方法、 设备及系统  Method, device and system for detecting path information
技术领域 Technical field
本发明涉及移动通信技术, 尤其涉及一种探测路径信息的方法、 设备及 系统。 背景技术  The present invention relates to mobile communication technologies, and in particular, to a method, device and system for detecting path information. Background technique
传统的 IP网络中假设所有的分组转发行为为 "per-Hop" (每一跳 )行为, 端到端不需要对每一跳的状态进行了解和控制。随着 IP网络在不同行业中的 应用, IP网络要求可知、 可控、 可维管。 例如在无线^载网中, 业务要求高, 要求端点能根据网络流量和路径状态进行收发控制, 需要了解网络转发每跳 的状况。 这时, 就需要了解网络内部对数据流的转发行为, 例如, 获知一个 流在端到端转发过程中经过了哪些路由器, 这些路由器有哪些参数或行为。  In the traditional IP network, all packet forwarding behaviors are assumed to be "per-Hop" behavior, and the state of each hop does not need to be understood and controlled end-to-end. With the application of IP networks in different industries, IP network requirements are known, controllable, and configurable. For example, in a wireless carrier network, the service requirements are high, and the endpoint is required to perform transmission and reception control according to network traffic and path state, and it is necessary to understand the status of each hop of the network forwarding. At this time, you need to understand the forwarding behavior of the data flow inside the network. For example, you can know which routers have passed through the end-to-end forwarding process, and what parameters or behaviors these routers have.
现网中,对 IP路由的感知一般使用跟踪路由( TraceRouter )的方式进行, 对路由器的最大传输单元( Maximum Transmission Unit, MTU ) 的感知通过 路径 MTU ( Path MTU, PMTU )探测获取。 TraceRouter技术使用因特网控 制才艮文协议 ( Internet Control Message Protocol, ICMP ) 消息 , 通过填充存活 时间 (Time To Live, TTL ), 使得中间路由器无法转发业务包, 向发送源回 复 ICMP超时错误, 发送源通过分析 ICMP报文的源 IP地址获知中间路由器 的 IP地址。 由于中间路由器或者目的主机可能不开启 ICMP错误处理回复, 有可能造成某些路由器的地址无法获取。 另外, ICMP 消息的回复时间不能 确定, 一般使用超时机制来进行 TTL的递增, 如果跳数较多, 则需要时间较 长。  In the current network, the perception of the IP route is generally performed by using the tracerouter (TraceRouter). The maximum transmission unit (MTU) of the router is detected by the Path MTU (PMTU). The TraceRouter technology uses the Internet to control the Internet Protocol Message Protocol (ICMP) message. The time-to-live (TTL) is used to make the intermediate router unable to forward the service packet. The ICMP timeout error is replied to the source. The source is transmitted. Analyze the source IP address of the ICMP packet to learn the IP address of the intermediate router. Because the intermediate router or the destination host may not open the ICMP error handling reply, it may cause the addresses of some routers to be unavailable. In addition, the reply time of the ICMP message cannot be determined. Generally, the timeout mechanism is used to increase the TTL. If the hop count is large, it takes a long time.
上述感知方式都是基于超时机制, 由发送端更改报文, 经过多次探测获 取到路由信息, 导致探测时间长且不一定成功。 发明内容 The above-mentioned sensing methods are based on the timeout mechanism. The sending end changes the packet and obtains the routing information after multiple times of detection. As a result, the detection time is long and may not be successful. Summary of the invention
本发明实施例是提供一种探测路径信息的方法、 设备及系统, 保证路径 探测的成功且降低所需时间。  The embodiment of the invention provides a method, a device and a system for detecting path information, which ensure the success of the path detection and reduce the time required.
本发明实施例提供了一种探测路径信息的方法, 包括:  The embodiment of the invention provides a method for detecting path information, including:
源节点生成路径信息探测包, 所述路径信息探测包中包含逐跳选项、 源 地址和目的地址;  The source node generates a path information probe packet, where the path information probe packet includes a hop-by-hop option, a source address, and a destination address;
所述源节点通过所述源地址和目的地址对应的待探测路径向目的节点发 送所述路径信息探测包, 所述路径信息探测包在所述待探测路径中经过需要 记录节点信息的节点时, 被所述需要记录节点信息的节点将自身的节点信息 记录在所述逐跳选项中;  The source node sends the path information detection packet to the destination node by using the to-be-detected path corresponding to the source address and the destination address, where the path information detection packet passes through a node that needs to record node information in the to-be-detected path. The node that needs to record the node information records its own node information in the hop-by-hop option;
所述源节点接收所述目的节点发送的包含节点信息的路径信息响应包, 并根据所述路径信息响应包中包含的节点信息确定所述待探测路径的信息, 所述路径信息响应包中的节点信息包括所述目的节点获取的所述逐跳选项中 记录的节点信息。  The source node receives the path information response packet that is sent by the destination node and includes the node information, and determines the information of the to-be-detected path according to the node information included in the path information response packet, where the path information is in the response packet. The node information includes node information recorded in the hop-by-hop option acquired by the destination node.
本发明实施例提供了一种探测路径信息的方法, 包括:  The embodiment of the invention provides a method for detecting path information, including:
需要记录节点信息的节点接收源节点发送的路径信息探测包, 所述路径 信息探测包中包含逐跳选项、 源地址和目的地址;  The node that needs to record the node information receives the path information probe packet sent by the source node, where the path information probe packet includes a hop-by-hop option, a source address, and a destination address.
需要记录节点信息的节点将自身的节点信息记录在所述逐跳选项中 , 并 转发记录了节点信息的路径信息探测包给所述源地址和目的地址对应的待探 测路径中的下一跳节点。  The node that needs to record the node information records its own node information in the hop-by-hop option, and forwards the path information probe packet in which the node information is recorded to the next hop node in the to-be-detected path corresponding to the source address and the destination address. .
本发明实施例提供了一种探测路径信息的设备, 包括:  An embodiment of the present invention provides an apparatus for detecting path information, including:
生成模块, 用于生成路径信息探测包, 所述路径信息探测包中包含逐跳 选项、 源地址和目的地址;  a generating module, configured to generate a path information detecting packet, where the path information detecting packet includes a hop-by-hop option, a source address, and a destination address;
发送模块, 用于通过所述源地址和目的地址对应的待探测路径向目的节 点发送所述路径信息探测包, 所述路径信息探测包在所述待探测路径中经过 需要记录节点信息的节点时, 被所述需要记录节点信息的节点将自身的节点 信息记录在所述逐跳选项中; a sending module, configured to send the path information detection packet to the destination node by using the to-be-detected path corresponding to the source address and the destination address, where the path information detection packet passes through a node that needs to record node information in the to-be-detected path , the node that needs to record the node information to set its own node Information is recorded in the hop-by-hop option;
获取模块, 用于接收所述目的节点发送的包含节点信息的路径信息响应 包, 并根据所述路径信息响应包中包含的节点信息确定所述待探测路径的信 息, 所述路径信息响应包中的节点信息包括所述目的节点获取的所述逐跳选 项中记录的节点信息。  An acquiring module, configured to receive a path information response packet that is sent by the destination node and that includes the node information, and determine information about the to-be-detected path according to the node information included in the path information response packet, where the path information is in the response packet The node information includes node information recorded in the hop-by-hop option acquired by the destination node.
本发明实施例提供了一种探测路径信息的设备, 包括:  An embodiment of the present invention provides an apparatus for detecting path information, including:
接收模块, 用于接收源节点发送的路径信息探测包, 所述路径信息探测 包中包含逐跳选项、 源地址和目的地址;  a receiving module, configured to receive a path information probe packet sent by the source node, where the path information probe packet includes a hop-by-hop option, a source address, and a destination address;
记录模块, 用于将自身的节点信息记录在所述逐跳选项中, 并转发记录 了节点信息的路径信息探测包给所述源地址和目的地址对应的待探测路径中 的下一跳节点。  The recording module is configured to record the node information of the node in the hop-by-hop option, and forward the path information probe packet that records the node information to the next hop node in the path to be detected corresponding to the source address and the destination address.
本发明实施例提供了一种探测路径信息的系统, 包括:  The embodiment of the invention provides a system for detecting path information, including:
上述的两种设备。  The above two devices.
由上述技术方案可知, 本发明实施例通过将节点的路径信息携带在逐跳 选项中, 可以根据该逐跳选项实现路径探测, 避免采用超时机制引起的时间 长且不一定成功的问题。 附图说明  According to the foregoing technical solution, the path information of the node is carried in the hop-by-hop option, and the path hopping can be implemented according to the hop-by-hop option to avoid the problem that the timeout mechanism is long and not necessarily successful. DRAWINGS
为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例描述中 所需要使用的附图作一简单地介绍, 显而易见地, 下面描述中的附图是本发 明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动性的 前提下, 还可以根据这些附图获得其他的附图。  In order to more clearly illustrate the technical solutions in the embodiments of the present invention, a brief description of the drawings to be used in the description of the embodiments will be briefly made. It is obvious that the drawings in the following description are some embodiments of the present invention. It will be apparent to those skilled in the art that other drawings may be obtained from these drawings without the inventive labor.
图 1为本发明第一实施例的方法流程示意图;  1 is a schematic flow chart of a method according to a first embodiment of the present invention;
图 2为本发明实施例中路径信息探测流程一的示意图;  2 is a schematic diagram of a process 1 of path information detection according to an embodiment of the present invention;
图 3为本发明实施例中路径信息探测流程二的示意图;  3 is a schematic diagram of a process 2 of path information detection according to an embodiment of the present invention;
图 4为本发明第二实施例的方法流程示意图; 图 5为本发明实施例中路径信息探测包的格式一的示意图; 图 6为本发明实施例中路径信息探测包的格式二的示意图; 4 is a schematic flow chart of a method according to a second embodiment of the present invention; 5 is a schematic diagram of a format 1 of a path information detection packet according to an embodiment of the present invention; FIG. 6 is a schematic diagram of a format 2 of a path information detection packet according to an embodiment of the present invention;
图 7为本发明实施例中路由器对接收的报文进行处理的流程示意图; 图 8为本发明实施例中采用 TLV格式记录路径信息的示意图; 图 9为本发明第三实施例的方法流程示意图;  FIG. 7 is a schematic flowchart of processing a received packet by a router according to an embodiment of the present invention; FIG. 8 is a schematic diagram of recording path information in a TLV format according to an embodiment of the present invention; FIG. 9 is a schematic flowchart of a method according to a third embodiment of the present invention; ;
图 10为本发明第四实施例的设备结构示意图;  FIG. 10 is a schematic structural diagram of a device according to a fourth embodiment of the present invention; FIG.
图 11为本发明第五实施例的设备结构示意图;  11 is a schematic structural diagram of a device according to a fifth embodiment of the present invention;
图 12为本发明第六实施例的系统结构示意图。 具体实施方式  FIG. 12 is a schematic structural diagram of a system according to a sixth embodiment of the present invention. detailed description
为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本发 明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于 本发明中的实施例, 本领域普通技术人员在没有做出创造性劳动前提下所获 得的所有其他实施例, 都属于本发明保护的范围。  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. It is a partial embodiment of the invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
图 1为本发明第一实施例的方法流程示意图, 包括:  FIG. 1 is a schematic flowchart of a method according to a first embodiment of the present invention, including:
步骤 11 : 源节点生成路径信息探测包, 该路径信息探测包中包含逐跳选 项、 源地址和目的地址;  Step 11: The source node generates a path information probe packet, where the path information probe packet includes a hop-by-hop option, a source address, and a destination address.
步骤 12: 源节点通过该源地址和目的地址对应的待探测路径向目的节点 发送路径信息探测包, 路径信息探测包在待探测路径中经过需要记录节点信 息的节点时, 被需要记录节点信息的节点将自身的节点信息记录在逐跳选项 中;  Step 12: The source node sends a path information detection packet to the destination node by using the to-be-detected path corresponding to the source address and the destination address. When the path information detection packet passes through the node that needs to record the node information in the path to be detected, the node information needs to be recorded. The node records its own node information in a hop-by-hop option;
步骤 13: 源节点接收目的节点发送的包含节点信息的路径信息响应包, 并根据该路径信息响应包中包含的节点信息确定待探测路径的信息, 该路径 信息响应包中的节点信息包括目的节点获取的逐跳选项中记录的节点信息。  Step 13: The source node receives the path information response packet that is sent by the destination node and includes the node information, and determines information about the path to be detected according to the node information included in the path information response packet, where the node information in the path information response packet includes the destination node. Get the node information recorded in the hop-by-hop option.
在 IPv6中, 引入了 "扩展头" 的概念代替了 IPv4中的头选项部分。 逐 跳选项头( Hop by hop options header )是扩展头的一种, 位于紧邻 IPv6分组 头之后。 每个途径路由器都会识别并处理逐跳选项 (简称 ΗΒΗ )。 本发明实 施例中即是采用该逐跳选项携带节点的路径信息。 本发明实施例可以应用于 单向探测流程中, 也可以应用于环回探测流程中。 In IPv6, the concept of "extension header" was introduced instead of the header option part of IPv4. By The Hop by hop options header is a type of extension header that is located immediately after the IPv6 packet header. Each route router recognizes and processes the hop-by-hop option (referred to as ΗΒΗ). In the embodiment of the present invention, the path information of the node is carried by using the hop-by-hop option. The embodiment of the present invention can be applied to a one-way detection process, and can also be applied to a loopback detection process.
图 2为本发明实施例中路径信息探测流程一的示意图。 参见图 2, 对于 单向探测, 只记录单向路径中的节点信息。  FIG. 2 is a schematic diagram of a process 1 of path information detection according to an embodiment of the present invention. Referring to Figure 2, for one-way detection, only the node information in the one-way path is recorded.
图 3为本发明实施例中路径信息探测流程二的示意图。 参见图 3 , 对于 环回探测, 返回的路径中的节点路径信息也需要记录在路径探测报文中。  FIG. 3 is a schematic diagram of a second process of path information detection according to an embodiment of the present invention. Referring to Figure 3, for loopback detection, the path information of the node in the returned path also needs to be recorded in the path detection packet.
具体地, 可以是路径信息响应包的净荷部分包含节点信息, 路径信息响 应包的源地址和目的地址与路径信息探测包的源地址和目的地址互换。  Specifically, the payload portion of the path information response packet may include node information, and the source address and the destination address of the path information response packet are exchanged with the source address and the destination address of the path information probe packet.
在单向路径探测时, 该路径信息响应包中不包含逐跳选项, 使得返回路 径上的节点不记录自身信息到路径信息响应包中, 例如, 参见图 2, 路由器 3 不记录自身信息到路径信息响应包中; 在环回路径探测时, 该路径信息响应 包中包含逐跳选项, 返回路径中的需要记录节点信息的节点将自身的节点信 息记录在该路径信息响应包的逐跳选项中, 例如, 参见图 3 , 路由器 3记录 自身信息到路径信息响应包中。  In the unidirectional path detection, the path information response packet does not include a hop-by-hop option, so that the node on the return path does not record its own information into the path information response packet. For example, referring to FIG. 2, the router 3 does not record its own information to the path. In the information response packet; in the loopback path detection, the path information response packet includes a hop-by-hop option, and the node in the return path that needs to record the node information records its own node information in the hop-by-hop option of the path information response packet. For example, referring to Figure 3, Router 3 records its own information into the Path Information Response Packet.
本实施例通过将节点的路径信息携带在逐跳选项中, 可以根据该逐跳选 项实现路径探测, 避免采用超时机制引起的时间长且不一定成功的问题。  In this embodiment, the path information of the node is carried in the hop-by-hop option, and the path detection can be implemented according to the hop-by-hop option, which avoids the problem that the timeout mechanism is long and is not necessarily successful.
图 4为本发明第二实施例的方法流程示意图, 本实施例以源节点和目的 节点分别为源主机和目的主机, 且目的主机和中间节点为路由器为例。 参见 图 4, 本实施例包括:  4 is a schematic flowchart of a method according to a second embodiment of the present invention. In this embodiment, a source node and a destination node are respectively a source host and a destination host, and a destination host and an intermediate node are routers as an example. Referring to FIG. 4, this embodiment includes:
步骤 41 : 源主机生成路径信息探测包, 之后发送给路由器。  Step 41: The source host generates a path information probe packet, which is then sent to the router.
其中, 图 5为本发明实施例中路径信息探测包的格式一的示意图, 该格 式下用于记录节点信息的报文为 ICMP格式。 参见图 5, 该路径信息探测包 包括: IPv6首部、 ΗΒΗ首部、 ICMP首部和 ICMP内容部分, 路径信息记录 在 ICMP内容部分。 图 6为本发明实施例中路径信息探测包的格式二的示意图, 该格式下用 于记录节点信息的报文为用户数据包协议( User Datagram Protocol, UDP ) 格式。 参见图 6, 该路径信息探测包包括: IPv6首部、 HBH首部、 UDP首部 和 UDP内容部分, 路径信息记录在 UDP内容部分。 5 is a schematic diagram of a format 1 of a path information detection packet according to an embodiment of the present invention. The packet used for recording node information in the format is an ICMP format. Referring to FIG. 5, the path information detection package includes: an IPv6 header, a header, an ICMP header, and an ICMP content portion, and path information is recorded in the ICMP content portion. FIG. 6 is a schematic diagram of a format 2 of a path information detection packet according to an embodiment of the present invention. The message used for recording node information in the format is a User Datagram Protocol (UDP) format. Referring to FIG. 6, the path information detection packet includes: an IPv6 header, an HBH header, a UDP header, and a UDP content part, and the path information is recorded in the UDP content part.
在图 5或图 6所示的路径信息探测包中, 包括: 待探测路径的源地址和 目的地址, 例 口, 用 IPv6首部的 Source Address和 Destination Address表示, 以便该路径信息探测包在待探测路径上逐跳转发。  The path information detection packet shown in FIG. 5 or FIG. 6 includes: a source address and a destination address of the path to be detected, and an example port, which is represented by a Source Address and a Destination Address of the IPv6 header, so that the path information detection packet is to be detected. Forward on the path by hop.
在图 5或图 6所示的路径信息探测包还包括: 逐跳选项, 例如用 IPv6首 部的 next header=HBH表示 IPv6首部后为逐跳选项 ( HBH )„  The path information detection packet shown in FIG. 5 or FIG. 6 further includes: a hop-by-hop option, for example, using the next header=HBH of the IPv6 header to indicate the hop-by-hop option (HBH) after the IPv6 header.
可以在逐跳选项中包含路由警告( RouterAlert )选项, 以便指示路由器 对路径信息探测包的净荷部分进行解析。 例如, 在图 5或图 6中的 HBH首 部包括: type=00000101 , 表示逐跳选项中包含 RouterAlert选项。  A route warning (RouterAlert) option can be included in the hop-by-hop option to instruct the router to resolve the payload portion of the path information probe packet. For example, the HBH header in Figure 5 or Figure 6 includes: type=00000101, which indicates that the hop-by-hop option includes the RouterAlert option.
对于 ICMP报文, 可以预设类型, 如果路由器接收的 ICMP报文的类型 为该预设类型, 例如, 图 5中的 Type=TraceRoute=预设类型, 则表明该路径 信息探测包的净荷部分为用于记录节点信息的报文。对于 UDP报文, 可以预 设端口号,如果路由器接收的 UDP报文的目的端口号为该预设端口号,例如, 图 6中的 DPort=预设端口号, 则表明该路径信息探测包的净荷部分为用于记 录节点信息的 ·艮文。  For the ICMP packet, the type of the ICMP packet can be preset. If the type of the ICMP packet received by the router is the preset type, for example, Type=TraceRoute=preset type in Figure 5, the payload part of the path information detection packet is indicated. It is a message for recording node information. For a UDP packet, the port number can be preset. If the destination port number of the UDP packet received by the router is the preset port number, for example, DPort=preset port number in Figure 6, it indicates that the path information detection packet is The payload part is the text used to record the node information.
用于记录节点信息的报文, 例如 ICMP报文或者 UDP报文中, 可以包括 请求填充的节点信息( Information-Request-Flag )、 终止( EndHop )域、 起始 ( InitHop )域、 跳数 ( CurrentHop )域、 当前位置 ( CurrentPoint )域和填充 域。  The packet used to record the node information, such as an ICMP packet or a UDP packet, may include the information of the request-filled node (Information-Request-Flag), the termination (EndHop) field, the start (InitHop) field, and the hop count ( CurrentHop ) domain, current location ( CurrentPoint ) domain, and padding domain.
其中, 填充域用于记录节点信息, 节点信息可以包括如下项中的至少一 项: 路由器的地址、 路由器的 MTU、 路由器的拥塞状况、 路由器的差分服务 代码点 ( Differentiated Services Code Point, DSCP )重置信息 (remarking ), 例如, 图 5或 6中的 "路由器 1 (地址、 MTU、 拥塞状况、 DSCP-Remarking 其他域的描述可以参见表 1。 The padding domain is used to record node information, and the node information may include at least one of the following items: the address of the router, the MTU of the router, the congestion status of the router, and the Differentiated Services Code Point (DSCP) of the router. Remarking, for example, "Router 1 (Address, MTU, Congestion, DSCP-Remarking in Figure 5 or 6) See Table 1 for a description of other fields.
Figure imgf000009_0001
步骤 42: 路由器接收到报文后, 对接收的报文进行处理, 将自身的节点 信息记录在路径信息探测包中, 之后转发记录节点信息的路径信息探测包。
Figure imgf000009_0001
Step 42: After receiving the packet, the router processes the received packet, records its own node information in the path information detection packet, and then forwards the path information detection packet of the recorded node information.
其中, 路由器对接收的报文进行处理的流程可以参见图 7。  The process of processing the received packet by the router can be seen in Figure 7.
步骤 43: 目的主机接收到路径信息探测包后, 将自身的节点信息(对于 目的主机也为端点信息)记录在该路径信息探测包中。  Step 43: After receiving the path information probe packet, the destination host records its own node information (for the destination host and also the endpoint information) in the path information probe packet.
其中, 目的节点可以根据路由器记录自身节点信息的方式, 记录端点信 自  The destination node may record the endpoint information according to the manner in which the router records its own node information.
步骤 44: 目的主机从路径信息探测包中获取记录的节点信息, 并将获取 的节点信息携带在路径信息响应包中发送给源主机。  Step 44: The destination host obtains the recorded node information from the path information detection packet, and carries the acquired node information in the path information response packet and sends the information to the source host.
该路径信息响应包和路径信息探测包的源地址和目的地址互换。  The source information and the destination address of the path information response packet and the path information probe packet are interchanged.
其中, 如果进行单向探测, 则返回的路径信息响应包不再记录返回路径 中节点的路径信息; 如果进行双向探测, 则返回的路径信息响应包中还需要 记录返回路径中的节点的路径信息, 返回路径节点的处理报文的流程也可以 采用图 7所示流程。 If the one-way detection is performed, the returned path information response packet no longer records the path information of the node in the return path; if the two-way detection is performed, the returned path information response packet also needs to record the path information of the node in the return path. , the process of returning the path node processing message can also The flow shown in Figure 7 is employed.
步骤 45: 源主机根据接收的路径信息响应包中携带的节点信息, 确定待 探测路径的信息。  Step 45: The source host determines the information of the path to be detected according to the received node information and the node information carried in the packet.
其中, 该路径信息响应包中携带的节点信息可以包括: 目的节点从路径 信息探测包中获取的节点信息, 另外, 当环回探测时, 还包括路径信息响应 包的逐跳选项中记录的返回路径上的节点信息。  The node information carried in the path information response packet may include: node information acquired by the destination node from the path information detection packet, and further, when loopback detection, further includes returning recorded in the hop-by-hop option of the path information response packet. Node information on the path.
确定待探测路径的信息可以包括: 获取经过了哪些路由器, 这些路由器 的地址、 MTU、 拥塞状况、 DSCP-Remaking等。  Determining the information of the path to be detected may include: obtaining which routers have passed, addresses, MTUs, congestion status, DSCP-Remaking, etc. of the routers.
本实施例通过将路由器的路径信息携带在逐跳选项中, 可以根据该逐跳 选项实现路径探测, 避免采用超时机制引起的时间长且不一定成功的问题。 通过不同的识别方式可以适用于采用 ICMP报文或 UDP报文检测。  In this embodiment, the path information of the router is carried in the hop-by-hop option, and the path hopping can be implemented according to the hop-by-hop option, which avoids the problem that the timeout mechanism is long and is not necessarily successful. You can use ICMP packets or UDP packets to detect packets.
其中, 图 7为本发明实施例中路由器对接收的路径信息探测包(可以简 称为 "报文")进行处理的流程示意图, 本实施例以记录路径信息的报文的格 式为 ICMP格式为例, 参见图 7, 本实施例包括:  FIG. 7 is a schematic diagram of a process in which a router processes a received path information detection packet (which may be simply referred to as a “message”) according to an embodiment of the present disclosure. In this embodiment, an ICMP format is used as an example. Referring to FIG. 7, this embodiment includes:
步骤 701 : 接收到报文。  Step 701: Receive a message.
步骤 702: 判断该接收的报文是否包含逐跳选项, 若是, 执行步骤 703 , 否则, 执行步骤 714。  Step 702: Determine whether the received message includes a hop-by-hop option. If yes, go to step 703. Otherwise, go to step 714.
例如, 如果接收的报文的 IPv6首部的 next header=HBH, 则表明包含逐 跳选项, 否则不包含逐跳选项。  For example, if the next header=HBH of the IPv6 header of the received message indicates that the hop-by-hop option is included, otherwise the hop-by-hop option is not included.
步骤 703: 判断逐跳选项中包含 ICMP报文,若是,执行步骤 704, 否贝 , 执行步骤 715。  Step 703: Determine that the hop-by-hop option includes an ICMP packet, and if yes, execute step 704, no, and perform step 715.
例如 ,如果逐跳选项的 HBH首部的 next header=ICMP , 则判断出逐跳选 项中包含 ICMP报文, 否则不包含 ICMP报文。  For example, if the next header=ICMP of the HBH header of the hop-by-hop option, it is determined that the hop-by-hop option contains the ICMP packet, otherwise the ICMP packet is not included.
步骤 704: 判断该 ICMP报文是否用于记录节点信息, 若是, 执行步骤 705, 否则执行步骤 716。 其中,可以在 ΗΒΗ首部中用特定的标识表明该 ICMP报文用于记录节点 信息, 例如, 在 ΗΒΗ首部中采用 "路由警告(RouterAlert )" 选项来标识需 要解析 ^艮文内容。 可以为 "RouterAlert"选项对应的 Value定义特定值, 该特 定值表明 ICMP报文用于记录节点信息。 具体的, 可以用 type=00000101表 示具有 RouterAlert选项, 表明需要解析报文内容, 即需要解析路径信息探测 包的净荷部分。 用 TraceRoute的值 =特定值(该特定值为预设类型的值), 表 明 ICMP报文用于记录节点信息, 即表明路径信息探测包的净荷部分为用于 记录节点信息的报文。 Step 704: Determine whether the ICMP message is used to record node information. If yes, go to step 705. Otherwise, go to step 716. The ICMP message may be used in the header to indicate that the ICMP message is used to record node information. For example, the "RouterAlert" option is used in the header to identify the content to be parsed. A specific value can be defined for the Value corresponding to the "RouterAlert" option, which indicates that the ICMP message is used to record node information. Specifically, the type=00000101 indicates that the RouterAlert option is used, indicating that the content of the packet needs to be parsed, that is, the payload portion of the path information probe packet needs to be parsed. The value of TraceRoute=the specific value (the specific value is the value of the preset type) indicates that the ICMP message is used to record the node information, that is, the payload part of the path information probe packet is the message for recording the node information.
步骤 705: 将接收的报文的 Current Ho 域中的值 Hop增加 1 , 即执行 Hop=Hop+l处理, 得到更新后的跳数。  Step 705: Increase the value Hop of the received message in the Current Ho field by one, that is, perform Hop=Hop+l processing to obtain the updated hop count.
步骤 706: 判断更新后的跳数 Hop是否大于或等于起始跳数 InitHop, 若 是, 执行步骤 707, 否则执行步骤 712。  Step 706: Determine whether the updated hop Hop is greater than or equal to the initial hop count InitHop, and if yes, go to step 707, otherwise go to step 712.
步骤 707: 判断接收的报文中的终止跳数 EndHop是否为 0, 若是, 执行 步骤 708, 否则执行步骤 712。  Step 707: Determine whether the number of termination hops EndHop in the received message is 0. If yes, go to step 708, otherwise go to step 712.
步骤 708: 根据接收的报文中 的请求填充的 节点信息 InformationRequestFlag获取自身的节点信息, 并确定自身的节点信息所需的 长度。  Step 708: The node information InformationRequestFlag filled according to the request in the received message acquires its own node information, and determines the length required for its own node information.
其中, InformationRequestFlag可以使用位标识, 标识是否请求某一种信 息。 例如, 该 InformationRequestFlag为 16位, 可以请求 16种信息。  InformationRequestFlag can use a bit identifier to identify whether to request a certain type of information. For example, the InformationRequestFlag is 16 bits and can request 16 kinds of information.
例如, 通过 InformationRequestFlag表示请求路由器的地址, 则路由器获 取自身的地址, 并确定自身地址所需的长度。  For example, if InformationRequestFlag is used to indicate the address of the requesting router, the router obtains its own address and determines the length required for its own address.
步骤 709: 根据所需的长度判断填充域是否足够, 若是, 执行步骤 710, 否则执行步骤 713。  Step 709: Determine whether the padding field is sufficient according to the required length. If yes, go to step 710, otherwise go to step 713.
步骤 710: 将自身的节点信息记录在填充域中。  Step 710: Record its own node information in the padding domain.
其中, 可以采用类型长度值(TLV )格式记录自身的节点信息。 图 8为 本发明实施例中采用 TLV格式记录路径信息的示意图, 参见图 8, 每个节点 的路径信息以 "HOP" 标识起始, 用 "Type=END,, 标识结尾。 其中的 Type 和 Length可以都是 1个字节, Value不定长。 通常每个节点的路径信息的长 度可以是 4字节的整数倍, 因此, END通常出现在 4字节对齐的最末端。 但 是, END也可以不出现在最末端, 此时需要对字节进行填充(padding ) , 保 证每个节点的路径信息以 4字节对齐。 Among them, the node information of the own can be recorded in the type length value (TLV) format. FIG. 8 is a schematic diagram of recording path information in a TLV format according to an embodiment of the present invention. Referring to FIG. 8, each node The path information starts with the "HOP" identifier and ends with "Type=END,". The Type and Length can both be 1 byte, and the Value is not fixed. Usually the path information of each node can be 4 in length. Integer multiples of bytes, therefore, END usually appears at the very end of 4-byte alignment. However, END can also not appear at the very end, in this case, the bytes need to be padded to ensure the path information of each node. Aligned in 4 bytes.
另夕卜,路由器在记录自身的节点信息时,可以将报文的 CurrentPoint的值 作为记录位置的起始点, 例如, 该 CurrentPoint的值为 1 , 则从填充域的第一 位开始记录自身的节点信息。 上述的 TLV格式中起始点的 "HOP" 为当前节 点更新后的跳数 Hop。  In addition, when the router records its own node information, the router can use the value of the CurrentPoint of the packet as the starting point of the recording location. For example, if the value of the CurrentPoint is 1, the node that records its own from the first digit of the padding domain. information. The "HOP" of the starting point in the above TLV format is the hop count Hop of the current node update.
步骤 711 : 计算并刷新当前位置 CurrentPoint域的值。  Step 711: Calculate and refresh the current position of the CurrentPoint field.
由于 CurrentPoint用于指示下一个节点记录的起始位置,在记录自身的节 点信息后需要更新该 CurrentPoint的值, 以便后续节点顺利记录。 例如, 当前 节点接收的报文中的 CurrentPoint的值为 1 , 当前节点的自身路径信息的长度 为 4字节,则更新该 CurrentPoint的值为第 5个字节的起始位, 即以比特为单 位时值为 33。  Since CurrentPoint is used to indicate the starting position of the next node record, the value of the CurrentPoint needs to be updated after recording its own node information, so that subsequent nodes can record smoothly. For example, if the value of the CurrentPoint in the packet received by the current node is 1 and the length of the current path information of the current node is 4 bytes, the value of the CurrentPoint is updated to be the starting bit of the 5th byte, that is, in bits. The unit time value is 33.
步骤 712: 按照正常流程转发报文。  Step 712: Forward the packet according to the normal process.
步骤 713: 将终止跳数 EndHop域的值更新为更新后的跳数 Hop。 之后, 执行步骤 712。 由于填充域已不够再记录路径信息, 因此当前节点为终止节 点, 记录为当前更新后的跳数。  Step 713: Update the value of the end hop count EndHop field to the updated hop count Hop. After that, step 712 is performed. Since the padding field is not enough to record the path information, the current node is the terminating node and is recorded as the number of hops after the current update.
步骤 714: 执行非 HBH处理流程。  Step 714: Perform a non-HBH process flow.
步骤 715: 执行非 ICMP处理流程。  Step 715: Perform a non-ICMP processing flow.
步骤 716: 执行其他 ICMP处理流程。  Step 716: Perform other ICMP processing procedures.
本实施例通过上述处理可以实现路由器将自身的信息记录到逐跳选项 中, 以便根据逐跳选项中记录的信息探测路径信息。  In this embodiment, the router can record its own information into the hop-by-hop option by the above processing, so as to detect the path information according to the information recorded in the hop-by-hop option.
图 9为本发明第三实施例的方法流程示意图, 本实施例以需要记录节点 信息的节点的执行流程为例, 参见图 9, 本实施例包括: 步骤 91 : 需要记录节点信息的节点接收源节点发送的路径信息探测包, 该路径信息探测包中包含逐跳选项、 源地址和目的地址; FIG. 9 is a schematic flowchart of a method according to a third embodiment of the present invention. In this embodiment, an execution flow of a node that needs to record node information is taken as an example. Referring to FIG. 9, the embodiment includes: Step 91: The node that needs to record the node information receives the path information probe packet sent by the source node, where the path information probe packet includes a hop-by-hop option, a source address, and a destination address.
步骤 92: 需要记录节点信息的节点将自身的节点信息记录在该逐跳选项 中, 并转发记录了节点信息的路径信息探测包给该源地址和目的地址对应的 待探测路径中的下一跳节点。  Step 92: The node that needs to record the node information records its own node information in the hop-by-hop option, and forwards the path information probe packet that records the node information to the next hop in the to-be-detected path corresponding to the source address and the destination address. node.
该需要记录节点信息的节点可以具体为路由器。  The node that needs to record the node information may be specifically a router.
具体地, 如果该需要记录节点信息的节点为中间节点, 则在记录自身的 节点信息后, 转发路径信息探测包给从源节点向目的节点方向上的下一跳节 点。 如果该需要记录节点信息的节点为目的节点, 则目的节点在记录自身的 节点信息后, 还进一步从路径信息探测包中获取记录的节点信息, 之后, 将 节点信息携带在路径信息响应包中发送给源节点。  Specifically, if the node that needs to record the node information is an intermediate node, after recording its own node information, the path information detection packet is forwarded to the next hop node from the source node to the destination node. If the node that needs to record the node information is the destination node, the destination node further obtains the recorded node information from the path information detection packet after recording the node information of the node, and then carries the node information in the path information response packet. Give the source node.
可选的, 路由器可以识别逐跳选项, 如果根据逐跳选项确定需要解析该 路径信息探测包的净荷部分,且确定该净荷部分为用于记录节点信息的报文, 在用于记录节点信息的报文中填充自身的节点信息。  Optionally, the router may identify a hop-by-hop option, if it is determined according to the hop-by-hop option that the payload portion of the path information probe packet needs to be parsed, and the payload portion is determined to be a packet for recording node information, and is used for recording the node. The message of the information is filled with its own node information.
其中, 如果该逐跳选项中包含路由警告选项, 则确定需要解析该路径信 息探测包的净荷部分。  Wherein, if the hop-by-hop option includes a route warning option, it is determined that the payload portion of the path information probe packet needs to be parsed.
如果用于记录节点信息的报文格式为 ICMP格式, 则确定 ICMP格式的 报文的类型, 如果该类型为用于记录节点信息的预设报文类型, 则确定该净 荷部分为用于记录节点信息的报文; 或者, 如果用于记录节点信息的报文格 式为 UDP格式, 则确定该 UDP格式的报文的目的端口号, 如果该目的端口 号为用于记录节点信息的报文的预设端口号, 则确定该净荷部分为用于记录 节点信息的报文。  If the format of the packet used for recording the node information is an ICMP format, the type of the ICMP format packet is determined. If the type is a preset packet type for recording node information, determining the payload portion is used for recording. The packet of the node information; or, if the format of the packet used for recording the node information is UDP format, the destination port number of the packet in the UDP format is determined, if the destination port number is the packet used for recording the node information. If the port number is preset, it is determined that the payload portion is a message for recording node information.
该用于记录节点信息的报文可以包括: 跳数域、 起始域、 终止域、 请求 填充的节点信息、 填充域、 当前填充位置域, 该填充自身的节点信息可以包 括: 将跳数域中的当前值增加 1 ; 如果增加后的跳数域的值大于或等于起始 域的值, 且根据终止域表明不终止时, 则获取与请求填充的节点信息对应的 自身节点信息, 并在填充域足够时, 根据当前填充位置域的值将自身节点信 息记录到填充域中, 以及在记录自身节点信息后, 更新当前填充位置域的值 为下一个填充位置。 如果填充域不足够, 则将终止域中的值更新为表明终止 的值。 可以将自身节点信息, 采用 TLV格式添加到填充域中。 记录的节点信 息可以包括如下项中的至少一项: 路由器的地址、 路由器的 MTU、 路由器的 拥塞状况、 路由器的 DSCP重置信息。 The packet for recording the node information may include: a hop field, a start field, a termination field, a node information to be filled, a padding field, and a current padding field. The node information of the padding itself may include: The current value in the increment is increased by 1; if the value of the added hop count field is greater than or equal to the value of the start field, and the termination field indicates no termination, then the node information corresponding to the requested fill is obtained. The self node information, and when the padding field is sufficient, the own node information is recorded into the padding domain according to the value of the current padding location field, and after the self node information is recorded, the value of the current padding location field is updated to the next padding location. If the padding field is not sufficient, the value in the terminating domain is updated to a value indicating termination. Self node information can be added to the padding domain in TLV format. The recorded node information may include at least one of the following: an address of the router, an MTU of the router, a congestion status of the router, and a DSCP reset information of the router.
本实施例通过将节点的路径信息携带在逐跳选项中, 可以根据该逐跳选 项实现路径探测, 避免采用超时机制引起的时间长且不一定成功的问题。 通 过不同的识别方式可以适用于采用 ICMP报文或 UDP报文检测。  In this embodiment, the path information of the node is carried in the hop-by-hop option, and the path detection can be implemented according to the hop-by-hop option, which avoids the problem that the timeout mechanism is long and is not necessarily successful. You can use ICMP packets or UDP packets to detect packets.
图 10为本发明第四实施例的设备结构示意图, 包括生成模块 101、 发送 模块 102和获取模块 103。  FIG. 10 is a schematic structural diagram of a device according to a fourth embodiment of the present invention, including a generating module 101, a sending module 102, and an obtaining module 103.
生成模块 101用于生成路径信息探测包, 该路径信息探测包中包含逐跳 选项、 源地址和目的地址; 发送模块 102用于通过源地址和目的地址对应的 待探测路径向目的节点发送该路径信息探测包, 该路径信息探测包在该待探 测路径中经过需要记录节点信息的节点时, 被该需要记录节点信息的节点将 自身的节点信息记录在该逐跳选项中; 获取模块 103用于接收该目的节点发 送的包含节点信息的路径信息响应包, 并根据该路径信息响应包中包含的节 点信息确定该待探测路径的信息, 该路径信息响应包中的节点信息包括该目 的节点获取的该逐跳选项中记录的节点信息。  The generating module 101 is configured to generate a path information detecting packet, where the path information detecting packet includes a hop-by-hop option, a source address, and a destination address. The sending module 102 is configured to send the path to the destination node by using the to-be-detected path corresponding to the source address and the destination address. The information detection packet, when the path information detection packet passes through the node that needs to record the node information in the path to be detected, the node that needs to record the node information records its own node information in the hop-by-hop option; the obtaining module 103 is configured to: Receiving, by the destination node, a path information response packet that includes the node information, and determining information about the to-be-detected path according to the node information included in the path information response packet, where the node information in the path information response packet includes the destination node acquired The node information recorded in this hop-by-hop option.
其中, 如果进行单向路径探测, 则该获取模块 103接收的路径信息响应 包中不包含逐跳选项; 或者, 如果进行环回路径探测, 则该获取模块 103接 收的路径信息响应包中包含逐跳选项, 且返回路径中的需要记录节点信息的 节点将自身的节点信息记录在该路径信息响应包的逐跳选项中。  If the unidirectional path detection is performed, the path information response packet received by the obtaining module 103 does not include a hop-by-hop option; or, if the loopback path detection is performed, the path information response packet received by the obtaining module 103 includes The hop option, and the node in the return path that needs to record the node information records its own node information in the hop-by-hop option of the path information response packet.
上述的需要记录节点信息的节点可以包括: 中间节点和目的节点中的路 由器。 上述路径信息响应包的净荷部分包含节点信息, 该路径信息响应包的源 地址和目的地址与所述路径信息探测包的源地址和目的地址互换。 加上述方法中对源节点的描述。 The above-mentioned nodes that need to record node information may include: an intermediate node and a router in the destination node. The payload portion of the path information response packet includes node information, and the source address and the destination address of the path information response packet are interchanged with the source address and the destination address of the path information probe packet. Add the description of the source node in the above method.
本实施例通过将节点的路径信息携带在逐跳选项中, 可以根据该逐跳选 项实现路径探测, 避免采用超时机制引起的时间长且不一定成功的问题。 通 过不同的识别方式可以适用于采用 ICMP报文或 UDP报文检测。  In this embodiment, the path information of the node is carried in the hop-by-hop option, and the path detection can be implemented according to the hop-by-hop option, which avoids the problem that the timeout mechanism is long and is not necessarily successful. You can use ICMP packets or UDP packets to detect packets.
图 11为本发明第五实施例的设备结构示意图, 包括接收模块 111和记录 模块 112; 接收模块 111用于接收源节点发送的路径信息探测包, 该路径信 息探测包中包含逐跳选项、 源地址和目的地址; 记录模块 112用于将自身的 节点信息记录在该逐跳选项中, 并转发记录了节点信息的路径信息探测包给 该源地址和目的地址对应的待探测路径中的下一跳节点。  FIG. 11 is a schematic structural diagram of a device according to a fifth embodiment of the present invention, including a receiving module 111 and a recording module 112. The receiving module 111 is configured to receive a path information detecting packet sent by a source node, where the path information detecting packet includes a hop-by-hop option and a source. The address module and the destination address; the recording module 112 is configured to record the node information of the node in the hop-by-hop option, and forward the path information probe packet that records the node information to the next path in the path to be detected corresponding to the source address and the destination address. Jump the node.
记录模块 112可以具体用于识别该逐跳选项, 如果根据该逐跳选项确定 需要解析该路径信息探测包的净荷部分, 且确定该净荷部分为用于记录节点 信息的报文, 在该用于记录节点信息的报文中填充自身的节点信息。  The recording module 112 may be specifically configured to identify the hop-by-hop option, if it is determined according to the hop-by-hop option that the payload portion of the path information probe packet needs to be parsed, and the payload portion is determined to be a packet for recording node information, where The message used to record the node information is filled with its own node information.
该记录模块 112可以包括第一确定单元, 该第一确定单元用于在该逐跳 选项中包含路由警告选项时, 确定需要解析该路径信息探测包的净荷部分。  The recording module 112 can include a first determining unit, configured to determine, when the routing warning option is included in the hop-by-hop option, that the payload portion of the path information probe packet needs to be parsed.
可选的, 该记录模块包括第二确定单元, 该第二确定单元用于: 如果该 用于记录节点信息的报文格式为 ICMP格式, 则通过如下方式确定该净荷部 分为用于记录节点信息的报文: 确定该 ICMP格式的报文的类型, 如果该类 型为用于记录节点信息的预设报文类型, 则确定该净荷部分为用于记录节点 信息的报文; 或者, 如果该用于记录节点信息的报文格式为 UDP格式, 则通 过如下方式确定该净荷部分为用于记录节点信息的报文:确定该 UDP格式的 报文的目的端口号, 如果该目的端口号为用于记录节点信息的报文的预设端 口号, 则确定该净荷部分为用于记录节点信息的报文。 可选的, 该记录模块包括记录单元, 该记录单元用于将该跳数域中的当 前值增加 1 ; 如果增加后的跳数域的值大于或等于该起始域的值, 且根据该 终止域表明不终止时,则获取与该请求填充的节点信息对应的自身节点信息, 并在该填充域足够时, 根据该当前填充位置域的值将该自身节点信息记录到 该填充域中, 以及在记录该自身节点信息后, 更新该当前填充位置域的值为 下一个填充位置。 Optionally, the recording module includes a second determining unit, where the second determining unit is configured to: if the packet format used to record the node information is an ICMP format, determine the payload portion as a recording node by: Information packet: determining the type of the ICMP format message, if the type is a preset message type for recording node information, determining that the payload portion is a message for recording node information; or, if The packet format for recording the node information is the UDP format, and the payload portion is determined to be a packet for recording node information by: determining a destination port number of the UDP format packet, if the destination port number As a preset port number of the packet for recording the node information, it is determined that the payload portion is a message for recording node information. Optionally, the recording module includes a recording unit, where the recording unit is configured to increase the current value in the hop field by one; if the value of the increased hop field is greater than or equal to the value of the starting field, and according to the When the termination field indicates no termination, the node information corresponding to the node information filled by the request is obtained, and when the padding domain is sufficient, the node information is recorded in the padding domain according to the value of the current padding field. And after recording the self node information, updating the value of the current padding location field to the next padding location.
记录单元还可以用于如果填充域不足够, 则将终止域中的值更新为表明 终止的值。  The record unit can also be used to update the value in the terminating domain to a value indicating termination if the padding field is not sufficient.
记录单元可以具体用于将自身节点信息,采用类型长度值 TLV格式添加 到填充域中。  The recording unit may be specifically configured to add the own node information to the padding domain by using a type length value TLV format.
上述需要记录节点信息的节点可以包括: 路由器, 该节点信息包括如下 项中的至少一项: 路由器的地址、 路由器的 MTU、 路由器的拥塞状况、 路由 器的 DSCP重置信息。 加上述方法中对路由器的描述。 本实施例通过将节点的路径信息携带在逐跳 选项中, 可以根据该逐跳选项实现路径探测, 避免采用超时机制引起的时间 长且不一定成功的问题。 通过路径信息响应包中包含或不包含逐跳选项可以 适用于单向或环回探测。 通过不同的识别方式可以适用于采用 ICMP报文或 UDP报文检测。  The foregoing node that needs to record node information may include: a router, the node information including at least one of the following: an address of the router, an MTU of the router, a congestion status of the router, and a DSCP reset information of the router. Add the description of the router in the above method. In this embodiment, the path information of the node is carried in the hop-by-hop option, and the path hopping can be implemented according to the hop-by-hop option, which avoids the problem that the timeout mechanism is long and is not necessarily successful. The hop-by-hop option with or without the hop-by-hop option in the path information response packet can be applied to one-way or loopback detection. You can use ICMP packets or UDP packets to detect packets.
图 12为本发明第六实施例的系统结构示意图, 包括源节点 121和需要记 录节点信息的节点 122, 该源节点 121可以具体如图 10所示, 该需要记录节 点信息的节点 122可以具体如图 11所示。  FIG. 12 is a schematic structural diagram of a system according to a sixth embodiment of the present invention, including a source node 121 and a node 122 that needs to record node information. The source node 121 may be specifically as shown in FIG. 10, and the node 122 that needs to record node information may be specifically as shown in FIG. Figure 11 shows.
本实施例通过将节点的路径信息携带在逐跳选项中, 可以根据该逐跳选 项实现路径探测, 避免采用超时机制引起的时间长且不一定成功的问题。 通 过不同的识别方式可以适用于采用 ICMP报文或 UDP报文检测。 可以理解的是, 上述方法及设备中的相关特征可以相互参考。 另外, 上 述实施例中的 "第一" 、 "第二" 等是用于区分各实施例, 而并不代表各实 施例的优劣。 In this embodiment, the path information of the node is carried in the hop-by-hop option, and the path hopping can be implemented according to the hop-by-hop option, which avoids the problem that the timeout mechanism is long and is not necessarily successful. You can use ICMP packets or UDP packets to detect packets. It can be understood that related features in the above methods and devices can be referred to each other. In addition, "first", "second", and the like in the above embodiments are used to distinguish the embodiments, and do not represent the advantages and disadvantages of the embodiments.
本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分步骤 可以通过程序指令相关的硬件来完成, 前述的程序可以存储于计算机可读取 存储介质中, 该程序在执行时, 执行包括上述方法实施例的步骤; 而前述的 存储介质包括: ROM, RAM,磁碟或者光盘等各种可以存储程序代码的介质。  A person skilled in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by using hardware related to program instructions. The foregoing program may be stored in a computer readable storage medium, and when executed, the program includes The foregoing steps of the method embodiment; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对其 限制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的普通技术 人员应当理解: 其依然可以对前述各实施例所记载的技术方案进行修改, 或 者对其中部分技术特征进行等同替换; 而这些修改或者替换, 并不使相应技 术方案的本质脱离本发明各实施例技术方案的精神和范围。  It should be noted that the above embodiments are only for explaining the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that: The technical solutions described in the foregoing embodiments are modified, or some of the technical features are equivalently replaced. The modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

权 利 要 求 Rights request
1、 一种探测路径信息的方法, 其特征在于, 包括:  A method for detecting path information, comprising:
源节点生成路径信息探测包, 所述路径信息探测包中包含逐跳选项、 源 地址和目的地址;  The source node generates a path information probe packet, where the path information probe packet includes a hop-by-hop option, a source address, and a destination address;
所述源节点通过所述源地址和目的地址对应的待探测路径向目的节点发 送所述路径信息探测包, 所述路径信息探测包在所述待探测路径中经过需要 记录节点信息的节点时, 被所述需要记录节点信息的节点将自身的节点信息 记录在所述逐跳选项中;  The source node sends the path information detection packet to the destination node by using the to-be-detected path corresponding to the source address and the destination address, where the path information detection packet passes through a node that needs to record node information in the to-be-detected path. The node that needs to record the node information records its own node information in the hop-by-hop option;
所述源节点接收所述目的节点发送的包含节点信息的路径信息响应包, 并根据所述路径信息响应包中包含的节点信息确定所述待探测路径的信息, 所述路径信息响应包中的节点信息包括所述目的节点获取的所述逐跳选项中 记录的节点信息。  The source node receives the path information response packet that is sent by the destination node and includes the node information, and determines the information of the to-be-detected path according to the node information included in the path information response packet, where the path information is in the response packet. The node information includes node information recorded in the hop-by-hop option acquired by the destination node.
2、 根据权利要求 1所述的方法, 其特征在于, 所述需要记录节点信息的 节点包括: 中间节点和目的节点中的路由器。  2. The method according to claim 1, wherein the node that needs to record node information comprises: an intermediate node and a router in the destination node.
3、 根据权利要求 1或 2所述的方法, 其特征在于, 所述路径信息响应包 的净荷部分包含所述节点信息, 所述路径信息响应包的源地址和目的地址与 所述路径信息探测包的源地址和目的地址互换。  The method according to claim 1 or 2, wherein the payload portion of the path information response packet includes the node information, and the source address and destination address of the path information response packet and the path information The source and destination addresses of the probe packet are interchanged.
4、 根据权利要求 1至 3任一项所述的方法, 其特征在于,  4. A method according to any one of claims 1 to 3, characterized in that
如果进行单向路径探测, 则所述路径信息响应包中不包含逐跳选项; 或 者,  If unidirectional path detection is performed, the path information response packet does not include a hop-by-hop option; or
如果进行环回路径探测, 则所述路径信息响应包中包含逐跳选项, 且返 回路径中的需要记录节点信息的节点将自身的节点信息记录在所述路径信息 响应包的逐跳选项中。  If the loopback path detection is performed, the path information response packet includes a hop-by-hop option, and the node in the return path that needs to record the node information records its own node information in the hop-by-hop option of the path information response packet.
5、 一种探测路径信息的方法, 其特征在于, 包括:  A method for detecting path information, comprising:
需要记录节点信息的节点接收源节点发送的路径信息探测包, 所述路径 信息探测包中包含逐跳选项、 源地址和目的地址; 需要记录节点信息的节点将自身的节点信息记录在所述逐跳选项中, 并 转发记录了节点信息的路径信息探测包给所述源地址和目的地址对应的待探 测路径中的下一跳节点。 The node that needs to record the node information receives the path information probe packet sent by the source node, where the path information probe packet includes a hop-by-hop option, a source address, and a destination address. The node that needs to record the node information records its own node information in the hop-by-hop option, and forwards the path information probe packet in which the node information is recorded to the next hop node in the to-be-detected path corresponding to the source address and the destination address. .
6、 根据权利要求 5所述的方法, 其特征在于, 所述需要记录节点信息的 节点为路由器, 所述将自身的节点信息记录在所述逐跳选项中, 包括:  The method according to claim 5, wherein the node that needs to record the node information is a router, and the recording the node information of the node in the hop-by-hop option includes:
所述路由器识别所述逐跳选项, 如果根据所述逐跳选项确定需要解析所 述路径信息探测包的净荷部分, 且确定所述净荷部分为用于记录节点信息的 报文, 在所述用于记录节点信息的报文中填充自身的节点信息。  Determining, by the router, the hop-by-hop option, if it is determined according to the hop-by-hop option that the payload portion of the path information probe packet needs to be parsed, and determining that the payload portion is a packet for recording node information, The message for recording node information is filled with its own node information.
7、 根据权利要求 6所述的方法, 其特征在于, 所述根据所述逐跳选项确 定需要解析所述路径信息探测包的净荷部分, 包括:  The method according to claim 6, wherein the determining, according to the hop-by-hop option, that the payload portion of the path information probe packet needs to be parsed comprises:
如果所述逐跳选项中包含路由警告选项, 则确定需要解析所述路径信息 探测包的净荷部分。  If the hop-by-hop option includes a route warning option, it is determined that the payload portion of the path information probe packet needs to be parsed.
8、 根据权利要求 6或 7所述的方法, 其特征在于, 所述用于记录节点信 息的报文的格式为: 因特网控制报文协议 ICMP格式或者用户数据包协议 UDP格式;  The method according to claim 6 or 7, wherein the format of the message for recording node information is: Internet Control Message Protocol (ICMP) format or User Data Packet Protocol (UDP) format;
如果所述用于记录节点信息的报文格式为 ICMP格式, 则所述确定所述 净荷部分为用于记录节点信息的报文, 包括: 确定所述 ICMP格式的报文的 类型, 如果所述类型为用于记录节点信息的预设报文类型, 则确定所述净荷 部分为用于记录节点信息的报文;  If the format of the packet for recording node information is an ICMP format, the determining that the payload portion is a packet for recording node information includes: determining a type of the packet in the ICMP format, if The type of the preset packet is used to record the node information, and the payload portion is determined to be a packet for recording node information.
或者,  Or,
如果所述用于记录节点信息的报文格式为 UDP格式,则所述确定所述净 荷部分为用于记录节点信息的报文, 包括: 确定所述 UDP格式的报文的目的 端口号, 如果所述目的端口号为用于记录节点信息的报文的预设端口号, 则 确定所述净荷部分为用于记录节点信息的报文。  If the format of the packet for recording the node information is in the UDP format, the determining that the payload portion is a packet for recording node information includes: determining a destination port number of the packet in the UDP format, And if the destination port number is a preset port number of a packet for recording node information, determining that the payload portion is a packet for recording node information.
9、 根据权利要求 6至 8任一项所述的方法, 其特征在于, 所述用于记录 节点信息的报文包括: 跳数域、 起始域、 终止域、 请求填充的节点信息、 填 充域、 当前填充位置域, 所述填充自身的节点信息, 包括: The method according to any one of claims 6 to 8, wherein the message for recording node information comprises: a hop field, a start field, a termination field, a node information to be filled, and a filling Filling the domain, the current padding location domain, and the node information of the padding itself, including:
将所述跳数域中的当前值增加 1;  Increase the current value in the hop field by one;
如果增加后的跳数域的值大于或等于所述起始域的值, 且根据所述终止 域表明不终止时, 则获取与所述请求填充的节点信息对应的自身节点信息, 并在所述填充域足够时, 根据所述当前填充位置域的值将所述自身节点信息 记录到所述填充域中, 以及在记录所述自身节点信息后, 更新所述当前填充 位置域的值为下一个填充位置。  If the value of the added hop field is greater than or equal to the value of the start field, and indicates that the termination field does not terminate according to the termination field, acquiring the self node information corresponding to the node information that is requested to be filled, and When the padding field is sufficient, the self-node information is recorded into the padding domain according to the value of the current padding location field, and after the self-node information is recorded, the value of the current padding location field is updated. A fill location.
10、 根据权利要求 9所述的方法, 其特征在于, 所述填充自身的节点信 息还包括:  The method according to claim 9, wherein the filling of the node information of the self includes:
如果所述填充域不足够, 则将所述终止域中的值更新为表明终止的值。 If the padding field is not sufficient, the value in the terminating domain is updated to a value indicating termination.
11、 根据权利要求 9所述的方法, 其特征在于, 所述将所述自身节点信 息添加到所述填充域中, 包括: The method according to claim 9, wherein the adding the self node information to the padding domain comprises:
将所述自身节点信息, 采用类型长度值 TLV格式添加到所述填充域中。 The self node information is added to the padding domain using a type length value TLV format.
12、 根据权利要求 5至 11任一项所述的方法, 其特征在于, 所述需要记 录节点信息的节点包括: 路由器, 所述节点信息包括如下项中的至少一项: 路由器的地址、 路由器的最大传输单元 MTU、 路由器的拥塞状况、 路由器的 差分服务代码点 DSCP重置信息。 The method according to any one of claims 5 to 11, wherein the node that needs to record node information comprises: a router, the node information includes at least one of the following: a router address, a router The maximum transmission unit MTU, the congestion status of the router, and the DSCP reset information of the router's differential service code point.
13、 一种探测路径信息的设备, 其特征在于, 包括:  13. A device for detecting path information, comprising:
生成模块, 用于生成路径信息探测包, 所述路径信息探测包中包含逐跳 选项、 源地址和目的地址;  a generating module, configured to generate a path information detecting packet, where the path information detecting packet includes a hop-by-hop option, a source address, and a destination address;
发送模块, 用于通过所述源地址和目的地址对应的待探测路径向目的节 点发送所述路径信息探测包, 所述路径信息探测包在所述待探测路径中经过 需要记录节点信息的节点时, 被所述需要记录节点信息的节点将自身的节点 信息记录在所述逐跳选项中;  a sending module, configured to send the path information detection packet to the destination node by using the to-be-detected path corresponding to the source address and the destination address, where the path information detection packet passes through a node that needs to record node information in the to-be-detected path And the node that needs to record the node information records its own node information in the hop-by-hop option;
获取模块, 用于接收所述目的节点发送的包含节点信息的路径信息响应 包, 并根据所述路径信息响应包中包含的节点信息确定所述待探测路径的信 息, 所述路径信息响应包中的节点信息包括所述目的节点获取的所述逐跳选 项中记录的节点信息。 An acquiring module, configured to receive a path information response packet that includes the node information sent by the destination node, and determine the path of the to-be-detected path according to the node information included in the path information response packet The node information in the path information response packet includes node information recorded in the hop-by-hop option acquired by the destination node.
14、 根据权利要求 13所述的设备, 其特征在于,  14. Apparatus according to claim 13 wherein:
如果进行单向路径探测, 则所述获取模块接收的路径信息响应包中不包 含逐跳选项; 或者,  If the unidirectional path detection is performed, the path information response packet received by the obtaining module does not include a hop-by-hop option; or
如果进行环回路径探测, 则所述获取模块接收的路径信息响应包中包含 逐跳选项, 且返回路径中的需要记录节点信息的节点将自身的节点信息记录 在所述路径信息响应包的逐跳选项中。  If the loopback path detection is performed, the path information response packet received by the acquiring module includes a hop-by-hop option, and the node in the return path that needs to record the node information records its own node information in the path information response packet. Jump option.
15、 一种探测路径信息的设备, 其特征在于, 包括:  15. A device for detecting path information, comprising:
接收模块, 用于接收源节点发送的路径信息探测包, 所述路径信息探测 包中包含逐跳选项、 源地址和目的地址;  a receiving module, configured to receive a path information probe packet sent by the source node, where the path information probe packet includes a hop-by-hop option, a source address, and a destination address;
记录模块, 用于将自身的节点信息记录在所述逐跳选项中, 并转发记录 了节点信息的路径信息探测包给所述源地址和目的地址对应的待探测路径中 的下一跳节点。  The recording module is configured to record the node information of the node in the hop-by-hop option, and forward the path information probe packet that records the node information to the next hop node in the path to be detected corresponding to the source address and the destination address.
16、根据权利要求 15所述的设备,其特征在于,所述记录模块具体用于: 识别所述逐跳选项, 如果根据所述逐跳选项确定需要解析所述路径信息 探测包的净荷部分, 且确定所述净荷部分为用于记录节点信息的报文, 在所 述用于记录节点信息的报文中填充自身的节点信息。  The device according to claim 15, wherein the recording module is specifically configured to: identify the hop-by-hop option, if it is determined according to the hop-by-hop option that a payload portion of the path information probe packet needs to be parsed And determining that the payload portion is a packet for recording node information, and filling the node information of the packet in the packet for recording node information.
17、 根据权利要求 16所述的设备, 其特征在于,  17. Apparatus according to claim 16 wherein:
所述记录模块包括第一确定单元, 所述第一确定单元用于在所述逐跳选 项中包含路由警告选项时, 确定需要解析所述路径信息探测包的净荷部分; 和 /或,  The recording module includes a first determining unit, where the first determining unit is configured to determine, when the route-by-hop option includes a route warning option, that the payload portion of the path information probe packet needs to be parsed; and/or,
所述记录模块包括第二确定单元, 所述第二确定单元用于: 如果所述用 于记录节点信息的报文格式为 ICMP格式, 则通过如下方式确定所述净荷部 分为用于记录节点信息的报文: 确定所述 ICMP格式的报文的类型, 如果所 述类型为用于记录节点信息的预设>¾文类型, 则确定所述净荷部分为用于记 录节点信息的报文; 或者, 如果所述用于记录节点信息的报文格式为 UDP格 式, 则通过如下方式确定所述净荷部分为用于记录节点信息的报文: 确定所 述 UDP格式的报文的目的端口号,如果所述目的端口号为用于记录节点信息 的报文的预设端口号, 则确定所述净荷部分为用于记录节点信息的报文。 The recording module includes a second determining unit, where the second determining unit is configured to: if the message format for recording node information is an ICMP format, determine the payload portion as a recording node by: Message of the information: determining the type of the message in the ICMP format, if the type is a preset type for recording node information, determining that the payload portion is used for recording If the packet format of the node information is UDP format, the payload portion is determined to be a packet for recording node information by: determining the UDP format. The destination port number of the packet, if the destination port number is a preset port number of a packet for recording node information, determining that the payload portion is a packet for recording node information.
18、 根据权利要求 16或 17所述的设备, 其特征在于, 所述用于记录节 点信息的报文包括: 跳数域、 起始域、 终止域、 请求填充的节点信息、 填充 域、 当前填充位置域, 所述记录模块包括记录单元, 所述记录单元用于将所 述跳数域中的当前值增加 1 ; 如果增加后的跳数域的值大于或等于所述起始 域的值, 且根据所述终止域表明不终止时, 则获取与所述请求填充的节点信 息对应的自身节点信息, 并在所述填充域足够时, 根据所述当前填充位置域 的值将所述自身节点信息记录到所述填充域中, 以及在记录所述自身节点信 息后, 更新所述当前填充位置域的值为下一个填充位置。  The device according to claim 16 or 17, wherein the packet for recording node information comprises: a hop field, a start field, a termination field, a node information to be filled, a padding field, and a current Filling the location field, the recording module includes a recording unit, where the recording unit is configured to increase the current value in the hop field by one; if the value of the increased hop field is greater than or equal to the value of the starting field And indicating, according to the termination field, that the node information is not terminated, acquiring the own node information corresponding to the node information that is filled in the request, and when the padding field is sufficient, the self is determined according to the value of the current padding field The node information is recorded into the padding domain, and after the self node information is recorded, the value of the current padding location field is updated to be the next padding location.
19、 一种探测路径信息的系统, 其特征在于, 包括:  19. A system for detecting path information, comprising:
如权利要求 13-14任一项所述的设备, 以及,  A device according to any one of claims 13-14, and
如权利要求 15-18任一项所述的设备。  Apparatus according to any of claims 15-18.
PCT/CN2011/074804 2011-05-27 2011-05-27 Method, device and system for detecting path information WO2011144114A2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2011/074804 WO2011144114A2 (en) 2011-05-27 2011-05-27 Method, device and system for detecting path information
CN201180000807.XA CN102217378B (en) 2011-05-27 2011-05-27 Method, device and system for detecting routing information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/074804 WO2011144114A2 (en) 2011-05-27 2011-05-27 Method, device and system for detecting path information

Publications (2)

Publication Number Publication Date
WO2011144114A2 true WO2011144114A2 (en) 2011-11-24
WO2011144114A3 WO2011144114A3 (en) 2012-04-26

Family

ID=44746780

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/074804 WO2011144114A2 (en) 2011-05-27 2011-05-27 Method, device and system for detecting path information

Country Status (2)

Country Link
CN (1) CN102217378B (en)
WO (1) WO2011144114A2 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103840976B (en) 2014-02-28 2017-06-20 华为技术有限公司 Communication means, light device and the network equipment
CN104202250A (en) * 2014-08-11 2014-12-10 乐鑫信息科技(上海)有限公司 Network address forwarding method based on route information carrying-forwarding
CN104219144B (en) * 2014-09-09 2018-09-21 华为技术有限公司 The system for determining the forward-path of Business Stream
KR20180025946A (en) * 2015-08-20 2018-03-09 후아웨이 테크놀러지 컴퍼니 리미티드 METHOD AND APPARATUS FOR INSPECTING FRONT HALL TOPOLOGY
CN108270602B (en) * 2016-12-30 2022-07-08 中兴通讯股份有限公司 Method, device and system for detecting data link
CN109495352B (en) * 2018-12-27 2021-06-08 新华三技术有限公司 Method and device for determining transmission path
CN110995583B (en) * 2019-09-12 2021-04-20 华为技术有限公司 Path detection method, path detection device and computer storage medium
CN113395206B (en) * 2020-03-13 2023-06-02 华为技术有限公司 Route determining method, device and network equipment
CN116192721A (en) * 2021-11-29 2023-05-30 华为技术有限公司 Path perception method, device and system
CN115225510B (en) * 2022-07-19 2024-01-23 北京天融信网络安全技术有限公司 Method and device for acquiring block chain public chain network structure and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1726679A (en) * 2002-12-13 2006-01-25 思科技术公司 Arrangement in a router of a mobile network for optimizing use of messages carrying reverse routing headers
CN1833414A (en) * 2003-08-08 2006-09-13 索尼株式会社 Communication system, communication method, communication terminal device, control method thereof, and program
CN101150520A (en) * 2007-11-02 2008-03-26 杭州华三通信技术有限公司 Method and device for adjusting path maximum transfer unit
CN101835233A (en) * 2010-03-19 2010-09-15 浙江大学 Wireless sensor network oriented random route selecting method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1726679A (en) * 2002-12-13 2006-01-25 思科技术公司 Arrangement in a router of a mobile network for optimizing use of messages carrying reverse routing headers
CN1833414A (en) * 2003-08-08 2006-09-13 索尼株式会社 Communication system, communication method, communication terminal device, control method thereof, and program
CN101150520A (en) * 2007-11-02 2008-03-26 杭州华三通信技术有限公司 Method and device for adjusting path maximum transfer unit
CN101835233A (en) * 2010-03-19 2010-09-15 浙江大学 Wireless sensor network oriented random route selecting method

Also Published As

Publication number Publication date
WO2011144114A3 (en) 2012-04-26
CN102217378B (en) 2014-03-05
CN102217378A (en) 2011-10-12

Similar Documents

Publication Publication Date Title
WO2011144114A2 (en) Method, device and system for detecting path information
US10574763B2 (en) Session-identifer based TWAMP data session provisioning in computer networks
US7995478B2 (en) Network communication with path MTU size discovery
US9762485B2 (en) Network packet flow controller with extended session management
Duke et al. A roadmap for transmission control protocol (TCP) specification documents
KR100916288B1 (en) Method and apparatus for determination of network topology
WO2015180559A1 (en) Fault detection method and apparatus for service chain
WO2020233192A1 (en) Method and apparatus for providing service for service flow
WO2011111105A1 (en) Relay device and communication program
JP3665622B2 (en) Source address selection system, router device, communication node, and source address selection method
US10298616B2 (en) Apparatus and method of securing network communications
WO2009089713A1 (en) A method for transmitting bfd message, a method and device for detecting link failure
US11695858B2 (en) Packet fragmentation control
JP2015537493A (en) Method and apparatus for enhancing TWAMP
US11943147B2 (en) Method of determining passive round trip time, RTT, delay in a telecommunications system
US9253237B2 (en) Rich media status and feedback for devices and infrastructure components using in path signaling
WO2013044827A1 (en) Test method for trace route and system, apparatus and device thereof
WO2009109128A1 (en) Method and apparatus of full header information message configuration
JP4463838B2 (en) Method and apparatus for setting service device elements in a network
Duke et al. RFC 7414: A Roadmap for Transmission Control Protocol (TCP) Specification Documents
Blanton et al. A roadmap for Transmission Control Protocol (TCP) specification documents
WO2011124182A2 (en) Detection method, device and system of transmission between controller and base station
Yussuf Performance Comparisons of Internetwork Protocols

Legal Events

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

Ref document number: 201180000807.X

Country of ref document: CN

NENP Non-entry into the national phase in:

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11783031

Country of ref document: EP

Kind code of ref document: A2