Traceroute command: Definition & Examples

Do you need to know what path the queries take to your domain? Then, here comes the Traceroute command. Let’s see how this software can trace the route of queries and why this information is so useful.

Traceroute command – Definition

Traceroute command is software with CLI (command-line interface) that you can find inside most of the popular operating systems (Windows, macOS, Linux, BSD, and more) and serves to check the route from your device to a destination (domain name or IP address).

The Traceroute command traces the route to the target by sending queries, waiting to get the results, and showing you statistics about the package delivery. You will know what time the packages take to get to the end destination and if there were lost packages.

Also, you will see the addresses of the hops that packages pass through, round time, and more data if you add additional options for your queries.

The command is especially useful for seeing bottlenecks in your network. You can see where it takes more time for the queries to go. After that, based on the data, you can take actions like adding additional servers.

It also helps you map the route and check the delivery times to understand the network better. That will help you a lot.

And lastly, the traceroute will identify the routers on the way by their IP address and hostname.

If you combine the use of a Traceroute command with a VPN, you can create a world map of the routes your visitors take to your domain. That will show you if you need more DNS servers and where exactly you need them.

Traceroute command examples

Here you will see different examples of the command. You can change the domain names we use and the IP addresses with the one you would like to check and use it for your purposes.

We use Linux for these examples, but it also works on macOS. For Windows, check the tracert command, which is its equivalent.

Basic Traceroute command:

traceroute yourdomainname.com

or

traceroute 123.123.123.123

Traceroute command for IPv6

traceroute -6 123.123.123.123

That way, you will trace the route using IPv6 only. The route could be different from the IPv4 traceroute.

Traceroute command without fragmentation.

traceroute -F yourdomainname.com

That way, the packages won’t get fragmented on the way.

Limit the maximum hops your query takes.

traceroute -m 15 123.123.123.123

In this case, the maximum number of hops is set to 15. You can change it to another one if you like.

Send a specific number of queries.

traceroute -q 10 yourdomainname.com

In this example of the command, we will send 10 queries. The default is 3, but you can decide on a number.

Traceroute command using TCP.

traceroute -T yourdomainname.com

That way, you will replace the default ICMP protocol with TCP for your queries.

Traceroute without resolving to hosts’ name.

traceroute -n yourdomainname.com

That way, you won’t see hostnames in the results. Only IP addresses.

Conclusion

The Traceroute command is a small and handy tool to trace the route to a target.

Leave a Comment

Your email address will not be published. Required fields are marked *