The ping command sends ICMP echo request packets to a destination. For example, you could run ping or ping to ping a domain name or IP address.

These packets ask the remote destination to reply. If the remote destination is configured to reply, it will respond with packets of its own.

You’ll be able to see how long the round-trip time is between your computer and the destination. You’ll see a “request timed out” message if packet loss is occurring, and you’ll see an error message if your computer can’t communicate with the remote host at all.

This tool can help you troubleshoot Internet connection problems, but bear in mind that many servers and devices are configured not to reply to pings.

In Linux, ping sends ECHO_REQUEST packets to the address you specify. It’s a great way to see whether your computer can communicate with the Internet or a specific IP address.

Unlike the ping command on Windows, the Linux ping command will keep sending packets until you terminate it. You can specify a finite amount of packets with the -c switch.

ping -c 4


This option repeatedly sends pings (ICMP echo messages) until you stop it by pressing Ctrl+C.
-n count
This option specifies the number of pings to send.
This option sets the don’t fragment bit in a packet’s header. If the packet tries to cross a router that attempts to fragment the packet, the packet is dropped, and an ICMP error message is returned.
-i TTL
This option sets the TTL value in a packet’s header. The TTL is decremented for each router hop. A packet is discarded when its TTL value reaches 0.
-S srcaddr
If the PC from which you are issuing the ping command has more than one IP address, this option allows you to specify the source IP address from which the ICMP echo messages should be sent.
This option specifies the name or the IP address of the device to which you are sending ICMP echo messages.









Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.