W dniu 2014-08-13 17:24, Fajar A. Nugraha pisze:
On Wed, Aug 13, 2014 at 10:08 PM, m.byryn1u <m.bry...@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 <tom...@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.

I had a server on FreeBSD-10 before and i had 2 jails with 1 failover ip per jail, work well.
OVH says :

post-up /sbin/ifconfig eth0:X IP.FAIL.OVER netmask 255.255.255.255 broadcast IP.FAIL.OVER
post-down /sbin/ifconfig eth0:X down

Or as bridge:


/etc/network/interfaces
auto lo eth0
iface lo inet loopback
iface eth0 inet static
addressIP.FAIL.OVER
netmask 255.255.255.255
broadcastIP.FAIL.OVER
post-up route addIP..SERWERA.254dev eth0
post-up route add default gwIP.SERWERA.254
post-down route delIP..SERWERA.254dev eth0
post-down route del default gwIP.SERWERA.254

That's why i think that method 2 post befor should works.
_______________________________________________
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to