concept ping command in category security

This is an excerpt from Manning's book The Art of Network Penetration Testing.
2.2.1 Using the ping command
Your Ubuntu VM is already equipped with the ping command, which you can execute from inside a Bash prompt. If you want to test the ping command, you can run it against yourself or rather against the local loopback IP address of your Ubuntu system. Type ping 127.0.0.1 -c 1 at the command prompt in the terminal. You can expect to see the following output:
~$ ping 127.0.0.1 -c 1 #A PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data. 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.024 ms --- 127.0.0.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.024/0.024/0.024/0.000 msNotice the use of the -c 1 parameter, which tells the command to issue only a single ICMP echo request. By default, if you omit this parameter, the ping command will continuously send requests one after another until the end of time, as opposed to the Microsoft Windows version, which defaults to sending 4 requests. This output tells you that the target host you just pinged is live or “up”. This is to be expected, because you pinged a live system from which we are using. The following is what you would expect to see if you sent a ping to an IP address that was not in use, or “down”.