[lxc-users] LXD containers with dual nic

Giuseppe gcesab at gmail.com
Sun Jul 10 09:38:58 UTC 2016


Hi all,
I'm trying to configure a LXD container with two nics but the second one
cannot reach the external network. Here is my config:

/etc/network/interfaces


auto ens160
iface ens160 inet manual


auto br0
iface br0 inet static
address 192.168.1.103
netmask 255.255.255.0
gateway 192.168.1.1
bridge-ifaces ens160
bridge-ports ens160
up ifconfig ens160 up


auto ens192
iface ens192 inet manual


auto br1
iface br1 inet static
address 10.10.0.103
netmask 255.255.255.0
bridge-ifaces ens192
bridge-ports ens192
bridge-stp on
up ifconfig ens192 up

Default profile is:

devices:
eth0:
name: eth0
nictype: bridged
parent: br0
type: nic
eth1:
name: eth1
nictype: bridged
parent: br1
type: nic

Both IP addresses are statically configured in the container, the first in
the 192.168.1.0 subnet and the second in the 10.10.0.0 subnet. The first nic
works well, I can ssh from external network. The second one can ping only
the LXD host address and viceversa. The LXD host address can ping everyone
on the 10.10.0.0 network.

What's wrong in my config? Any suggestion?



More information about the lxc-users mailing list