Open In App

How to Use Tracert/Traceroute Command in Windows

Last Updated : 06 Dec, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

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-Traceout
How to Use Tracert/Traceroute Command in Windows

What 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-Command
Run the Tracert Command

Step 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.

CommandDescriptionExample
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 -TSpecifies 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


Next Article

Similar Reads