Advance

How to work with Fping in Linux

How to work with Fping in Linux
1
(1)

In this tutorial we are going to learn you how to work with Fping in Linux. Nowadays most of the users are familiar with the Ping command, that ICMP packets can be sent to another device on the network and its status can be informed. And we would introduce you to an interesting tool called fping so that you can take advantage of its practical capabilities.

 

How to work with Fping in 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, which distinguishes it from the Ping command, is the ability to ping multiple devices on a network, which will allow us to ping all the systems within a network or different IP addresses simultaneously.

 

How to install Fping ?

To install fping in the version, access Linux using the following commands:

Install fping on CentOS and Redhat

yum install fping

Installing fping in Debian and Ubuntu

Note: you can just run below command by root user,But if you do not access to root user, you have to add sudo before execute the command.

apt install fping

Fping installation in Fedora

dnf install fping

Installing fping in Arch Linux

pacman -S fping
Recommended Article: How to Fix Server Response Time problem

What should be done after installation ?

This way you will be able to install and decide on your Linux.

After installation, you can enter the following command to ensure that the installed version of fping is displayed on your server to ensure the correct installation status.

fping -v  

The output of the above command will be as 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.

How to work with Fping command

The easiest way to use the fping command to test and check multiple different IP addresses simultaneously would be as follows.

fping 50.116.66.139 173.194.35.35 98.139.183.24

After entering the above command, the output of the command will be as follows.

Output    50.116.66.139 is alive  173.194.35.35 is unreachable  98.139.183.24 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

Recommended Article: Ways To Set Up SSH Keys on Debian 10

Note: that in the above command, the -r parameter with the number 1 is used, which means that the whole command has to be pinged 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 back 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.

In this way, you can use fping tools to ping a whole network, an IP range, or a number of different IP addresses at the same time, and be informed of their status.

Dear user, we hope you would enjoy this tutorial How to work with Fping in Linux, you can ask questions about this training in the comments section, or to solve other problems in the field of Eldernode training, refer to the Ask page section and raise your problem in it as soon as possible. Make time for other users and experts to answer your questions.

How useful was this post?

Click on a star to rate it!

Average rating 1 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

View More Posts
Tom Veitch
Eldernode Writer
We Are Waiting for your valuable comments and you can be sure that it will be answered in the shortest possible time.

Leave a Reply

Your email address will not be published. Required fields are marked *

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+8595670151

7 days a week, 24 hours a day