I would like to use systemd-networkd to set up an IPv6 tunnel to tunnelbroker.net. I have created two files in /etc/systemd/network, called ip6tun.netdev and ip6tun.network, respectively. My ip6tun.network file works correctly, in the sense that if I manually create the tunnel with the following command, systemd-networkd automatically assigns the correct IP address to the new ip6tun network interface:
ip tunnel add ip6tun mode sit remote $REMOTEIP local $MYIP ttl 255 Unfortunately, it seems to ignore my netdev file and not create the interface on its own. Here's my netdev file (where I've changed the raw IP addresses to fake ones and added a comment for privacy):
[Match] [NetDev] Name=ip6tun Kind=sit #MTUBytes=1480 [Tunnel] Local=1.2.3.4 # actual file has real address Remote=5.6.7.8 # actual file has real address TTL=255 Note that other than the IP addresses, this netdev file is identical to one I have working at a different site. When I stop the unit file and manually run SYSTEMD_LOG_LEVEL=debug /usr/lib/systemd/systemd-networkd, there are only two mentions of ip6tun:
/etc/systemd/network/ip6tun.netdev: Successfully loaded. /usr/lib/systemd/network/80-6rd-tunnel.network: Successfully loaded. Failed to read $container of PID 1, ignoring: Permission denied Found container virtualization none. No virtualization found in DMI vendor table. Unable to read /sys/firmware/dmi/entries/0-0/raw, using the virtualization information found in DMI vendor table, ignoring: Permission denied ... /etc/systemd/network/eth0.network: Successfully loaded. /etc/systemd/network/eth1.network: Successfully loaded. /etc/systemd/network/ip6tun.network: Successfully loaded. Loaded. When I run systemd-networkd from the .service unit file, with the following commands, I also don't see any error messages in the system log, other than the fact that ip6tun.netdev was successfully loaded:
systemctl set-environment SYSTEMD_LOG_LEVEL=debug systemctl restart systemd-networkd I guess one question I have is what am I doing wrong and how to fix it. But a bigger question is how to go about debugging these kinds of problems. I find that I often end up in situations where I just want the equivalent of a simple command to be run, yet I have no idea why the systemd equivalent is not working and I end up completely stumped as to how to proceed. I suppose in this case I could create a service file to run the ip tunnel add command, but then what is the point of .netdev files?