September 21, 2025
Linux Command Line

Linux Command Line

Traceroute is a command-line tool used to track the route that packets take to reach a specific destination on the internet. This tool is particularly useful for network administrators and IT professionals to troubleshoot connectivity issues and identify bottlenecks in the network. In this article, we will explain what traceroute is, when to use it, and how to use it on a Linux system, with examples. You may also consider tracepath as a route diagnostic tool.

What is Traceroute?

Traceroute is a diagnostic tool that traces the path of packets from the source to the destination. It works by sending a series of Internet Control Message Protocol (ICMP) Echo Request (ping) packets to the destination, with each packet having a different Time-to-Live (TTL) value. As the packets traverse the network, routers along the way decrement the TTL value by one, and when the TTL value reaches zero, the router sends back an ICMP Time Exceeded message.

Traceroute uses the ICMP Time Exceeded message to determine the round-trip time (RTT) for each hop and the IP address of the router that sent the message. By repeating this process for multiple packets, traceroute can determine the complete route that the packets take to reach the destination.

When to use Traceroute

Traceroute is a useful tool for troubleshooting network connectivity issues. For example, if you are unable to connect to a website or a remote server, you can use traceroute to determine where the connection is being blocked or where the delay is occurring. Additionally, traceroute can be used to determine the path that packets take to reach a specific destination, which can be useful for identifying bottlenecks in the network or for identifying the source of a DDoS attack. Or if you are wanting to troubleshoot on an IPv6 network, you can use traceroute6

How to use Traceroute

Traceroute is a command-line tool and is typically used in the terminal window. The basic syntax for the traceroute command is as follows:

traceroute [destination_IP]

where destination_IP is the IP address or hostname of the destination that you want to trace the route to.

Here is an example of how to use traceroute to trace the route to google.com:

traceroute google.com

The output of the command will show the number of hops and the IP address of each router along the way, along with the RTT for each hop.

You can also specify the number of packets to send and the size of the packets

traceroute -q 1 -w 1 google.com

This will send one packet and wait for one second between each packet.

Traceroute is a powerful tool for troubleshooting network connectivity issues and identifying bottlenecks in the network. By tracing the path of packets from the source to the destination, traceroute can help you determine where a problem is occurring and how to fix it. Whether you’re a network administrator or an IT professional, traceroute is an essential tool for maintaining and troubleshooting networks.

See our list of 75 Linux commands you should know about.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
Share via
Copy link
Powered by Social Snap