Tip
This is the documentation for the 19.12 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:
tnsr(config)# service ntp status
* ntpd.service - Network Time Service
Loaded: loaded (/usr/lib/systemd/system/ntpd.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2018-11-15 07:05:57 EST; 2 weeks 5 days ago
Main PID: 1744 (ntpd)
CGroup: /system.slice/ntpd.service
└─1744 /usr/sbin/ntpd -u ntp:ntp -g
Dec 04 11:38:44 ntpd[1744]: Listen normally on 21 mytap 10.2.99.1 UDP 123
Dec 04 11:38:44 ntpd[1744]: Listen normally on 22 vpp5 fe80::208:a2ff:fe09:95b5 UDP 123
Dec 04 11:38:44 ntpd[1744]: Listen normally on 23 vpp1 fe80::208:a2ff:fe09:95b1 UDP 123
Dec 04 11:38:44 ntpd[1744]: Listen normally on 24 vpp1 fe80::5 UDP 123
Dec 04 11:38:44 ntpd[1744]: Listen normally on 25 vpp5 fe80::15 UDP 123
Dec 04 11:38:44 ntpd[1744]: Listen normally on 26 mytap fe80::c41e:7bff:fea5:462a UDP 123
Dec 04 11:38:44 ntpd[1744]: new interface(s) found: waking up resolver
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