[Lxc-users] container not pinging default gw

Nirmal Guhan vavatutu at gmail.com
Thu Nov 4 16:26:14 UTC 2010


On Thu, Nov 4, 2010 at 2:31 AM, Daniel Lezcano <daniel.lezcano at free.fr> wrote:
> On 11/04/2010 01:28 AM, Nirmal Guhan wrote:
>>
>> On Tue, Nov 2, 2010 at 6:05 PM, Nirmal Guhan<vavatutu at gmail.com>  wrote:
>>
>>>
>>> What could be the reason for container not able to ping the default gw
>>> while host can do? I use macvlan instead of bridge. Do I need to
>>> configure something in the host?
>>>
>>> -Nirmal
>>>
>>>
>>
>> Just realized my gw is actually a private IP (vmnet). While host can
>> ping it, am not able to do from within container. Is this something
>> that anyone has faced before?
>>
>
> You can ping the addresses between macvlan only if you set the network with:
>
> lxc.network.macvlan.mode=bridge
>
> and you set your gateway address on a macvlan on the host.
>

Thanks. Is this supposed to work in 2.6.32 ? It didn't work for me.

I tried these :

ip link add link eth0 name myvmnet address 00:aa:bb:cc:dd:ee type
macvlan mode bridge
ifconfig myvmnet gwaddr up

and then in my lxc config

lxc.network.type = macvlan
lxc.network.macvlan.mode = bridge
lxc.network.link = myvmnet
lxc.network.ipv4 = x.y.z.p/24
lxc.network.name = eth0
lxc.network.flags = up
lxc.network.mtu = 1500

I still can't ping the gwaddr from container. Also after a while my
host hung as my root is at a nfs location. Not sure if these are
related.

-Nirmal




More information about the lxc-users mailing list