arping :向相邻主机发送ARP请求
范例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 ~]#
参考:http://www.lx138.com/page.php?ID=266