Time – NTP

Reading Time: < 1 minute

Update: 1/16/2022: minor – put in explanation of stratum.

In this segment we are going to talk about a number of NTP tools. We will review Microsoft’s NTP; Linux NTP and discuss hardware solutions. Integrating time/NTP into your organization is important in event analysis. Also applications and services can become cranky if servers have drifted too far apart. For example if you have multiple Exchange servers deployed in the same environment and they drift too far apart they might just not talk to each other the way you would expect.

apt-get install ntp
service ntp start
timedatectl set-ntp on

sudo hwclock --show

timedatectl

timedatectl list-timezones

timedatectl set-timezone America/New_York
timedatectl set-timezone EST
timedatectl set-timezone America/Chicago

more /etc/timezone

ntpq -p

date --set "23 Sep 2018 11:04:00"

apt-get install ntpstat
ntpstat

systemctl status systemd-timesyncd.service
  • https://www.digitalocean.com/community/tutorials/how-to-set-up-time-synchronization-on-ubuntu-16-04
  • https://en.wikipedia.org/wiki/Network_Time_Protocol
root@node0:~# ntpstat
synchronised to NTP server (69.89.207.199) at stratum 2
   time correct to within 98 ms
   polling server every 64 s

Stratum: Aside: A “stratum” is hierarchy used to “rank” and delineate the quality of the time keeping.

A Stratum 0: device is a high-precision time keeping device. Typically something that is deriving it’s time either through an Atomic Clock; GPS; or a Radio Clock. Typically a Stratum 0 device would not advertise it’s service.

A Stratum 1 device – typically get’s it’s time from a Stratum 1 device. A Stratum 1 device may “peer” with with other Stratum 1 devices as a check.

This entry was posted in Linux, Networking, ntp. Bookmark the permalink.