-3

I've recently read about the command in the OS X terminal, "ping -f (Target IP)". I haven't been able to form an understanding on the command even after looking through numerous online articles.

I assume it floods the server with ping requests without waiting for those requests to be answered, but that is simply my speculation.

If you'd like to use this command:

Open Terminal

sudo -s

Enter Password

ping -f <Target IP Address>

Watch!

I'd also like to know some scenarios where I could use this command, and the impacts it may have on the network (lag etc.).

Thanks in advance!

Stephen

Stephen
  • 7
  • 1
  • 1
  • 4
  • 3
    Did you read the man page for `ping`? – EEAA Oct 31 '15 at 02:31
  • @EEAA I'm looking for an answer that also explains the usage scenarios of this command. Thank you though! – Stephen Oct 31 '15 at 02:34
  • 1
    Please answer the question. Did you read the documentation? If so, what specifically was not clear? It's not a complex option. – EEAA Oct 31 '15 at 02:34

1 Answers1

4

This is for Flood Ping. This sends pings without waiting for a reply from the target.

The semantics of the actual command are in the man page:

   -f     Flood ping. For every ECHO_REQUEST sent a period ``.'' is  printed,
          while  for  ever  ECHO_REPLY received a backspace is printed.  This
          provides a rapid display of how many packets are being dropped.  If
          interval is not given, it sets interval to zero and outputs packets
          as fast as  they  come  back  or  one  hundred  times  per  second,
          whichever  is  more.   Only the super-user may use this option with
          zero interval.

This is often used for testing network latency and throughput. Most specifically for stress testing: more details here

It can also be used as a method of DoS attack as, if the target system/network is slower than the source, sending replies to the requests will saturate the system's CPU cycles.

You will notice that you need to be root (by default) as the command consumes as many CPU cycles as possible, thus introducing latency on the system sending the pings.

Once the command is complete (e.g. keyboard interrupt), a summary of the latency is displayed in the same format as regular ping.

Joshua Griffiths
  • 2,202
  • 15
  • 19