Fping is a small program that uses ICMP (Internet Control Message Protocol) echo requests that the target host responds like ping command in Linux. It differs from the ping command as it pings the number of specified hosts on the command line or specific files with a list of IP addresses to ping.
For example, we can specify the complete network Fping (192.168.0.1/24 Class C Network). As mentioned, it will send a Fping request to the host and move to another target host. This works like a round-robin. Unlike ping, fping is meant for basic scripting.
If you're looking to enhance your network security alongside monitoring, consider setting up a VPN on your CentOS 7 system. You can find detailed instructions on how to do this in our guide on Installing PPTP VPN on CentOS 7.
If you want Fping, you will need to install Fping packages separately as this doesn’t come together with the Operating System.
How to Install Fping on CentOS 7
First, download fping source package to your Linux server (the latest version is 3.10):
wget http://fping.org/dist/fping-3.10.tar.gz
To install the fping application, follow the steps below:
tar -xvf fping-3.10.tar.gz
cd fping-3.10
./configure
make
make install
You can compile fping with support for IPv6 addresses follow the next steps:
./configure --prefix=/usr/local --enable-ipv4 --enable-ipv6
make
make install
That's it! You have successfully installed fping on your CentOS server. Now for the next section of the article, we will go through some of the basic use cases of the fping command!
If you're interested in enhancing your server monitoring capabilities, consider checking out our guide on Installing GoAccess on CentOS 7, which provides insights into real-time web log analysis.
Use cases of the fping command
Fping multiple IP addresses:
fping 8.8.8.8 8.8.4.4 104.28.25.20
8.8.4.4 is alive
8.8.8.8 is alive
104.28.25.20 is alive
Fping range of IP addresses:
fping -s -g 192.168.1.1 192.168.1.5
ICMP Network Unreachable from 83.231.213.65 for ICMP Echo sent to 192.168.1.1
ICMP Network Unreachable from 83.231.213.65 for ICMP Echo sent to 192.168.1.3
ICMP Network Unreachable from 83.231.213.65 for ICMP Echo sent to 192.168.1.5
ICMP Network Unreachable from 83.231.213.65 for ICMP Echo sent to 192.168.1.1
ICMP Network Unreachable from 83.231.213.65 for ICMP Echo sent to 192.168.1.3
ICMP Network Unreachable from 83.231.213.65 for ICMP Echo sent to 192.168.1.5
ICMP Network Unreachable from 83.231.213.65 for ICMP Echo sent to 192.168.1.1
ICMP Network Unreachable from 83.231.213.65 for ICMP Echo sent to 192.168.1.3
ICMP Network Unreachable from 83.231.213.65 for ICMP Echo sent to 192.168.1.5
ICMP Network Unreachable from 83.231.213.65 for ICMP Echo sent to 192.168.1.1
ICMP Network Unreachable from 83.231.213.65 for ICMP Echo sent to 192.168.1.3
ICMP Network Unreachable from 83.231.213.65 for ICMP Echo sent to 192.168.1.5
192.168.1.1 is unreachable
192.168.1.2 is unreachable
192.168.1.3 is unreachable
192.168.1.4 is unreachable
192.168.1.5 is unreachable
5 targets
0 alive
5 unreachable
0 unknown addresses
5 timeouts (waiting for response)
20 ICMP Echos sent
0 ICMP Echo Replies received
12 other ICMP received
0.00 ms (min round trip time)
0.00 ms (avg round trip time)
0.00 ms (max round trip time)
4.191 sec (elapsed real time)
Fping complete network
fping -g -r 3 192.168.1.1/24
Show fping version
fping -v
fping: Version 3.10
fping: comments to [email protected]
Wrapping up
Congratulations! You have successfully installed Fping on your CentOS 7 VPS. We also covered some of the basic use cases of the fping command. Using Fping can greatly enhance your network monitoring capabilities on your CentOS server. We hope that you managed to set it up without any issues. If you encounter any problems during the installation, please let us know in the comments below, and we'll be happy to assist you.
As you continue to manage your CentOS system, consider upgrading to CentOS 8 for improved features and support. You can find a detailed guide on how to upgrade in our article on How to Upgrade CentOS 7 to 8.
People also read: