[lxc-users] Networking in Ubuntu with 2 ip failover in LXC
Fajar A. Nugraha
list at fajar.net
Wed Aug 13 15:24:02 UTC 2014
On Wed, Aug 13, 2014 at 10:08 PM, m.byryn1u <m.bryn1u at gmail.com> wrote:
>
> 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.
Then ask OVH how to use that IP.
> 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 ?
If my guess is right, it's similar to serverloft. They will say
"simply put it as an IP alias/additional IP on your server".
As in, the additional IP is routed to ONE of your server's IP.
Permanently. Can't be used on other server. Thus, there can be NO
failover.
It's not a standard failover setup where two or more physical servers
each have an IP in the same network segment, and you can have one or
more virtual IP for your services that can fail over to any of the
servers.
--
Fajar
More information about the lxc-users
mailing list