Using tracert to track network connections Tracert is a routing tracking utility used to determine the path adopted by the IP datagram access target. The Tracert command uses the ip ttl field and the ICMP error message to determine the route from one host to other hosts on the network. Tracert works by sending an "Internet Control Message Protocol (ICMP)" response packet with different TTL values to the target, and the Tracert diagnostic program determines the route adopted by the target. Each vro on the path must at least decrease the TTL of the data packet by 1 before forwarding the data packet. When the TTL value on the data packet is reduced to 0, the router should send the "ICMP timeout" message back to the source system. Tracert sends a response packet whose TTL is 1, and increases TTL by 1 in each subsequent sending process until the target response or TTL reaches the maximum value to determine the route. Check the ICMP timeout message sent back by the Intermediate router to determine the route. Some routers directly discard TTL expired data packets without asking, which is not seen in the Tracert utility. The Tracert command prints out the list of nearby router interfaces in the path that returns the "ICMP timeout" message in sequence. If the-d option is used, the Tracert utility does not query DNS on each IP address. In the following example, data packets must pass through two routers (10.0.0.1 and 192.168.0.1) to reach host 172.16.0.99. The default gateway of the host is 10.0.0.1, And the IP address of the router on the 192.168.0.0 network is 192.168.0.1. C:> tracert 172.16.0.99-d Tracing route to 172.16.0.99 over a maximum of 30 hops 1 2 s 3 s 2 s 10, 0.0, 1 2 75 MS 83 MS 88 MS 192.168.0.1 3 73 MS 79 MS 93 MS 172.16.0.99 Trace complete. to solve the problem with tracert, you can use the tracert command to determine the stop position of the data packet on the network. In the following example, the default gateway determines that there is no valid path for the host 192.168.10.99. This may be due to a vro configuration problem, or the 192.168.10.0 network does not exist (the wrong IP address ). C:> tracert 192.168.10.99 Tracing route to 192.168.10.99 over a maximum of 30 hops 1 10.0.0.1 reportsestination net unreachable. trace complete. the Tracert utility is very useful for solving large network problems. In this case, several paths can be taken to reach the same point. The Tracert command line option Tracert command supports multiple options, as shown in the following table. Tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name option description-d specifies that the IP address is not resolved to the host name. -H maximum_hops specifies the number of hops to track the route of the host called target_name. -J host-list specifies the list of router interfaces in the path used by the Tracert utility package. -W timeout: the number of milliseconds specified for each reply. The target host name or IP address of target_name. For more information, see trace paths using the tracert command. Using the pathping command to test the vropatpathping is a routing tracking tool that combines the ping and tracert commands with other information not provided by the two tools. The pathping Command sends data packets to each vro in the path to the destination within a period of time, and then returns the data packet-based computer results from each hop. Because the command shows how much data packets are lost on any given vro or link, it is easy to determine the vro or link that may cause network problems. Some options are available, as shown in the following table. Option name function-n Hostnames does not resolve the address to the host name. -H Maximum hops: the Maximum number of hops for a search target. -G Host-list: Release the source route along the route list. -P Period: the number of milliseconds that a ping can wait. -Q Num_queries: the number of queries per hop. -W Time-out indicates the number of milliseconds each reply takes. -T Layer 2 tag connects the Layer 2nd priority mark (for example, for IEEE 802.1 p) to the data packet and sends it to each network device in the path. This helps identify network devices that are not correctly configured with Layer 2 priority. The-T switch is used to test QoS connectivity. -R rsvp isbase Che check to determine whether each vro in the path supports the resource retention Protocol (RSVP), which allows the host to retain a certain amount of bandwidth for the data stream. The-R switch is used to test QoS connectivity. The default number of hops is 30, and the default waiting time before timeout is 3 seconds. The default time is 250 milliseconds, and the number of queries per vro along the path is 100. The following is a typical pathping report. The statistical information edited after the hop list indicates the packet loss on each independent router. D:> pathping-n msw Tracing route to msw [7.54.1.196] over a maximum of 30 hops: 0 172.16.87.35 1 172.16.87.218 2 192.68.52.1 3 192.68.80.1 4 7.54.247.14 5 7.54.1.196 Computing statistics for 125 seconds... source to Here This Node/Link Hop RTT Lost/Sent = Pct Address 0 172.16.87.35 0/100 = 0% | 1 41 ms 0/100 = 0% 0/100 0% = 100 172.16.87.21813/13% = | 2 22 ms 16/100 = 16% 3/100 = 3% 192.68.52.10/100 = 0% | 3 24 ms 13/100 = 13% 0/100 = 0% 192.68.80.1 0/100 = 0% | 4 21 ms 14/100 = 14% 1/100 = 1% 10.54.247.14 0/100 = 0% | 5 24 ms 13/100 = 13% 0/100 = 0% 10.54.1.196 Trace complete. when you run pathping, first view the routing results when testing the problem. This path is the same as the path displayed by the tracert command. Then the pathping command displays a busy message for the next 125 milliseconds (this time varies according to the hop count ). During this period, pathping collects information between all the routers listed earlier and the links between them. At the end of this period, it displays the test results. The rightmost two columns of This Node/Link Lost/Sent = Pct and Address are the most useful. 172.16.87.218 (hops 1) and 192.68.52.1 (hops 2) lose 13% of data packets. All other links are working properly. Routers in hops 2 and 4 also lose packets destined for them (as shown in This Node/Link column), but This loss does not affect the forwarding path. The loss rate displayed on the Link (marked as | in the rightmost column) indicates that the lost data packets are forwarded along the path. This loss indicates that the link is blocked. The loss rate displayed on the router (displayed by the IP address in the rightmost sidebar) indicates that the CPU of these routers may be overloaded. These congested routers may also cause peer-to-peer problems, especially when the software router forwards packets. ========================================================== ========================================================== === Tracert working principle by sending different IP address TTL to the target) value of the "Internet Control Message Protocol (ICMP)" response packet, the Tracert diagnostic program determines the route to the target. Each vro on the path must at least decrease the TTL of the data packet by 1 before forwarding the data packet. When the TTL value on the data packet is reduced to 0, the router should send the "ICMP timeout" message back to the source system. Tracert sends a response packet whose TTL is 1, and increases TTL by 1 in each subsequent sending process until the target response or TTL reaches the maximum value to determine the route. Check the ICMP timeout message sent back by the Intermediate router to determine the route. Some routers directly discard TTL expired data packets without asking, which is not seen in the Tracert utility. The Tracert command prints out the list of nearby router interfaces in the path that returns the "ICMP timeout" message in sequence. If the-d option is used, the Tracert utility does not query DNS on each IP address. In the following example, data packets must pass through two routers (10.0.0.1 and 192.168.0.1) to reach host 172.16.0.99. The default gateway of the host is 10.0.0.1, And the IP address of the router on the 192.168.0.0 network is 192.168.0.1. C: \> tracert 172.16.0.99-d Tracing route to 172.16.0.99 over a maximum of 30 hops 1 2 s 3 s 2 s 10, 0.0, 1 2 75 MS 83 MS 88 MS 192.168.0.1 3 73 MS 79 MS 93 MS 172.16.0.99 Trace complete. to solve the problem with tracert, you can use the tracert command to determine the stop position of the data packet on the network. In the following example, the default gateway determines that there is no valid path for the host 192.168.10.99. This may be due to a vro configuration problem, or the 192.168.10.0 network does not exist (the wrong IP address ). C: \> tracert 192.168.10.99 Tracing route to 192.168.10.99 over a maximum of 30 hops 1 10.0.0.1 reports: Destination net unreachable. trace complete. the Tracert utility is very useful for solving large network problems. In this case, several paths can be taken to reach the same point. The Tracert command line option Tracert command supports multiple options, as shown in the following table. Tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name option description-d specifies that the IP address is not resolved to the host name. -H maximum_hops specifies the number of hops to track the route of the host called target_name. -J host-list specifies the list of router interfaces in the path used by the Tracert utility package. -W timeout: the number of milliseconds specified for each reply. The target host name or IP address of target_name. For more information, see trace paths using the tracert command. Using the pathping command to test the vropatpathping is a routing tracking tool that combines the ping and tracert commands with other information not provided by the two tools. The pathping Command sends data packets to each vro in the path to the destination within a period of time, and then returns the data packet-based computer results from each hop. Because the command shows how much data packets are lost on any given vro or link, it is easy to determine the vro or link that may cause network problems. Some options are available, as shown in the following table. Option name function-n Hostnames does not resolve the address to the host name. -H Maximum hops: the Maximum number of hops for a search target. -G Host-list: Release the source route along the route list. -P Period: the number of milliseconds that a ping can wait. -Q Num_queries: the number of queries per hop. -W Time-out indicates the number of milliseconds each reply takes. -T Layer 2 tag connects the Layer 2nd priority mark (for example, for IEEE 802.1 p) to the data packet and sends it to each network device in the path. This helps identify network devices that are not correctly configured with Layer 2 priority. The-T switch is used to test QoS connectivity. -R rsvp test Che check to determine whether each vro in the path supports the resource retention Protocol (RSVP), which allows the host to retain a certain amount of bandwidth for the data stream. The-R switch is used to test QoS connectivity. The default number of hops is 30, and the default waiting time before timeout is 3 seconds. The default time is 250 milliseconds, and the number of queries per vro along the path is 100. The following is a typical pathping report. The statistical information edited after the hop list indicates the packet loss on each independent router. D: \\> pathping-n msw Tracing route to msw [7.54.1.196] over a maximum of 30 hops: 0 172.16.87.35 1 172.16.87.218 2 192.68.52.1 3 192.68.80.1 4 7.54.247.14 5 7.54.1.196 Computing statistics for 125 seconds... source to Here This Node/Link Hop RTT Lost/Sent = Pct Address 0 172.16.87.35 0/100 = 0% │ 1 41 ms 0/100 = 0% 0/100 0% = 13/100 172.16.87.218 13% = │ 2 22 ms 16/100 = 16% 3/ 100 = 3% 192.68.52.1 0/100 = 0% │ 3 24 ms 13/100 = 13% 0/100 0% = 0/100 192.68.80.1 0% = 14/100 │ 4 21 ms 14% = 1/100 1% = 0/100 10.54.247.14 0% = 13/100 │ 5 24 ms = 13% 0/100 = 0% 10.54.1.196 Trace complete. when you run pathping, first view the routing results when testing the problem. This path is the same as the path displayed by the tracert command. Then the pathping command displays a busy message for the next 125 milliseconds (this time varies according to the hop count ). During this period, pathping collects information between all the routers listed earlier and the links between them. At the end of this period, it displays the test results. The rightmost two columns of This Node/Link Lost/Sent = Pct and Address are the most useful. 172. 13% of data packets are lost in 16.87.218 (HOP point 1) and 192.68.52.1 (HOP point 2. All other links work properly. Routers in hops 2 and 4 also lose packets destined for them (as shown in This Node/Link column), but This loss does not affect the forwarding path. The loss rate displayed on the Link (marked as │ In the rightmost column) indicates that the lost data packets are forwarded along the path. This loss indicates that the link is blocked. The loss rate displayed on the router (displayed by the IP address in the rightmost sidebar) indicates that the CPU of these routers may be overloaded. These congested routers may also cause peer-to-peer problems, especially when the software router forwards packets.