[lxc-devel] can LXC works with ip alias?

Daniel Lezcano daniel.lezcano at free.fr
Sun Feb 5 22:12:57 UTC 2012


On 01/30/2012 03:29 AM, MaoXiaoyun wrote:
> Hi:
>
>     Recently we are planning to set up a cluster by using LXC.  But one problem we facing is
> it would be to much MAC address.
>
>     Here is the detail. We plan 1000 lXC in one physical linux server, so there will be 1000 MAC
> address,  suppose we have 100 servers, so total will have 1000 * 100 MAC address, far over the
> capbility of our switch(Currently our network is big second layer, all MAC addresses are recoreded
> in core switch).
>
>    If one server's all container share the same MAC address, but different IP address, much like
> "linux ip alias". There will be only 100 MAC existed.
>
>   So my question is : is it possilbe to have LXC work with ip alias device?

Unfortunately, it is not supported by the kernel and was a big 
discussion when the network namespace was implemented. Finally the 
decision was to act the layer 2 for the virtualization.

Maybe, the macvlan virtual network driver could be enhanced to accept 
the same mac address as the link if the macvlan port belongs to another 
network namespace and then forwards the packets to all the macvlan ports 
like multicasting.

>   Or any other suggestiones to solve the problem above.

Yes, may be you can use the host as a gateway for the containers.





More information about the lxc-devel mailing list