[Lxc-users] lxc container messing with hosts networking
arkaitzj at gmail.com
arkaitzj at gmail.com
Sat May 14 10:41:25 UTC 2011
On Sat, May 14, 2011 at 1:34 AM, Serge Hallyn <serge.hallyn at canonical.com>wrote:
> Immediately I assume that your problem is that the mac addresses
> assigned to your containers are lower than that of the bridge. The
> bridge always takes on the lowest mac of any of its nics, so it'll
> change its mac address, which will temporarily drop the host's
> network connection if it's also part of that bridge.
>
> If I'm not mistaken you can specify a macaddr for your container
> using
>
> lxc.network.hwaddr=$x
>
> where x is a mac address - just make sure it's higher than the
> host's.
>
Your diagnosis looks right to me, all the symptoms match with a mac addr
change, and I've seen the br0 mac address change between the 2 ifaces on
some tests.
However, forcing kvm to assign the host a macaddr of 00:... and even seting
that ip to the bridge in the hosts network/interfaces did not seem to solve
the problem, I haven't seen the bridge changing mac addr anymore, but the
20-30 second hang is still there, so I don't know what to think, I've find
few webs in the internet detailing the problem and solving it like that, but
apparently it does not work for me.
So, with a bridge with the lower macaddr I still experiment network hangs
when starting containers, and even worse, when using the network from the
container it hangs as well with a simple "apt-get update" on my ssh link
laptop->host->guest.
Somehow each time the container uses the network the host networking hangs,
I suspect the guest has no problem with it though I can't see it because my
ssh connection goes through the host and hangs there.
Apart from that, I discovered that lxc.network.hwaddr= sets the internal
macaddr of the container, but not the in-host generated interface that gets
added to the bridge.
Thanks
Arkaitz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20110514/e7a94c11/attachment.html>
More information about the lxc-users
mailing list