brctl: network bridges

# create bridge
brctl addbr br0
ifconfig eth0 0.0.0.0
 
brctl delif lxcbr0 eth0
brctl addif br0 eth0
dhclient br0
 
# move VM to other bridge
for IF in $(brctl show | grep veth | sed 's/^[ \t]*//'); do
    brctl delif lxcbr0 ${IF}
    brctl addif br0 ${IF}
done
 
 
# connect two bridges?
ip link add veth0 type veth peer name veth1
ifconfig veth0 up
ifconfig veth1 up
 
brctl delif br0 veth0
brctl delif lxcbr0 veth1
 
 
# renew ip in VM
lxc-attach -n vm1 -- dhclient
 
 
# /etc/network/interfaces
auto eth0
iface eth0 inet manual
 
auto br0
iface br0 inet dhcp
    bridge_ports eth0