Candela Technologies Logo
Network Testing and Emulation Solutions

Configure NTP Chronyd on Fedora

Goal: configure an NTP time source for a customer Fedora system

Some customer systems are in offline labs that are unable to reach the Internet, and without that connection, NTP will not continue to adjust the system time. Below are examples of how to configure the chrony service to look at the manager system of a LANforge realm to get time updates. The resulting times will be more consistent with respect to the whole realm of machines, but times will still be different than global time sources.

Background

It is possible to configure chronyd on Fedora to look at specific local servers for time synchronization, and to configure a LANforge to be a NTP time server. For more reference, see https://docs.fedoraproject.org/en-US/fedora/latest/system-administrators-guide/servers/Configuring_NTP_Using_the_chrony_Suite/

In the examples below, we will consider two systems:

Maintenance: Adjusting the time

sudo -s
chronyc tracking    # display the details about how far off the system is from NTP time
chronyc sources     # display the releationship to the sources
chronyc makestep    # force a catch-up to the NTP server
chronyc tracking    # to see the resulting time difference.  

Configure a Server

Use the allow directive to provide access to the NTP protocol from the management network:

rtcsync
hwtimestamp *
allow 192.168.1.0/24
local stratum 9

Configure a Client

Edit the /etc/chrony.conf file and add a these lines:

server 192.168.1.101 iburst auto_offline
local stratum 10
hwtimestamp *
rtcsync

Apply Changes

Restart the chronyd service to apply:

systemctl restart chronyd.service

Check journalctl for anything wrong.

All that other stuff in the file

There’s plenty of notes in the chrony.conf file. The two network time source directives of interest are:

pool pool.ntp.org iburst maxsources 4
server 0.pool.ntp.org iburst auto_offline

If you are in an offline setting, you might consider commenting out the remote pool/server directives, but the consequence of that is the next time the system is placed on a routable network, it will never try to look for NTP time sources again and hence never attempt to re-set the system hardware clock. It is harmless to leave those directives un-commented.


Candela  Technologies, 2417 Main Street, Suite 201, Ferndale, WA 98248, USA
www.candelatech.com | sales@candelatech.com | +1.360.380.1618
Facebook | LinkedIn | Blog