Ping

The Ping Command:

The Ping (Packet InterNet Groperutility uses the echo request, and echo reply messages within the Internet Control Message Protocol (ICMP), an integral part of any IP network. When a ping command is issued, an echo request packet is sent to the address specified. When the remote host receives the echo request, it responds with an echo reply packet.

Syntax: ping [options] <target_ip/hostname>

Options:

-t : Continuous ping. -> ping 172.22.82.1 –t


-n: Number of ping packet. -> ping 172.22.82.1 –n 2 (2 ping packet)


-l : Size of the ping packet. -> ping 172.22.82.1 –l 200 (200 bytes,from 32 to 65,527)


-i : The value of TTL. -> ping 172.22.82.1 –i 200 (TTL=200, max 255)


-s : To report the time, in Internet Timestamp format, that each echo request is received and echo reply is sent. The maximum value for count is 4 meaning that only the first four hops can be time stamped.


-w: To adjust the time-out value. Default is 1000ms=1s -> ping 172.22.82.1 –w 2000


-f : Sets the Do Not Fragment bit on the ping packet. -> ping 172.22.82.1 –f


-a: To resolve, the hostname of an IP address target. -> ping 172.22.82.1 -a


-4 : Force to use IPv4


-6 : Force to use Ipv6


-R : To trace the round trip path (for Ipv6 only)


-S : To specify the source address (for Ipv6 only)


Do not forget that, this parameters are used in different meaning in different systems. For example, “-l” value is used for packet size in windows systems, but you can do this with “-s” in unix systems. similarly instead od "-n" in unix systems. use "-c".