traceroute Command
The traceroute command is a network diagnostic tool for displaying the route (path) and measuring transit delays of packets across an IP network. It's essential for identifying where network slowdowns or connection failures are occurring.
Common `traceroute` Commands
Standard Trace
traceroute google.comTraces the path to the specified host. It will show each "hop" (router) the packet passes through on its way to the destination, along with latency times.
No Hostname Resolution
traceroute -n google.com The -n flag prevents traceroute from resolving the IP addresses of the hops into hostnames. This can significantly speed up the trace.
Trace with ICMP Packets
traceroute -I google.com Uses ICMP ECHO packets (the same type as ping) for probes instead of the default UDP. This can sometimes bypass firewalls that block UDP packets. (Note: Requires root privileges).
Trace with TCP Packets
traceroute -T google.comUses TCP SYN packets for probes. This is another method to bypass firewalls and is often more successful than UDP or ICMP. (Note: Requires root privileges).