Sheng Yang 14d6c85176 bug 12727: Add arping to update the vSwitch cache
We need to broadcast all our public IP address's ARP, not only the gateway one.

status 12727: resolved fixed
2011-12-22 17:24:57 -08:00

11 lines
328 B
Plaintext

ip link|grep BROADCAST|grep -v eth0|grep -v eth1|cut -d ":" -f 2 > /tmp/iflist
while read i
do
ip addr show $i|grep "inet " > /tmp/iplist_$i
while read line
do
ip=`echo $line|cut -d " " -f 2|cut -d "/" -f 1`
arping -I $i -A $ip -c 2 >> [RROUTER_LOG] 2>&1
done < /tmp/iplist_$i
done < /tmp/iflist