<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Nov 11, 2014 at 4:02 PM, Moritz Kobel <span dir="ltr"><<a href="mailto:mailinglists@kobelnet.ch" target="_blank">mailinglists@kobelnet.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hello,<br>
<br>
I would like to configure several IPv4 and IPv6 adresses for one<br>
container. This works basically with the configuration below.<br>
But it configures only one network interface (eth0) with all addresses.<br>
(One primary and the others as seconday).<br>
<br>
<br>
What do I have to modify to get several interfaces (eth0,eth0:0,eth0:1,..<br>
or eth0,eth1,eth2,...)?<br>
<br>
<br>
lxc.network.type = veth<br>
lxc.network.flags = up<br>
lxc.network.link = br0<br>
lxc.network.hwaddr = <REMOVED><br>
</blockquote><div><br></div><div><br></div><div>Delete everything from here ...</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">lxc.network.ipv4.gateway = <REMOVED><br>
lxc.network.ipv6.gateway = <REMOVED><br>
<a href="http://lxc.network.name" target="_blank">lxc.network.name</a> = eth0<br>
lxc.network.ipv4 = <REMOVED>.106/27<br>
lxc.network.ipv6 = <REMOVED>:106/64<br>
lxc.network.ipv4 = <REMOVED>.108/27<br>
lxc.network.ipv6 = <REMOVED>:108/64<br>
lxc.network.ipv4 = <REMOVED>.109/27<br>
lxc.network.ipv6 = <REMOVED>:109/64<br></blockquote><div><br></div><div>to here, and instead setup your IP addresses from the container OS configuration script (e.g. /etc/network/interfaces, /etc/sysconfig/network-scripts/ifcfg-eth*). That should give only one interface, and you can configure eth0:1, eth0:2, etc from inside the container.</div><div><br></div><div><br></div><div>If you instead want eth0, eth1, eth2, etc, then repeat the network block block several times, e.g.</div><div><br></div><div>lxc.network.type = veth</div><div>lxc.network.flags = up</div><div>lxc.network.link = br0</div><div>lxc.network.hwaddr = <MAC1><br></div><div><br></div><div><div>lxc.network.type = veth</div><div>lxc.network.flags = up</div><div>lxc.network.link = br0</div><div>lxc.network.hwaddr = <MAC2><br></div></div><div><br></div><div>-- </div><div>Fajar</div></div></div></div>