PTP Overview
The Precision Time Protocol (PTP), as defined in the IEEE 1588 standard, synchronizes with nanosecond accuracy the real-time clocks of the devices in a network. The clocks are organized into a master-slave hierarchy. PTP identifies the port that is connected to a device with the most precise clock. This clock is referred to as the master clock. All the other devices on the network synchronize their clocks with the master and are referred to as members. Constantly exchanged timing messages ensure continued synchronization. PTP ensures that the best available clock is selected as the source of time (the grandmaster clock) for the network and that other clocks in the network are synchronized to the grandmaster.
Network Element |
Description |
---|---|
Grandmaster (GM) |
A network device physically attached to the primary time source. All clocks are synchronized to the grandmaster clock. |
Ordinary Clock (OC) |
An ordinary clock is a 1588 clock with a single PTP port that can operate in one of the following modes:
|
Boundary Clock (BC) |
The device participates in selecting the best master clock and can act as the master clock if no better clocks are detected. Boundary clock starts its own PTP session with a number of downstream slaves. The boundary clock mitigates the number of network hops and packet delay variations in the packet network between the Grand Master and Slave. |
Transparent Clock (TC) |
A transparent clock is a device or a switch that calculates the time it requires to forward traffic and updates the PTP time correction field to account for the delay, making the device transparent in terms of time calculations. |
PTP consists of two parts:
-
The port State machine and Best Master Clock Algorithm: This provides a method to determine state of the ports in the network that will remain passive (neither master nor slave), run as a master (providing time to other clocks in the network), or run as slaves (receiving time from other clocks in the network).
-
Delay-Request/Response mechanism and a Peer-delay mechanism: This provides a mechanisms for slave ports to calculate the difference between the time of their own clocks and the time of their master clock.
Note |
Transparent Clock (TC) is not supported. |
Frequency and Time Selection
The selection of the source to synchronize the device clock frequency is made by frequency synchronization, and is outside of the scope of PTP. The Announce, Sync, and Delay-request frequencies must be the same on the master and slave.
Delay-Response Mechanism
The Delay Request-response mechanism (defined in section 11.3 of IEEE Std 1588-2008) lets a slave port estimate the difference between its own clock-time and the clock-time of its master. The following options are supported:
-
One-step mechanism - The timestamp for a Sync message is sent in the Sync message itself.
-
Two-step mechanism - The timestamp for a Sync message is sent later in a Follow-up message.
When running a port in Slave state, a router can send Delay-request messages and handle incoming Sync, Follow-up, and Delay-response messages. The timeout periods for both Sync and Delay-response messages are individually configurable.
Hybrid Mode
Your router allows the ability to select separate sources for frequency and time-of-day (ToD). Frequency selection can be between any source of frequency available to the router, such as: BITS, GPS, SyncE or IEEE 1588 PTP. The ToD selection is between the source selected for frequency and PTP, if available (ToD selection is from GPS, or PTP). This is known as hybrid mode, where a physical frequency source (BITS or SyncE) is used to provide frequency synchronization, while PTP is used to provide ToD synchronization.
Frequency selection uses the algorithm described in ITU-T recommendation G.781. The ToD selection is controlled using the time-of-day priority configuration. This configuration is found under the clock interface frequency synchronization configuration mode and under the global PTP configuration mode. It controls the order for which sources are selected for ToD. Values in the range of 1 to 254 are allowed, with lower numbers indicating higher priority.
The steps involved in configuring PTP hybrid mode is described in a subsequent section in this chapter.
Time of Day (ToD) Support
The router receives GPS ToD messages in serial ASCII stream through the RS422 interface in any of the following formats:
-
NTP Type 4
-
Cisco
-
NMEA - GPZDA
Note |
You can refer to the below support information in context of the current release and see relevant Release Notes for more information on supported features and hardware. |
Port States
State machine indicates the behavior of each port. The possible states are:
State |
Description |
---|---|
INIT |
Port is not ready to participate in PTP. |
LISTENING |
First state when a port becomes ready to participate in PTP: In this state, the port listens to PTP masters for a (configurable) period of time. |
PRE-MASTER |
Port is ready to enter the MASTER state. |
MASTER |
Port provides timestamps for any Slave or boundary clocks that are listening. |
UNCALIBRATED |
Port receives timestamps from a Master clock but, the router’s clock is not yet synchronized to the Master. |
SLAVE |
Port receives timestamps from a Master clock and the router’s clock is synchronized to the Master. |
PASSIVE |
Port is aware of a better clock than the one it would advertise if it was in MASTER state and is not a Slave clock to that Master clock. |
PTP Support Information
This table lists different types of support information related to PTP:
Transport Media |
|
Messages |
|
Transport Modes |
|
PTP Hardware Support
Note |
The table also contains support details of upcoming releases. You can read this table in context of the current release and see relevant Release Notes for more information on supported features and hardware. |
This table provides a detailed information on the timing features that are supported on the following hardware variants.
Hardware Variant |
Features |
Cisco IOS XR Release |
Comments |
||
---|---|---|---|---|---|
NCS-57B1-6D24-SYS NCS-57B1-5DSE-SYS NCS-57D2-18DD-SYS |
Default profile |
Release 7.11.1 |
With this release, PTP Class C performance and QSFP-DD optics are now supported on 400G port speed. | ||
G.8265.1 |
|||||
G.8275.1 |
|||||
G.8275.2 |
|||||
NC57-48Q2D-S NC57-48Q2D-SE-S |
G8275.1 |
Release 7.10.1 |
With this release, SyncE and PTP Class-C, Class-B performance is supported on 1G, 10G, 25G, 40G and 100G port speeds. On 50G and 400G ports speeds, only timing functionality is supported. PTP support is available on compatible mode. PTP with Class-C is not achieved with macsec on any interface speed.
|
||
NC57-36H6D-S |
G8265.1 |
Release 7.10.1 |
With this release, timing support for PTP and SyncE is extended to 4x10G and 4x25G breakout ports of NC57-36H6D-S in native mode. Class B and Class C performances are supported on 4x10G and 4x25G breakout ports in native mode. Route Processor: NC55-RP2-E |
||
G8275.1 |
|||||
G8275.2 |
|||||
Default Profile |
|||||
NC57-36H-SE |
G8265.1 |
Release 7.10.1 |
With this release, timing support for PTP and SyncE is extended to 4x10G breakout port of NC57-36H-SE is in native mode. Class B performance is supported on 4x10G breakout port in native mode. Route Processor: NC55-RP2-E |
||
G8275.1 |
|||||
G8275.2 |
|||||
Default Profile |
|||||
NCS-57C1-48Q6-SYS |
G.8265.1 |
Release 7.10.1 |
G.8273.2 Class C is supported on 400G interfaces with the following optics modules:
|
||
G.8275.1 |
|||||
G.8275.2 |
|||||
Default Profile |
|||||
NCS-57D2-18DD-SYS |
G.8265.1 |
Release 7.8.1 |
With this release,PTP is supported on 400G, 100G and 40G ports. Class C performance on 100G and 40G ports. |
||
G.8275.1 |
Release 7.8.1 |
||||
G.8275.2 |
Release 7.8.1 |
||||
Default Profile |
Release 7.8.1 |
||||
NCS-57C3-MOD-SYS NCS-57C3-MODS-SYS |
Timing support for PTP and SyncE over Breakout port |
Release 24.3.1 |
With this release, the timing support for PTP and SyncE is extended to 4x10G and 4x25G breakout ports in NCS-57C3-MOD and NCS-57C3-MODS-SYS routers with 8 fixed port number 24 to 31 and 4x10G. Class A and Class B performances are supported on 4x10G and 4x25G breakout ports of NCS-57C3-MOD and NCS-57C3-MODS-SYS routers. |
||
NCS-57C3-MOD-SYS NCS-57C3-MODS-SYS |
PTP Virtual Port and APTS |
Release 7.7.1 |
|||
C57-MPA-2D4H-S |
Timing support for PTP and SyncE over Breakout port |
Release 24.3.1 |
With this release, the timing support for PTP and SyncE is extended to 4x25G breakout ports in NC57-MPA-2D4H-S router. Class A and Class B performances are supported on 4x25G breakout ports of NC57-MPA-2D4H-S router. |
||
NCS-57B1-6D24-SYS |
PTP Virtual Port and APTS |
Release 7.7.1 |
|||
NCS-57C1-48Q6-SYS |
Default profile |
Release 7.5.1 |
|||
G.8265.1 |
Release 7.5.1 |
||||
G.8275.1 |
Release 7.5.1 |
||||
G.8275.2 |
Release 7.5.1 |
||||
RP:NC57-MOD-RP-2E with NCS573-MODS-SYS and NCS-573-MOD-SYS |
G.8275.1 |
Release 7.4.1 |
|||
G.8273.2 |
Release 7.4.1 |
||||
GNSS |
Release 7.4.1 |
||||
NCS-57B1-5DSE-SYS NCS-57B1-6D24-SYS |
Default profile |
Release 7.3.1 |
|||
G.8265.1 |
Release 7.3.1 |
||||
G.8275.1 |
Release 7.3.1 |
||||
G.8275.2 |
Release 7.3.1 |
||||
RP: NC55-RP2-E Line card: NC57-36H6D-S |
G.8275.1 |
Release 7.3.2 |
|
||
G.8273.2 |
Release 7.3.2 |
|
|||
RP:NC55-RP-E with Line cards: NC55-MOD-A-S and NC55-32T16Q4H-AT |
BITS |
Release 7.1.1 |
|||
G8275.1 |
Release 7.1.1 |
For the profile G8275.1 NC55-32T16Q4H-AT supports only T-BCand does not support T-GM. 25G/100G/40G is supported from IOSXR release 7.2.2 onwards. |
|||
G8273.2 |
Release 7.1.1 |
Class B |
|||
RP:NC55-RP2-E with Line cards: NC55-MOD-A-S and NC55-32T16Q4H-AT |
BITS |
Release 7.1.1 |
|||
G.8275.1 |
Release 7.1.1 |
For the profile G8275.1 NC55-32T16Q4H-AT supports only T-BC and does not support T-GM. 25G/100G/40G is supported from IOSXR release 7.2.2 onwards. |
|||
G.8273.2 |
Release 7.1.1 |
Class B |
|||
RP:NC55-RP2-E with Line card:NC55-32T16Q4H-AT |
BITS |
Release 7.1.1 |
|||
G8275.1 |
Release 7.1.1 |
For the profile G8275.1 NC55-32T16Q4H-AT supports only T-BCand does not support T-GM. 25G/100G/40G is supported from IOSXR release 7.2.2 onwards. |
|||
G.8273.2 |
Release 7.1.1 |
Class C |
|||
NCS-55A1-36H-SE-S |
G.8265.1 |
Release 7.0.1 |
|||
G.8275.1 |
Release 7.0.1 |
||||
G.8275.2 |
Release 7.0.1 |
||||
G.8273.2 |
Release 7.0.1 |
Class B |
|||
NCS-55A1-36H-S |
G.8265.1 |
Release 7.0.1 |
|||
G.8275.1 |
Release 7.0.1 |
||||
G.8275.2 |
Release 7.0.1 |
||||
G.8273.2 |
Release 7.0.1 |
Class B |
|||
NCS-55A1-24Q6H-S NCS-55A1-24Q6H-SS |
G.8265.1 |
Release 6.6.25 |
|||
G.8275.1 |
Release 6.6.25 |
||||
G.8275.2 |
Release 6.6.25 |
From Release 7.7.1, support is available for PTP over IPv6 for ports 10G-25G and 40G-100G |
|||
G.8273.2 |
Release 6.6.25 |
Class B |
|||
NCS-55A1-48Q6H |
G.8265.1 |
Release 6.6.25 |
|||
G.8275.1 |
Release 6.6.25 |
||||
G.8275.2 |
Release 6.6.25 |
||||
G.8273.2 |
Release 6.6.25 |
Class B |
|||
NCS-55A1-24H |
G.8265.1 |
Release 6.5.2 |
|||
G.8275.1 |
Release 6.5.2 |
||||
G.8275.2 |
Release 6.5.2 |
||||
G.8273.2 |
Release 6.5.2 |
Class B |
|||
NCS55A2-MOD |
G.8265.1 |
Release 6.5.1 |
|||
G.8275.1 |
Release 6.5.1 |
||||
G.8275.2 |
Release 6.5.1 |
||||
G.8273.2 |
Release 6.5.1 |
Class B |
|||
RP:NC55-RP-E Linecard:NC55-MOD-A-S |
BITS |
Release 6.5.1 |
SyncE is not supported on 25GE or 100GE interfaces, when they are used in 1G mode. |
||
G.8265.1 |
Release 6.5.1 |
||||
G.8275.1 |
Release 6.5.1 |
||||
G.8275.2 |
Release 6.5.1 |
This profile is supported from Release 6.5.1 for Ipv4. |
|||
G.8273.2 |
Release 6.5.1 |
Class B |
|||
RP:NC55-RP-E Linecard:NC55-36X100G-A-SE |
G.8273.2 |
Release 6.3.2 |
Class B |
||
BITS |
Release 6.3.2 |
SyncE is not supported on 25GE or 100GE interfaces, when they are used in 1G mode. |
|||
G.8265.1 |
Release 6.3.2 |
||||
G.8275.1 |
Release 6.3.2 |
||||
G.8275.2 |
NA |
||||
G.8273.2 |
Release 6.3.2 |
Class B |
|||
NCS5501-SE |
G.8265.1 |
Release 6.3.2 |
|||
G.8275.1 |
Release 6.3.2 |
Class B |
|||
G.8275.2 |
Release 6.3.2 |
||||
GNSS External |
Release 6.3.2 |
Timing features are supported on the following MPAs:
-
NC55-MPA-2TH-S
-
NC55-MPA-1TH2H-S
-
NC55-MPA-1TH2H-HD-S
-
NC55-MPA-4H-S
-
NC55-MPA-4H-HD-S
-
NC55-MPA-12T-S
Breakout Timing Support
PTP Profiles 8275.1 and 8275.2 are supported on breakout ports on the following hardware PIDs:
Hardware PID |
Client Port |
Server Port |
---|---|---|
NCS-57C3-MOD NCS-57C3-MODS-SYS |
100G |
25G Breakout |
NC57-MPA-2D4H-S |
40G |
10G Breakout |
NCS-55A1-36H-S |
100G |
25G Breakout |
NCS-55A1-36H-S |
100G |
10G Breakout |
NCS-55A1-48Q6H |
10G |
25G Breakout |
NCS-55A1-48Q6H |
100G |
25G Breakout |
NCS55A1-24Q6H-S |
1G |
25G Breakout |
NCS55A1-24Q6H-S |
10G |
25G Breakout |
NCS55A1-24Q6H-S |
100G |
25G Breakout |
NCS-5501-SE |
1G |
10G Breakout |
NCS-5501-SE |
1G |
25G Breakout |
NCS-5501-SE |
10G |
10G Breakout |
NCS-5501-SE |
10G |
25G Breakout |
NC57-36H6D-S |
25G |
25G Breakout |
NC57-36H6D-S |
25G |
10G Breakout |
NC57-36H6D-S |
10G |
25G Breakout |
NC57-36H6D-S |
10G |
10G Breakout |
NC57-36H-SE |
10G |
10G Breakout |
Note |
The server ports 100G and 40G are used as breakout for 4x25G and 4x10G respectively. The client ports are used as direct ports of different port speeds as presented in the table, Breakout Timing Support Hardware Matrix. |
PTP Phase Difference Threshold Between Passive and Secondary Ports
Feature Name |
Release Information |
Feature Description |
---|---|---|
PTP Phase Difference Threshold Between Passive and Secondary Ports |
Release 24.2.1 |
Introduced in this release on:NCS 5500 fixed port routersNCS 5500 modular routersNCS 5500 line cardsNCS 5700 line cards [Mode: Compatibility; Native] Passive ports can now be included in the Delay Request-Response Mechanism (DRRM), which allows for the monitoring of PTP phase differences between a passive port and a secondary port. If these PTP phase differences surpass a predefined limit, system logs are triggered. This feature enables you to detect potential errors such as fiber asymmetry or a clock failure in the PTP network. This feature introduces these changes: CLI:
YANG Data Models: The following data models are enhanced:
|
The Precision Time Protocol (PTP), as defined in the IEEE 1588 standard, is designed for precise time synchronization across networked devices. It operates by having Foreign Masters (FMs) broadcast timing information to interfaces within the network. The selection of the Grandmaster (GM), the primary reference clock, is determined by the Best Master Clock Algorithm (BMCA). Devices synchronize their clocks to the GM through a process known as the Delay Request-Response Mechanism (DRRM), wherein ports that are directly synchronizing with the GM enter a secondary state.
Historically, ports in a passive state—those that receive timing messages from FMs but aren’t actively syncing to the GM—didn’t participate in DRRM, which meant they didn’t synchronize their clocks.
Starting Cisco IOS XR Software Release 24.2.1, DRRM has been extended to include passive ports, enabling them to engage in the exchange of delay request and response packets. This enhancement allows for the calculation of PTP phase differences between the clocks on passive ports and the GM.
This calculated PTP phase difference provides a valuable insight into the timing characteristics of other foreign masters in the network by using the grandmaster as a reference point. It can be utilized on any boundary clock or slave clock that has connections to at least one other foreign master.
You can access these measurements and the calculated PTP phase differences using show commands through the router's CLI. Also, the information can be retrieved programmatically through operational data models in YANG, providing flexibility in how you can access and utilize this synchronization data.
Phase Difference Alarm
PTP phase difference can also be used to monitor the timing properties of the network. You can configure a value at which a bistate alarm is triggered when the PTP phase difference of a FM exceeds the threshold. The PTP phase difference can have a negative or positive value, but the threshold can only be the absolute value. You can configure the PTP phase difference threshold using the phase-difference-threshold-breach command.
System Log for PTP Phase Difference
When the configured threshold is reached, system logs (syslogs) are displayed. The following syslog is triggered if the configured PTP phase difference threshold is passed through by any master.
Phase difference for clock ACDE48FFFE234567, steps removed 1, receiving-port 1, received on interface GigabitEthernet0/2/0/3 is 40ns, configured threshold is 30ns. Raising phase difference alarm.
Configure PTP Phase Difference Alarm Threshold
Procedure
Step 1 |
Configure threshold for triggering PTP phase difference alarms using the phase-difference-threshold-breach command. Example:
|
Step 2 |
Verify that PTP phase difference threshold value is configured using the show running configuration command. Example:
|
Step 3 |
Display the current operational value using the show ptp foreign-masters command. Example:
|
Isolate Foreign Masters Causing Packet Timing Signal Fail
Feature Name |
Release Information |
Feature Description |
---|---|---|
Isolate Foreign Masters Causing Packet Timing Signal Fail |
Release 24.2.1 |
Introduced in this release on:NCS 5500 fixed port routers, NCS 5500 modular routers, NCS 5500 line cards, and NCS 5700 line cards [Mode: Compatibility; Native] This feature permits the flexible selection of timing sources by filtering out Foreign Master (FM) clocks that exhibit unstable timing. This filtering causes the secondary clocks to produce a signal deemed Packet Timing Signal Fail (PTSF)-unusable, from consideration within the Best Master Clock Algorithm (BMCA). The system continuously monitors these clocks for timing stabilization, and upon detecting enhanced stability, it may reevaluate and possibly reintegrate them as suitable time sources. This feature introduces these changes: CLI:
YANG Data Models: The following data models are enhanced:
|
Starting Cisco IOS XR Software Release 24.2.1, the servo mechanism now has the ability to detect unusable clocks due to packet timing signal fail by analyzing timestamps from foreign masters. This enhancement allows the system to identify foreign masters with unstable timing as unsuitable for use. A platform supports multiple masters, such a master can be excluded from the BMCA selection process while remaining under observation for potential recovery. Even after a master is deemed unusable, the DRRM continues to operate and timestamps from it are still provided to the servo. This ongoing monitoring enables PTP to detect and respond to any improvements in the primary's timing, allowing it to be reconsidered as usable.
System Log for PTSF-unusable
When the master becomes PTSF-unusable, and if its the current Grandmaster, the following system log (syslogs) is displayed:
Foreign master with clock ID ACDE48FFFE234567, steps removed 1, receiving-port 1, received on interface GigabitEthernet0/2/0/4 is now PTSF-unusable and disqualified from selection.
Configure PTSF-unusable
Procedure
Step 1 |
Exclude the FM with unstable timing from selection in the BMCA and declare it as unusable using the detect-ptsf-unusable command. Example:
|
Step 2 |
Check if the master clock is PTSF-unuable using the show ptp foreign-masters command. Example:
|