[Lxc-users] Networking Qs

Nirmal Guhan vavatutu at gmail.com
Fri Jun 18 20:34:58 UTC 2010


On Fri, Jun 18, 2010 at 9:39 AM, Daniel Lezcano <daniel.lezcano at free.fr> wrote:
> On 06/17/2010 06:49 PM, Nirmal Guhan wrote:
>>
>> Hi,
>>
>> Any reason why we require bridging in the host for lxc ? Am not able to
>> setup IP address for the container unless I configure bridge in the host.
>>
>
> You can use the macvlan but the container <--> host communication won't
> work.

Not sure what am doing wrong but container <--> gateway too does not
work with macvlan. If I change it back to veth and bridge it works
fine. So just wondering what is the point of configuring macvlan? Am I
missing anything?

>
>> Also couple of other questions :
>> 1. Can I configure container and host be in different networks / subnets
>> (assuming I have multiple interfaces) ? I can't try this yet as I just
>> have
>> one interface.
>> 2. Does container and host use different routing tables / VRFs ?
>>
>
> Yes, the virtualization begins at the network layer 2 and a virtual
> interface is created for the container.
> Look at the lxc.conf man page and the doc/examples configuration files.
>
> A quick start:
>
> lxc-execute -n foo -s lxc.network.type=macvlan -s lxc.network.link=eth0 -s
> lxc.network.flags=up -s lxc.network.ipv4=1.2.3.4 -- /bin/bash
>
>




More information about the lxc-users mailing list