Hostwinds Tutorials

Search results for:


Table of Contents


What is Traceroute?
What Makes Traceroute Useful?
How to Use Traceroute in Windows
Step 1: Open the command prompt
Step 2: Run the traceroute command
How to Use Traceroute in Linux
Step 1: Open your command line terminal or log in to your Linux server.
Step 2: Run traceroute command
How to Use Traceroute in Mac
Step 1: Open the Terminal app
Step 2: Run traceroute command
The Traceroute Journey
How to Read Traceroute Output
What do Traceroute Results Mean?
Sharing Your Traceroute Results
Windows:
Mac:
Linux:
What is Packet Loss in Traceroute?
Summary + Checklist
What is Traceroute?
Why Use Traceroute?
How to Use Traceroute:
Reading Traceroute Results:
Troubleshooting Tips:
When to Seek Help:

Traceroute Command: What is it and How to Use it

Tags: Windows,  Linux 

What is Traceroute?
What Makes Traceroute Useful?
How to Use Traceroute in Windows
Step 1: Open the command prompt
Step 2: Run the traceroute command
How to Use Traceroute in Linux
Step 1: Open your command line terminal or log in to your Linux server.
Step 2: Run traceroute command
How to Use Traceroute in Mac
Step 1: Open the Terminal app
Step 2: Run traceroute command
The Traceroute Journey
How to Read Traceroute Output
What do Traceroute Results Mean?
Sharing Your Traceroute Results
Windows:
Mac:
Linux:
What is Packet Loss in Traceroute?
Summary + Checklist
What is Traceroute?
Why Use Traceroute?
How to Use Traceroute:
Reading Traceroute Results:
Troubleshooting Tips:
When to Seek Help:

When you're facing connection issues with your website or server, one of the most useful ways to troubleshoot the problem is traceroute.

What is Traceroute?

Traceroute is a command-line tool that lets you track the journey of a data packet as it travels across different networks. It maps out each stop, or "hop," along the way, showing you the path the data takes from one network to another.

What Makes Traceroute Useful?

Each hop within the traceroute output provides details like the location and response time of each network node, helping you understand how the data is processed and handed off from one network to the next.

This type of information makes traceroute a useful tool for multiple reasons:

Diagnose Network Issues: Traceroute can help you identify where network delays or disruptions are occurring. By seeing how long each hop takes, you can pinpoint potential problem areas in the network that might be causing slowdowns.

Identify Bottlenecks: By examining the latency (time taken) for each hop, you can spot potential bottlenecks in the network where data is getting held up.

Visualize the Network Path: Traceroute provides a clear map of the route data takes from source to destination, showing you each router along the way. This visualization can help you understand the complexity and structure of the network.

Help with Troubleshooting: If you're experiencing connection issues, traceroute can provide valuable information for troubleshooting. You can share the results with support teams or network administrators to get further assistance in resolving problems.

Verify Connectivity: Traceroute helps confirm whether your data packets can reach their intended destination and how long it takes, providing insights into the overall connectivity of your network.

How to Use Traceroute in Windows

Step 1: Open the command prompt
  • Click the Start menu and type "cmd" into the search bar.
  • Once the command prompt appears, click on it to open.
Step 2: Run the traceroute command
  • In the command prompt, type tracert <destination> and hit ENTER. Replace <destination> with your server's IP address or domain name. For example:

    tracert hostwinds.com

After you press Enter, you'll see numbered lines of text appear. Each line represents a "hop" in the network journey, showing the path your data is taking. The columns list how long each hop takes, measured in milliseconds. Higher times may indicate potential latency issues at that specific hop.

How to Use Traceroute in Linux

In Linux, using traceroute is quite similar, but the command is slightly different. Instead of "tracert" we'll use "traceroute."

Step 1: Open your command line terminal or log in to your Linux server.
Step 2: Run traceroute command
  • Type traceroute <destination> and press ENTER.
  • Again, replace <destination> with your server's IP address or domain name.

The output will look similar to the Windows version, showing you each hop and the time taken for data to travel between each point.

How to Use Traceroute in Mac

Traceroute is also available on Mac, and running the command is nearly identical to Linux:

Step 1: Open the Terminal app
  • you can search for it using Spotlight).

Step 2: Run traceroute command
  • Once in the Terminal, type traceroute <destination> and press ENTER.

You'll see a list of hops just like in the other operating systems, along with the time taken for each hop.

The Traceroute Journey

When you execute the traceroute command, it traces the journey your data packets take from your computer to a specified destination, such as a website or server. It maps out each step along the way, revealing the route your data travels and the time it takes for data to reach each point. Here's what happens during the journey:

  1. Initiation: When you start the traceroute command, your computer begins sending data packets toward the destination. These packets contain instructions on how many hops they can make, which is set using a Time-to-Live (TTL) value.
  2. First Hop: The first data packet leaves your computer and makes its way to the first router (gateway) in your network. The TTL value starts at 1, which allows the packet to travel to the first hop.
  3. TTL Check: When the packet reaches the first hop, the TTL value decreases by one. Since the TTL value is now zero, the router discards the packet and sends back an ICMP "Time Exceeded" message to your computer.
  4. Record Hop Information: Your computer receives the ICMP message, which includes the IP address or hostname of the router and the round-trip time it took for the packet to travel to that router and back.
  5. Increment TTL: Traceroute then increases the TTL value by one (from 1 to 2) and sends another packet. This allows the packet to travel through the first hop and reach the next hop in the network path.
  6. Repeat Process: Traceroute repeats the process, sending new packets with increasing TTL values. Each packet travels one hop further along the network path, and traceroute records the information for each hop.
  7. Reach Destination: Traceroute continues sending packets until one of them reaches the destination server or website, or until it reaches a predetermined maximum number of hops (usually around 30).
  8. Results Display: Traceroute displays the results, showing each hop the packets took, the IP addresses or hostnames of the routers they passed through, and the round-trip time (in milliseconds) for each hop.

