<div dir="ltr"><div><div><div><div>Sorry for the delay. I have these in the interfaces:<br>.....<br><b><i>auto mvlan0<br>iface mvlan0 inet dhcp<br> # as eth0 and macvlan0 are on the same LAN, we must drop default route and LAN route<br> # from eth0 configuration to avoid conflicts (this just slooooow down things).<br> pre-up route del default<br> # NOTE: adapt this line to your LAN address and netmask <br> pre-up route del -net 192.168.1.0 netmask 255.255.255.0<br> pre-up ip link add link eth0 name mvlan0 type macvlan mode bridge<br></i></b><br></div>I've copied from these blog: <a href="http://noyaudolive.net/2012/05/09/lxc-and-macvlan-host-to-guest-connection/#comments">http://noyaudolive.net/2012/05/09/lxc-and-macvlan-host-to-guest-connection/#comments</a><br><br></div>Everything works ok but I see that after some time stops working.<br></div>There is some way better? <br></div>thanks and sorry for my english!<br><div><div><div><div><div><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-12-20 12:06 GMT+01:00 Fajar A. Nugraha <span dir="ltr"><<a href="mailto:list@fajar.net" target="_blank">list@fajar.net</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Tue, Dec 20, 2016 at 5:48 PM, Mateusz Korniak <span dir="ltr"><<a href="mailto:mateusz-lists@ant.gliwice.pl" target="_blank">mateusz-lists@ant.gliwice.pl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="m_-7585987041392203013gmail-">On Tuesday 20 of December 2016 17:04:08 Fajar A. Nugraha wrote:<br>
> What I did in my host, is create a macvlan interface for the host, and move<br>
> host's eth0 IP address there.<br>
><br>
</span>> (...)<br>
<span class="m_-7585987041392203013gmail-">> ### from "lxc config show container_name"<br>
> devices:<br>
> eth0:<br>
> name: eth0<br>
> nictype: macvlan<br>
> parent: eth0<br>
> type: nic<br>
><br>
><br>
> So I use host eth0 (now without IP, as its ip is moved to v-0, which is a<br>
> macvlan interface) as "parent" in lxd (this should be "lxc.network.link" in<br>
> lxc). If you have problems with flockport's guide, try my setup.<br>
<br>
</span>Are you able to set MAC address for lxc container?<br>
</blockquote><div><br></div></span><div>Yes. It's whatever value on "volatile.eth0.hwaddr" on "lxc config show container_name" (again, I'm using lxd)</div><span class=""><div><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">How do you setup IP# for container?<br>
<br></blockquote><div><br></div><div><br></div></span><div>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.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-- </div><div>Fajar</div></font></span></div></div></div>
<br>______________________________<wbr>_________________<br>
lxc-users mailing list<br>
<a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.<wbr>linuxcontainers.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" rel="noreferrer" target="_blank">http://lists.linuxcontainers.<wbr>org/listinfo/lxc-users</a><br></blockquote></div><br></div></div>