Bridge-Utils for LXC
Bridging Network Connections Install
apt-get install bridge-utils
Start the bridge:
brctl addbr br0
Edit: /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback
# Bridge between eth0 and eth1
auto br0
# DHCP would look like this but we will use static
# iface br0 inet dhcp
iface br0 inet static
address 192.168.1.100
network 192.168.1.0
gateway 192.168.1.1
broadcast 192.168.1.255
netmask 255.255.255.0
dns-nameservers 192.168.1.1
#dns-search example.com pre-up ip link set eth0 down
pre-up ip link set eth1 down
pre-up brctl addbr br0
pre-up brctl addif br0 eth0 eth1
pre-up ip addr flush dev eth0
pre-up ip addr flush dev eth1
post-down ip link set eth0 down
post-down ip link set eth1 down
post-down ip link set br0 down
post-down brctl delif br0 eth0 eth1
post-down brctl delbr br0
Restart network: