Thursday, April 28, 2011

fping

Network Mapping -> Identify Live Hosts -> fping

fping is capable of pinging multiple hosts at the same time (ICMP ECHO). We can give a list, range, a file, etc... the ping properties like timeout, number of retries are also configurable.

Here are a few examples:

Usage: fping [options] [targets...]
-a show targets that are alive
-A show targets by address
-b n amount of ping data to send, in bytes (default 56)
-B f set exponential backoff factor to f
-c n count of pings to send to each target (default 1)
-C n same as -c, report results in verbose format
-e show elapsed time on return packets
-f file read list of targets from a file ( - means stdin) (only if no -g specified)
-g generate target list (only if no -f specified)
(specify the start and end IP in the target list, or supply a IP netmask)
(ex. fping -g 192.168.1.0 192.168.1.255 or fping -g 192.168.1.0/24)
-i n interval between sending ping packets (in millisec) (default 25)
-l loop sending pings forever
-m ping multiple interfaces on target host
-n show targets by name (-d is equivalent)
-p n interval between ping packets to one target (in millisec)
(in looping and counting modes, default 1000)
-q quiet (don't show per-target/per-ping results)
-Q n same as -q, but show summary every n seconds
-r n number of retries (default 3)
-s print final stats
-S addr set source address
-t n individual target initial timeout (in millisec) (default 500)
-u show targets that are unreachable
-v show version
targets list of targets to check (if no -f specified)

root@bt:~#
root@bt:~# fping 192.168.1.1 192.168.1.11 192.168.1.20
192.168.1.1 is alive
192.168.1.11 is alive
ICMP Host Unreachable from 192.168.1.7 for ICMP Echo sent to 192.168.1.20
ICMP Host Unreachable from 192.168.1.7 for ICMP Echo sent to 192.168.1.20
ICMP Host Unreachable from 192.168.1.7 for ICMP Echo sent to 192.168.1.20
192.168.1.20 is unreachable
root@bt:~# fping -r 1 -g 192.168.1.1 192.168.1.10
192.168.1.1 is alive
192.168.1.7 is alive
192.168.1.8 is alive
192.168.1.2 is unreachable
192.168.1.3 is unreachable
192.168.1.4 is unreachable
192.168.1.5 is unreachable
192.168.1.6 is unreachable
192.168.1.9 is unreachable
192.168.1.10 is unreachable
10 targets
3 alive
7 unreachable
0 unknown addresses

14 timeouts (waiting for response)
17 ICMP Echos sent
3 ICMP Echo Replies received
0 other ICMP received

0.09 ms (min round trip time)
72.5 ms (avg round trip time)
216 ms (max round trip time)
1.591 sec (elapsed real time)
root@bt:~#

Official website: http://fping.sourceforge.net/

No comments: