Hostwinds Tutorials
Search results for:
Table of Contents
When you're facing connection issues with your website or server, one of the most useful ways to troubleshoot the problem 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.
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.
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.
In Linux, using traceroute is quite similar, but the command is slightly different. Instead of "tracert" we'll use "traceroute."
The output will look similar to the Windows version, showing you each hop and the time taken for data to travel between each point.
Traceroute is also available on Mac, and running the command is nearly identical to Linux:
you can search for it using Spotlight).
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.
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:
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.
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.
You may want to share your traceroute results. Here's how to do it on each operating system:
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.).
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.
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.
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.
Here's a quick rundown of what we covered on traceroute:
Written by Hostwinds Team / April 11, 2018