Created
January 20, 2013 10:09
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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