From aldeid
Jump to navigation Jump to search


Fping is a program like ping which uses the Internet Control Message Protocol (ICMP) echo request to determine if a target host is responding. Fping differs from ping in that you can specify any number of targets on the command line, or specify a file containing the lists of targets to ping. Instead of sending to one target until it times out or replies, fping will send out a ping packet and move on to the next target in a round-robin fashion.

In the default mode, if a target replies, it is noted and removed from the list of targets to check; if a target does not respond within a certain time limit and/or retry limit it is designated as unreachable. Fping also supports sending a specified number of pings to a target, or looping indefinitely (as in ping).

Unlike ping, fping is meant to be used in scripts, so its output is designed to be easy to parse.


$ sudo apt-get install fping


Basic syntax

$ fping [options] [targets...]


show targets that are alive
show targets by address
-b <n>
amount of ping data to send, in bytes (default 56)
-B <f>
set exponential backoff factor to f
-c <n>
count of pings to send to each target (default 1)
-C <n>
same as -c, report results in verbose format
show elapsed time on return packets
-f <file>
read list of targets from a file
( - means stdin)
(only if no -g specified)
generate target list (only if no -f specified)
(specify the start and end IP in the target list, or supply a IP netmask)
(ex. fping -g or fping -g
-i <n>
interval between sending ping packets (in millisec) (default 25)
loop sending pings forever
ping multiple interfaces on target host
show targets by name (-d is equivalent)
-p <n>
interval between ping packets to one target (in millisec)
(in looping and counting modes, default 1000)
quiet (don't show per-target/per-ping results)
-Q <n>
same as -q, but show summary every n seconds
-r <n>
number of retries (default 3)
print final stats
-S <addr>
set source address
-t <n>
individual target initial timeout (in millisec) (default 500)
-T <n>
set select timeout (default 10)
show targets that are unreachable
show version
list of targets to check
(if no -f specified)


Responding host

$ fping is alive

Non-responding host

$ fping
ICMP Host Unreachable from for ICMP Echo sent to
ICMP Host Unreachable from for ICMP Echo sent to
ICMP Host Unreachable from for ICMP Echo sent to is unreachable