NTP Timing Based on PTP Clock

PTP as a Reference Clock for NTP

You can configure Precision Timing Protocol (PTP) time as the reference clock for Network Time Protocol (NTP) by enabling the feature on the IR8340 router.

PTP time acts as a stratum 0 source, and the Cisco IOS NTP server acts as a stratum 1 device. The server then provides clock information to its NTP clients (strata 2 and 3).

The feature is supported on Cisco Catalyst IR8340 Rugged Series Routers beginning with the Cisco IOS-XE Release 17.9.1. A Network Advantage license is required.

Enabling PTP as a Reference Clock for NTP

The PTP reference clock feature is disabled by default. You enable it by entering a CLI command. Before you begin, configure PTP and ensure that it is in slave mode. See the chapter Configuring Precision Time Protocol (PTP) in this guide for configuration instructions.

To enable PTP as a reference clock for NTP, enter the ntp refclock ptp command.

You disable the PTP reference clock feature by entering the no ntp refclock ptp command.


Note


On IR8340, this feature is supported only with PTP Default, Power, and Dot1as profiles. Telecom profiles (8265.1/8275.1) as source are not supported. You can only enable this feature when ntp refclock gnss is disabled, as NTP can take only one reference at a time, either GNSS or PTP.


To validate the PTP reference clock configuration on the router, see Validate the PTP Reference Clock.

Validate the PTP Reference Clock

After you enable PTP as the reference clock for NTP, you can enter CLI commands to validate the configuration.

Procedure


Step 1

Ccheck that the PTP reference clock configuration is correct and that the feature is running.

Example:

#show run | sec ptp|ntp
ntp refclock ptp
ptp clock boundary domain 0  profile power
 clock-port 1
  transport ethernet multicast interface Gi0/1/4

Step 2

Check that PTP is in slave mode; that is PTP is in phase aligned state, which means it is locked to a master clock.

Example:

#show ptp clock running
                      PTP Boundary Clock [Domain 0]  [Profile: power]
         State          Ports          Pkts sent      Pkts rcvd      Redundancy Mode
         PHASE_ALIGNED  1              629978         633            Hot standby
                               PORT SUMMARY
                                                                        PTP Master
Name  Tx Mode      Role         Transport    State         Sessions     Port Addr
1     mcast        negotiated   Ethernet     Slave         1            UNKNOWN

Step 3

Check that NTP is using PTP as its reference clock.

Example:

#show ntp status
Clock is synchronized, stratum 1, reference is .PTP.
nominal freq is 250.0000 Hz, actual freq is 249.9998 Hz, precision is 2**10
ntp uptime is 28233900 (1/100 of seconds), resolution is 4016
reference time is E6161FA8.FFBE7988 (08:26:16.999 UTC Fri Apr 29 2022)
clock offset is 0.9998 msec, root delay is 0.00 msec
root dispersion is 3940.49 msec, peer dispersion is 3938.47 msec
loopfilter state is 'CTRL' (Normal Controlled Loop), drift is 0.000000856 s/s
system poll interval is 64, last update was 4 sec ago.
#

Troubleshooting PTP as an NTP Reference Clock

Checking PTP-NTP Synchronization

You can check the time on the PTP and NTP cocks to ensure that they are synchronized, as shown in the following example.

#show ptp lan clock | inc time
Local clock time: 2022-4-29 8:48:39 UTC
#
#show clock detail
08:48:39.278 UTC Fri Apr 29 2022
Time source is NTP
#

Troubleshooting Commands

Table 1. Troubleshooting Commands

Command

Description

ntp logging

Enables syslogs from NTP.

debug ntp all

Provides the complete debugging logs for NTP processes.

debug platform software pd-ptp all

Provides debugging logs on the switch relating to PTP as a reference clock.

show ntp status

Shows detailed NTP status, including whether NTP is using PTP as its reference clock.

show ntp association detail

Shows detailed information about NTP peering.

show ptp clock running

Check that PTP is in slave mode; that is PTP is in phase aligned state, which means it is locked to a master clock.

Viewing Peering Details

The command output shows detailed information about NTP peering. You can use the command to check the amount of time the platform takes to switch to the next available timing source after the initial timing source goes down. In the following example, NTP waits 8x256 seconds to switch over to the next source.

#show ntp association detail
127.127.6.1 configured, ipv4, our_master, sane, valid, stratum 0
ref ID .PTP., time E61622E9.00000000 (08:40:09.000 UTC Fri Apr 29 2022)
our mode active, peer mode passive, our poll intvl 256, peer poll intvl 1024
root delay 0.00 msec, root disp 0.00, reach 377, sync dist 4.62
delay 0.00 msec, offset 0.9998 msec, dispersion 2.81, jitter 0.97 msec
precision 2**10, version 4
assoc id 63756, assoc name 127.127.6.1
assoc in packets 11, assoc out packets 17652, assoc error packets 0
org time E61622E8.FFBE7988 (08:40:08.999 UTC Fri Apr 29 2022)
rec time 00000000.00000000 (00:00:00.000 UTC Mon Jan 1 1900)
xmt time E61622E8.FFBE7988 (08:40:08.999 UTC Fri Apr 29 2022)
filtdelay = 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
filtoffset = 0.99 1.99 0.99 0.99 0.99 0.99 1.99 0.99
filterror = 0.97 2.89 4.81 6.73 8.65 10.57 11.53 12.49
minpoll = 4, maxpoll = 10