A method and apparatus for route tracing of all routes
By recording ICMP packet payload information and establishing a full routing path table in the Tracert tool, the shortcomings of existing Tracert tools in fault location are resolved, enabling precise location of hop-by-hop incoming and outgoing interface IP addresses, thus improving network operation and maintenance efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NEW H3C TECH CO LTD
- Filing Date
- 2026-03-03
- Publication Date
- 2026-06-02
AI Technical Summary
Existing Tracert tools cannot accurately locate network faults, especially when TTL probes are unresponsive, they cannot distinguish between previous hop and current hop faults, and they cannot obtain the device's outgoing interface information, resulting in low troubleshooting efficiency for network administrators.
By sending multiple route tracing probe messages, a full route path information table is established, recording the payload information of ICMP timeout and ICMP port unreachable messages, accurately identifying the hop-by-hop incoming and outgoing interface IP addresses, and combining ICMP message types and codes to achieve precise fault location.
It enables accurate identification of hop-by-hop inbound and outbound interface IP addresses, improving network operation and maintenance efficiency, supporting route tracing in complex scenarios, and enhancing the accuracy and efficiency of fault location.
Smart Images

Figure CN122137781A_ABST
Abstract
Description
Technical Field
[0001] This application relates to communication technology, specifically a route tracing method and device for a full route path. Background Technology
[0002] IP address network (Internet Protocol) operation and maintenance technology can use the Tracert (Traceroute) tool to detect the path from the source device to the destination device. Existing Tracert protocols typically rely on ICMP (Internet Control Message Protocol) and the TTL (Time To Live) field of IP address packets: The source device sends a UDP (User Datagram Protocol) packet with TTL=1. The intermediate three-layer devices discard the packet after the TTL decreases to 0 before forwarding it, and return an ICMP Time Exceeded message. The source device uses this information to obtain the address of the first-hop device. Subsequently, the source device sends packets with TTL=2, 3, etc., and each intermediate device returns a TTL Exceeded message when its TTL decreases to 0. When the packet finally reaches the destination device, since no process is listening on the UDP port, the destination device returns an ICMP Port Unreachable message. The source device uses this information to determine the end of the path and obtains the addresses of the devices traversed from the source to the destination.
[0003] The limitation of this existing technology is that when a TTL probe at a certain hop does not respond, the source device can only see the "no response" phenomenon and cannot determine whether the fault occurred in the previous hop or the current hop. For example, a route tracing probe packet with TTL=2 sent to the second hop may not receive a TTL timeout message from the second hop. This could be due to an abnormal forwarding by the first hop device, causing the second hop not to receive the packet at all; or it could be due to a fault or policy issue with the second hop device itself, resulting in no ICMP response. Traditional Tracert cannot distinguish between these two situations, making fault location difficult and still requiring manual troubleshooting combined with other methods.
[0004] Furthermore, existing Tracert methods typically only obtain the IP addresses of intermediate and destination devices, failing to simultaneously acquire finer-grained information such as the destination device's outgoing interface. They also cannot definitively determine whether a failure has occurred at a specific node or link, nor can they differentiate between "no TTL timeout ICMP" and "a TTL timeout ICMP was generated, but the return route was lost and the source device did not receive it." These limitations result in low troubleshooting efficiency and a heavy workload for network administrators, necessitating an improved path detection solution. Summary of the Invention
[0005] The purpose of this application is to provide a route tracing method and device for the entire route path, which achieves route tracing with strong compatibility and easy fault location.
[0006] To achieve the above objectives, this application provides a route tracing method for locating faults in the entire routing path. The method includes: sending multiple route tracing probe messages; establishing an entire routing path information table to record the TTL and UDP of each route tracing probe message; looking up the corresponding TTL based on the destination UDP port number carried in the payload of each received ICMP timeout message, and recording the source IP address of the ICMP timeout message (which serves as the ingress interface IP address) in the entire routing path information table; recording the corresponding previous TTL in the entire routing path information table based on the egress interface IP address carried in each received ICMP port unreachable extended message; receiving an ICMP port unreachable message and stopping route probing; looking up the corresponding TTL based on the destination UDP port number carried in the payload of the ICMP port unreachable message, and recording the source IP address of the ICMP port unreachable message (which serves as the ingress interface IP address) in the entire routing path information table; and determining that the entire routing path to the destination device is fault-free.
[0007] To achieve the above objectives, this application also provides a route tracing device for locating faults along the entire routing path. The processor of this device executes machine-executable instructions recorded on a machine-readable storage medium to perform the following operations: sending multiple route tracing probe messages; establishing an entire routing path information table to record the TTL and UDP of each route tracing probe message; looking up the corresponding TTL based on the destination UDP port number carried in the payload of each received ICMP timeout message, and recording the source IP address of the ICMP timeout message as the ingress interface IP address in the entire routing path information table; recording the corresponding previous TTL in the entire routing path information table based on the egress interface IP address carried in each received ICMP port unreachable extended message; receiving an ICMP port unreachable message and stopping route probing; looking up the corresponding TTL based on the destination UDP port number carried in the payload of the ICMP port unreachable message, and recording the source IP address of the ICMP port unreachable message as the ingress interface IP address in the entire routing path information table; and determining that the entire routing path to the destination device is fault-free.
[0008] To achieve the above objectives, this application also provides a route tracing method for an entire route path. The method includes: decrementing the Time-to-Live (TTL) of a received first route tracing probe packet; when the TTL of the first route tracing probe packet becomes zero after decrementing, sending an ICMP timeout message carrying the original IP address header of the route tracing probe packet; or when the TTL of the first route tracing probe packet is the penultimate hop and the outgoing interface is normal, sending the first route tracing probe packet to the next hop, and sending an ICMP port unreachable extension message carrying the local outgoing interface IP address of the route tracing probe packet and the original IP address header to the source device of the first route tracing probe packet.
[0009] To achieve the above objectives, this application also provides a route tracing device for locating faults along the entire route path. The processor of this device executes machine-executable instructions recorded on a machine-readable storage medium to perform the following operations: decrementing the Time-to-Live (TTL) of the received first route tracing probe message; when the TTL of the first route tracing probe message is zero after decrementing, sending an ICMP timeout message carrying the original IP address header of the route tracing probe message; or when the TTL of the first route tracing probe message is the penultimate hop and the outgoing interface is normal, sending the first route tracing probe message to the next hop and sending an ICMP port unreachable extension message carrying the local outgoing interface IP address of the route tracing probe message and the original IP address header to the source device of the first route tracing probe message.
[0010] The beneficial effect of this application is that it enables accurate identification of hop-by-hop inbound and outbound interface IP addresses, effectively supports route tracing in complex scenarios, and improves network operation and maintenance efficiency. Attached Figure Description
[0011] Figure 1 A flowchart illustrating an embodiment of the full-route path tracing method provided in this application; Figure 2 A schematic diagram illustrating an embodiment of the route tracing method for the entire routing path provided in this application; Figure 3 A schematic diagram illustrating an embodiment of the fault location method for the entire routing path provided in this application; Figure 4 A schematic diagram of another fault location embodiment of the full routing path provided in this application; Figure 5 A schematic diagram illustrating an embodiment of the route tracing method for the entire routing path provided in this application; Figure 6 This is a schematic diagram of an embodiment of the route tracing method for the entire routing path provided in this application. Detailed Implementation
[0012] The following detailed description will be provided with reference to several examples illustrated in the accompanying figures. In this detailed description, numerous specific details are used to provide a comprehensive understanding of the present application. Known methods, steps, components, and circuits are not described in detail in the examples to avoid obscuring their meaning.
[0013] In the terminology used, the term "including" means including but not limited to; the term "containing" means including but not limited to; the terms "above," "within," and "below" include the number itself; the terms "greater than" and "less than" mean not including the number itself. The term "based on" means based on at least a portion of them.
[0014] Figure 1 The diagram shown is a flowchart of an embodiment of the route tracing method for full-path fault location provided in this application. The method includes: Step 101: Send multiple route tracing probe messages with a Time-to-Live (TTL) starting from 1 and increasing hop by hop; Each intermediate device decrements the TTL of each received tracing probe message, and sends an ICMP timeout message for tracing probe messages with a TTL of zero after decrement, and sends an ICMP port unreachable extension message carrying the probe message's local output interface for tracing probe messages with a TTL of non-zero after decrement.
[0015] Step 102: Establish a full routing path information table to record the TTL and destination UDP port number of each route tracing probe packet; Step 103: Based on the destination UDP port number carried in the payload of each received ICMP timeout message, look up the corresponding TTL and record the source IP address of the ICMP timeout message, which is used as the ingress interface IP address, in the full routing path information table. Step 104: Based on the outgoing interface IP address carried in each received ICMP port unreachable extension message, record the corresponding previous TTL in the full routing path information table; Step 105: Receive an ICMP port unreachable message from the destination device and stop route probing; Step 106: Based on the destination UDP port number carried in the payload of the ICMP port unreachable message, find the corresponding TTL and record the source IP address of the ICMP port unreachable message, which is the ingress interface IP address, in the full routing path information table. Step 107: Determine that the entire route to the destination device is fault-free.
[0016] The beneficial effect of this application is that it enables accurate identification of hop-by-hop inbound and outbound interface IP addresses, effectively supports route tracing in complex scenarios, and improves network operation and maintenance efficiency.
[0017] Figure 2The diagram shown is a schematic representation of a route tracing embodiment of the full route path provided in this application.
[0018] Figure 2 In this scenario, source device Device A initiates a route tracing probe for the entire route to destination device Device D. The first directly connected Layer 3 forwarding device on this route path for the interface of source device Device A with IP address 1.1.1.1 is the first-hop device Device B.
[0019] Device B's ingress interface IP address to the source device Device A is 1.1.1.2, and its egress interface IP address to the next-hop device Device C is 1.1.2.1; the ingress interface IP address of the second-hop device Device C is 1.1.2.2, and its egress interface IP address to the destination device Device D is 1.1.3.1; the interface IP address of the destination device Device D is 1.1.3.2.
[0020] In this application, all devices from Device A to Device D support the extension mechanism proposed in this patent: when the TTL of the route tracing probe message to be sent is not zero and is the penultimate hop, an ICMP port unreachable extension message carrying the local outgoing interface IP address is sent.
[0021] Figure 2 In the above, source device Device A sends a UDP route tracing probe message 201 to destination device Device D: source IP address: 1.1.1.1; destination IP address: 1.1.3.2; destination UDP port number: 33434 (preset base value, a port that the application cannot use); TTL value = 1.
[0022] Device A records the full routing path information as shown in Table 1-1 below: Table 1-1 When the UDP tracing probe packet 201 arrives at the first-hop device Device B, Device B first performs a route lookup based on the destination IP address 1.1.3.2 of the UDP tracing probe packet 201, and determines that the next hop is IP address 1.1.2.2 and the local outgoing interface, which is the IP address 1.1.2.1 interface facing the second-hop device Device C.
[0023] Device B performs a decrement operation on the TTL field of the UDP route tracing probe packet, subtracting 1 from the original TTL value of 1, resulting in TTL=0.
[0024] If Device B determines that the TTL of the UDP tracing probe packet 201 to be forwarded after decrementing is 0, it will discard the UDP tracing probe packet 201 and send an ICMP Time Exceeded packet 211 to the source device Device A. The source IP address is the ingress interface IP address of Device B, 1.1.1.2, and the destination IP address is the source IP address of the original UDP tracing probe packet 201, 1.1.1.1. The payload encapsulates the original IP address header of the UDP tracing probe packet 201 and the first 8 bytes of the UDP header (including the destination port number 33434).
[0025] After receiving the ICMP timeout message 211, the source device Device A parses the ICMP message type and code, extracts the original UDP header information encapsulated in the payload, and obtains its destination UDP port number 33434.
[0026] Query the local maintenance full routing path information table 1-1, match the port number with the TTL=1 bound at the time of transmission, and record the source IP address 1.1.1.2 of ICMP timeout message 211 in this table as the ingress interface IP address, as shown in Table 1-2 below: Table 1-2 The source device, Device A, resends a UDP route tracing probe packet 202, where the source IP address is 1.1.1.1; the destination IP address is 1.1.3.2; the destination UDP port number is 33435 (an incrementing port that cannot be used by the application); and the TTL value is 2.
[0027] The source device, Device A, maintains the full routing path information table as shown in Table 1-3 below: Table 1-3 Device B first performs a route lookup based on the destination IP address 1.1.3.2 of the UDP route tracing probe packet 202, and determines that the next hop is IP address 1.1.2.2 and the local outgoing interface, that is, the IP address of the second hop device Device C is interface 1.1.2.1.
[0028] Device B performs a decrement operation on the TTL field of the UDP route tracing probe packet 202, subtracting 1 from the original TTL value of 2, resulting in TTL=1.
[0029] Device B copies a UDP route tracing probe packet 202 with a TTL that is not zero after decrementing, and sends the original UDP route probe packet 202 with TTL=1 to Device C through the outgoing interface with IP address 1.1.2.1.
[0030] Device B determines that the copied UDP route tracing probe packet 202 with TTL=1 is the penultimate hop, determines that the destination UDP port 33435 is not being used by the application, and sends an ICMP port unreachable extension packet 221.
[0031] In this application, the control plane of Device B sends an ICMP Port Unreachable Extended Message 221, which is of type Type 3. The message contains a custom code Code 16; the source IP address is the ingress interface IP address of Device B (1.1.1.2), and the destination IP address is the source IP address of the original UDP route tracing probe message 202 (1.1.1.1). The payload encapsulates the original IP address header of the UDP route tracing probe message 202 and the first 8 bytes of the UDP header (including the destination port number 33435); the decremented TTL is 1, and the outgress interface IP address of Device B on the routing path is 1.1.2.1.
[0032] After receiving the ICMP Port Unreachable Extension 221 message, source device Device A parses the ICMP message type 3 and code 16, and records the outgoing interface IP address 1.1.2.2 carried in the ICMP Port Unreachable Extension 221 message in the full routing path information table 1-4, corresponding to the previous TTL=1, as shown in Table 1-4: Table 1-4 The UDP tracing probe packet 202 arrives at the second-hop device Device C. Device C first performs a route lookup based on the destination IP address 1.1.3.2 of the UDP tracing probe packet 202, and determines that the next hop is IP address 1.1.3.1 and the local outgoing interface, that is, the IP address of the destination device Device D is interface 1.1.3.1.
[0033] Device C performs a decrement operation on the TTL field of the UDP route tracing probe packet 202, subtracting 1 from the original TTL value of 1, resulting in TTL=0.
[0034] If Device C determines that the TTL of the UDP tracing probe packet 202 to be forwarded after decrementing is 0, it will discard the UDP tracing probe packet 202 and send an ICMP timeout message 212 to the source device Device A. The source IP address is the ingress interface IP address of Device C, which is 1.1.2.2, and the destination IP address is the source IP address of the original UDP tracing probe packet 201, which is 1.1.1.1. The payload encapsulates the original IP address header of the UDP tracing probe packet 202 and the first 8 bytes of the UDP header (including the destination port number 33435).
[0035] After receiving the ICMP timeout message 212, the source device Device A parses the ICMP message type and code, extracts the original UDP header information encapsulated in the payload, and obtains its destination UDP port number 33435.
[0036] Query the local maintenance full routing path information table 1-4, match the port number with the TTL = 2 bound at the time of transmission, and record the source IP address 1.1.2.2 of ICMP timeout message 211 in this table as the ingress interface IP address of the second hop device, as shown in Table 1-5 below: Table 1-5 The source device, Device A, resends a UDP route tracing probe packet 203, where the source IP address is 1.1.1.1; the destination IP address is 1.1.3.2; the destination UDP port number is 33436 (an incrementing port that cannot be used by the application); and the TTL value is 3.
[0037] The source device, Device A, maintains the full routing path information table as shown in Table 1-6 below: Table 1-6 Device B first performs a route lookup based on the destination IP address 1.1.3.2 of the UDP route tracing probe packet 203, and determines that the next hop is IP address 1.1.2.2 and the local outgoing interface, that is, the IP address of Device C facing the second hop is interface 1.1.2.1.
[0038] Device B performs a decrement operation on the TTL field of UDP route tracing probe packet 203, subtracting 1 from the original TTL value of 3, resulting in TTL = 2.
[0039] Device B copies a UDP tracing probe packet 203 with TTL=2. If it determines that it is not the penultimate hop, it does not send an ICMP port unreachable extension packet. This avoids Device B and Device C repeatedly sending ICMP port unreachable extension packets in the same UDP tracing probe packet 203, thus preventing record redundancy errors.
[0040] Device C receives a UDP route tracing probe packet 203. First, it performs a route lookup based on the destination IP address 1.1.3.2 of the UDP route tracing probe packet 203, and determines that the next hop is IP address 1.1.3.2 and the local outgoing interface, which is interface with IP address 1.1.3.1.
[0041] Device C copies a UDP route tracing probe packet 203 with a TTL that is not zero after decrementing, and sends the original UDP route probe packet 203 with TTL=1 to Device D through the outgoing interface with IP address 1.1.3.1.
[0042] Device C determines that the TTL=1 of the copied UDP route tracing probe packet 203 is the penultimate hop, and sends an ICMP port unreachable extension packet 222. The source IP address is the ingress interface IP address of Device B, 1.1.1.2, and the destination IP address is the source IP address of the original UDP route tracing probe packet 203, 1.1.1.1. The payload encapsulates the original IP address header of the UDP route tracing probe packet 203 and the first 8 bytes of the UDP header (including the destination port number 33436); the decremented TTL=1; and the egress interface IP address of Device C on the routing path, 1.1.3.1.
[0043] The source device, Device A, records the outgoing interface IP address 1.1.3.1 carried in the ICMP Port Unreachable Extension 222 message in the full routing path information table 1-6, corresponding to the previous TTL=2, as shown in Table 1-7: Table 1-7 After receiving a UDP route tracing probe packet 203, Device D resolves the destination UDP port number to 33436, confirms that it is not occupied by any application, and determines that the UDP port is unreachable on this device.
[0044] Device D sends an ICMP port unreachable message 231, in which the source IP address is the IP address of the ingress interface 1.1.3.2 and the destination IP address is the source IP address of the UDP probe message 203 1.1.1.1, which is then encapsulated at the link layer and sent back.
[0045] After receiving the ICMP port unreachable message 231, the source device Device A parses its type and code, extracts the original UDP header information encapsulated in the payload, obtains the destination UDP port number 33436, queries the locally maintained full routing path information table 1-7, matches this port number with the TTL=1 bound at the time of transmission, and records the source IP address 1.1.3.2 of the ICMP timeout message 231 in this table as the ingress interface IP address of the destination device, as shown in Table 1-8 below: Table 1-8 The source device Device A determines the ingress interface IP address and egress interface IP address on the route path to the destination device Device D, and confirms that the entire route path to the destination device Device D is fault-free.
[0046] Figure 3 This is a schematic diagram of an embodiment of the fault location method for the entire routing path provided in this application.
[0047] The source device, Device A, sends a UDP route tracing probe message 301 to probe the first-hop intermediate device, Device B. Based on the IGMP timeout message 311 returned by the first-hop intermediate device, Device B, it maintains the full routing path information table. The implementation method for the ingress interface IP address corresponding to TTL=1 is the same. Figure 2 The schemes in the embodiments are the same.
[0048] The source device, Device A, sends a UDP route tracing probe packet 302 to probe the intermediate device, Device C, at the second hop. Based on the IGMP port unreachable extended packet 321 returned by the intermediate device, Device B, at the first hop, the implementation method for maintaining the full routing path information table with TTL=1 corresponding to the outgoing interface IP address is also similar to... Figure 2 The schemes in the embodiments are the same.
[0049] Figure 3 In the middle, after Device B decrements the TTL of the route tracing probe message 302, it continues to send the route tracing probe message 302 with TTL=1 to the intermediate device Device C in the second hop.
[0050] If the routing path of Device B, the device connected to Device C, is faulty, or if the ingress interface of Device C is faulty, Device C will not receive a TTL=1 route tracing probe packet 302 and will not send an ICMP timeout message.
[0051] After the source device Device A sends a route tracing probe message 302 with TTL=2, it does not receive an ICMP timeout message from the second hop device within a preset time. It then determines that the full routing path information table has recorded the outgoing interface IP address of the first hop, and determines that the incoming interface of the intermediate device Device C in the second hop or the routing path connecting to the first hop is faulty.
[0052] Figure 3 The implementation provides more accurate fault location for route tracing, making it easier for network administrators to locate path or ingress interface faults connecting intermediate devices to the previous hop device in the entire routing path.
[0053] Figure 4 This is a schematic diagram of another fault location embodiment of the full routing path provided in this application.
[0054] The source device, Device A, sends a UDP route tracing probe message 401 to probe the first-hop intermediate device, Device B. Based on the IGMP timeout message 411 returned by the first-hop intermediate device, Device B, it maintains the full routing path information table. The implementation method for the ingress interface IP address corresponding to TTL=1 is the same. Figure 2 The schemes in the embodiments are the same.
[0055] The source device, Device A, sends a UDP route tracing probe packet (402) to probe the intermediate device, Device C, on the second hop.
[0056] Device B decrements the TTL of the received route tracing probe message 402 to 1, determines that the outgoing interface of route tracing probe message 402 is faulty, discards route tracing probe message 402, and does not send ICMP port unreachable extension message.
[0057] After the source device Device A sends a 402 route tracing probe message with TTL=2, it does not receive an ICMP port unreachable extension message from the first-hop device within a preset time. It then determines that the full routing path information table has recorded the outgoing interface IP address of the first hop, and concludes that the outgoing interface of the first-hop device Device B is faulty.
[0058] Figure 4 The implementation provides a more accurate route tracing scheme for locating outgoing interface faults.
[0059] exist Figure 2 ,Figure 3 , Figure 4 In the illustrated embodiment, when the chassis device receives a route tracing probe message and determines that it is the penultimate hop, the ICMP Port Unreachable Extension message it sends can also carry the chassis number, slot number, and port number of the outgoing interface.
[0060] Figure 5 This is a schematic diagram of an embodiment of the route tracing method for the entire routing path provided in this application. The processor 51 of the device 50 executes machine-executable instructions in the memory 52 to perform the following operations: sending multiple route tracing probe messages; establishing an entire routing path information table to record the TTL and UDP of each route tracing probe message; looking up the corresponding TTL based on the destination UDP port number carried in the payload of each received ICMP timeout message, and recording the source IP address of the ICMP timeout message as the ingress interface IP address in the entire routing path information table; recording the corresponding previous TTL in the entire routing path information table based on the egress interface IP address carried in each received ICMP port unreachable extended message; receiving an ICMP port unreachable message and stopping route probing; looking up the corresponding TTL based on the destination UDP port number carried in the payload of the ICMP port unreachable message, and recording the source IP address of the ICMP port unreachable message as the ingress interface IP address in the entire routing path information table; and determining that the entire routing path to the destination device is fault-free.
[0061] Before the processor 51 of the device 50 executes the machine-executable instructions in the memory 52 to receive the ICMP port unreachable message and stop the route probing, it also performs the following operations: if no ICMP timeout message corresponding to the route tracing probe message with TTL of N is received within a preset time, and the full route path information table records the outgoing interface IP address with TTL of N-1 hops, it determines that the ingoing interface of the intermediate device at the Nth hop or the route path connecting the N-1 hop is faulty.
[0062] Before the processor 51 of the device 50 executes the machine-executable instructions in the memory 52 to receive the ICMP port unreachable message and stop the route probe, it also performs the following operations: if no ICMP port unreachable extension message is received from the previous hop of the route tracing probe message with TTL of N within a preset time, it determines that the outgoing interface of the intermediate device of the (N-1)th hop is faulty.
[0063] Before the processor 51 of the device 50 executes the machine-executable instructions in the memory 52 to receive the ICMP port unreachable message and stop route probing, it also performs the following operations: before recording the TTL corresponding to the outgoing interface IP address, chassis number, slot number, and port number carried by the ICMP port unreachable extended message in the full route path information table.
[0064] Figure 6 This is a schematic diagram of an embodiment of the route tracing method for the entire routing path provided in this application. The processor 61 of the device 60 executes machine-executable instructions in the memory 62 to perform the following operations: decrementing the Time-to-Live (TTL) of the received first route tracing probe message; when the TTL of the first route tracing probe message is zero after decrementing, sending an ICMP timeout message carrying the original IP address header of the route tracing probe message; or when the TTL of the first route tracing probe message is the penultimate hop and the outgoing interface is normal, sending the first route tracing probe message to the next hop, and sending an ICMP port unreachable extension message carrying the local outgoing interface IP address of the route tracing probe message and the original IP address header to the source device of the first route tracing probe message.
[0065] The processor 61 of the device 60, by running machine-executable instructions in memory 62, also performs the following operations: decrements the Time-to-Live (TTL) of the received second route tracing probe message; determines that the outgoing interface of the second route tracing probe message is faulty, discards the second route tracing probe message, and does not send an ICMP Port Unreachable extension message.
[0066] The processor 61 of the device 60 sends an ICMP port unreachable extension message by running machine-executable instructions in the memory 62, which also carries the chassis number, slot number, and port number of the local output interface; wherein, the ICMP port unreachable extension message is an ICMPv4 type 3, code 16, or a custom type ICMP message.
[0067] In this application, a machine-readable storage medium can be any electronic, magnetic, optical, or other physical storage device used to store or contain information (such as executable instructions, data, etc.). For example, any machine-readable storage medium herein can be any type of random access memory (RAM), volatile memory, non-volatile memory, flash memory, storage drive (such as a hard disk drive), solid-state drive, any type of optical disc (such as an optical disc, DVD, etc.), and similar devices, or combinations thereof. Furthermore, any machine-readable storage medium described herein can be a non-transitory machine-readable storage medium.
[0068] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A route tracing method for the entire route path, characterized in that, The method includes, Send multiple route tracing probe messages; Establish a full routing path information table to record the TTL and UDP of each route tracing probe packet; Based on the destination UDP port number carried in the payload of each received ICMP timeout message, the corresponding TTL is looked up, and the source IP address of the ICMP timeout message, which is used as the ingress interface IP address, is recorded in the full routing path information table. Based on the outgoing interface IP address carried in each received ICMP port unreachable extension message, the corresponding previous TTL is recorded in the full routing path information table; Upon receiving an ICMP port unreachable message, stop route probing. Based on the destination UDP port number carried in the payload of the ICMP port unreachable message, the corresponding TTL is found, and the source IP address of the ICMP port unreachable message, which is used as the ingress interface IP address, is recorded in the full routing path information table. The entire route to the destination device is confirmed to be fault-free.
2. The method according to claim 1, characterized in that, Before receiving the ICMP port unreachable message and stopping route probing, the method further includes: If no ICMP timeout message corresponding to a route tracing probe message with a TTL of N is received within a preset time, and the full route path information table records the outgoing interface IP address with a TTL of N-1 hops, it is determined that the ingoing interface of the intermediate device at the Nth hop or the route path connecting the N-1 hop is faulty.
3. The method according to claim 1, characterized in that, Before receiving the ICMP port unreachable message and stopping route probing, the method further includes: If no ICMP port unreachable extension message is received from the previous hop of the route tracing probe message with TTL of N within a preset time, it is determined that the outgoing interface of the intermediate device at hop N-1 is faulty.
4. The method according to claim 1, characterized in that, The method also includes, The TTL corresponding to the outgoing interface IP address, chassis number, slot number, and port number carried in the ICMP port unreachable extension message is recorded in the full routing path information table.
5. A route tracing device for locating faults along the entire route path, characterized in that, The device processor executes the method described in any one of claims 1-4 by running machine-executable instructions recorded on a machine-readable storage medium.
6. A route tracing method for the entire route path, characterized in that, The method includes, Decrease the Time-to-Live (TTL) of the first received route tracing probe message; When the TTL of the first route tracing probe message is zero after decrementing, an ICMP timeout message carrying the original IP address header of the route tracing probe message is sent. or When the TTL of the first tracing probe message is the penultimate hop after its decrement and the outgoing interface is normal, the first tracing probe message is sent to the next hop, and an ICMP port unreachable extension message carrying the local outgoing interface IP address of the tracing probe message and the original IP address header is sent to the source device of the first tracing probe message.
7. The method according to claim 6, characterized in that, The method also includes, Decrease the Time-to-Live (TTL) of the received second-route tracing probe packets; If the outgoing interface of the second route probe message is found to be faulty, the second route tracing probe message is discarded, and the ICMP port unreachable extension message is not sent.
8. The method according to claim 6 or 7, characterized in that, The ICMP port unreachable extension message also carries the chassis number, slot number, and port number of the local output interface.
9. The method according to claim 6 or 7, characterized in that, The ICMP port unreachable extension message is an ICMPv4 type 3, code 16, or custom type ICMP message.
10. A route tracing device for locating faults along the entire route path, characterized in that, The processor of the device executes the method described in any one of claims 6-9 by running machine-executable instructions recorded on a machine-readable storage medium.