The tracert (which is short for trace route) is a Windows network command-line utility used to help diagnose network routing issues. If you are familiar with Linux, this tool is similar to traceroute. With tracert, you can learn details about each router (hop) that make up your network connection pathway to a remote device. It can help to determine why your connections may be poor and can help you identify where exactly the problem is.
These commands shown here are tested on a computer with Windows 10 but most will work in other versions of Windows as well.
The tracert utility is a Windows command-line tool used to diagnose network issues. It is used to report pathway between one network device to another. By using tracert, we can identify the route your connection takes to reach the remote device. The network pathway typically requires traversing multiple routers (refer to as hops) to reach the remote device. This makes troubleshooting network connectivity issues a bit more involved as there are many devices that can contribute to the problem. With the tracert tool, you'll be able to check on connection problems with ease as it can help you identify the specific device that is causing problems. It will trace the pathway your connection takes to the destination by providing information on each device (typically a router) and on its progress.
It is important to be aware that tracert result is a single snapshot of the network at the time it was performed. You should perform tracert multiple times to ensure you have a fair sampling of data to use in your troubleshooting efforts.
To use this utility, you will need to launch the Command Prompt window. The three common ways to launch the Command Prompt window are:
cmd
using the built-in Windows search tool.cmd
at the Run window that appears.tracert [-d] [-h <MaximumHops>] [-j <Hostlist>] [-w <timeout>] [-R] [-S <Srcaddr>] [-4][-6] <TargetName>
Parameter | Description |
---|---|
-d | Do not resolve addresses of intermediate routers to their hostnames. This can speed up tracert performance. |
-h maximum_hops | Set the maximum number of hops in the path to search for target. Default is 30 hops. |
-j host-list | Loose source route along host-list (IPv4-only). With loose source routing, successive intermediate destinations can be separated by one or more routers. The maximum number of addresses of names is the host list is nine (9). The hostlist is simply a series of IP addresses in dotted decimal notation (e.g., 192.168.128.8) each separated by spaces. This parameter is only for IPv4 addresses. |
-w timeout | Set the amount of time (in milliseconds) to wait for each reply. |
-R | Trace round-trip path (IPv6-only). |
-S srcaddr | Source address to use (IPv6-only). |
-4 | Force tracert to use IPv4 for the trace. |
-6 | Force tracert to use IPv6 for the trace. |
TargetName | Specifies the destination, either an IP address or a host name. |
/? | Displays help information. |
There are a variety of switches (sub commands) available with the tracert utility that allows your to configure how it behaves
To trace the route to a specific IP address, for example 72.47.244.140, type the following in the command window then press Enter: tracert 72.47.244.140
It can take a few minutes for the trace to complete. If you wish to abort a trace, press CTRL+C on your keyboard.
As the illustration below shows, each time the data packet reaches a router (a hop) along its way to the destination, tracert will report back information about that router. This information include the IP address and hostname, if available, of the router, and the time it took between each hop.
To trace the route to a specific domain, such as www.meridianoutpost.com, type the following in the command window then press Enter: tracert www.meridianoutpost.com
It can take a few minutes for the trace to complete. If you wish to abort a trace, press CTRL+C on your keyboard.
By default, tracert will trace the complete pathway from your computer to the remote host. However, sometimes you only need to trace up to a specific router or a specific number of hops. Limiting a trace to just a specific number of hops will help you use tracert more efficiently. By using the -h
switch, you can specify the maximum number of hops tracert will go through.
For example, to trace to the 6th hop to the website www.meridianoutpost.com, type the following in the command window then press Enter: tracert -h 6 www.meridianoutpost.com
By default, tracert will perform a reverse IP lookup to identify the hostname for each hop. If there is no hostname available, tracert will have to wait for a timeout before it continues to the next hop. Waiting for the timeout can account for the majority of time it take tracert to complete a trace. If knowing the hostname is not important for your troubleshooting efforts, you can use the -d
switch to skip this lookup.
For example, to perform a trace to www.meridianoutpost.com without resolving IP addresses to host names, type the following in the command window then press Enter: tracert -d www.meridianoutpost.com
The information in a tracert reports can look overwhelming. This section will help you better understand what it means.
Area 1 - This is the tracert command that was typed
Area 2 - This shows what tracert is performing. In the example illustration, it is performing a trace to the destination IP of 72.47.244.140, which a reverse lookup identifies this with a hostname of agaaacgeks.gs11.gridserver.com.
Area 3 - This is the maximum number of hops that will be used to trace the route. For Windows tracert, the default is 30 hops. This means, tracert will only trace to the first 30 routers. This parameter can be increased by using the -h
switch if necessary.
Area 4 - This portion of the tracert output shows information on each hop that handled your data packet to help it along to the destination. There are five columns of data shown in this report.
-h
switch.-w
switch if necessary. Seeing one or two asterisks does not necessarily indicate a problem. Routers can be configured to limit the number of ping or tracert packets it responses to as a way to prevent them from being affected by denial-of-service attacks.The example usage described in the article shows only some of the sub commands available with tracert. To get a list of the available switches, type the following in the command window then press Enter: tracert /?
-d
switch to skip reverse IP lookup to speed up tracert.The following is an example of a good tracert result. On hop 9, the device did not respond, as indicated with the asterisks.. However, because hop 10 responded, we know hop 9 was able to handle the packet to move to forward to the next hop. In this scenario, the router on hop 9 is likely configured to not response to ICMP packets, but it is functioning properly to in routing data packets. A tracert result with no asterisks is also a good result.
1 13 ms 22 ms 25 ms 52.93.114.64
1 <1 ms <1 ms 1 ms 54.239.108.177
2 <1 ms <1 ms <1 ms 64.125.12.29
3 2 ms 2 ms 2 ms 64.125.31.41
4 65 ms 65 ms 65 ms 64.125.30.248
5 65 ms 66 ms 65 ms 64.125.29.45
6 65 ms 65 ms 65 ms 64.125.28.103
7 82 ms 65 ms 65 ms 64.125.26.183
8 65 ms 65 ms 65 ms 64.125.31.49
9 * * * 216.200.159.42
10 64 ms 65 ms 64 ms 64.93.85.25
11 66 ms 66 ms 66 ms 64.93.75.18
12 65 ms 65 ms 65 ms 72.10.63.118
13 64 ms 64 ms 64 ms 72.47.244.140
The following is an example of a tracert result.showing a failed hop.Starting with hop 9, we see all hops from that point forward are not responding. This indicates hop 9 is faulty or mis-configured and not forwarding traffic to the next hop. Hop 9 is where you want to start your troubleshooting.
1 13 ms 22 ms 25 ms 52.93.114.64
1 <1 ms <1 ms 1 ms 54.239.108.177
2 <1 ms <1 ms <1 ms 64.125.12.29
3 2 ms 2 ms 2 ms 64.125.31.41
4 65 ms 65 ms 65 ms 64.125.30.248
5 65 ms 66 ms 65 ms 64.125.29.45
6 65 ms 65 ms 65 ms 64.125.28.103
7 82 ms 65 ms 65 ms 64.125.26.183
8 65 ms 65 ms 65 ms 64.125.31.49
9 * * * Request timed out
10 * * * Request timed out
11 * * * Request timed out
12 * * * Request timed out
13 * * * Request timed out
The following is an example of a tracert result showing a routing problem. Starting with hop 8 and hop 9, our packet is bouncing back and forth between these two routers (routing loop). The packet will continued to be passed between 64.125.31.49 and 216.200.159.42 until the maximum hop count is reached (30 is this example) or until the session times out. With a routing loop problem, data will not reach the intend destination.
1 13 ms 22 ms 25 ms 52.93.114.64
1 <1 ms <1 ms 1 ms 54.239.108.177
2 <1 ms <1 ms <1 ms 64.125.12.29
3 2 ms 2 ms 2 ms 64.125.31.41
4 65 ms 65 ms 65 ms 64.125.30.248
5 65 ms 66 ms 65 ms 64.125.29.45
6 65 ms 65 ms 65 ms 64.125.28.103
7 82 ms 65 ms 65 ms 64.125.26.183
8 65 ms 65 ms 65 ms 64.125.31.49
9 65 ms 65 ms 72 ms 216.200.159.42
10 64 ms 65 ms 64 ms 64.125.31.49
11 66 ms 66 ms 66 ms 216.200.159.42
…
…
…
29 64 ms 65 ms 66 ms 216.200.159.42
30 64 ms 64 ms 64 ms 64.125.31.49
tracert 72.47.244.140 > c:\temp\tracert.txt
An investment in knowledge always pays the best interest.
The tracert utility is a valuable tool for troubleshooting network issues, particularly for large networks. It will help you identify where a problem lies on a network if you are unable to reach a remote host. If you are a network administrator or network engineer, this is a great utility to become familiar with.
Back to Top