[lxc-users] Networking in Ubuntu with 2 ip failover in LXC
Fajar A. Nugraha
list at fajar.net
Wed Aug 13 14:57:16 UTC 2014
On Wed, Aug 13, 2014 at 7:34 PM, Tamas Papp <tompos at martos.bme.hu> wrote:
> Resending..
>
>
> On 08/13/2014 02:27 PM, Tamas Papp wrote:
>
> host machine:
>
> auto br0
> iface br0 inet static
> bridge_ports eth0
> bridge_stp off
> bridge_maxwait 0
> bridge_fd 0
> address 94.23.237.216
> netmask 255.255.255.0
> network 94.23.237.0
> broadcast 94.23.237.255
> gateway 94.23.237.254
>
>
> Don't setup br0:0
>
>
> Remove the following entries from CONTAINER/config:
>
> lxc.network.ipv4 = 91.121.239.228/32
> lxc.network.ipv4.gateway = 91.121.239.254
>
>
>
> guest machine:
>
> auto eth0
> iface eth0 inet static
> address 91.121.239.228
> netmask 255.255.255.0
> gateway 94.23.237.254
>
>
> This should work.
No, that won't work.
94.23.237.254 is not part of 91.121.239.0/24.
@Bryn, how is the ROUTER (i.e. 94.23.237.254) setup? Is it configured
to route the additional IP (91.121.239.228) thru host's IP
(94.23.237.216), the way some dedicated server provider does (e.g.
serverloft)?
If yes, then the EASY way would be to put 91.121.239.228 as an alias
in host's interface (I'd just use eth0, no need to use a bridge there)
and setup a static NAT to whatever IP the container has (e.g.
10.0.3.251, connected to host's lxcbr0 bridge)
--
Fajar
More information about the lxc-users
mailing list