The ping command has been through the years one of the most practical ways to check the operation of both a remote and a local computer when working with packages that are sent and from which an answer is expected to know details as if this active or not, shipping quality, packages received and much more..
By using the ping command it is possible to do this action with a single host or equipment in particular, but today we have a free utility called fping, thanks to which the equipment detection or network verification tasks will be with more functions complete. It is for this reason that today TechnoWikis will explain how we can install and use fping in Linux and thus add one more utility to the management tasks.
What is fping
Fping has been developed as an application that is responsible for sending ICMP (Internet Control Message Protocol) echo requests to the computers on the network in order to validate their status in real time, but, unlike the ping command , fping allows us to ping several hosts simultaneously and also allows us to specify a file in which is the list of IP addresses or hosts to ping. With fping we have a standard tool for network diagnostics and statistics.
Unlike traditional ping, fping is designed to be used in scripts, so its output is focused to be of a much simpler analysis.
1. How to install fping on Linux
To install this fping utility we can execute any of the following commands based on the distribution used:
Note
Alternatively, we can install fping from the resources, for this we execute the following lines in their order:
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
2 . How to run ping to various Linux IP addresses
To validate multiple IP addresses, we will execute the following:
fping IP1 IP2 IP3….
We will get two results that are:
Alive
IP address is active
Unreachable
The host is not available
3. How to ping a range of IP addresses in Linux
Another option is to ping a specific range of IP addresses. This sends an echo request to the range of the IP address and the response of each of them is obtained and in the final part we find details such as:
- Amount of managed IP address
- Number of positive and negative responses
- Total time of task execution
4. How to scan a complete Linux network with fping
It is possible that for some support task it is necessary to see how many IP addresses are active or not in a local network. To do this we will add the parameter -r 1 which repeats the action once, we execute the following:
fping -g -r 1 (IP range), for example, fping -g -r 1 192.168.0.0/24
5. How to validate the fping version in Linux
To know the current version of fping just run the following:
fping -v
6. How to ping from a file in Linux
It is possible to create a text file with a range of addresses to analyze, in this case we must use the following syntax:
fping <fping.txt
With this command you create the text file with the info.
7. Additional fping parameters (Linux)
With fping we will have the opportunity to use additional parameters such as:
Restrict search for IPv4 addresses only
Search only IPv6 addresses
Display only active IP addresses
Display goals by address instead of DNS name
It is the number of bytes of ping data to send
Rollback factor is used in the default mode, there fping sends several requests to a target before generating error, and for this it waits longer for a response in each successive request
Indicate the number of request packages to send to each target
Use the DNS to find the address of the ping return packet
Get the IP addresses of a text file
Display the used interface
−I, −−iface = IFACE
Send ping to each of the multiple IP addresses of the destination host
Define the type of service
They are the retry limits which by default is 3