Redes con contenedores lxc con problemas de doble puente dhcp local e ipv6 externo

Redes con contenedores lxc con problemas de doble puente dhcp local e ipv6 externo

Quiero usar ipv6 externo en todos mis contenedores e ipv4 externo solo en los hosts. Estoy usando Ubuntu 12.04 de 64 bits. Para ipv4 en el contenedor utilizo el DHCP que vino con la instalación de lxc.

Hice funcionar la configuración, pero no estoy seguro de que sea correcta. ¿Podrían ustedes arrojar algo de luz sobre esto?

En mi host contenedor uso:

 auto lo
 iface lo inet loopback
    address 127.0.0.1
    netmask 255.0.0.0

 auto eth0
 iface eth0 inet manual

 auto br-lxc
 iface br-lxc inet static
    address ipv4
    netmask 255.255.255.0
    gateway ipv4 gw
    bridge_ports eth0

 iface br-lxc inet6 static
    address exte:rnal::ipv6
    netmask 48
    gateway exte:rnal:ipv6:gw

En la configuración de mi contenedor:

 lxc.network.type= veth
 lxc.network.flags= up
 lxc.network.link= br-lxc
 lxc.network.hwaddr= random-mac
 lxc.network.name = eth0

 lxc.network.type=veth
 lxc.network.link=br-lxc-1 
 lxc.network.flags=up
 lxc.network.hwaddr= random-mac
 lxc.network.name = eth1

Y en mis contenedores utilizo:

 auto lo
 iface lo inet loopback

 auto eth0
 iface eth0 inet6 static
    address ipv6
    netmask 48
    gateway ipv6 gw

 auto eth1
 iface eth1 inet dhcp

Y me meto en el contenedor:

 $ip a|grep inet
    inet6 externalipv6:33/48 scope global
    inet6 internalipv6::78/64 scope link
    inet 10.0.3.52/24 brd 10.0.3.255 scope global eth1
    inet6 internalipv6::28/64 scope link
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
  • ¿Es esto correcto?
  • ¿Existe una mejor manera de conectar ipv6 con los contenedores?

Cuando necesito reiniciar la red me sale:

$ /etc/init.d/networking restart

* Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
* Reconfiguring network interfaces...   

Device "br-lxc" does not exist.

información relacionada