Project

General

Profile

Configure ntpd

NTP configuration.

/etc/ntp/step-tickers
192.168.76.26 192.168.76.79

This causes the ntpdate service to step the system clock in one big jump at boot time, using NTP servers tevp and cluckp respectively.

/etc/ntp.conf
driftfile /var/lib/ntp/drift
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1 
restrict -6 ::1
server 192.168.76.79 iburst
server 192.168.76.26 iburst
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys

The only non-default lines here are the two server lines, one for tevp and one for cluckp. The iburst option causes the client node to send a burst of 8 packets to the NTP server node at the first connection in order to rapidly converge the time delay calculations. With this option it can take about 15 minutes for time-setting to begin.

/etc/sysconfig/ntpdate
# Options for ntpdate
OPTIONS="-U ntp -s -b" 

# Set to 'yes' to sync hw clock after successful ntpdate
SYNC_HWCLOCK=yes

The only non-default line here is the SYNC_HWCLOCK=yes. This causes the ntpdate service to update the time in the system hardware clock chip to match what is fetched from the /etc/ntp/step-tickers NTP servers. This corrects the time drift in that chip, which typically will be a few seconds off per day.

Verify NTP configuration.

  • /usr/bin/ntpstat
synchronised to NTP server (192.168.76.26) at stratum 4 
   time correct to within 59 ms
   polling server every 1024 s
  • /usr/sbin/ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+cluckp.private. 131.225.202.200  3 u  434 1024   37    0.407    1.145   0.058
*tevp.private.ne 131.225.202.200  3 u  923 1024  377    2.417   -0.122   0.416
  • /usr/sbin/ntpdc -p
     remote           local      st poll reach  delay   offset    disp
=======================================================================
=cluckp.private. 192.168.76.80    3 1024   37 0.00040  0.001145 0.67368
*tevp.private.ne 192.168.76.80    3 1024  377 0.00241 -0.000122 0.12177