[Lxc-users] Networking Qs

Daniel Lezcano daniel.lezcano at free.fr
Fri Jun 18 16:39:13 UTC 2010


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.

> 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