3.3.a Interpret NTP and PTP configurations

ENCOR 350-401 v1.2 · 3.0 Infrastructure

ENCOR asks you to read NTP and PTP configurations. NTP keeps clocks within milliseconds across a network and is enough for logs and certificates. PTP (IEEE 1588) reaches sub-microsecond accuracy with hardware timestamps, for industrial control, audio/video, finance and mobile networks.

What you must know

NTP configurations

ntp authentication-key 1 hmac-sha2-256 Ntp-K3y
ntp authenticate
ntp trusted-key 1
ntp source Loopback0
ntp server 10.0.0.1 key 1 prefer
ntp server 10.0.0.2 key 1
ntp peer 10.0.1.2
ntp access-group peer 10
ntp access-group serve-only 20
LineMeaning
ntp server … preferClient of that server, preferred when choices are equal
ntp peerSymmetric: either side can sync the other
ntp master 3Authoritative from its own clock at stratum 3 (no upstream)
ntp access-group serve-onlyHosts in the ACL may get time but not change ours
ntp source Loopback0Packets come from a stable address servers can filter on
R1# show ntp associations
  address         ref clock       st   when   poll reach  delay  offset   disp
*~10.0.0.1        192.0.2.123      2     35     64   377  1.204  -0.311  1.002
+~10.0.0.2        192.0.2.124      2     12     64   377  1.410   0.207  0.950

PTP

PTP elects a grandmaster with the best master clock algorithm (priority, clock class, accuracy). Network devices then help keep precision: a boundary clock synchronises to its upstream master and acts as master downstream; a transparent clock measures how long each PTP message spent inside the switch and corrects the timestamp. Hardware timestamping removes software delays, giving nanosecond to microsecond accuracy.

Time flows from the grandmaster through the boundary clock to the clients (1). Use NTP for IT systems; use PTP when devices must act within microseconds of each other.

Commands

show ntp statusSynchronised or not, stratum, reference, offset.
show ntp associations detailEach server's details and authentication state.
show ptp clock / show ptp portPTP role, grandmaster identity and port states.

Exam traps

Check yourself

In show ntp associations, what do * and + mean?
* is the server the clock is synchronised to; + is a candidate.
When do you need PTP rather than NTP?
When sub-microsecond accuracy is needed: industrial control, broadcast media, mobile fronthaul, trading.
What does ntp access-group serve-only permit?
The listed hosts may get time from this device, but cannot synchronise it.

More topics in 3.0 Infrastructure