[lxc-devel] how to specify the network peer name throughlxc-veth.conf

Daniel Lezcano dlezcano at fr.ibm.com
Tue May 12 20:44:13 UTC 2009


nisha kannoth wrote:
> Hi 
> 
> I am using lxc-0.6.1 for my project.
>  
>   Is there a option in lxc-veth.conf to specify the  network peer name like the following command:
>     ip link add name FOO type veth peer name BAR
> if there no option fort that in the lxc-veth.conf is there any patch available for specifying the network peer name.

Hi Nisha,

To avoid confusion let's use the name vethA and vethB:
  * vethA is outside of the container
  * vethB is inside the container.

Do you really need to specify the veth name for both side ?

lxc guarantees you will have a unique veth name for vethA, ensuring 
there will be no name conflict in case you launch several containers.

For the name of the interface of vethB, you can specify it in the 
configuration file by adding:

lxc.network.name = myname

'myname' could be whatever you want, except 'lo' :)


Thanks
   -- Daniel

ps : lxc-0.6.2 is out ;)





More information about the lxc-devel mailing list