Bridged nodes sharing local IP to be used as gateway for LXC

Nick Hibma nick at anywi.com
Thu Mar 14 14:18:56 CET 2013


> Well if you have two hosts with the same IP addresses on a network, the one
> which responds first to an ARP request will win. The MAC address discovered
> via ARP will be cached, so if a LXC container migrates to another node it will
> not automatically change to the local gateway. And even if no containers
> migrate, it could be that the local host has a higher load than the remote
> node, and the remote node's ARP replies will arrive before the local node's.

Which will cause flapping... Using the same IP address is not recommended for normal working setups, unless you know exactly what you do.

Moving a container however should be trivial. If I am not mistaken an interface that is taken down and up again will send an ARP request for its own IP address, which will prime all connected host's ARP caches. Think gateway failover/VRRP, they do the same. So a simple 'ifconfig eth0 down; ifconfig eth0 up' in the container should do the trick.

Nick


More information about the tinc mailing list