返回IP地址
[root@sre01 yum.repos.d]# fping -a www.baidu.com
www.baidu.com
[root@sre01 yum.repos.d]# fping -A www.baidu.com
110.242.68.3 is alive
探测单个主机
[root@sre01 yum.repos.d]# fping 223.5.5.5
223.5.5.5 is alive
探测多个主机
[root@sre01 yum.repos.d]# fping 223.5.5.5 1.1.1.1
223.5.5.5 is alive
1.1.1.1 is unreachable
指定网段范围探测
[root@sre01 yum.repos.d]# fping -g 192.168.10.0/24
192.168.10.1 is alive
192.168.10.2 is alive
192.168.10.3 is alive
192.168.10.5 is alive
192.168.10.7 is alive
ICMP Host Unreachable from 192.168.10.248 for ICMP Echo sent to 192.168.10.8
ICMP Host Unreachable from 192.168.10.248 for ICMP Echo sent to 192.168.10.9
ICMP Host Unreachable from 192.168.10.248 for ICMP Echo sent to 192.168.10.10
ICMP Host Unreachable from 192.168.10.248 for ICMP Echo sent to 192.168.10.11
ICMP Host Unreachable from 192.168.10.248 for ICMP Echo sent to 192.168.10.12
ICMP Host Unreachable from 192.168.10.248 for ICMP Echo sent to 192.168.10.13
指定地址段探测
[root@sre01 yum.repos.d]# fping -g 192.168.10.1 192.168.10.10
192.168.10.1 is alive
192.168.10.2 is alive
192.168.10.3 is alive
192.168.10.5 is alive
192.168.10.7 is alive
ICMP Host Unreachable from 192.168.10.248 for ICMP Echo sent to 192.168.10.8
ICMP Host Unreachable from 192.168.10.248 for ICMP Echo sent to 192.168.10.8
ICMP Host Unreachable from 192.168.10.248 for ICMP Echo sent to 192.168.10.8
ICMP Host Unreachable from 192.168.10.248 for ICMP Echo sent to 192.168.10.8
ICMP Host Unreachable from 192.168.10.248 for ICMP Echo sent to 192.168.10.9
ICMP Host Unreachable from 192.168.10.248 for ICMP Echo sent to 192.168.10.9
ICMP Host Unreachable from 192.168.10.248 for ICMP Echo sent to 192.168.10.9
ICMP Host Unreachable from 192.168.10.248 for ICMP Echo sent to 192.168.10.9
ICMP Host Unreachable from 192.168.10.248 for ICMP Echo sent to 192.168.10.10
ICMP Host Unreachable from 192.168.10.248 for ICMP Echo sent to 192.168.10.10
ICMP Host Unreachable from 192.168.10.248 for ICMP Echo sent to 192.168.10.10
ICMP Host Unreachable from 192.168.10.248 for ICMP Echo sent to 192.168.10.10
192.168.10.4 is unreachable
192.168.10.6 is unreachable
192.168.10.8 is unreachable
192.168.10.9 is unreachable
192.168.10.10 is unreachable
指定探测次数
[root@sre01 yum.repos.d]# fping -c 10 223.5.5.5
223.5.5.5 : [0], 84 bytes, 4.90 ms (4.90 avg, 0% loss)
223.5.5.5 : [1], 84 bytes, 20.1 ms (12.5 avg, 0% loss)
223.5.5.5 : [2], 84 bytes, 41.8 ms (22.2 avg, 0% loss)
223.5.5.5 : [3], 84 bytes, 16.5 ms (20.8 avg, 0% loss)
223.5.5.5 : [4], 84 bytes, 13.6 ms (19.4 avg, 0% loss)
223.5.5.5 : [5], 84 bytes, 35.4 ms (22.0 avg, 0% loss)
223.5.5.5 : [6], 84 bytes, 11.7 ms (20.6 avg, 0% loss)
223.5.5.5 : [7], 84 bytes, 5.96 ms (18.7 avg, 0% loss)
223.5.5.5 : [8], 84 bytes, 51.3 ms (22.4 avg, 0% loss)
223.5.5.5 : [9], 84 bytes, 6.59 ms (20.8 avg, 0% loss)
223.5.5.5 : xmt/rcv/%loss = 10/10/0%, min/avg/max = 4.90/20.8/51.3
指定探测包的大小
[root@sre01 yum.repos.d]# fping -c 4 -b 1024 223.5.5.5
223.5.5.5 : [0], 1052 bytes, 7.24 ms (7.24 avg, 0% loss)
223.5.5.5 : [1], 1052 bytes, 14.5 ms (10.8 avg, 0% loss)
223.5.5.5 : [2], 1052 bytes, 6.32 ms (9.35 avg, 0% loss)
223.5.5.5 : [3], 1052 bytes, 13.7 ms (10.4 avg, 0% loss)