Blog
Command traceroute tracert
The tracert (traceroute) command is a tool used to trace the route of IP packets in networks. The operation of traceroute is based on sending a series of packets that increase the TTL (Time to Live) field, and examining the responses received from intermediate routers encountered along the way. The ping command has a similar action, but ping can only verify connectivity between two network nodes, it does not provide any routing information.
Windows tracert
tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout][-R] [-S srcaddr] [-4] [-6] target_name Options tracert
- -d Do not resolve addresses to hostnames.
- -h maximum_hops Maximum number of hops to search for target.
- -j host-list Loose source route along host-list (IPv4-only).
- -w timeout Wait timeout milliseconds for each reply.
- -R Trace round-trip path (IPv6-only).
- -S srcaddr Source address to use (IPv6-only).
- -4 Force using IPv4.
- -6 Force using IPv6.
Linux tracert
traceroute [options] [packet length] Options traceroute
- -help
Information about the command. - -d
This command enables debugging on Linux. - -F
Forbid fragmentation. - -f first_ttl
Put the first TTL value of the packet. - -g gateway
Define a loose source route gateway. - -i interface
Set the interface for the probes. - -m max_ttl
The TTL in traceroute means the maximum amount of hops. - -N
The number of probes that are sent at the same time (simultaneously). - -n
Stop the resolving of the IP addresses. - -p port
Define the port for the query. - -t
Set the type-of-service in probes. - -w waittime
Maximum waiting time for each of the replies. - -q nqueries
Set the number of queries. The default value is 3. - -r
Bypass the routing tables and send them to the host directly (on an attached network only). - -S srcaddr
IPv6 only – source address. - -e
Show ICMP extensions. - -A
AS lookups enable for each hop. - -V
Show version. - -U
Use a particular UDP port. The default value is 53. - -UL
Use the UDPLITE for the query. - -P protocol
Send packets of a specified IP protocol. - -I
Use the ICMP echo for the requests. - -T
Use the TCP SYN for the requests. - -4
Use only IPv4 addresses - -6
Use only IPv6 addresses
If we don’t want to read the results in the console we can, on both Windows and Linux, pass the data to a file using the following command.
traceroute 8.8.8.8 > results.txttracert 8.8.8.8 > result.txt 