Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to use both ipv6 externally on all my containers, and ipv4 external only on the hosts. I am using Ubuntu 12.04 64bit. For ipv4 on the container I use the DHCP that came with the lxc installation.

I got the setup working, but I'm not sure this is correct. Could you guys shed some light on it?

On my container host I use:

 auto lo
 iface lo inet loopback

 auto eth0
 iface eth0 inet manual

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

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

In my container configuration: veth up br-lxc random-mac = eth0 random-mac = eth1

And in my container(s) I use:

 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

And I get in the container:

 $ip a|grep inet
    inet6 externalipv6:33/48 scope global
    inet6 internalipv6::78/64 scope link
    inet brd scope global eth1
    inet6 internalipv6::28/64 scope link
    inet scope host lo
    inet6 ::1/128 scope host
  • Is this correct?
  • Is there a better way to bridge the ipv6 to the containers?

When I need to restart the network I get:

$ /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.
share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.