PTP Commands

detect-ptsf-unusable

To enable disqualification when appropriate for an FM from selection in the BMCA and declare it as unusable, use the detect-ptsf-unusable command in PTP configuration mode.

detect-ptsf-unusable

Syntax Description

This command has no keywords or arguments.

Command Default

No default behavior or values

Command Modes

PTP configuration

Release Modification

Release 25.4.1

This command was introduced.

Usage Guidelines

No specific guidelines impact the use of this command.

Task ID Operation

ethernet-services

read, write

Examples

The example below demonstrates the example for excluding a Foreign Master (FM) from being considered in the Best Master Clock Algorithm (BMCA) and marking it as inoperable. This action is taken if the secondary clocks generate a signal known as Packet Timing Signal Fail (PTSF)-unusable:


Router(config)# ptp 
Router(config-ptp)# detect-ptsf-unusable 
Router(config-ptp-profile)# commit
            

holdover-spec-clock-class

To specify the clock class value that a PTP clock advertises while in holdover mode, use the holdover-spec-clock-class command in PTP configuration mode. To remove, use the no form of this command.

holdover-spec-clock-class

Table 1. Syntax Description:
class

Specifies the clock class to use while in holdover-spec. Values can range 0–255.

Command Default

None

Command Modes

Global PTP configuration

Table 2. Command History

Release

Modification

Release 25.4.1

This command was introduced.

Usage Guidelines

PTP clock configuration commands is run from global configuration mode by preceding the command string with the ptp holdover-spec-clock-class keywords. From PTP clock configuration mode, various PTP clock settings can be configured.

Examples

This is an example of specifying the hold-over-spec-class.


Router(config)#ptp 
Router(config-ptp)#holdover-spec-clock-class 10
Router(config-ptp)#commit

holdover-spec-duration

To specify holdover-spec-duration , use the holdover-spec-duration command in PTP configuration mode. To remove, use the no form of this command.

holdover-spec-duration

Table 3. Syntax Description
duration

Specifies the exact duration of holdover-spec, in seconds. Values can range 0–255.

Command Default

None

Command Modes

Global PTP configuration

Table 4. Command History
Release Modification

Release 25.4.1

This command was introduced.

Usage Guidelines

PTP clock configuration commands is run from global configuration mode by preceding the command string with the ptp holdover-spec-duration keywords. From PTP clock configuration mode, various PTP clock settings can be configured.

Examples

This example shows how to specify holdover-spec-duration.


Router(config)#ptp 
Router(config-ptp)#clock 
Router(config-ptp-clock)#holdover-spec-duration 23
Router(config-ptp-clock)#commit

monitor-receiver (PTP)

To configure monitor-receiver on the the main port through ptp profile, use the monitor-receiver command in PTP profile configuration mode.

profile name monitor-receiver

profile name

Enters PTP profile configuration mode for the specified profile name.

monitor-receiver

Enables the main port to receive packets.

Command Default

No default behavior or values

Command Modes

PTP configuration

Release Modification

Release 25.4.1

This command was introduced.

Usage Guidelines

A monitor-receiver can be used only on the main port which deliver packets.

Task ID Operation

ethernet-services

read, write

Examples

The following example shows how to enable a monitor-receiver configuration on the main port through PTP profile.

Router#config
Router(config)#ptp
Router(config-ptp)#profile demo
Router(config-ptp-profile)#monitor-receiver
Router(config-ptp-profile)#commit
            

monitor-sender (PTP)

To configure monitor-receiver on the the passive port through ptp profile, use the monitor-sender command in PTP profile configuration mode.

profile name monitor-sender

profile name

Enters PTP profile configuration mode for the specified profile name.

monitor-sender

Enables the passive port to send packets.

Command Default

No default behavior or values

Command Modes

PTP configuration

Release Modification

Release 25.4.1

This command was introduced.

Usage Guidelines

A monitor-sender can be used on the passive port which send packets.

Task ID Operation

ethernet-services

read, write

Examples

