Dhclient ignores NTP info Option 42 from DHCP Server

How to make dhclient fetch NTP info distributed by DHCP Server as Option 42 and pass it to NTP service?

1 Like

I know that the internal DHCP client of systemd-networkd can pass the learned NTP Server to systemd-timesyncd. systemd-timesyncd will use this learned NTP Server.

If you use something else you would need to check how you can get the learned NTP Server to your NTP software.

For example chrony has a example NetworkManager(NM) dispatcher config, that can be used to pass the NTP Server address from NM to chrony.

If you don’t use the internal DHCP client of NM you are probably completely on your own. And of course there is always the option to statically add multiple NTP Server addresses to a NTP client. It will try all until one works.


Just noticed the Arch Wiki has a dispatcher script for NM with systemd-timesyncd.
https://wiki.archlinux.org/title/systemd-timesyncd#Dynamically_set_NTP_servers_received_via_DHCP

1 Like