Ubuntu Server 24.04 LTS, netplan 6in4 IPv6 tunnel does not work for me
https://askubuntu.com/questions/1565277/ubuntu-server-24-04-lts-netplan-6in4-ipv6-tunnel-does-not-work-for-me
With Ubuntu Server, 22.04 LTS, I had a working netplan, which brought up an IPv6 in IPv4 tunnel using a tunnel broker (no native support for IPv6 at colo.)
Upgrade to 24.04 and the netplan config for tun6in4 fails.
I see log entries like:
tun6in4: Link UP
tun6in4: Gained carrier
device (tun6in4): state change: unavailable -> disconnected (reason 'user-requested', sys-iface-state: 'managed')
device (tun6in4): Activation: starting connection 'netplan-tun6in4' ($UUID)
device (tun6in4): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
device (tun6in4): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
device (tun6tin): failed to generate interface identifier for link type 27 hwaddr_len 4
device (tun6in4): linklocal6: failed to get interface identifier; IPv6 cannot continue
policy: set 'netplan-tun6in4' (tun6in4) as default for IPv6 routing and DNS
device (tun6in4): state change: ip-config -> failed (reason 'ip-config-unavailable', sys-iface-state: 'managed')
device (tun6in4): Activation: failed for connection 'netplan-tun6in4'
device (tun6in4): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
These errors seem to suggest an attempt being made to maybe assign an IPv4 address to the sit interface named tun6in4 but the other errors suggest not being able to find an interface with the given name.
I've tried altering the netplan for the tunnel to explicitly disable DHCP for IPv4 and IPv6, but that did not help.
I can confirm it is not a firewall issue, as I can take steps from the command line to establish the tunnel, and that works, but it fails with netplan using the same settings:
REMOTE_IP would be the remote IPv4 IP address for the tunnel broker
LOCAL_IP would be the local IPv4 IP address from which I would connect to the broken
These are place-holders in this post. They are actual IPv4 addresses, not variable to be interpreted in the netplan or from the command line.
Sample for section of netplan for tunnel:
tunnels:
tun6in4:
mode: sit
local: $LOCAL_IP
remote: $REMOTE_IP
ttl: 64
ignore-carrier: true
addresses:
- "$IPv6_Address_for_Tunnel_IN_CIDR_FORMAT"
- "$IPv6_routed_network_Address_for_Tunnel_IN_CIDR_FORMAT"
routes:
- to: ::/0
via: $IPv6_Default_Gateway_Address
I've tried including extra items like for route, appending these, without help.
mtu: 1480
on-link: true
I've also tried explicit disable of DHCP immediately under "tun6in4" in case that is an issue:
dhcp4: false
dhcp6: false
These steps work fro the command-line using the same values as found in the netplan for the tunnel, the same netplan that worked with 22.04, but doesn't with 24.04:
ip tunnel add tun6in4 mode sit remote $REMOTE_IP local $LOCAL_IP ttl 64
ip link set tun6in4 up
ip addr add $IPv6_Address_for_Tunnel_IN_CIDR_FORMAT dev tun6in4
ip addr add $IPv6_routed_network_Address_for_Tunnel_IN_CIDR_FORMAT dev tun6in4
ip -6 route add default via $IPv6_Default_Gateway_Address dev tun6in4
Completing the manual steps, the tun6in4 comes up, and I have routed IPv6 support.
Why would the netplan that worked in 22.04 not work in 24.04?
If this is a known issue, is it due to differences between "NetworkManager" and "networkd-dispatcher" / "systemd-networkd" ?
(I don't recall having NetworkManager installed before upgrade to 24.04, but maybe it was and I didn't notice.)
Other than making my own systemd "service" which does what netplan should do for IPv6 tunnels over IPv4, what is the best way to solve this using the tools and packages available in Ubuntu 24.04 Server?