What is traceroute/tracert
Traceroute or Tracert is yet another network diagnostic software. It does what it says – it completely traces the route frоm the device who makes the request to an IP address or hostname. It provides you with statistics about the final point as well as the routers on the way.
You can find it on macOS, Linux, Android, and iOS as traceroute and on Windows as tracert.
Windows tracert syntax
Let’s first start with the Windows version called tracert. You can use it inside the Command Prompt of Windows. Its syntax is as follows:
tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] [-R] [-S srcaddr] [-4] [-6] target_name
macOS traceroute syntax
To start traceroute on macOS, you will need to use Terminal.
traceroute [options] host [packetsize]
Linux traceroute syntax
On Linux, you can also use Terminal for traceroute. You can use $traceroute –help and see all the possible options on Linux.
traceroute [options] host_Address [pathlength]
Here’s a comparison between the commands on the different OSes.
|-d||Not to resolve addresses to the hostnames||Yes||No||No|
|-d –debug||Linux debugging enable||No||No||Yes|
|-h aximum_hops||Set the maximum hops of the request||No||No||Yes|
|-m max_ttl||Max number of hops||No||Yes||Yes|
|-j host-list||Loose source route along host-list, works only with IPv4|
|-w timeout||Maximum time in milliseconds for each reply||Yes||Yes||No|
|-w waittime –wait=waittime||Maximum time in milliseconds for each reply||No||No||Yes|
|-I –icmp||ICMP echo for the command||No||No||Yes|
|-R||Trace the return path too, works only with IPv6||Yes||No||No|
|-S srcaddr||Source address, works only with IPv6||Yes||No||No|
|-4||Use only IPv4||Yes||Yes||Yes|
|-6||Use only IPv6||Yes||Yes||Yes|
|-p port||Set the port for the probe||No||Yes||No|
|-F||No packet fragmentation||No||Yes||Yes|
|-n||Do not resolve IP address||No||Yes||Yes|
Traceroute or tracert is a really good command for checking the route. You will get important statistics and you can do it on every major OS. Use it to determine the number of hops it takes for a query and the response times of different network component.