Doing IPv6 with systemd-networkd – the correct way

Understanding the docs:
I blogged about IPv6 with systemd-networkd in Arch Linux step by step installation guide and provided a hacky workaround to get a working IPv6 address configured. I read through the docs again and hand a longer discussion with Silvio Knizek (systemd guru). We noticed that the documentation isn’t very clear about the correct setup for dualstack with static addresses. The manpage says about the the [Address] section that it can contain an Address= option, for more infos you are advised to check out the docs about the [Network] section. Also you can have multiple [Address] sections. Docs about [Network] say that you can have multiple Address= attributes, however having them in one [Address] block as well doesn’t work.

TL;DR: docs are complicated, here is a working setup:

[Match]
Name=enp0s5

[Address]
Address=37.61.202.154/32
Peer=169.255.30.1/32

[Address]
Address=2a01:488:67:1000:253d:ca9a:0:1/128

[Network]
Gateway=169.255.30.1
Gateway=fe80::1
DHCP=no
DNS=80.237.128.144
DNS=80.237.128.145
This entry was posted in 30in30, General, Internet found pieces, Linux. Bookmark the permalink.

One Response to Doing IPv6 with systemd-networkd – the correct way

  1. Pingback: Arch Linux step by step installation guide | the world needs more puppet!

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.