[Lxc-users] network problem with lxc

Stéphane Graber stgraber at ubuntu.com
Tue Aug 23 03:25:19 UTC 2011


On 08/22/2011 11:13 PM, Canhua wrote:
> hi, one additional info: I use lxc on a vmware virtual machine. And I
> suspect that veth* virtual interface should be assigned mac address
> with vmware's mac prefix (00:50:56:*). But I don't know how to
> manually set mac address of the veth* interface.
>
> On Mon, Aug 22, 2011 at 10:55 PM, Canhua<dreameration at gmail.com>  wrote:
>> hi
>>
>> I have a network problem with lxc. I use bridge and veth for the
>> network setup. Now I can connect to the containers from host system,
>> but can't from network outside. My various interfaces are as shown in
>> pastebin: http://pastebin.com/RqtyitG6. In those interfaces, eth1 is
>> irrelavant, and eth0 is the bridged physical interfaces, and those two
>> veth* are interface of two container.
>>
>> Any suggestions?
>>
>> Thank you.
>>
>> Best regards.


Hi,

Unfortunately VMWare doesn't allow multiple MAC addresses to come out of 
one virtual network card. This is a problem for anyone doing briding 
within a virtual machine.

Some tricks exist to reconfigure the vswitch to allow multiple mac 
addresses though last I checked it involved making it a hub which is far 
from desirable in most cases.

The two other way around the limitation that I know of are:
  1) Route a subnet to your VM and then re-distribute these for your 
containers
  2) Add one virtual network card to your VM for each container you want 
to have inside it. Then directly assign each of these network interfaces 
to a container using the "phys" network type in lxc.

Hope it helps!

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com




More information about the lxc-users mailing list