1

The systemd-networkd documentation makes this statement...

By enabling DHCPv6 support explicitly, the DHCPv6 client will
be started regardless of the presence of routers on the link

This is the behavior I'm looking for - ignoring any RAs which may or may not appear, and just launching a DHCPv6 client.

I see no evidence that networkd is launching a dhcpv6 client, either from the output of SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-networkd or from tcpdump.

I can however confirm my DHCPv6 server is working if I manually evoke dhclient.

root@client:~# dhclient -6 -v eth0
[...]
XMT: Solicit on eth0, interval 1070ms.
RCV: Advertise message on eth0 from fe80::baae:edff:fe77:7798.
[...]
XMT: Request on eth0, interval 910ms.
RCV: Reply message on eth0 from fe80::baae:edff:fe77:7798.
[...]
RCV:  | | X-- IAADDR fd11:7::175
RCV:  | | | X-- Preferred lifetime 7200.
RCV:  | | | X-- Max lifetime 7500.
RCV:  X-- Server ID: 00:01:00:01:29:d9:12:a2:02:42:0a:fe:fe:fe
message status code Success: "success"
PRC: Bound to lease 00:01:00:01:29:d9:12:a2:02:42:0a:fe:fe:fe.

The systemd-network config (as produced by netplan).

[Match]
MACAddress=xx:xx:xx:xx:xx:xx
Name=eth0

[Network]
DHCP=ipv6   <-- explicitly enabling dhcpv6
LinkLocalAddressing=ipv6
Address=192.168.0.1/24
IPv6AcceptRA=no

[Route]
Destination=0.0.0.0/0
Gateway=192.168.0.10

Any ideas as to why networkd is not launching the DHCPv6 client?

Coops
  • 6,055
  • 1
  • 34
  • 54
  • "_ignoring any RAs which may or may not appear, and just launching a DHCPv6 client._" That is not what it is saying. It launched the DHCP client, whether or not there are routers, but it is not saying the host ignores the RAs. You are reading something into that which is not addressed in the text. – Ron Maupin Apr 02 '22 at 00:49
  • It's that *I* don't care what it does with the RAs, not that it shouldn't care :-) And it didn't launch the DHCP client, that's the fundamental problem. The solution is in my answer below. – Coops Apr 02 '22 at 02:15
  • The way IPv6 was designed is that it takes its marching orders from the router if one is on the network, so it does matter, and a host should care, If the router is properly configured, the RAs should tell the host it can or not use stateful addressing, regardles of whether or not the DHCP client is loaded. Of course, Linux lets you break all sorts of network standards, but that does not mean it's a good idea. You should actually just properly configure the router. – Ron Maupin Apr 02 '22 at 02:46

1 Answers1

0

Ok, it seems WithoutRA=solicit is the setting needed under [DHCPv6].

I might file an issue with the docs, as this seems contradictory to statement in the [Network] section.

Coops
  • 6,055
  • 1
  • 34
  • 54