How to Read Traceroute Output

Reading traceroute results may seem a bit overwhelming at first, but once you know what each part means, it becomes a great tool for understanding your network's performance. Let's break it down so you can make sense of the information you see.

When you run a traceroute, the output will show rows of information, with each row indicating a hop (router) your data packets took on their way to the destination. Each row is split into columns and usually contains the following information:

Hop Number: The first column shows the hop number, starting with 1. This represents the sequence of routers your data travels through.

Round-Trip Times: The next columns (usually three sets) show the round-trip time (in milliseconds) it took for your data packets to travel to each router and back. These numbers give you an idea of how long your data is taking at each hop.

Router Information: Following the trip times, the next column typically shows either the IP address or hostname of the router at each hop.

Asterisks (*): Sometimes, instead of round-trip times, you may see asterisks in the columns. This usually means that a packet was lost or a response was not received from that hop.

Notes: Occasionally, there might be extra notes or symbols, such as an exclamation point (!), to indicate special situations like timeouts or unexpected results.

What do Traceroute Results Mean?

Low Latency: Low round-trip times (measured in milliseconds) are good! It means your data is traveling quickly and smoothly through each hop.

High Latency: Higher round-trip times at a specific hop might suggest a potential delay or bottleneck in the network. If one hop consistently has higher times compared to others, it may be a point of concern.

Packet Loss: Asterisks (*) in place of round-trip times could mean packet loss or no response from a hop. This can be a sign of network issues.

Patterns: Look for patterns in the data, such as a sudden jump in round-trip times or consistent asterisks, to identify areas that might need further investigation.

Keep in mind that the traceroute results may vary slightly each time you run the command, so if you spot an issue, you may want to try running it again to confirm the results. If you encounter high latency, packet loss, or any other irregularities, these could be signs of a network problem worth investigating further.

Sharing Your Traceroute Results

You may want to share your traceroute results. Here's how to do it on each operating system:

Windows:

Step 1: Right-click in the command prompt window and choose "Mark."

Step 2: Use the arrow keys to highlight the traceroute results.

Step 3: Press ENTER to copy, then CTRL + V to paste results into the document of your choosing (word doc, email, etc.).

Mac:

Step 1: Click and drag to highlight the traceroute results in the terminal window.

Step 2: Press Command + C to copy it, then Command + V to paste.

Linux:

Step 1: Click and drag to highlight the traceroute results in the terminal window.

Step 2: Right-click in the terminal window and select "Copy" from the context menu, or Ctrl + Shift + C.

Step 3: Right-click and select "Paste" from the context menu, or Ctrl + V.

What is Packet Loss in Traceroute?

Packet loss happens when some data packets don't make it to their destination while traveling through the network. As data travels across routers and network devices, issues like congestion, faulty hardware, or other problems can cause packets to be lost along the way. When you run a traceroute command, you can spot packet loss when asterisks (*) show up instead of round-trip times at certain hops, indicating that a packet didn't complete the journey.

Packet loss can cause various network hiccups, such as slow loading times or dropped connections. Keeping an eye on patterns of packet loss in your network can help you identify areas that might need attention. If you see consistent packet loss at specific hops or during peak times, it could be a sign of underlying network issues. Try running traceroute multiple times to see if the loss continues. If it does, consider reaching out to your network provider or support team for assistance in fixing the problem.

Summary + Checklist

Here's a quick rundown of what we covered on traceroute:

What is Traceroute?
  • Traceroute tracks the journey of data packets across different networks, mapping out each "hop" from source to destination.
Why Use Traceroute?
  • Diagnose network issues by pinpointing delays and disruptions.
  • Identify bottlenecks in the network causing slowdowns.
  • Visualize the network path for a clearer picture of your network's structure.
  • Troubleshoot connection issues with valuable data you can share with support teams.
  • Verify connectivity to ensure your data packets reach their destination.
How to Use Traceroute:
  • Windows: Use the tracert command in the command prompt.
  • Linux and Mac: Use the traceroute command in the terminal.
Reading Traceroute Results:
  • Look for round-trip times in milliseconds to understand network performance.
  • Pay attention to higher times or asterisks (*) as potential indicators of network issues.
  • Consistent patterns of high latency or packet loss may signal areas that need investigation.
Troubleshooting Tips:
  • Run traceroute multiple times to confirm results.
  • Share your traceroute output with network administrators or support teams if you encounter persistent issues.
When to Seek Help:
  • If you experience significant packet loss or high latency, consider reaching out to your network provider or support team for assistance.

Written by Hostwinds Team  /  April 11, 2018