출처 :
http://fping.org
https://github.com/schweikert/fping
fping 은 ping에서 조금 진보된 형태로 멀티로 아이피를 받거나…대역으로… 혹은 파일로 아이피를 설정해서 icmp 패킷의 요청을 응답해주는 프로그램입니다.
관제 혹은 네트워크 작업시에 적절히 응용해서 사용하기 좋습니다.
YUM
# yum install fping
Source Compile
# wget http://fping.org/dist/fping-3.10.tar.gz
# tar -xvf fping-3.10.tar.gz
#cd fping-3.10
# ./configure
==>> ipv6 support ./configure –prefix=/usr/local –enable-ipv4 –enable-ipv6
# make
# make install
Example)
여러개의 아이피를 개별적으로 지정
# fping 173.194.127.95 173.194.127.79 173.194.127.88 173.194.127.87
173.194.127.95 is alive
173.194.127.79 is alive
173.194.127.88 is alive
173.194.127.87 is alive
아이피 스캔범위를 지정
# fping -s -g 173.194.127.79 173.194.127.95
173.194.127.79 is alive
173.194.127.80 is alive
173.194.127.81 is alive
173.194.127.82 is alive
173.194.127.83 is alive
173.194.127.84 is alive
173.194.127.85 is alive
173.194.127.86 is alive
173.194.127.87 is alive
173.194.127.88 is alive
173.194.127.89 is alive
173.194.127.90 is alive
173.194.127.91 is alive
173.194.127.92 is alive
173.194.127.93 is alive
173.194.127.94 is alive
173.194.127.95 is alive
17 targets
17 alive
0 unreachable
0 unknown addresses
0 timeouts (waiting for response)
17 ICMP Echos sent
17 ICMP Echo Replies received
0 other ICMP received
33.0 ms (min round trip time)
54.7 ms (avg round trip time)
70.3 ms (max round trip time)
0.690 sec (elapsed real time)
네트워크 지정
# fping -g -r 3 173.194.127.0/29
173.194.127.0 is alive
173.194.127.1 is alive
173.194.127.2 is alive
173.194.127.3 is alive
173.194.127.4 is alive
173.194.127.5 is alive
173.194.127.6 is alive
173.194.127.7 is alive
요청에 응답한 아이피리스트 파일로 저장
# fping -g -r 3 173.194.127.0/29 > CHK_PING.TXT
파일로 지정된 아이피 응답 확인
# cat CHK_PING.TXT
naver.com
daum.net
google.com
yahoo.com
smileserv.com
# fping -a -f CHK_PING.TXT
smileserv.com
google.com
yahoo.com
네이버와 다음은 응답이 없네요;;;
추가옵션은 아래 help 를 확인해보시기 바랍니다.
# fping -help
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 68)
-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
-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)
[polldaddy rating=”7739789″]