[转]arping

简介:

arping :向相邻主机发送ARP请求

语 法

arping[必要参数][选择参数][目的地址]
功 能
arping 命令: 在指定网卡上发送ARP请求指定地址,源地址 “-s” 参数指定,可用来直接 ping MAC 地址,以及找出那些 ip 地址被哪些电脑所使用了
类似命令: arp   ping   ping6   clockdiff   tracepath   cu   
相似命令: linux命令
执行权限: 超级用户 普通用户
命令属性: 网络通讯

 

参数
必要参数 

-A ARP回复模式,更新邻居
-b 保持广播
-D 复制地址检测模式
-f 得到第一个回复就 退出
-q 不显示警告信息
-U 主动的ARP模式,更新邻居


选择参数 

-c<数据包的数目> 发送的数据包的数目
-w<超时时间> 设置超时时间
-I<网卡> 使用指定的以太网设备,默认情况下使用eth0
-s 指定源IP地址
-h 显示帮助信息
-V 显示版本信息

 

范例



范例1 : 发送ARP请求 

[root@hnlinux ~]# arping 192.168.0.1 //向指定IP发送ARP请求
ARPING 192.168.0.1 from 192.168.0.3 eth0
Unicast reply from 192.168.0.1 [00:21:27:9E:36:66] 2.480ms
Unicast reply from 192.168.0.1 [00:21:27:9E:36:66] 2.387ms
Unicast reply from 192.168.0.1 [00:21:27:9E:36:66] 1.459ms
Unicast reply from 192.168.0.1 [00:21:27:9E:36:66] 1.494ms
Unicast reply from 192.168.0.1 [00:21:27:9E:36:66] 1.478ms
Unicast reply from 192.168.0.1 [00:21:27:9E:36:66] 2.414ms
Unicast reply from 192.168.0.1 [00:21:27:9E:36:66] 1.464ms
Unicast reply from 192.168.0.1 [00:21:27:9E:36:66] 1.501ms
Sent 8 probes (1 broadcast(s))
Received 8 response(s) //Ctrl+C 终止
[root@hnlinux ~]# 

范例2 : 向指定主机发送ARP请求,当收到第一个包自动退出

[root@hnlinux ~]# arping -f 192.168.0.1
ARPING 192.168.0.1 from 192.168.0.3 eth0
Unicast reply from 192.168.0.1 [00:21:27:9E:36:66] 0.692ms
Sent 1 probes (1 broadcast(s))
Received 1 response(s)
[root@hnlinux ~]# 

范例3 : 指定发送次数


[root@hnlinux ~]# arping -c 3 192.168.0.1 //指定发送3次
ARPING 192.168.0.1 from 192.168.0.3 eth0
Unicast reply from 192.168.0.1 [00:21:27:9E:36:66] 0.662ms
Unicast reply from 192.168.0.1 [00:21:27:9E:36:66] 0.810ms
Unicast reply from 192.168.0.1 [00:21:27:9E:36:66] 1.491ms
Sent 3 probes (1 broadcast(s))
Received 3 response(s)
[root@hnlinux ~]#

 

本文转自feisky博客园博客,原文链接:http://www.cnblogs.com/feisky/archive/2011/11/20/2256587.html,如需转载请自行联系原作者

 


相关文章
|
5月前
ifconfig 配置网络接口
ifconfig 配置网络接口。
43 1
|
5月前
|
监控 安全 Linux
【专栏】Linux中六个常用的网络命令:ping、traceroute、netstat、nmap、ifconfig和ip
【4月更文挑战第28天】本文介绍了Linux中六个常用的网络命令:ping、traceroute、netstat、nmap、ifconfig和ip,以及它们在测试网络连通性、追踪路由、查看网络状态、安全扫描和接口配置等场景的应用。通过学习和运用这些命令,系统管理员和网络爱好者能更有效地诊断和管理网络问题,确保网络稳定运行。
187 0
|
5月前
|
Unix Linux
`ifconfig`命令
`ifconfig`是UNIX和类UNIX系统中用于查看和配置网络接口的命令,提供IP地址、子网掩码等信息。常用参数包括显示所有接口(`-a`)、启用/禁用接口(`up/down`)、设置IP地址和子网掩码。配置在重启后失效,需修改配置文件永久保存。在某些新Linux版本中,可能已被`ip`命令替代。是一款便捷的网络管理工具,更多详情可参考相关手册或文档。
63 4
|
10月前
回环lo:127.0.0.1 的简单理解
回环lo:127.0.0.1 的简单理解
49 0
|
Docker 容器
“eth0”不存在
“eth0”不存在
119 2
|
移动开发 网络协议 Linux
网络环境查看命令:ifconfig、ifup、ifdown、route、netstat、ss
一、ifconfig ifconfig命令被用于配置和显示Linux内核中网络接口的网络参数。用ifconfig命令配置的网卡信息,在网卡重启后机器重启后,配置就不存在。要想将上述的配置信息永远的存的电脑里,那就要修改网卡的配置文件了。 1. 安装 若系统默认没有ifconfig命令,则使用下面命令进行安装。
1074 0