Traceroute references

References for traceroute.

Traceroute syntax on Windows

Example of traceroute command on Windows:

tracert [-d] [-h maximum hops] [-j host list] [-w timeout] [-R] [-S scraddr] [-4] [-6] target_name

The list of parameters available on Windows systems are:

-dDo not resolve addresses to hostnames.
-h maximum_hopsMaximum number of hops to search for target.
-j host-listLoose source route along host-list (IPv4-only).
-w timeoutWait timeout milliseconds for each reply.
-RTrace round-trip path (IPv6-only).
-S srcaddrSource address to use (IPv6-only).
-4Force using IPv4.
-6Force using IPv6.

Traceroute syntax on MacOS and Linux

Example of traceroute command on MacOS and Linux:

traceroute [-n] [-w wait_time] [-i initial_ttl] [-m max_ttl] [-p dest_port] [-q n_queries] [-t tos] host [data_size]

The list of parameters available on MacOS and Linux-based systems are:

-nPrevents traceroute from performing a DNS lookup for each hop.
-w wait_timeSpecify the amount of time (in seconds) that traceroute will wait for an ICMP response message. Allowed range is 1 to 300 seconds, default is 5 seconds.
-i initial_ttlCauses traceroute to send ICMP datagrams with a TTL value equal to initial_ttl instead of the default TTL of 1. This causes traceroute to skip processing for hosts that are less than initial_ttl hops away.
-m max_ttlSpecify the maximum TTL value for outgoing ICMP datagrams. Allowed range for max_ttl is 1 to 255, default value is 30.
-p dest_portSpecify the base UDP destination port number used in traceroute datagrams. Allowed range for dest_port is 1 to 65535, default base port is 33434.
-q n_queriesSpecify the number of datagrams to send for each TTL value. Allowed range for n_queries is 1 to 1000, default is 3.
-t tosSpecify the TOS to be set in the IP header of the outgoing datagrams. Allowed range for tos is 0 to 255; default is 0.
hostIP alias or IP address in dot notation (a.b.c.d) of the destination host.
data_sizeNumber of bytes, in addition to the default of 40 bytes, of the outgoing datagrams. The allowed range is 0 to 1420, default is 0.