当前位置: 首页 > news >正文

fping命令

fping是一个用于网络扫描的工具,它可以在 Linux 系统上使用。fping可以发送 ICMP ECHO_REQUEST(即 ping)数据包到指定的网络地址范围,并等待响应。通过这种方式,fping可以用来检测哪些 IP 地址是活跃的。

可以测试多个ip或者域名,并形成报告

[root@localhost ~]# fping 192.168.71.130 qq.com 192.168.71.131
192.168.71.130 is alive
qq.com is alive
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.131
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.131
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.131
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.131
192.168.71.131 is unreachable
  1. 192.168.71.130是可达的(alive)。
  2. qq.com是可达的(alive)。
  3. 对于发送到192.168.71.131的ICMP Echo请求,从192.168.71.130收到了ICMP Host Unreachable错误。
  4. 192.168.71.131是不可达的(unreachable)。

指定范围

这里指定的是192.168.71.130到192.168.71.140在内的所有ip地址,并返回报告

[root@localhost ~]# fping  -s -g 192.168.71.130  192.168.71.140 
192.168.71.130 is alive
192.168.71.132 is alive
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.133
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.133
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.133
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.133
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.131
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.131
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.131
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.131
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.137
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.137
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.137
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.137
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.136
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.136
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.136
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.136
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.135
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.135
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.135
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.135
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.134
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.134
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.134
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.134
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.140
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.140
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.140
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.140
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.139
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.139
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.139
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.139
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.138
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.138
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.138
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.138
192.168.71.131 is unreachable
192.168.71.133 is unreachable
192.168.71.134 is unreachable
192.168.71.135 is unreachable
192.168.71.136 is unreachable
192.168.71.137 is unreachable
192.168.71.138 is unreachable
192.168.71.139 is unreachable
192.168.71.140 is unreachable11 targets2 alive9 unreachable0 unknown addresses36 timeouts (waiting for response)38 ICMP Echos sent2 ICMP Echo Replies received36 other ICMP received0.055 ms (min round trip time)1.05 ms (avg round trip time)2.04 ms (max round trip time)4.271 sec (elapsed real time)

执行结果

  1. 共有11个目标地址。
  2. 其中2个是可达的(alive)。
  3. 9个是不可达的(unreachable)。
  4. 0个未知地址。
  5. 共发送了38个ICMP Echo请求,收到了2个ICMP Echo回复。
  6. 共收到36个其他类型的ICMP消息。
  7. 最小往返时间(round trip time)为0.055毫秒。
  8. 平均往返时间为1.05毫秒。
  9. 最大往返时间为2.04毫秒。
  10. 总共花费了4.271秒的实际运行时间。

测试连通整个网络

fping -g -r 1 192.168.71.0/24

创建文件,使用fping测试文件内容的ip地址

[root@localhost ~]# cat 1.sh 
192.168.71.1
192.168.71.12
192.168.71.15
192.168.71.18
192.168.71.10
192.168.71.111
[root@localhost ~]# fping -f 1.sh 
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.12
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.12
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.12
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.12
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.111
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.111
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.111
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.111
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.10
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.10
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.10
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.10
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.18
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.18
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.18
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.18
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.15
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.15
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.15
ICMP Host Unreachable from 192.168.71.130 for ICMP Echo sent to 192.168.71.15
192.168.71.1 is unreachable
192.168.71.12 is unreachable
192.168.71.15 is unreachable
192.168.71.18 is unreachable
192.168.71.10 is unreachable
192.168.71.111 is unreachable

http://www.lryc.cn/news/333499.html

相关文章:

  • 奇富科技推出新一代全自研智能语音模型,打破沟通壁垒
  • 穿越代码之海:探寻结构体深层逻辑,展望未来应用新天地
  • layui框架实战案例(26):layui-carousel轮播组件添加多个Echarts图标的效果
  • Unity开发一个FPS游戏之三
  • NIUSHOP完美运营版商城 虚拟商品全功能商城 全能商城小程序 智慧商城系统 全品类百货商城
  • vue2开发好还是vue3开发好vue3.0开发路线
  • 爬虫 新闻网站 并存储到CSV文件 以红网为例 V2.0 (控制台版)升级自定义查询关键词、时间段,详细注释
  • JavaSE-11笔记【多线程2(+2024新)】
  • WebKit是什么?
  • 谷歌(Google)历年编程真题——接雨水
  • golang 归并回源策略
  • 【漏洞复现】可视化融合指挥调度平台 dispatch接口处存在任意文件上传漏洞
  • 最讨厌这种字符串问题了!!
  • B-名牌赌王(本人遇到的题,做个笔记)
  • 博客评论回复03
  • 【【萌新的学习之Numpy数组的使用】】
  • RabbitMQ3.13.x之七_RabbitMQ消息队列模型
  • Android JNI 调用第三方SO
  • Vid2seq
  • Opencv人机交互界面设置
  • 蓝桥杯算法心得——字典树考试(贡献度+前缀和)
  • Linux下Qt生成程序崩溃文件
  • Go语言中测试和性能
  • 回归预测 | Matlab基于CPO-GPR基于冠豪猪算法优化高斯过程回归的多输入单输出回归预测
  • python 日期字符串转换为指定格式的日期
  • day03-Docker
  • C语言函数实现冒泡排序
  • 区间概率预测python|QR-CNN-BiLSTM+KDE分位数-卷积-双向长短期记忆神经网络-时间序列区间概率预测+核密度估计
  • Java 分支结构 - if…else/switch
  • 【Unity每日一记】如何从0到1将特效图集制作成一个特效