I'm trying to create a tunnel to HE.net to get an IPv6 address on my (cloud) server.
When I created the tunnel and put this in /etc/network/interfaces
:
auto he-ipv6
iface he-ipv6 inet6 v4tunnel
address <my IPv6 address>
netmask 64
endpoint 66.220.7.82
local <my IPv4 address>
ttl 255
gateway <my gateway>
Then ifup he-ipv6
, and I got:
error: /etc/network/interfaces: line5: iface he-ipv6: unsupported address method 'v4tunnel'
How can I fix this?
The operating system is Ubuntu 18.04.3
.
(I've tried to search this error but it seems nobody ever has it. But I've tried on two separate machine by different providers, and the results are the same.)
Update: add a picture for details:
Update 2: add a picture of netplan:
Conclusion: the problem is caused by ifupdown2
.
ifupdown versus ifupdown2
From your error message, you are using the package ifupdown2 rather than ifupdown. Both are available on Ubuntu, but the online manpage shows only one version, I'm guessing the default installed, which would explain why you ended up using ifupdown2.
Ubuntu 16.04 LTS: interfaces(5)
Ubuntu 18.04 LTS: interfaces(5)
While ifupdown2 is a replacement for ifupdown developped by Cumulus Networks, with improved support for modern network features, there are some syntax incompatibilities.
So either install ifupdown instead of ifupdown2, or adapt the configuration, which I give below.
What tunnel?
The original ifupdown provides the v4tunnel method:
The ifupdown settings run these actual commands:
So we know it's a SIT tunnel.
Using ifupdown2
The package ifupdown2, doesn't provide a
v4tunnel
method and lacks documentation for the replacementtunnel
method which should have been described inman ifupdown-addons-interfaces
but is not. It's still available fromifquery --syntax-help
. Here's an excerpt (from Ubuntu 18.04's version):Note that there's a typo in mode values (it should be
gre,ipip,sit
). Newer versions would handle more modes (anyway we already havesit
available):Which gives this working configuration:
The difference is the generic
tunnel
method and that you specify the type of tunnel with themode
keyword.