You might also sometimes see the tracert command referred to as the trace route command or traceroute command.
Tracert Command Availability
The tracert command is available from within the Command Prompt in all Windows operating systems including Windows 11, Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, and older versions of Windows as well.
Tracert Command Syntax
If you know how to read command syntax, the syntax for tracert is pretty straight-forward: tracert [-d] [-h MaxHops] [-w TimeOut] [-4] [-6] target [/?]
Tracert Command Examples
In the above example, the tracert command is used to show the path from the networked computer on which the tracert command is being executed by a network device, in this case, a router on a local network, that’s assigned the 192.168.1.1 IP address. The result displayed on the screen will look something like this: In this example, you can see that tracert found a network device using the IP address of 192.168.1.254, let’s say a network switch, followed by the destination, 192.168.1.1, the router. With the tracert command shown above, we’re asking tracert to show us the path from the local computer all the way to the network device with the hostname www.google.com. In this example, we can see that tracert identified fifteen network devices including our router at 10.1.0.1 and all the way through to the target of www.google.com, which we now know uses the public IP address of 209.85.225.104, one of Google’s many IP addresses. With this tracert command example, we’re again requesting the path to a website, this time www.yahoo.com, but now we’re preventing tracert from resolving hostnames by using the -d option. We can see that tracert again identified fifteen network devices including our router at 10.1.0.1 and all the way through to the target of www.yahoo.com, which we can assume uses the public IP address of 209.191.122.70. As you can see, tracert didn’t resolve any hostnames this time, which significantly sped up the process. In this last example of the tracert command in Windows, we’re using -h to limit the hop count to 3, but instead of displaying the results in Command Prompt, we’ll use the > redirection operator to send it all to a TXT file located on Z:, an external hard drive. Here are some example results of this last command:
Tracert Related Commands
The tracert command is often used with other networking related Command Prompt commands like ping, ipconfig, netstat, nslookup, and others. The pathping command is similar to tracert but also shows network latency and loss information.