How to Use Tracert/Traceroute Command in Windows
Last Updated :
06 Dec, 2024
If you've ever faced slow internet speeds, difficulty accessing websites, or issues with your network connection, you might have heard about the tracert/traceroute command. It's a powerful diagnostic tool that helps you trace the route packets take across the internet or your local network, helping identify where problems may be occurring. Whether you're a network admin, IT professional, or just a curious user, knowing how to use the tracert command in Windows 10 or Windows 11 can significantly improve your troubleshooting skills.
In this guide, we’ll understand the process of running the tracert command in both Windows 10 and Windows 11.
How to Use Tracert/Traceroute Command in WindowsWhat is Tracert
Tracert (short for "Trace Route") is a command-line utility used to trace the route that data packets take to reach a specific destination across an IP network, such as the Internet. It provides a detailed map of the path taken by the packets from the source device to the destination, showing each intermediate router or "hop" along the way.
Example: Imagine you're unable to load a website, and you wonder if the problem lies with your internet service provider, the website's server, or somewhere in between. Running tracert allows you to pinpoint where the connection fails, so you can narrow down the cause of the issue. It's also incredibly helpful in diagnosing latency issues and understanding the health of your network.
Running Tracert/Traceroute: Step-by-Step Guide
Follow the below steps to Run a traceroute (tracert) command using Mircosoft Windows 10/11:
Step 1: Open the Command Prompt
- Simply type 'cmd' in the search bar and hit Enter. The Command Prompt window will open.
- Alternatively, Press
Win + R
, type cmd
, and hit Enter.
Step 2: Run the Tracert Command
To trace the route to a specific website, type 'tracert' followed by the domain or IP address i.e. tracert [hostname or IP address]
Traceroute Command with Example:
Here we want to Trace the route of www.google.com, In the Command Prompt or Terminal, type the following command:
tracert www.google.com
Run the Tracert CommandStep 3: Reading a Traceroute
The output will display the following for each hop:
- The hop number.
- The router’s IP address or domain name.
- The round-trip time (RTT) for the packet to reach that hop and return.
Explanation of the above example:
- The packet first hits the 10.143.85.102 router.
- Then it moves to 10.143.80.5, followed by static and so on, until it reaches 142.250.182.164, which is the IP address of
google.com
. - The round-trip time (RTT) for each hop is also shown.
Tracert Command List with Parameters
Here’s a complete table of the Tracert (Trace Route) command along with its common parameters, their descriptions, and how they are used. These parameters allow to customize the behavior of Tracert, making it more flexible for troubleshooting network issues.
Command | Description | Example |
---|
tracert <destination> | Basic syntax to run Tracert to a specified destination (IP address or domain name). | tracert www.google.com |
tracert -d <destination> | Disables the domain name resolution; shows only IP addresses instead of hostnames. | tracert -d www.google.com |
tracert -h <max_hops> | Sets the maximum number of hops to trace before terminating. | tracert -h 20 www.google.com |
tracert -w <timeout> | Specifies the timeout in milliseconds to wait for each reply. Default is 4000 ms. | tracert -w 1000 www.google.com |
tracert -4 <destination> | Forces Tracert to use IPv4 for the trace. | tracert -4 www.google.com |
tracert -6 <destination> | Forces Tracert to use IPv6 for the trace. | tracert -6 www.google.com |
tracert -l <packet_size> | Specifies the number of bytes in the ICMP packet sent. Default is 32 bytes. | tracert -l 1500 www.google.com |
tracert -p <port> | Sends the trace to the specified port number (useful in some network troubleshooting). | tracert -p 80 www.google.com |
tracert -R <route_option> | This option routes each hop in reverse, from destination back to the source. | tracert -R www.google.com |
tracert -T | Specifies the use of a TCP-based probe instead of the default ICMP packets. | tracert -T www.google.com |
tracert -f <TTL> | Sets the initial Time-to-Live (TTL) value for the first hop (useful for debugging routing). | tracert -f 64 www.google.com |
tracert -R <destination> | Routes each hop using a reverse path to the source. | tracert -R www.google.com |
Common Error Messages in Tracert
While using Tracert, you may encounter various error messages that can help diagnose network problems. These messages typically indicate issues with connectivity, routing, or firewalls. Below are some of the most common error messages you might see when running a Tracert command, along with explanations and troubleshooting steps.
1. * * * Request Timed Out
This is one of the most common error messages in Tracert. It means that the Tracert command did not receive a response within the specified timeout period from one of the hops along the route.
Possible Causes:
- The router or server may be configured to ignore ICMP requests (ping requests) for security reasons.
- The router or server may be temporarily down or overloaded.
- Firewalls or security policies may block ICMP traffic.
Troubleshooting:
- This message doesn't always indicate a serious issue. It is normal for certain routers or firewalls to block ICMP traffic (which is used by Tracert).
- If the timeout occurs only on a particular hop and the rest of the route is fine, the network may be functioning correctly.
- Try running Tracert to different destinations or check if other users are experiencing the same issue.
2. Destination Net Unreachable
This error appears when Tracert cannot find a route to the destination network, meaning the path to the target is completely blocked or the destination network is unreachable.
Possible Causes:
- There may be a routing issue, either within your local network or on the internet.
- A misconfigured router or gateway might be preventing the route.
- The destination might be temporarily down or disconnected from the network.
Troubleshooting:
- Check the local network for misconfigurations, such as incorrect IP settings or faulty network equipment.
- Contact your Internet Service Provider (ISP) if the issue persists beyond your network.
- You can also verify if the destination is reachable via other network tools like
ping
or telnet
.
3. Request Timed Out - All Hops
When every hop returns the Request Timed Out
message, it generally suggests that no ICMP traffic is allowed past the first router in the path. This typically indicates a configuration issue.
Possible Causes:
- A firewall or router along the path is blocking ICMP packets (the type of packet used by Tracert).
- Network-level security policies prevent the Tracert tool from working.
Troubleshooting:
- Check if a firewall on your local machine, router, or ISP is blocking ICMP requests.
- If you are troubleshooting from behind a corporate network, it’s likely that network policies prevent the use of Tracert for security reasons.
- Test using alternative tools like
ping
or PathPing
.
4. General Failure
This error occurs when Tracert encounters a general issue that prevents it from performing the trace. It typically happens when there is a problem with the local machine’s networking or configuration.
Possible Causes:
- Issues with the network interface on your local machine (e.g., Wi-Fi or Ethernet).
- A misconfigured IP address or DNS settings.
- A software conflict or firewall blocking Tracert.
Troubleshooting:
- Restart your computer and check your network connection.
- Verify that your computer’s IP address and DNS settings are correct.
- Temporarily disable any third-party firewalls or security software and test again.
5. Unable to Resolve Target System Name
This error happens when Tracert is unable to resolve the domain name you provided into an IP address. This suggests a DNS (Domain Name System) resolution issue.
Possible Causes:
- The DNS server is not functioning or configured incorrectly.
- The domain name may be misspelled or the destination website may not exist.
Troubleshooting:
- Check if the domain name is correct and try to visit it in a web browser to ensure it's active.
- Test your DNS configuration by running
nslookup
or ping
on the domain name to confirm that it resolves to an IP address. - Try using a different DNS server, such as Google's public DNS (8.8.8.8), to see if the issue resolves.
6. Time To Live Exceeded
The Time To Live Exceeded
error indicates that the packet has traversed more hops than the set TTL (Time To Live) value, which means the packet is stuck in a routing loop or has failed to reach the destination within the set hop limit.
Possible Causes:
- A network routing loop where the packet continuously circulates between two or more routers without reaching the destination.
- A misconfigured router or network device could be creating circular routing paths.
Troubleshooting:
- This error is typically a sign of a problem within the network itself, such as a misconfigured router or a routing loop.
- If the loop is within your network, check the routing tables and configuration on your routers or gateways.
- Contact your ISP if the issue appears to be outside your local network.
7. Network Unreachable
This error occurs when Tracert is unable to find a valid path to the destination network. It suggests a significant connectivity issue between your machine and the target destination.
Possible Causes:
- The destination network may be completely disconnected or misconfigured.
- A major network routing issue exists between your device and the destination.
Troubleshooting:
- Verify that your local network is connected and functional (e.g., check cables or Wi-Fi settings).
- If possible, try accessing a different website or service to verify that the issue is specific to the target destination.
- Contact your ISP or the administrator of the destination network to investigate potential connectivity issues.
How Does Tracert Work?
When you run a Tracert command, it sends a series of Internet Control Message Protocol (ICMP) Echo Request messages (like ping requests) to the target IP address. However, unlike a typical ping, Tracert uses TTL (Time To Live) values to track each hop along the route.
- Initial Packet: Tracert sends the first packet with a TTL of 1. The first router it encounters will decrement the TTL value by 1. Once the TTL reaches 0, the router sends back a "TTL Expired" message (ICMP Time Exceeded message).
- Increasing TTL: Tracert then sends another packet, but this time with a TTL of 2. The first router decrements the TTL to 1, and the second router decrements it to 0. The second router then responds with the "TTL Expired" message. This process continues, incrementing the TTL by one each time until the destination is reached.
- Destination: When the packet reaches the final destination, the destination device responds with an ICMP Echo Reply message, and Tracert stops.
Note: Each router along the path sends an ICMP "Time Exceeded" message to the origin, and Tracert records the round-trip time for each hop. The round-trip time is measured in milliseconds (ms), and the information is displayed for each hop in the output.
Conclusion
Tracert is an valuable tool for network administrators and IT professionals to troubleshoot network issues, analyze network performance, and verify connectivity. It helps pinpoint areas of congestion, identify bottlenecks, and provide a clear map of how data flows across the network. Whether you’re troubleshooting latency issues, ensuring proper routing, or optimizing network paths, Tracert is an essential tool for diagnosing and understanding network behavior.
By using Tracert in combination with other network diagnostic tools like Ping or PathPing, you can quickly identify and resolve network issues, improving overall network performance and reliability.
Also Read
Similar Reads
How to Use the telnet Command in Windows for Network Diagnostics?
The telnet command in Windows is a useful tool for performing basic network diagnostics. While it might not be the most commonly used command, it allows you to test network connectivity and troubleshoot various services. This guide will help you understand how to use telnet in Windows, including ena
6 min read
How to Use Command Prompt - Windows Command Prompt Guide
Learn how to manually run the Command Prompt in different versions of Windows - The Windows Command Prompt (CMD) is a powerful tool that allows users to execute commands, automate tasks, and troubleshoot system issues efficiently. Whether youâre a beginner looking to learn basic CMD commands or an a
5 min read
How to Remotely Start Windows through CMD?
Command Prompt (CMD) is a powerful tool not only for troubleshooting Windows errors but also for remotely managing systems. In this guide, we'll focus on using CMD to remotely start a Windows computer. Whether you're troubleshooting a system that's out of reach or simply want to save time by startin
4 min read
How to Open Command Prompt in Windows 11, 10, 8, 7
The Command Prompt is a powerful tool in Windows for executing commands, troubleshooting issues, and automating tasks. Whether you're using Windows 11, 10, 8, or 7, this guide covers all the methods to open Command Prompt quickly and efficiently.Methods to Open Command Prompt in Windows in Any Versi
8 min read
How to Check Open Ports Using CMD in Windows?
Open ports on your Windows computer act like doors for data-letting information in and out. While necessary for apps and services, unprotected ports can become security risks. Checking which ports are open helps you spot vulnerabilities, fix connection issues, and keep your system safe.Using Command
5 min read
Useful CMD Commands for Daily Use in Windows OS
The Windows Command Prompt (CMD) is a powerful tool that many users overlook, but knowing a few useful CMD commands for Windows can make your daily tasks much more efficient. From navigating the file system to managing network settings, these daily use CMD commands can help streamline your workflow
3 min read
How to Set Internet Priority on Windows 11?
Short Preview!Here is a short preview of our active and speedy learner. Follow these steps to set Internet priority on your Windows PC. Press Win + R > type "ncpa.cpl" > Enter.Right-click "Wi-Fi" or Ethernet > select "Properties."Double-click on IPv4 or IPv6 > Click "Advanced."Uncheck Au
4 min read
What is Traceroute: What Does it Do & How Does It Work?
Traceroute is a network diagnostic tool used to track the path that data packets take from one computer to another across a network (like the internet). It helps in determining the route and measuring the transit delays of packets over the internet. It's especially useful for identifying network iss
8 min read
How to Monitor Network Traffic Using Wireshark in Windows?
Monitoring network traffic is critical for diagnosing network issues, analyzing performance, and enhancing security. Wireshark is an important and generally- used network protocol analyzer that allows you to capture and inspect packets in real- time on your Windows system. In this article, we will w
5 min read
How to Find Your IP Address on Windows? Updated
In the big world of technology, knowing the basics can help you feel more comfortable and skilled when using computers and other devices. One important basic thing to know is how to find your IP address. Your IP address is like your digital home address, it's essential for how computers talk to each
6 min read