I have a server running Ubuntu 14 (server edition), connected to a network using two network adapters. These two network adapters are configured in a bond to have network redundancy (in case one of them breaks down). This server has a static IP address configured
On this server, I installed LXC and created a new container. I want to connect this container directly to the network as well, so I created a bridge.
This is the network configuration (/etc/network/interfaces) on my host server:
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto p2p3 iface p2p3 inet manual bond-master bond0 auto p2p4 iface p2p4 inet manual bond-master bond0 # Set up a bonding NIC auto bond0 iface bond0 inet manual bond-mode active-backup bond-miimon 100 bond-slaves p2p3 p2p4 # Set up bridge auto br0 iface br0 inet static address 18.104.22.168 gateway 22.214.171.124 netmask 255.255.255.0 dns-nameservers 126.96.36.199 188.8.131.52 bridge-ports bond0 up ip route add 192.168.105.0/24 via 184.108.40.206
And this is the container configuration:
lxc.include = /usr/share/lxc/config/ubuntu.common.conf lxc.rootfs = /var/lib/lxc/mailman/rootfs lxc.mount = /var/lib/lxc/mailman/fstab lxc.utsname = mailman lxc.arch = amd64 lxc.network.type = veth lxc.network.flags = up lxc.network.link = br0 lxc.network.hwaddr = 12:ae:9a:12:ac:32 lxc.start.auto = 0 lxc.loglevel = 0 lxc.network.ipv4 = 220.127.116.11 lxc.network.ipv4.gateway = 18.104.22.168
And the network configuration of the container (/etc/network/interfaces):
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp
There seems to be something wrong with my configuration, because the network only works on the host machine (and doesn't on the container). Can anyone put me in the right direction here? Thanks!