The following example shows how to enable a monitor-sender configuration on the passive port through PTP profile.

Router#config
Router(config)#ptp
Router(config-ptp)# profile demo
Router(config-ptp-profile)# monitor-sender
Router(config-ptp-profile)# commit
            

performance-monitoring

To enable the collection of performance-monitoring statistics, use the performance-monitoring command in PTP configuration mode.

performance-monitoring

Syntax Description

This command has no keywords or arguments.

Command Default

By default performance-monitoring is not enabled.

Command Modes

Global PTP configuration

Command History

Release Modification

Release 25.3.1

This command was introduced.

Usage Guidelines

None.

Task ID

Task ID Operation

performance-monitoring

read, write

Examples

The following example shows how to enable the collection of performance-monitoring statistics.


Router(config)# ptp
Router(config-ptp)# performance-monitoring
Router(config-ptp)# commit

phase-difference-threshold-breach

To sets the threshold in nanoseconds that triggers a bistate alarm when the phase difference for any foreign master is exceeded, use the phase-difference-threshold-breach command in the PTP configuration mode. To remove, use the no form of this command.

phase-difference-threshold-breach value-in-nanoseconds

Table 5. Syntax Description
value-in-nanoseconds

Indicates value at which a bistate alarm is triggered when the phase difference for any foreign master is exceeded in nanoseconds.The range is <0-4294967295>5.

Command Default

The default clock class can be obtained from the platform properties.

Command Modes

PTP configuration

Table 6. Command History
Release Modification
Release 25.4.1

This command was introduced.

Usage Guidelines

None

Examples

The following example configures phase difference threshold value to 300 nanoseconds:

Router#configure terminal
Router(config)#ptp
Router(config-ptp)#phase-difference-threshold-breach 300
Router(config-ptp)#commit

show ptp dataset performance

To display the performance monitoring dataset for the local clock and any PTP port for the current 15-minute window, use the show ptp dataset performance{ clock| port{ all| interface name} } command in EXEC mode.

show ptp dataset performance { clock | port { all | interface name } } }

Syntax Description

clock

Displays the performance monitoring dataset of the local clock for the current 15-minute window.

port

Displays the performance monitoring dataset of the port for the current 15-minute window for all or specified interface name .

Syntax Description

This command has no keywords or arguments.

Command Default

None

Command Modes

EXEC

Command History

Release

Modification

Release 25.3.1

This command was introduced.

Usage Guidelines

None.

Task ID

Task ID Operation

performance

read

Examples

The following show command displays the performance monitoring dataset of the local clock for the current 15-minute window.


Router#show ptp dataset performance clock

performanceMonitoringDS for the current 15-minute window:
Clock ID ccccfffecccc00, steps removed 1, receiving port 2:
    Start of time window: Thursday, 14:18:59
    Measurement is valid
    Period is complete
    Measurement has been taken with reference to system clock
    Master slave delay:
        Average: 50ns
        Min: 50ns
        Max: 70ns
        Std: 1ns
    Slave master delay:
        Average: 51ns
        Min: 51ns
        Max: 71ns
        Std: 2ns
    Mean path delay:
        Average: 52ns
        Min: 52ns
        Max: 72ns
        Std: 3ns
    Offset from master:
        Average: 53ns
        Min: 53ns
        Max: 73ns
        Std: 4ns

Clock ID aaaabbbecccc00, steps removed 1, receiving port 2:
    Start of time window: Thursday, 14:18:59
    Measurement is not valid
    Period is not complete
    Measurement has been taken with reference to system clock
    Master slave delay:
        Average: 50ns
        Min: 50ns
        Max: 70ns
        Std: 1ns
    Slave master delay:
        Average: 51ns
        Min: 51ns
        Max: 71ns
        Std: 2ns
    Mean path delay:
        Average: 52ns
        Min: 52ns
        Max: 72ns
        Std: 3ns
    Offset from master:
        Average: 53ns
        Min: 53ns
        Max: 73ns
        Std: 4ns

Examples

The following show command displays the performance monitoring dataset of the port for the current 15-minute window.

Examples



Router#show ptp dataset performance port GigabitEthernet 0/0/0/1
performanceMonitoringPortDS for the current 15-minute window:
Interface GigabitEthernet 0/0/0/1
    Start of time window: Thursday, 14:18:59
    Measurement is valid
    Period is not complete
    Measurement has been taken with reference to system clock
    Packets                     Sent        Received         Dropped
    ----------------------------------------------------------------
    Announce                       3              83              11
    Sync                           0              32               5
    Follow-Up                      0              31               0
    Delay-Req                     22               0               0
    Delay-Resp                     0              21               7
    Pdelay-Req                     0               7               0
    Pdelay-Resp                    0               0               0
    Pdelay-Resp-Follow-Up          0               0               0
    Signaling                      2               1               0
    Management                     0               0               0
    Other                          0               3              12
                               -----           -----           -----
    TOTAL                         27             178              35

show ptp foreign-masters

To display the Precision Time Protocol (PTP) foreign master clocks that are available to the router, use the show ptp foreign-masters command in EXEC mode.

show ptp foreign-masters [brief] { interface name | location node }

show ptp foreign-masters best

brief

Lists all foreign-masters known on the router, ordered by the interface on which they were discovered.

If this option is omitted, the output also include detailed clock properties, unicast messages that are granted from the master, length of time the master has been qualified, and information about the clock peer.

name

Displays foreign masters that are discovered by the specified interface. For more information, use the question mark (?) online help function.

node

Displays foreign masters tdiscovered by the specified node

best

Displays the state of the best foreign master found in the network

Command Default

This command has no default values or behavior.

Command Modes

EXEC

Release Modification
Release 25.4.1

This command was introduced.

Usage Guidelines

This command displays the state of foreign masters for the PTP processes. It is only relevant when running as a boundary clock; in grandmaster mode, no relevant output gets displayed.

The show ptp foreign-masters command with the best keyword collects grandmaster information from all RPs and filters out all but the grandmaster on the active timing card. If the active timing card does not support running as slave, no foreign masters are displayed and instead, it is indicated that slaving is not supported (refer examples section).

Examples

The following shows output with the brief option:


Router# show ptp foreign-masters brief
M=Multicast,Q=Qualified,GM=Grandmaster
Interface         Transport Address                   Priority1 State
Gi0/2/0/0         IPv4      192.168.172.122           13        M,Q   
                  IPv4      192.168.172.123           17        M    
Gi0/2/0/1         IPv6      fe80::2b0:4aff:fe6b:f4fc  1         Q,GM
                  IPv6      fe80::2b0:4aff:fe6b:1234  18        Q
Gi0/3/0/0         Ethernet  00b0.4a6b.f4fc
            

The example indicates if the foreign-master is multicast and the clock that is being used as the grandmaster.

Examples

The following example shows output for the location 0/2/CPU0, including the brief option:


Router#show ptp foreign-masters brief location 0/2/CPU0 
M=Multicast,Q=Qualified,GM=Grandmaster
Interface         Transport Address                   Priority1 State
Gi0/2/0/0         IPv4      192.168.172.122           13        M,Q   
                  IPv4      192.168.172.123           17        M    
Gi0/2/0/1         IPv6      fe80::2b0:4aff:fe6b:f4fc  1         Q,GM
                  IPv6      fe80::2b0:4aff:fe6b:1234  18        Q
            

Examples

The following example shows output for the interface GigabitEthernet0/2/0/0, without the brief option:


Router#show ptp foreign-masters brief interface GigabitEthernet0/2/0/0 
Interface GigabitEthernet0/2/0/3 (PTP port number 27): 
    IPv4, Address 172.108.11.25
       Configured priority: None
       Announce granted:   every 2 seconds,   600 seconds
       Sync granted:       16 per-second,     400 seconds
       Delay-Resp granted: 16 per-second,     600 seconds
       Qualified for 6 days, 2 hours, 11 minutes
       Clock ID: ACDE48FFFE234567
       Clock properties:
          Priority1: 1, Priority2: 83, Class: 6, Accuracy: 0x2B 
          Offset scaled log variance: 0x27FF, Steps-removed: 5
          Domain: 0, Time Source: GPS, Timescale: PTP
          Frequency-traceable, Time-traceable
          Current UTC offset: 25 seconds
       Parent properties:
          Clock-ID: BADE48FFFE234367
          Port number: 3, Steps Removed: 2
    IPv4, Address 172.108.11.23, Multicast
       Configured priority: 27
       Announce granted: every 2 seconds,   600 seconds
       Qualified for 5 days, 4 hours, 27 minutes
       Clock ID: ACDE48FFFE234567
       Clock properties:
          Priority1: 7, Priority2: 83, Class: 6, Accuracy: 0x2B 
          Offset scaled log variance: 0x27FF, Steps-removed: 5
          Domain: 0, Time Source: GPS, Timescale: PTP
          Frequency-traceable, Time-traceable
          Current UTC offset: 25 seconds
       Parent properties:
          Clock-ID: BADE48FFFE234367
          Port number: 5, Steps Removed: 1
    IPv4, Address 172.108.11.18, Multicast
       Configured priority: 11
       Not qualified
            

Examples

The following example shows state information for the best foreign master in the network:


Router# show ptp foreign-masters best 
    Used to set system frequency and time
    IPv4, Address 1.2.3.4
    Received on interface GigabitEthernet0/2/0/3 (port number 0x1007)
    Clock ID: ACDE48FFFE234567 
    Best foreign-master for 5 days, 4 hours, 27 minutes
    Advertised for 5 days, 4 hours, 20 minutes
    Clock properties: 
       Priority1: 7, Priority2: 83, Class: 6, Accuracy: 0x2B 
       Offset scaled log variance: 0x27FF, Steps-removed: 5
       Domain: 0, Time Source: GPS, Timescale: PTP
       Frequency-traceable, Time-traceable
       Current UTC offset: 25 seconds
    Parent properties:
       Clock-ID: BADE48FFFE234367
       Port number: 0x0005
            

This example indicates the display when slaving is not supported on the active timing card:

Router #show ptp foreign-masters best
PTP slaving is not supported on the RSP.
            

show ptp platform performance-counters

To display counters details for platform performance sent by Precision Time Protocol (PTP), use the show ptp platform performance-counters in command in EXEC mode.

show ptp platform performance-counters { detail | brief }

Syntax Description

detail

Displays all 123 counter record details for platform performance sent by PTP.

brief

Displays only the current counter record in 15 minutes, 24 hours, 3minutes, and 1hour windows.

Command Default

None

Command Modes

EXEC

Command History

Release

Modification

Release 25.3.1

This command was introduced.

Usage Guidelines

None.

Task ID

Task ID Operation

platform performance-counters

read

Examples

In this example, the detail mode of the command displays all 123 records.


Router#sh ptp platform performance-counters detail 

PTP Current record index 15 min: 96
PTP Current record index 3 min: 119

PTP performance monitoring statistics: 
==============================================================================================================
15 min stats
[0]     07:08:59 UTC 15 min statistics
--------------------------------------------------------------------------------------------------------------
                Stat    Min(sec.nsec)        Max(sec.nsec)       Mean(sec.nsec)     Std deviation           Samples
--------------------------------------------------------------------------------------------------------------
  Master-slave-delay -000000000.15937      000000000.333       -000000000.1780       000000000.71191      154       
  Slave-master-delay  000000000.319        000000000.16593      000000000.2437       000000000.74103      154       
     mean-path-delay  000000000.322        000000000.334        000000000.327        000000000.4057       154       
  offset-from-master -000000000.16263      000000000.6         -000000000.2108       000000000.72546      154       

--------------------------------------------------------------------------------------------------------------
            Complete      Valid      PmRef      ServoAtStart     ServoAtEnd          LastServoFlapTime
