[lxc-users] Networking in Ubuntu with 2 ip failover in LXC

m.byryn1u m.bryn1u at gmail.com
Wed Aug 13 15:08:05 UTC 2014


W dniu 2014-08-13 16:57, Fajar A. Nugraha pisze:
> 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)
>
Hey,

It's server dedicated in OVH.
I have one ip like  94.23.237.216 and i bought one more called "ip 
failover" like 91.121.239.228. You say as an alias and setup static NAT. 
But what about 2 ip failover ?



More information about the lxc-users mailing list