|Network Testing and Emulation Solutions|
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.
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:
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.
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
/etc/chrony.conf file and add a these lines:
server 192.168.1.101 iburst auto_offline local stratum 10 hwtimestamp * rtcsync
Restart the chronyd service to apply:
systemctl restart chronyd.service
Check journalctl for anything wrong.
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
pool refers to a whole network of time servers that are listed in a DNS group that rotates their definition very quickly. You can use
host pool.net.org repeatedly to see what IPs are being provided.
server points at just one IP
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.