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: http://noyaudolive.net/2012/05/09/lxc-and-macvlan-host-to-guest-connection/#comments 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 <l...@fajar.net>: > On Tue, Dec 20, 2016 at 5:48 PM, Mateusz Korniak < > mateusz-li...@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 >> move >> > 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 >> a >> > 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. > > -- > Fajar > > _______________________________________________ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users >
_______________________________________________ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users