Fping – A High Performance Ping Tool for Linux

fping is a small command line tool to send ICMP (Internet Control Message Protocol) echo request to network hosts, similar to ping, but much higher performing when pinging multiple hosts. fping totally differs from ping in that you can define any number of hosts on the command line or specify a file with the list of IP addresses or hosts to ping.

Read Also: A Linux Sysadmin’s Guide to Network Management, Troubleshooting and Debugging

For example, using fping, we can specify the complete network range (192.168.0.1/24). It will send Fping request to host and move to another target host in a round-robin fashion. Unlike ping, Fping is meant for basically scripting.

How to Install Fping in Linux Systems

In most Linux distributions, the package fping is available to install from the default package repositories using package management tool as shown.

# sudo apt install fping  [On Debian/Ubuntu]
# sudo yum install fping  [On CentOS/RHEL]
# sudo dnf install fping  [On Fedora 22+]
# sudo pacman -S fping    [On Arch Linux]

Alternatively, you can install latest version of fping (4.0) from the source package using following commands.

$ wget https://fping.org/dist/fping-4.0.tar.gz
$ tar -xvf fping-4.0.tar.gz
$ cd fping-4.0/
$ ./configure
$ make && make install

Let’s see some Fping command with their examples.

1. Fping Multiple IP Address

The below command will fping multiple IP address at once and it will display status as alive or unreachable.

# fping 50.116.66.139 173.194.35.35 98.139.183.24

50.116.66.139 is alive
173.194.35.35 is unreachable
98.139.183.24 is unreachable

2. Fping Range of IP Address

The following command will fping a specified range of IP addressees. With below output we are sending echo request to range of IP address and getting reply as we wanted. Also cumulative result shown after exit.

# fping -s -g 192.168.0.1 192.168.0.9

192.168.0.1 is alive
192.168.0.2 is alive
ICMP Host Unreachable from 192.168.0.2 for ICMP Echo sent to 192.168.0.3
ICMP Host Unreachable from 192.168.0.2 for ICMP Echo sent to 192.168.0.3
ICMP Host Unreachable from 192.168.0.2 for ICMP Echo sent to 192.168.0.3
ICMP Host Unreachable from 192.168.0.2 for ICMP Echo sent to 192.168.0.4
192.168.0.3 is unreachable
192.168.0.4 is unreachable

8      9 targets
       2 alive
       2 unreachable
       0 unknown addresses

       4 timeouts (waiting for response)
       9 ICMP Echos sent
       2 ICMP Echo Replies received
      2 other ICMP received

 0.10 ms (min round trip time)
 0.21 ms (avg round trip time)
 0.32 ms (max round trip time)
        4.295 sec (elapsed real time)

3. Fping Complete Network with Different Options

With above command, it will ping complete network and repeat once (-r 1). Sorry, it’s not possible to show output of the command as it is scrolling up my screen with no time.

# fping -g -r 1 192.168.0.0/24

4. Reads the List of Targets From a File

We have create a file called fping.txt having IP address (173.194.35.35 and 98.139.183.24) to fping.

# fping < fping.txt

173.194.35.35 is alive
98.139.183.24 is alive

5. Show Version of Fping

Check the Fping version by executing the command.

# fping -v

fping: Version 4.0
fping: comments to [email protected]

Those who want to get more information with options about Fping command, please look into a man page. Also requested to try Fping command in your environment and share your experience with us through the comment box below.

If you read this far, tweet to the author to show them you care. Tweet a thanks
Ravi Saive
I am an experienced GNU/Linux expert and a full-stack software developer with over a decade in the field of Linux and Open Source technologies

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

6 thoughts on “Fping – A High Performance Ping Tool for Linux”

  1. We use CloudView NMS to alert us (via e-mail/SMS) when an IP Address from one of the predefined IP Address ranges suddenly comes up. It usually happens when a guest (or intruder) joins/connects to our network (can run on Windows/Linux/Mac).

    CloudView NMS is actually a universal network monitoring system supporting multiple standards.

    Reply
    • @Niraj,

      Fping has limited options and usage, so shown important usage only. If you know any other useful fping usage examples, do share here…

      Reply
      • Would have been helpful to show the format of your fping.txt file. I can’t tell from the info given whether I can specify a subnet range, 1 per line or space separated, or whether a specific format is required when using an ip range.

        Reply
  2. Hi, Neat post. There’s a difficulty together with your site in web explorer, would check this… IE still will be the marketplace leader and a massive element of folks will omit your excellent writing due to this concern.

    Reply

Got something to say? Join the discussion.

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.