I have a ipv6 tunnel interface, that is using my network connection on eth0. when I turn on my system something messes up the things and I have no ipv6 connectivity.

The system is Ubuntu 14.04 server

this is what happens:

  • bootup
  • eth0 goes up, then search for DHCP (not a parameter that I can control, amazon uses DHCP)
  • ipv6 interface goes up but cannot setup the tunnel correctly because eth0 isn't fully up (I suppose).
  • eth0 does not have the ipv6 address assigned and find no ipv6 route
  • nginx search to allocate ipv6 address to the first site and fail, exiting.

So I have to login, delete all the routes and bring up the interfaces in the correct order with:

  • ifup eth0
  • ifup he-ipv6
  • service nginx restart

this is my /network/interfaces file

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto he-ipv6
iface he-ipv6 inet6 v4tunnel
    address 2001:470:1f0a:******
    netmask 64
    endpoint 216.66.*****
    local 172.********
    up ip -6 route add default dev he-ipv6
    down ip -6 route del default dev he-ipv6
    post-up ifconfig eth0 inet6 add 2001:470:*******

How can I configure the system to achieve ipv6 connectivity without manual intervention?

Thank you in advance!

1 Answer 1


The proper thing to do would be to make the he-ipv6 interface depend on a working eth0 interface. Unfortunately, you can't express such dependencies in the interfaces file.

A simple hack could be to add a line pre-up sleep 5 or some such to the he-ipv6 stanza. It's a bit ugly, but it should normally work, depending on how long it takes for your DHCP client to do its thing. Alternatively, you could write a tool that watches netlink and only returns when there is a working v4 route, and call that from pre-up. This would be a bit more reliable, but you'd have more work to do.

  • You are right, i cannot set to manual to he-ipv6 because the iface line is full (and this is a limitation of interfaces syntax). The sleep step is good, I'll test it! Thank you
    – Aleritty
    Commented Oct 18, 2015 at 18:40
  • Unfortunatelly this is not working, i don't know why... After my check eth0 was not configured for ipv6.
    – Aleritty
    Commented Oct 18, 2015 at 19:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .