Skip to content
TrySitePrice

HowTo: Speedup ping and traceroute Command Responses under Linux / Unix

Best/Tutorial

The speed of the ping and traceroute commands can be affected by a number of factors, including network congestion, distance to the target host, and routing issues. However, you can try the following methods to speed up their responses:

  1. Decrease the number of packets sent by using the -c option for ping and the -q option for traceroute. For example:

# ping -c 3 google.com

# traceroute -q 3 google.com

  1. Increase the size of the packets sent by using the -s option for ping:

# ping -s 1024 google.com

  1. Use the -I option for ping and traceroute to specify the source network interface:

# ping -I eth0 google.com

# traceroute -I eth0 google.com

  1. Use the -n option for ping and traceroute to avoid name resolution:

# ping -n google.com

# traceroute -n google.com

  1. Use the -w option for ping to specify a timeout value:

# ping -w 2 google.com

  1. Use the -f option for ping to avoid fragmenting large packets:

# ping -f google.com

These methods can help improve the speed of ping and traceroute commands, but the exact effect will depend on the specific network conditions and topology.