systemd-networkd 未啟動 DHCPv6 用戶端

systemd-networkd 未啟動 DHCPv6 用戶端

systemd-networkd 文檔做出這樣的聲明...

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

這就是我正在尋找的行為 - 忽略可能出現或可能不出現的任何 RA,而只是啟動 DHCPv6 用戶端。

我沒有看到任何證據表明 Networkd 正在啟動 dhcpv6 客戶端,無論是從 的輸出SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-networkd還是從tcpdump.

不過,如果我手動調用,我可以確認我的 DHCPv6 伺服器正在工作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.

配置systemd-network(由 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

關於為什麼 Networkd 不啟動 DHCPv6 用戶端有什麼想法嗎?

答案1

好吧,看來WithoutRA=solicit是下需要的設定[DHCPv6]

我可能會向文件提出問題,因為這似乎與本[Network]節中的陳述相矛盾。

相關內容