jump to navigation

fping – Ping multiple hotsts at once on Linux February 9, 2011

Posted by Tournas Dimitrios in Linux admin tools.

fping is a ping like program which uses the Internet Control Message Protocol (ICMP) echo request to determine if a host is up. fping is different from ping in that you can specify any number of hosts on the command line, or specify a file containing the lists of hosts to ping.

Instead of trying one host until it timeouts or replies, fping will send out a ping packet and move on to the next host in a round-robin fashion. If a host replies, it is noted and removed from the list of hosts to check. If a host does not respond within a certain time limit and/or retry limit it will be considered unreachable.
Unlike ping, fping is meant to be used in scripts and its output is easy to parse.

Scanning a network should not be done without prior permission. Many networks and systems will view a network scan as an aggressive action regardless of how trivial and petty it might be. Please keep this in mind before utilizing this tool.

For CentOs 5.x this utility is provided from the EPEL repository , just install it with :
yum install fping

Let’s start with a very simple scan, our own system:
fping Nice …. it return that our router is alive is alive
fping  -a < ip_table.txt                                . Let’s try scanning a larger chunk of our network using a file for input instead of typing in IP addresses at the command line: is alive is alive
fping  -f ip_table.txt The file “ip_table.txt” just contains the IP addresses from to with each IP address on its own line. In my above command line example I piped in the file. If you are logged into your system as root you can use this command instead:
fping -a -d < ip_table.txt The -d flag will attempt to resolve host names for each IP address while the -a flag will only show alive hosts. Again I piped a list of IP addresses into fping.
fping    -g               . If you wanted to specify a range of IP addresses at the command line, say all 255 possible hosts of 192.168.1.*, you could use the -g flag

There are quite a few more options capable of being used with fping. I would recommend reading the man page for fping to learn more about this tool.

If you want to quickly scan a network for reachable hosts then fping will easily provide you with that capability. It is a simple tool that can be run while you work on other things should you need to scan a large network (but not as long as ping!). It is also worth learning because fping can be incorporated into your own custom scripts since it’s output is easy to parse. A drawback to using fping is that the perimeter of networks will often block ICMP traffic into the internal network. This is overcome by using nmap which we’ll look at another day. Happy scanning!

The home page for fping, http://www.fping.com/ seems not updated and hence can .



1. Prakash - October 21, 2015

It’s really helpful me.

Thanks a lot.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s