<div dir="ltr">Hi,<div><br></div><div>is it possible to use network type macvlan on tagged VLANs?</div><div><br></div><div>I tried it like this:</div><div><br></div><div>ubuntu host configuration:</div><div><br></div><div>
<div>auto lo</div><div>iface lo inet loopback</div><div><br></div><div>auto p3p3</div><div>iface p3p3 inet static</div><div> address 192.168.222.11</div><div> netmask 255.255.255.0</div><div> gateway 192.168.222.1</div><div>
 dns-nameservers 2xx.xxx.xxx.xxx 2xx.xxx.xxx.xxx</div><div> dns-search <a href="http://example.com">example.com</a></div><div><br></div><div>auto em3<br></div><div>iface em3 inet manual</div><div><br></div><div>auto em1</div>
<div>iface em1 inet manual</div><div> bond-master bond0</div><div><br></div><div>auto p3p1</div><div>iface p3p1 inet manual</div><div> bond-master bond0</div><div> </div><div>auto bond0</div><div>iface bond0 inet manual</div>
<div> bond-slaves none</div><div> bond-mode 4</div><div> bond-miimon 100</div><div> bond-updelay 200</div><div> bond-downdelay 200</div><div> bond-lacp-rate 1</div><div><br></div><div>auto em2</div><div>iface em2 inet manual</div>
<div> bond-master bond1</div><div><br></div><div>auto p3p2</div><div>iface p3p2 inet manual</div><div> bond-master bond1</div><div><br></div><div>auto bond1</div><div>iface bond1 inet manual</div><div> bond-slaves none</div>
<div> bond-mode 4</div><div> bond-miimon 100</div><div> bond-updelay 200</div><div> bond-downdelay 200</div><div> bond-lacp-rate 1</div><div><br></div><div>auto bond0.2065</div><div>iface bond0.2065 inet manual</div><div>
<br></div><div>auto bond0.2067<br></div><div>iface bond0.2067 inet manual</div><div><br></div><div>auto bond1.2066<br></div><div>iface bond1.2066 inet manual</div><div><br></div><div>auto bond1.2068</div><div>iface bond1.2068 inet manual</div>
<div><br></div><div><br></div></div><div>We have got two network trunk with four VLANs tagged on them. This is to seperate production from testing environment and frontend from backend. With macvlan is should be possible two have different containers on the same iface device communicating with each oder (mode bridge). But it did not work:</div>
<div><br></div><div>Container configuration:</div><div><br></div><div><div>lxc.network.type = macvlan</div><div>lxc.network.macvlan.mode = bridge</div><div>lxc.network.link = bond0.2065</div><div>lxc.network.flags = up</div>
<div><a href="http://lxc.network.name">lxc.network.name</a> = front</div><div>lxc.network.hwaddr = 00:16:3f:1c:59:20</div><div>lxc.network.type = macvlan</div><div>lxc.network.macvlan.mode = bridge</div><div>lxc.network.link = bond1.2066</div>
<div>lxc.network.flags = up</div><div><a href="http://lxc.network.name">lxc.network.name</a> = back</div><div>lxc.network.hwaddr = 00:16:3b:62:dd:76</div></div><div><br></div><div>Container interfaces:</div><div><br></div>
<div><div>auto lo</div><div>iface lo inet loopback</div><div><br></div><div>auto front</div><div>iface front inet static</div><div>        address 192.168.219.17</div><div>        netmask 255.255.255.0</div><div>        gateway 192.168.219.1</div>
<div><span class="" style="white-space:pre">    </span>up route add -net <a href="http://192.168.252.0/23">192.168.252.0/23</a> gw 192.168.219.254</div><div><span class="" style="white-space:pre">  </span>up route add -net <a href="http://212.71.112.120/29">212.71.112.120/29</a> gw 192.168.219.254</div>
<div><span class="" style="white-space:pre">    </span>post-up ping -c3 192.168.219.254</div><div><br></div><div>auto back</div><div>iface back inet static</div><div>        address 10.168.219.17</div><div>        netmask 255.255.255.0</div>
</div><div><br></div><div><br></div><div>side question: the "post-up ping -c3 192.168.219.254" I used to work around the fact that a fresh container was not "pingable" after it was started... any other solution for that?</div>
<div><br></div><div><br></div><div>The container does start up without any problem but communication from other hosts in those vlans is not possible and also from one container to another it is not possible.</div><div><br>
</div><div>Should tagged VLANs work with macvlan?</div><div><br></div><div>veth did work fine but macvlan should be more secure and even faster?</div><div><br></div><div>Regards,</div><div>flo</div><div><br></div></div>