[Lxc-users] Multiple lxc containers with same IP/ethernet address

Fajar A. Nugraha list at fajar.net
Fri Mar 30 03:35:49 UTC 2012


On Fri, Mar 30, 2012 at 2:30 AM, Arun M <arunmahadevaiyer at gmail.com> wrote:
> Hello,
>
> I have a set up where there are multiple short lived containers (sharing the
> same IP address) in a host.

Why? Don't do that.

>
> When a TCP connection is established from the container to an outside host
> (in a different network in the LAN), the connection establishment takes a
> long time (around 3 secs).

> I am suspecting that since multiple containers have different (generated)
> ethernet addresses, the initial reply contains the eth address of once of
> the previous containers that established connection. (some kind of arp
> caching). Is this possible?

exactly.

>
> Are there any work arounds for this?

Depends on what you need.

If you simply want some kind of load-balancing setup, try
http://www.linuxvirtualserver.org/
The documentation is somewhat old, but AFAIK the required kernel
support should be in the kernel already.

>
> One option I am considering is to specify a fixed hwaddr via the conf.

That is always necessary no matter which approach you take.

>
> Will multiple containers having same IP and ethernet address work?

No

> In that
> case how will the packets be routed to the correct container?

It won't.

> Will bridge
> device take care of this?

No.

-- 
Fajar




More information about the lxc-users mailing list