I have set up a local network chrony configuration between two nodes running SLES15 SP2. These nodes are internally connected but do not have external connectivity, I want both nodes to always have same time. I found that 2nd node is not automatically sync'ing the time from first node, it does that only when makestep is done manually. 2nd question I have is what is the time interval in which 2nd node will check 1st node if there is a change in time ?
$ node1: cat /etc/chrony.conf
driftfile /var/lib/chrony/drift
makestep 1.0 3
rtcsync
logdir /var/log/chrony
log measurements statistics tracking
server 127.0.0.1
allow 192.168.10.7 <----------- specific IP of the second node
local stratum 10
$ node2: cat /etc/chrony.conf
driftfile /var/lib/chrony/drift
makestep 1.0 3
rtcsync
logdir /var/log/chrony
log measurements statistics tracking
server 192.168.10.7 iburst
As soon as I start chrony on 2nd node or do a manual makestep, I see that 2nd node gets the time same time as first node.. But if I have chrony running on 2nd node and change 1st nodes time (through date -s command).. 2nd node does detect that there is a time difference in below output of chronic tracking, but still doesn't sync the time... I want to understand why it doesn't sync.
$node2: chronyc tracking
Reference ID : 93B22808 (FILE-1)
Stratum : 11
Ref time (UTC) : Fri Jan 29 06:08:15 2021
System time : 9182.181640625 seconds slow of NTP time
Last offset : +0.000131132 seconds
RMS offset : 305.027038574 seconds
Frequency : 1.395 ppm slow
Residual freq : +0.004 ppm
Skew : 0.061 ppm
Root delay : 0.000979753 seconds
Root dispersion : 0.000705841 seconds
Update interval : 962.1 seconds
Leap status : Normal
I was able to get acceptable time diff following the below-listed steps:
Steps
Install chrony in both your devices
Let's assume the server IP address 192.168.1.87 then client configuration (/etc/chrony/chrony.conf) as follows:
server 192.168.1.87 iburst
keyfile /etc/chrony/chrony.keys
driftfile /var/lib/chrony/chrony.drift
log tracking measurements statistics
logdir /var/log/chrony
Server configuration (/etc/chrony/chrony.conf), assume your client IP is 192.168.1.14
keyfile /etc/chrony/chrony.keys
driftfile /var/lib/chrony/chrony.drift
log tracking measurements statistics
logdir /var/log/chrony
local stratum 8
manual
allow 192.0.0.0/24
allow 192.168.1.14
Restart chrony in both computers
sudo systemctl stop chrony
sudo systemctl start chrony
5.1 Checking on the client-side,
sudo systemctl status chrony
5.1
chronyc tracking
output: