setting up a v4tunnel interface after a dhcp interface?

Ben Coleman oloryn at benshome.net
Tue Nov 17 08:55:41 UTC 2015


I've got a couple of Ubuntu 14.04 VPSs where the eth0 interface gets its
ipv4 address via dhcp.  This is set up as

auto eth0
iface eth0 inet dhcp

in a file in /etc/network/interface.d.  They always get the same ip
address, but this is how the VPS vendor has set them up.

I've also set up Hurricane Electric tunnels for them for ipv6, set up as
the typical

auto he0
iface he0 inet6 v4tunnel
        address <my ipv6 address>
        netmask 64
        endpoint <endpoint ipv4 address - which is the same as the eth0
ip address>
        local <local ipv4 address>
        ttl 255
        gateway <gateway ipv6 address>

What I'm finding is that on boot-up, while the he0 interface is created,
it does not have the global scope ipv6 address attached (same address as
specified in <my ipv6 address> above).  I can do a

sudo ifdown he0; sudo ifup he0

and it will be correct, but it does not come up correctly on boot-up.

I believe this is because during boot-up, he0 is being set up while the
dhcp process is still going on, and eth0 does not yet have an ip
address.  The ipv6 connection does not get set up because the eth0 ip
address does not yet match the endpoint address of eth0.

So, is there a way to specify that the he0 interface should not be set
up until after eth0 has completed dhcp?

Ben



More information about the ubuntu-users mailing list