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

Arun M arunmahadevaiyer at gmail.com
Thu Mar 29 19:30:16 UTC 2012


Hello,

I have a set up where there are multiple short lived containers (sharing
the same IP address) in a host.

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).

The containers use veth type interface via a bridge device in the physical
host with dynamic ethernet addresses. The containers also have a gateway
configured.

tcpdump shows that the ethernet address in the TCP SYN+ACK reply does not
match with the source ethernet address (auto generated address of the veth
device inside the container) that was sent in the initial TCP SYN request.

This connection then times out and then a second attempt is made to connect
to the external host which succeeds.

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?

Are there any work arounds for this?

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

Will multiple containers having same IP and ethernet address work? In that
case how will the packets be routed to the correct container? Will bridge
device take care of this?

Thanks,
Arun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20120330/2f3c0b5f/attachment.html>


More information about the lxc-users mailing list