How to work with Fping tools on Linux.
Certainly, nowadays no one is unfamiliar with the Ping command and do not know that, with this command, ICMP packets can be sent to another device on the network and be informed of its status. Now in this article, from the Linux tutorial series, we are going to introduce you to an attractive tool called fping so that you can take advantage of its practical capabilities. Join us to learn how to work with Fping tools on linux.
What is Fping?
Fping is a small tool that you can install separately on your Linux and use it to pin devices inside the network. But the important thing about this tool is that, its distinct with Ping commands. It is the ability to ping multiple devices on a network, allows us to ping all systems within a network or different IP addresses simultaneously.
Join us now to learn how to work with Fping tools on Linux and of course install it
Learning to work with Fping tools on Linux
You can use the following commands to install fping in different versions of Linux :
Install fping on CentOS and Redhat
yum install fping
apt install fping
Installing fping in Fedora
dnf install fping
Installing fping in Arch Linux
pacman -S fping
Therefore you will be able to install fping on your Linux.
After installation, to ensure the correct installation status, you can enter the following command to display the installed fping version on your server.
The output of the above command will be as it follows.
Output fping: Version 4.0 fping: comments to [email protected]
Note: If the output correctly displays the tool version, it means that the fping is installed correctly.
Well, so far you’ve managed to install fping on your Linux; In the following, we will teach you how to work with it in Linux.
Working with Fping commands
The easiest way to use the fping command to test and check multiple different IP addresses simultaneously would be as follows.
fping 18.104.22.168 22.214.171.124 126.96.36.199
After entering the above command, the output of the command will be as follows.
Output 188.8.131.52 is alive 184.108.40.206 is unreachable 220.127.116.11 is unreachable
To use fping to check and test a range of IP addresses, you can enter the fping command as follows.
fping -s -g 192.168.0.1 192.168.0.9
After entering the above command, you will have the same output as the following statements.
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)
To ping a subnet completely, you will be able to enter the fping command as shown below.
fping -g -r 1 192.168.0.0/24
Note that in the above command, the -r parameter with the number 1 is used, which means that the whole subnet has to be in ping command only once.
Finally, another interesting feature of fping is the ability to read IP addresses from a TXT file that enables you to create a file from all the desired IP addresses and call it whenever you want.
fping < IPs.txt
In the above command, we have already created a file called IPs.txt and in the above command we called it.
We hope you enjoy the tutorial on working with Fping tools on Linux.
If you have any questions or problems, you can ask the Ask system to provide guidance.