On Tue, Nov 11, 2014 at 4:02 PM, Moritz Kobel <mailingli...@kobelnet.ch>
wrote:

> Hello,
>
> I would like to configure several IPv4 and IPv6 adresses for one
> container. This works basically with the configuration below.
> But it configures only one network interface (eth0) with all addresses.
> (One primary and the others as seconday).
>
>
> What do I have to modify to get several interfaces (eth0,eth0:0,eth0:1,..
> or eth0,eth1,eth2,...)?
>
>
> lxc.network.type = veth
> lxc.network.flags = up
> lxc.network.link = br0
> lxc.network.hwaddr = <REMOVED>
>


Delete everything from here ...


> lxc.network.ipv4.gateway = <REMOVED>
> lxc.network.ipv6.gateway = <REMOVED>
> lxc.network.name = eth0
> lxc.network.ipv4 = <REMOVED>.106/27
> lxc.network.ipv6 = <REMOVED>:106/64
> lxc.network.ipv4 = <REMOVED>.108/27
> lxc.network.ipv6 = <REMOVED>:108/64
> lxc.network.ipv4 = <REMOVED>.109/27
> lxc.network.ipv6 = <REMOVED>:109/64
>

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.


If you instead want eth0, eth1, eth2, etc, then repeat the network block
block several times, e.g.

lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.hwaddr = <MAC1>

lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.hwaddr = <MAC2>

-- 
Fajar
_______________________________________________
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to