--------------------------------------------------------------------------------------------------------------
               FALSE      FALSE       TRUE        PHASE_LOCKED   HOLDOVER               07:09:09 UTC 

==============

….

Examples

In this example, the brief mode displays only the current counter record in 15 minutes, 24 hours, 3minutes, and 1hour windows.


Router#sh ptp platform performance-counters brief  

==============
PTP Current record index 15 min: 96
PTP Current record index 3 min: 116

PTP performance monitoring statistics: 
==============================================================================================================
15 min stats
[0]     11:46:07 UTC 15 min statistics
--------------------------------------------------------------------------------------------------------------
                Stat    Min(sec.nsec)        Max(sec.nsec)       Mean(sec.nsec)     Std deviation           Samples
--------------------------------------------------------------------------------------------------------------
  Master-slave-delay  000000000.271        000000000.336        000000000.325       000000000.38386      13922     
  Slave-master-delay  000000000.314        000000000.377        000000000.326       000000000.38526      13922     
     mean-path-delay  000000000.318        000000000.334        000000000.325       000000000.38425      13922     
  offset-from-master -000000000.53         000000000.9         -000000000.0         000000000.369        13922     

--------------------------------------------------------------------------------------------------------------
            Complete      Valid      PmRef      ServoAtStart     ServoAtEnd          LastServoFlapTime
--------------------------------------------------------------------------------------------------------------
               FALSE      FALSE       TRUE         FREQ_LOCKED   HOLDOVER               12:00:33 UTC 

==============

synchronous-ethernet prefer-interface ptp-receiver

To prefer selection of the SyncE source on the same interface where the PTP receiver is selected by the router, use the synchronous-ethernet prefer-interface ptp-receiver command in the global frequency synchronization mode.

The desired SyncE source on PTP receiver interface gets selected if it has the highest or equal QL and user configured priority among the other available SyncE sources.

If the selected PTP source goes down or if the PTP source's quality degrades, the system may switch to another PTP source. In such case, use this command so that the SyncE source selection would also switch to the new PTP receiver interface. Here, the preferred switching of SyncE source to the new PTP receiver interface shall happen only if the new interface uses the same SyncE QL and the user configured priority as the previously selected interface.

synchronous-ethernet prefer-interface ptp-receiver

Syntax Description

prefer-interface

Selects the frequency source among equal sources.

ptp-receiver

Selects the PTP receiver interface.

Command Default

None

Command Modes

EXEC

Command History

Release

Modification

Release 24.4.1

This command was introduced.

Usage Guidelines

Task ID

Task ID Operation

ethernet-services

read, write

Examples

This example shows how to configure the synchronous-ethernet prefer-interface ptp-receiver command.

RP/0/RP0/CPU0:router(config)# frequency synchronization synchronous-ethernet prefer-interface ptp-receiver
RP/0/RP0/CPU0:router(config)# commit

This example verifies the synchronous-ethernet prefer-interface ptp-receiver configuration.

RP/0/RP0/CPU0:router(config)# show running-config frequency synchronization
Thu Aug 8 04:50:13.638 UTC
frequency-synchronization
 synchronous-ethernet prefer-interface ptp-receiver
!

uncalibrated-clock-class

To configure the clock-class that is advertised when PTP is in ACQUIRING state and the interface is connected to the Best Master is in Uncalibrated state, use the uncalibrated-clock-class command in the PTP configuration mode. To remove, use the no form of this command.

uncalibrated-clock-class class

Table 7. Syntax Description
class

Indicates the advertised clock-class when PTP is in ACQUIRING state. The range is 0–255.

Command Default

The default clock class can be obtained from the platform properties.

Command Modes

PTP configuration

Table 8. Command History
Release Modification
Release 25.4.1

This command was introduced.

Usage Guidelines

This command is used to override the platform value, if needed.

Examples

The following example configures the clock class to 255:


Router(config)#ptp
Router(config-ptp)#uncalibrated-clock-class 255