DNS Info Zone Commands,DNS Traceroute command explained

Traceroute command explained

If you want to know everything about the traceroute command, you came to the right place. Here you will learn what is it, why to use it and how.

Traceroute command explained

Traceroute command, just like the rest of the popular network commands, is a simple small software with command-line interface (CLI) and comes built-in on most Linux distros, BSD distros and even macOS.

It is easy to understand its purpose, to trace the route of a query, from your computer, through all the routers (hops) on the way, to the target that you set.

The result will be data on each hop (host name and IP address), showing if the packets of data arrive and after what amount of time, and which was the next hop.

Traceroute options for Windows, Linux, and macOS

The pros of using traceroute

Although it is really small, the traceroute utility software can offer great benefits:

  • Small and light. There are other software, more eye-catchy with graphic interface, but the traceroute defend itself with very little size, and fast response. 
  • Show you the complete route to the target of your choice. It can show each hop with its hostname and IP address, and time it take for each of these points. See the slow router on the way. The information might help you to improve your network, depending if you have control on that particular part of the network infrastructure.
  • See the slow router on the way. The information might help you to improve your network, depending if you have control on that particular part of the network infrastructure.

Where can I find the traceroute command?

The traceroute command, just like ping command, dig command, and host command is already pre-built into your OS. You get to the traceroute command, through the Terminal application. Open it and let’s try this out.

You can use it in two ways:

Question structureExample
traceroute + hostnametraceroute bing.com
traceroute + IP addresstraceroute

*We are using bing.com for the example and its IP address. You can use the one you like.

Traceroute syntax

traceroute [options] host_Address [pathlength] (Linux)

Adicional options for refine traceroute command

Use the syntax and these options and you can create better traceroute queries. You can modify many elements including number of packets sent, intervals between them, time to wait, port for the probes, and more.

-FNo fragmentation allowed.
-f first_ttlSet TTL on the first sent packet. .
-g gatewaySet gateway.
-i interfaceChoose interface for the queries.  
-m max_ttlChoose the maximum number of hops. If you don’t use this option, the default value is 30.
-NThe number of simultaneous queries sent.
-nDon’t resolve IP addresses.
-p portChoose port for the query.
-tChoose type-of-service.
-w waittimeChoose time to wait for replies.
-q nqueriesSent the number of packets sent. If you don’t use the option, the default value will be 3.
-rIf the target is on the same network, bypass the routing tables and send probes directly.
-S srcaddrIPv6 only – source address.
-eSee ICMP extensions.
-AAS lookups on for each hop.
-VVersion of the traceroute command.
-UChoose UDP and port for the probes. If you don’t change it, the default value is 53.
-ULChoose UDPLITE for the probes.
-P protocolChoose IP protocol for the probes.
-IChoose ICMP echo for the probes.
-TChoose TCP SYN for the probes.
-4Choose IPv4 for the probes.
-6Choose IPv6 for the probes.


So should you use the traceroute command? It is there already, it works the way it suppose and it is easy to learn. You should at least try it. See if it works for your network diagnostic, and include it in your network diagnostic tool kit. Why not using the traceroute for seeing the complete route to a target, the ping command if you want to check an individual host, or the dig command for other information?

Leave a Reply

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

Related Post