arping
arping指令用于发送arp请求到一个相邻的主机,在指定网卡上发送arp请求指定地址,源地址使用-s指定。该指令可以直径ping MAC地址,找出哪些地址被哪些电脑使用了。
此命令的适用范围:RedHat、RHEL、Ubuntu、CentOS、SUSE、openSUSE、Fedora。
1、语法
arping [-AbDfhqUV] [-c count] [-w deadling] [-s source] -I interface destnation
2、选项列表
-A
与-U相同,但是发送的是ARP RELAY报文
-b
只发送物理层的广播报文
-c count
指定发送测试数据包的次数
-D
重复地址检测模式
-f
如果目的主机有回应,立刻停止发送测试数据包
-h
显示帮助信息
-I interface
指定网络设备接口
-q
静默模式
-s source
指定发送测试包的源地址
-U
更新邻居主机arp缓存
-V
显示版本信息
-w
指定超时时间
3、实例
向邻居主机发送请求
[root@localhost ~]# arping -I eth0 192.168.1.8 //指定网卡,向目标ip发送请求
ARPING 192.168.1.8 from 192.168.1.9 eth0
Unicast reply from 192.168.1.8 [98:01:A7:9F:5E:9D] 0.817ms //可以看到目标ip的mac地址
Unicast reply from 192.168.1.8 [98:01:A7:9F:5E:9D] 0.749ms
Unicast reply from 192.168.1.8 [98:01:A7:9F:5E:9D] 0.741ms
Unicast reply from 192.168.1.8 [98:01:A7:9F:5E:9D] 0.787ms
arping指令用于发送arp请求到一个相邻的主机,在指定网卡上发送arp请求指定地址,源地址使用-s指定。该指令可以直径ping MAC地址,找出哪些地址被哪些电脑使用了。
此命令的适用范围:RedHat、RHEL、Ubuntu、CentOS、SUSE、openSUSE、Fedora。
1、语法
arping [-AbDfhqUV] [-c count] [-w deadling] [-s source] -I interface destnation
2、选项列表
-A
与-U相同,但是发送的是ARP RELAY报文
-b
只发送物理层的广播报文
-c count
指定发送测试数据包的次数
-D
重复地址检测模式
-f
如果目的主机有回应,立刻停止发送测试数据包
-h
显示帮助信息
-I interface
指定网络设备接口
-q
静默模式
-s source
指定发送测试包的源地址
-U
更新邻居主机arp缓存
-V
显示版本信息
-w
指定超时时间
3、实例
向邻居主机发送请求
[root@localhost ~]# arping -I eth0 192.168.1.8 //指定网卡,向目标ip发送请求
ARPING 192.168.1.8 from 192.168.1.9 eth0
Unicast reply from 192.168.1.8 [98:01:A7:9F:5E:9D] 0.817ms //可以看到目标ip的mac地址
Unicast reply from 192.168.1.8 [98:01:A7:9F:5E:9D] 0.749ms
Unicast reply from 192.168.1.8 [98:01:A7:9F:5E:9D] 0.741ms
Unicast reply from 192.168.1.8 [98:01:A7:9F:5E:9D] 0.787ms