Tracert commands use introduction Tracert (tracking Routing) 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 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. Description 2: Tracert increments the value of the "TTL" field to control the Internet Message Protocol (ICMP) the echo request "or ICMPv6 message is sent to the target to determine the path to the target. The path is displayed in the list, including the near-side router interface of the router in the path between the source host and the target host. The near-side interface is the router interface closest to the sending host in the path. If no parameters are provided during use, tracert displays help. Syntax tracert [-d] [-h MaximumHops] [-j HostList] [-w Timeout] [-R] [-S SrcAddr] [-4] [-6] TargetName Parameter -d prevents tracert from attempting to resolve the IP addresses of intermediate routers to their names. This will accelerate the display of tracert results. -H MaximumHops specifies the maximum number of hops in the search target path. The default value is 30 hops. -J HostList specifies the echo request message to use the Loose Source Route Option in the IP header with the intermediate target set specified in the HostList. When a loose source route is used, consecutive intermediate targets can be separated by one or more routers. The maximum number of addresses or names in the HostList is 9. HostList is a series of IP addresses separated by spaces (expressed in dotted decimal Notation ). This parameter is used only when an IPv4 address is tracked. -W Timeout specifies the time (in milliseconds) for waiting for "ICMP Timeout" or "echo response" messages (corresponding to the specified "return request" message to be received ). If no message is received within the time-out period, an asterisk (*) is displayed (*). The default timeout value is 4000 (4 seconds ). -R specifies the IPv6 route extension header application to send the "echo request" message to the local host, use the target as the intermediate target, and test the reverse route. -S specifies the source address used in the "echo request" message. This parameter is used only when an IPv6 address is tracked. -4: Tracert.exe can only use IPv4 for this trail. -6: Tracert.exe can only use IPv6 for this trail. TargetName specifies the target, which can be an IP address or host name. -? Display help at a command prompt. Comment? The diagnostic tool sends an ICMP echo request message with a changed TTL value to the target to determine the path to the target. Each router on the path must at least reduce the TTL of the IP data packet by 1 before forwarding the data packet. In this way, TTL becomes the maximum Link counter. When the TTL on the data packet reaches 0, the router should send the "ICMP timeout" message back to the source computer. Tracert sends the first "echo request" message whose TTL is 1, and increases TTL by 1 in each subsequent sending process until the target response or hop reaches the maximum value, thus determining the path. By default, the maximum number of hops is 30, which can be specified using the-h parameter. Check the ICMP timeout message returned by the Intermediate router and the echo reply message returned by the target to determine the path. However, some routers do not return "timed out" messages for data packets whose TTL value has expired, and these routers are invisible to tracert commands. In this case, an asterisk (*) is displayed for this hop (*).? To track the path and provide network latency and packet loss information for each vro and link in the path, use the pathping command.? This command is available only when the "Internet Protocol (TCP/IP)" is installed as a component of the network adapter attribute in "network connection. For example, to track the path of a host named corp7.microsoft.com, type tracert corp7.microsoft.com to track the path of a host named corp7.microsoft.com and prevent each IP address from being parsed as its name. Type: tracert-d corp7.microsoft.com to track the path of the host named corp7.microsoft.com and use the Loose Source Route 10.12.0.1-10.29.3.1-10.1.44.1, type: tracert-j 10.12.0.1 10.29.3.1 10.1.44.1 corp7.microsoft.com. For example, this is the router used to track access to Baidu: C: \ WINDOWS \ system32> tracert www. baidu. comTracing route to www.a.shifen.com [202.108.22.43] over a maximum of 30 hops: 1 627 MS 502 MS 561 MS 221.221.144.12 504 MS 667 MS 597 MS gj-11-009.bta.net.cn [202.106.11.9] 3 667 MS 747 MS 647 MS bt-227-089.bta.net.cn [202.106.227.89] 4 591 MS 678 MS * bt-228-061.bta.net.cn [202.106.228.61] 5 719 MS 737 MS 652 MS 61.148.3.306 525 MS 497 MS 480 MS 202.106.48.187 366 MS 333 MS 587 MS xd-22-43-a8.bta.net.cn [202.108.22.43] Trace complete. this is 163 case: C: \ WINDOWS \ system32> tracert www.163.comTracing route to www.cache.split.netease.com [202.108.9.52] over a maximum of 30 hops: 1 580 MS 721 MS 674 MS 221.221.144.12*755 MS 620 MS 202.106.49.373 602 MS 413 MS 617 MS bt-227-093.bta.net.cn [202.106.227.93] 4 471 MS 386 MS 345 MS [202.106.228.57] 5 328 bt-228-057.bta.net.cn 245 MS 398 MS 202.106.193.1266 417 MS 340 MS 312 MS 61.148.143.307 425 MS 539 MS 500 MS 210.74.176.1948 576 MS 461 MS 418 MS zz-9-52-a8.bta.net.cn [202.108.9.52] Trace complete.