custom ntp server in phosphor-networkd

Vernon Mauery vernon.mauery at linux.intel.com
Tue Aug 27 03:23:15 AEST 2019


On 26-Aug-2019 07:25 PM, Alexander A. Filippov wrote:
> Our customers complain that they can't set custom ntp while dhcp is enabled on
> bmc network interface.
> 
> I found out that the phosphor-networkd doesn't allow it in fact and it awaits
> the list of ntp-servers in response from dhcp server. When BMC is configured
> with a static IP address phosphor-networkd keep a list of ntp-service in the
> configuration file of the network interface. In my opinion it is wrong.

This is pretty common behavior for DHCP settings. The DHCP server can 
respond with all sorts of settings beyond just the ip/netmask/gateway. 
NTP, DNS, TFTP (for PXE), etc., are all things that might get returned 
by the DHCP server. Generally, if you are using DHCP, you just accept 
those responses and use them because you assume that the network 
administrator did the right thing and set them up.

> I propose to change this behavior: 
>  - the list of ntp-service should be kept in /etc/systemd/timesyncd.conf
>  - the customization of ntp-servers should be independent from the network
>    inferface configuration.
> 

It seems to me that if you are using static settings for your network, 
then you would also have static (or user-supplied) settings for NTP and 
DNS. But if you are using DHCP for the network, it would make sense to 
use the NTP and DNS settings supplied by the DHCP server.

Now it might also be nice to have some reasonable defaults for NTP 
servers. It is not uncommon to have IP gateways also be NTP servers, so 
it might be reasonable to attempt to use the gateway as an NTP server if 
none was specified in the DHCP response. I don't like the idea of 
setting the default NTP server to be something that is globally 
addressable because that makes the assumption that the BMC can reach 
global networks, which should not be the case.

--Vernon


More information about the openbmc mailing list