On Wed, May 21, 2014 at 9:19 PM, Marc MAURICE <marc.maur...@objectif-libre.com> wrote: > >>> I finally made it work with veth mode, and a bridge on the host, but it's >>> frustrating. >>> And I have to manually generate and allow all mac adresses (required by >>> my >>> server hoster). >> >> >> I'd just comment on this one first. >> >> What is your hoster like? Is it like serverloft where you can buy >> additional IPs (one IP, /32 each) and the hoster would route the >> additional IPs thru the server's primary IP? > > It's Online.net (french) > I think it's exactly the way you describe. > > >> >> If yes, then you can use a custom veth + bridge + routed mode where >> the hoster's switch/router will only see one MAC. >> > That would work I think. Do you have some doc/exemple on that ?
I use ubuntu precise on both server and container. On the server: ### snippet of /etc/network/interface ### auto br0 iface br0 inet static address 192.168.124.1 netmask 255.255.255.0 bridge_ports none bridge_maxwait 0 bridge_stp off bridge_fd 0 up ip route add PUBLIC_IP_OF_CONTAINER/32 dev br0 || true ### ... and make sure /proc/sys/net/ipv4/ip_forward is 1 (lxc-net ubuntu package should already set that) ### snippet of container config ### # Network configuration lxc.network.type = veth lxc.network.flags = up lxc.network.link = br0 lxc.network.hwaddr = 00:16:3E:D8:FF:13 lxc.network.veth.pair=veth-CONT1-0 ### on the container: ### auto eth0 iface eth0 inet static address PUBLIC_IP_OF_CONTAINER netmask 255.255.255.255 up ip route add 192.168.124.1 dev eth0 up ip route add default via 192.168.124.1 ### -- Fajar _______________________________________________ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users