[lxc-users] no ping between host and lxc container
mmm286 at gmail.com
Tue Dec 20 12:49:32 UTC 2016
Sorry for the delay. I have these in the interfaces:
*auto mvlan0iface mvlan0 inet dhcp # as eth0 and macvlan0 are on the
same LAN, we must drop default route and LAN route # from eth0
configuration to avoid conflicts (this just slooooow down things).
pre-up route del default # NOTE: adapt this line to your LAN address and
netmask pre-up route del -net 192.168.1.0 netmask 255.255.255.0
pre-up ip link add link eth0 name mvlan0 type macvlan mode bridge*
I've copied from these blog:
Everything works ok but I see that after some time stops working.
There is some way better?
thanks and sorry for my english!
2016-12-20 12:06 GMT+01:00 Fajar A. Nugraha <list at fajar.net>:
> On Tue, Dec 20, 2016 at 5:48 PM, Mateusz Korniak <
> mateusz-lists at ant.gliwice.pl> wrote:
>> On Tuesday 20 of December 2016 17:04:08 Fajar A. Nugraha wrote:
>> > What I did in my host, is create a macvlan interface for the host, and
>> > host's eth0 IP address there.
>> > (...)
>> > ### from "lxc config show container_name"
>> > devices:
>> > eth0:
>> > name: eth0
>> > nictype: macvlan
>> > parent: eth0
>> > type: nic
>> > So I use host eth0 (now without IP, as its ip is moved to v-0, which is
>> > macvlan interface) as "parent" in lxd (this should be
>> "lxc.network.link" in
>> > lxc). If you have problems with flockport's guide, try my setup.
>> Are you able to set MAC address for lxc container?
> Yes. It's whatever value on "volatile.eth0.hwaddr" on "lxc config show
> container_name" (again, I'm using lxd)
>> How do you setup IP# for container?
> On the container's rootfs (e.g. /etc/network/interfaces inside the
> container). Basically this is a bridged setup, by default there's no way to
> set (and restrict) IP address from the host side.
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the lxc-users