Skip to content

Instantly share code, notes, and snippets.

@justyns
Created January 20, 2013 10:09
Show Gist options
  • Save justyns/4577648 to your computer and use it in GitHub Desktop.
Save justyns/4577648 to your computer and use it in GitHub Desktop.
Use this to re-arp all IPs currently on the interface. Change eth0 to eth1 or whatever as needed.
ifconfig|grep inet|awk '{print $2}'|awk -F: '{print $NF}'|grep -v 127|grep -v ^$|tr '.' ' '|while read -a ip;do arping -Ieth0 -f -s ${ip[0]}.${ip[1]}.${ip[2]}.${ip[3]} ${ip[0]}.${ip[1]}.${ip[2]}.1;done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment