The ping command line utility act as a computer network tool. It used to test whether a particular host is reachable across an IP network. The traceroute command also act as a computer network diagnostic tool for displaying the route (path) and measuring transit
ping -n -W VALUE -i VALUE host
Where,
Where,
The -N option specifies the number of probe packets sent out simultaneously. Sending several probes concurrently can speed up traceroute considerably. The default value is 16:
Please Note that some routers and hosts can use ICMP rate throttling. In such a situation specifying too large number can lead to loss of some responses. You can also limit the maximum number of hops to 16 before giving up (instead of default 30) using the -m option:
Speedup ping command
The syntax is:ping -n -W VALUE -i VALUE host
Where,
- -n : Disable DNS lookup to speed up queries.
- -W NUMBER : Time to wait for a response, in seconds. The option affects only timeout in absence of any responses, otherwise ping waits for two RTTs.
- -i SECONDS : Wait interval seconds between sending each packet. The default is to wait for one second between each packet normally, or not to wait in flood mode. Only super-user may set interval to values less 0.2 seconds.
ping -c 5 google.com[sibin@localhost]$ ping -c 5 google.com
PING google.com (74.125.235.8) 56(84) bytes of data.
64 bytes from sin01s04-in-f8.1e100.net (74.125.235.8): icmp_req=1 ttl=54 time=234 ms
64 bytes from sin01s04-in-f8.1e100.net (74.125.235.8): icmp_req=2 ttl=54 time=45.7 ms
64 bytes from sin01s04-in-f8.1e100.net (74.125.235.8): icmp_req=3 ttl=54 time=88.1 ms
64 bytes from sin01s04-in-f8.1e100.net (74.125.235.8): icmp_req=4 ttl=54 time=45.7 ms
64 bytes from sin01s04-in-f8.1e100.net (74.125.235.8): icmp_req=5 ttl=54 time=46.2 ms
--- google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4002ms
rtt min/avg/max/mdev = 45.758/92.011/234.135/72.918 ms Now optimize the ping command:$ ping -c 5 -n -i 0.2 -W1 google.com
[sibin@ast-wks-069 ~]$ ping -c 5 -n -i 0.2 -W1 google.com
PING google.com (74.125.235.9) 56(84) bytes of data.
64 bytes from 74.125.235.9: icmp_req=1 ttl=54 time=46.4 ms
64 bytes from 74.125.235.9: icmp_req=2 ttl=54 time=46.4 ms
64 bytes from 74.125.235.9: icmp_req=3 ttl=54 time=45.7 ms
64 bytes from 74.125.235.9: icmp_req=4 ttl=54 time=45.5 ms
64 bytes from 74.125.235.9: icmp_req=5 ttl=54 time=49.5 ms
--- google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 803ms
rtt min/avg/max/mdev = 45.569/46.762/49.541/1.433 ms Speedup traceroute command
The syntax is:
traceroute -n -w SECONDS -q NUMBER host
Where,
- -n : Disable DNS lookup to speed up queries.
- -w seconds : Set the time (in seconds) to wait for a response to a probe (default 5.0 sec).
- -q NUMBER : Sets the number of probe packets per hop. The default is 3.
$ traceroute -n -w 3 -q 1 www.google.comThe -N option specifies the number of probe packets sent out simultaneously. Sending several probes concurrently can speed up traceroute considerably. The default value is 16:
$ traceroute -n -w 3 -q 1 -N 32 www.google.comPlease Note that some routers and hosts can use ICMP rate throttling. In such a situation specifying too large number can lead to loss of some responses. You can also limit the maximum number of hops to 16 before giving up (instead of default 30) using the -m option:
$ traceroute -n -w 3 -q 1 -N 32 -m 16 www.google.com
No comments:
Post a Comment