[Lxc-users] two NICs in container

Daniel Lezcano daniel.lezcano at free.fr
Wed Jun 1 06:23:48 UTC 2011


On 06/01/2011 07:26 AM, Mihamina Rakotomandimby wrote:
> Hi all,
>
> When I create a container, I usually created it with only one NIC:
>    [...]
>    lxc.network.type = veth
>    lxc.network.flags = up
>    lxc.network.link = br0
>    lxc.network.ipv4 = 41.204.96.2/28
>    lxc.network.name = eth0
>    [...]
>
> Now I want to create a container with 2 NICs
> On the host I have another bridge "br1", and I wan the 2nd container
> interface to be "eth1"
>
> How to?

lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.ipv4 = 41.204.96.2/28
lxc.network.name = eth0
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br1
lxc.network.ipv4 = myip/28
lxc.network.name = eth1

Alternatively you can get ride of the virtual interface name because 
they automatically assigned.

lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.ipv4 = 41.204.96.2/28
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br1
lxc.network.ipv4 = myip/28







More information about the lxc-users mailing list