I'm exploring the LXC features in Ubuntu 12.04 and I really want to set up a network like this:
client1: 192.168.56.101/24 lxc-host: 192.168.56.102/24 guest1 192.168.56.201/24 guest2 192.168.56.202/24 guest3 184.108.40.206/24
I just want a "flat" network where the guests have full access to the LAN and are visible from the clients. I'm used to bridged networking with libvirt/KVM, as described here: http://libvirt.org/formatdomain.html#elementsNICSBridge
On the host:
# /etc/network/interfaces auto br0 iface br0 inet static address 192.168.56.102 netmask 255.255.255.0 broadcast 192.168.56.255 bridge_ports eth1
lxc.conf for the first guest:
# /var/lib/lxc/guest1/config: lxc.network.type=veth lxc.network.link=br0 lxc.network.flags=up lxc.network.hwaddr=00:16:3e:13:48:4e lxc.network.ipv4=192.168.56.201/24
It looks like 192.168.56.201 is invisible to the outside world, which isn't what I want. Seems like I have to do one of these things:
1) Manually set up routing on the host and guest
2) Do something hokey...create virtual interfaces on the host ahead of time, and configure the guests to use them
lxc.network.type=phys. I don't know if that would actually work.
I'm focused on Ubuntu, but answers for RHEL/Fedora would be useful too....