In some cases, the network elements use caching strategies in order to improve the network throughput. In this enviroment, is frequently that we are using subsystems like LVS with purpose of balance one service IP between a couple of hosts. In this cases, we can have several problems when we want use HA system because some network switch don’t releases the old ARP entry of the service IP (due to caching effect). To avoid this aim, we’d use arping to force releases of the old ARP entry.
arping -v -c 1 -i eth0 -S 220.127.116.11 -t ff:ff:ff:ff:ff:ff 18.104.22.168
arping: invalid option -- '-' Usage: arping [-fqbDUAV] [-c count] [-w timeout] [-I device] [-s source] destination -f : quit on first reply -q : be quiet -b : keep broadcasting, don't go unicast -D : duplicate address detection mode -U : Unsolicited ARP mode, update your neighbours -A : ARP answer mode, update your neighbours -V : print version and exit -c count : how many packets to send -w timeout : how long to wait for a reply -I device : which ethernet device to use (eth0) -s source : source ip address destination : ask for what ip address
For example, we can use this tip in the network/intefaces conffile:
auto eth0 iface eth0 inet static address 10.240.97.99 netmask 255.255.255.0 post-up arping -v -c 1 -i eth0 -S 22.214.171.124 -t ff:ff:ff:ff:ff:ff 126.96.36.199