ping is a basic network tool available on practically every system. It allows you to test the connectivity of a network device or server. It does so by sending a series of ICMP (Internet Control Message Protocol) packets to the target host and reports the round-trip time, packet loss, and other statistics. The ping command is useful for troubleshooting network connectivity issues and measuring network performance.
Basic Syntax
ping [options] [host]
Here, host can be an IP address or a domain name.
Commonly Used Options
-
-c count: This sets the number of packets to be sent. -
-i interval: This sets the interval between each packet in seconds. -
-t ttl: This sets the Time to Live (TTL) value of the packets. -
-s size: This sets the size of the packets in bytes. -
-q: This enables quiet mode, which only displays the summary statistics. -
-v: This enables verbose mode, which displays more detailed information.
Useful Examples
-
ping google.com: This sends ICMP packets to the Google server and displays the round-trip time and packet loss. -
ping -c 5 google.com: This sends 5 ICMP packets to the Google server and stops. -
ping -i 1 google.com: This sends ICMP packets to the Google server every second. -
ping -t 64 google.com: This sets the TTL value of the packets to 64. -
ping -s 1024 google.com: This sets the size of the packets to 1024 bytes. -
ping -q google.com: This displays only the summary statistics. -
ping -v google.com: This displays more detailed information.
Leave a Reply