arp -da
然后它是autorefreshing。 🙂
如何刷新ARP表?
你可以从arp表中保存ip:
arp -an | sed -s 's/.*(\([0-9.]*\)).*/\1/' > /tmp/ip_to_arp
然后ping所有的ip:
for ip in `cat /tmp/ip_to_arp`; do ping -c 1 ${ip}; done
要么
for ip in `cat /tmp/ip_to_arp`; do arping -c 1 -I eth0 ${ip}; done