And all I see in the systemd-networkd log is the following:
Feb 25 21:52:22 hjemmerouter systemd-networkd[8966]: wan: Link UP
Feb 25 21:52:22 hjemmerouter systemd-networkd[8966]: wan: Gained carrier
Feb 25 21:52:22 hjemmerouter systemd-networkd[8966]: wan: Gained IPv6LL
Feb 25 21:52:25 hjemmerouter systemd-networkd[8966]: wan: DHCPv4 address 81.166.85.226/20 via 81.166.80.1
Feb 25 21:54:44 hjemmerouter systemd-networkd[8966]: wan: DHCP lease lost
Feb 25 21:54:44 hjemmerouter systemd-networkd[8966]: wan: DHCPv6 lease lost
Feb 25 21:54:45 hjemmerouter systemd-networkd[10190]: wan: Link UP
Feb 25 21:54:45 hjemmerouter systemd-networkd[10190]: wan: Gained carrier
Feb 25 21:54:45 hjemmerouter systemd-networkd[10190]: wan: Gained IPv6LL
Feb 25 21:54:50 hjemmerouter systemd-networkd[10190]: wan: DHCPv4 address 81.166.85.226/20 via 81.166.80.1
I’ve also had problems with SLAAC in the past. For me it turned out that the DHCP server was expecting the interface DUID to be based on link-layer-time instead of the default machine-id. Maybe this helps.
I use systemd-networkd on all my Linux systems. My router needs to use DHCPv6 for getting both an IP and a prefix, so it should work.
Are you using a firewall, and do you have the appropriate ports open? Unlike DHCPv4, you have to make sure the ports are open for the interface to receive DHCPv6 responses. I’ve attached my nftables rules below in case those are any help.
Link-layer-time and link-layer also failed, but DUIDType=uuid in the [DHCPv6] section worked!
Thank you!
Quite weird to see that I was getting “Unspecified failure” from the server with link-layer address plus time in client identifier, when that’s what it’s using in the server identifier…
Server Identifier
Option: Server Identifier (2)
Length: 14
DUID: 0001000119af6056001a4aa88e40
DUID Type: link-layer address plus time (1)
Hardware type: Ethernet (1)
DUID Time: Aug 27, 2013 15:04:22.000000000 CEST
Link-layer address: 00:1a:4a:a8:8e:40
This worked for a day, then broke again… Looks like DUIDType wasn’t really the issue… It’s the ISPs DHCP relay agent that’s failing for some unknown reason. The issue is being debugged here.