Tip

This is the documentation for the 20.10 version. Looking for the documentation of the latest version? Have a look here.

NTP Service Control and Status

Enable the NTP Service

Enable the NTP server:

tnsr(config)# ntp enable
tnsr(config)#

Disable the NTP Service

Similar to the NTP enable command, disable the NTP service from configuration mode:

tnsr(config)# ntp disable
tnsr(config)#

Check the NTP Service Status

Check the status of the NTP services from configuration mode using service ntp <namespace> status, where <namespace> is the namespace where NTP is running (host or dataplane):

tnsr(config)# service ntp host status
* ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; disabled; vendor preset: disabled)
   Active: active (running) since Wed 2020-08-12 08:32:30 EDT; 1 day 1h ago
  Process: 7498 ExecStart=/usr/sbin/ntpd -u ntp:ntp $OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 7500 (ntpd)
    Tasks: 2 (limit: 23720)
   Memory: 1.6M
   CGroup: /system.slice/ntpd.service
           └─7500 /usr/sbin/ntpd -u ntp:ntp -g

Aug 13 09:24:51 tnsr ntpd[7500]: Soliciting pool server 69.164.213.136
Aug 13 09:25:56 tnsr ntpd[7500]: Soliciting pool server 208.79.89.249
Aug 13 09:27:03 tnsr ntpd[7500]: Soliciting pool server 206.55.191.142
Aug 13 09:28:10 tnsr ntpd[7500]: Soliciting pool server 47.144.196.17
Aug 13 09:29:15 tnsr ntpd[7500]: Soliciting pool server 68.233.45.146
Aug 13 09:30:21 tnsr ntpd[7500]: Soliciting pool server 198.255.68.106
Aug 13 09:31:26 tnsr ntpd[7500]: Soliciting pool server 38.229.71.1
Aug 13 09:32:32 tnsr ntpd[7500]: Soliciting pool server 72.5.72.15
Aug 13 09:33:38 tnsr ntpd[7500]: Soliciting pool server 172.98.193.44
Aug 13 09:34:42 tnsr ntpd[7500]: Soliciting pool server 173.255.21

View NTP Peers

The NTP peer list shows the peers known to the NTP daemon, along with information about their network availability and quality. For more information on peer associations, see View NTP Associations.

tnsr(config)# show ntp peers
Id    Host            Ref ID         Stratum Reach Poll   Delay Offset Jitter
----- --------------- -------------- ------- ----- ---- ------- ------ ------
17417 5.9.80.113      192.53.103.103       2  0xff  512 134.456 -1.936  3.904
17418 95.216.39.155   131.188.3.223        2  0xff  512 151.370 -1.582  4.883
17419 145.239.118.233 85.199.214.98        2  0xec  512 126.181  4.112 21.541
17420 178.128.4.44    204.123.2.5          2  0xff  512  80.998  2.906  4.140

View NTP Associations

The NTP peer associations list shows how the NTP daemon is using each peer, along with its status. These peers are listed by ID. For more information on each peer, see View NTP Peers.

tnsr(config)# show ntp associations
Id    Status Persistent Auth En Authentic Reachable Broadcast Selection Event      Count
----- ------ ---------- ------- --------- --------- --------- --------- ---------- -----
17417 0x931a true       false   false     true      false     outlier   sys_peer   1
17418 0x941a true       false   false     true      false     candidate sys_peer   1
17419 0x941a true       false   false     true      false     candidate sys_peer   1
17420 0x961a true       false   false     true      false     sys.peer  sys_peer   1

View NTP Daemon Configuration File

View the current NTP Daemon configuration file, generated by the settings in TNSR:

tnsr# show ntp config-file
#
# NTP config autogenerated
#

tinker panic 0

tos orphan 12

logconfig =syncall +clockall

restrict ::/0 kod limited nomodify nopeer notrap
restrict default kod limited nomodify nopeer notrap
restrict source kod limited nomodify notrap

pool pool.ntp.org maxpoll 9