Did You Know?
Got a tip? Let us know

LFCS - Linux Foundation Certified SysAdmin - Exam Preparation Guide

Install Fping ICMP Program on RHEL/CentOS 6/5/4

Download Your Free eBooks NOW - 10 Free Linux eBooks for Administrators

Fping is a small program that uses ICMP (Internet Control Message Protocol) echo request that the target host is responding like ping command in Linux. It’s totally different from ping command as it use to ping number of specified hosts on the command line or specify file having list of IP address to ping.

For example, we can specify the complete network Fping like (192.168.0.1/24 Class ‘C‘ Network). It will send Fping request to host and move to another target host as you mentioned. This works like round robin. Unlike ping, Fping is meant for basically scripting. You need to install Fping packages separately as this doesn’t included with Operating System.

Fping Commands

Fping Commands

Download Fping RPM Package

Download rpm package for your system architecture from http://pkgs.repoforge.org/fping, or you can use following links to download it using Wget command.

For RHEL/CentOS 6/5/4 32-Bit OS
## For RHEL/CentOS 6.3-6.0 32-Bit OS ##
# wget http://pkgs.repoforge.org/fping/fping-3.1-1.el6.rf.i686.rpm

## For RHEL/CentOS 5 32-Bit OS ##
# wget http://pkgs.repoforge.org/fping/fping-3.1-1.el5.rf.i386.rpm

## For RHEL/CentOS 4 32-Bit OS ##
# wget http://pkgs.repoforge.org/fping/fping-3.1-1.el4.rf.i386.rpm
For RHEL/CentOS 6/5/4 64-Bit OS
## For RHEL/CentOS 6.3-6.0 64-Bit OS ##
# wget http://pkgs.repoforge.org/fping/fping-3.1-1.el6.rf.x86_64.rpm

## For RHEL/CentOS 5 64-Bit OS ##
# wget http://pkgs.repoforge.org/fping/fping-3.1-1.el5.rf.x86_64.rpm

## For RHEL/CentOS 4 64-Bit OS ##
# wget http://pkgs.repoforge.org/fping/fping-3.1-1.el4.rf.x86_64.rpm

Install Fping RPM Package

Once, you have downloaded the Fping rpm package for your Linux distribution, let’s install it through rpm command.

For RHEL/CentOS 6/5/4 32-Bit OS
## For RHEL/CentOS 6.3-6.0 32-Bit OS ##
# rpm -ivh http://pkgs.repoforge.org/fping/fping-3.1-1.el6.rf.i686.rpm

## For RHEL/CentOS 5 32-Bit OS ##
# rpm -ivh http://pkgs.repoforge.org/fping/fping-3.1-1.el5.rf.i386.rpm

## For RHEL/CentOS 4 32-Bit OS ##
# rpm -ivh http://pkgs.repoforge.org/fping/fping-3.1-1.el4.rf.i386.rpm
For RHEL/CentOS 6/5/4 64-Bit OS
## For RHEL/CentOS 6.3-6.0 64-Bit OS ##
# rpm -ivh http://pkgs.repoforge.org/fping/fping-3.1-1.el6.rf.x86_64.rpm

## For RHEL/CentOS 5 64-Bit OS ##
# rpm -ivh http://pkgs.repoforge.org/fping/fping-3.1-1.el5.rf.x86_64.rpm

## For RHEL/CentOS 4 64-Bit OS ##
# rpm -ivh http://pkgs.repoforge.org/fping/fping-3.1-1.el4.rf.x86_64.rpm

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.

# fping 50.116.66.139 173.194.35.35 98.139.183.24

50.116.66.139 is alive
173.194.35.35 is alive
98.139.183.24 is alive

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 3.1
fping: comments to david@schweikert.ch

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

Ravi Saive

Owner at TecMint.com
Simple Word a Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux.

Linux Services & Free WordPress Setup

Our post is simply ‘DIY’ aka ‘Do It Yourself, still you may find difficulties and want us to help you out. We offer wide range of Linux and Web Hosting Solutions at fair minimum rates. Please submit your orders by Clicking Here.

One Response

  1. Sal says:

    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.

Leave a Reply

This work is licensed under a (cc) BY-NC | TecMint uses cookies. By using our services, you comply to use of our cookies. More info: Privacy Policy.
© 2012-2014 All Rights Reserved.