Configuring Precision Time Protocol

Precision Time Protocol (PTP) is a protocol that defines a method to distribute time around a network. PTP support is based on the IEEE 1588-2008 standard. This module describes the concepts around this protocol and details the various configurations involved.

This module contains the following topics:

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.

Table 1. PTP Clocks

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:

  • Master mode—Distributes timing information over the network to one or more slave clocks, thus allowing the slave to synchronize its clock to the master.

  • Slave mode—Synchronizes its clock to a master clock. You can enable the slave mode on up to two interfaces simultaneously in order to connect to two different master clocks.

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.

Restrictions for PTP

The following PTP restrictions apply to the Cisco NCS 5500 Series Router:

  • NCS55-RP does not support PTP

  • SyncE is not supported on a 1GE copper SFP.

  • SyncE is not supported on 25 GE or 100 GE interfaces when they are used in 1G mode.

  • Sync2 interface is supported only if 10 MHz, 1 Pulse per Second (PPS) and time-of-day (ToD) ports are configured.

  • PTP is not supported with MACSec.

  • G.8273.2 Class-A performance is met if CFP2-DCO is configured on either Slave or Master port on the node.

  • Transparent Clock is not supported.

PTP Support Information

This table lists different types of support information related to PTP:

Transport Media

  • UDP over IPv4

  • Ethernet

Messages

  • Signaling

  • Announce

  • Sync

  • Follow-up

  • Delay-request

  • Delay-response

  • Management

Transport Modes

  • Unicast: This is the default mode. All packets are sent as unicast messages. Unicast is applicable only for PTP over IP profiles.

  • Multicast: All packets are sent as multicast messages. Multicast is the only mode for PTP over ethernet profiles.

Timing Hardware Support Matrix

Table 2. Feature History Table

Feature Name

Release Information

Feature Description

PTP and SyncE Support on NCS-57C3-MOD-S and NCS-57C3-MOD-SE-S routers.

Release 7.4.1

With this release, timing support for IEEE 1588-2008 and SyncE is extended to the following routers:

  • NCS-57C3-MOD-S

  • NCS-57C3-MOD-SE-S

PTP and SyncE on breakout ports on NCS55A1-48Q6H-S, NCS55A1-24Q6H-S, and NCS-5501-SE routers.

Release 7.2.2

With this release, timing support for IEEE 1588-2008 (PTPv2) telecom Profiles 8275.1 and 8275.2, and SyncE ITU-T profiles G.8261, G.8262, and G.8264 is extended to breakout ports on the following routers:

  • NCS55A1-48Q6H-S

  • NCS55A1-24Q6H-S

  • NCS-5501-SE

This table provides a detailed information on the timing features that are supported on the following hardware PIDs.

Hardware Variant

Features

Cisco IOS XR Release

Comments

RP: NC55-RP-E

Line card: NC55-36X100G-A-SE

BITS

Release 6.3.2

SyncE

Release 6.3.2

SyncE is not supported on 25GE or 100GE interfaces, when they are used in 1G mode.

Dedicated 1588 Port (RP)

Release 6.3.2

G.8265.1

Release 6.3.2

G.8275.1

Release 6.3.2

G.8275.2

NA

GNSS External

Release 6.3.2

G.8273.2

Release 6.5.1

Class B

RP: NC55-RP-E

Line card: NC55-MOD-A-S

BITS

Release 6.5.1

SyncE

Release 6.5.1

SyncE is not supported on 100GE interfaces, when they are used in 1G mode.

Dedicated 1588 Port (RP)

Release 6.5.1

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.

GNSS External

Release 6.5.1

G.8273.2

Release 6.5.1

Class B

NCS5501-SE

SyncE

Release 6.3.2

SyncE is not supported on 25GE or 100GE interfaces, when they are used in 1G mode.

SyncE is supported on 10G from ports 8 to 15, but it is not supported on these ports in 1G mode.

G.8265.1

Release 6.3.2

G.8275.1

Release 6.3.2

G.8275.2

Release 6.3.2

GNSS External

Release 6.3.2

G.8273.2

Release 6.5.1

Class B

NCS-55A1-24H

SyncE

Release 6.5.2

SyncE is not supported on 25GE or 100GE interfaces, when they are used in 1G mode.

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

SyncE

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

G.8273.2

Release 6.5.1

Class B

NCS-55A1-24Q6H-S

SyncE

Release 6.6.25

SyncE is not supported on 25GE or 100GE interfaces, when they are used in 1G mode.

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-48Q6H

SyncE

Release 6.6.25

SyncE is not supported on 25GE or 100GE interfaces, when they are used in 1G mode.

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

RP: NC57-MOD-RP2-E with Line Card NCS-57C3-MODS-SYS and NCS-57C3-MOD-SYS

SyncE

Release 7.4.1

1G Clock recovery is not supported.

G.8275.1

Release 7.4.1

G.8273.2

Release 7.4.1

GNSS

Release 7.4.1


Note

Cisco NCS 5500 Series Routers support 64 PTP clients at 64 PPS sync packet rate.


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

ITU-T Telecom Profiles for PTP

Cisco IOS XR software supports ITU-T Telecom Profiles for PTP as defined in the ITU-T recommendations. A profile is a specific selection of PTP configuration options that are selected to meet the requirements of a particular application.

PTP lets you define separate profiles to adapt itself for use in different scenarios. A telecom profile differs in several ways from the default behavior defined in the IEEE 1588-2008 standard and the key differences are mentioned in the subsequent sections.

The following sections describe the ITU-T Telecom Profiles that are supported for PTP.

G.8265.1

G.8265.1 profile fulfills specific frequency-distribution requirements in telecom networks. Features of G.8265.1 profile are:

  • Clock advertisement: G.8265.1 profile specifies changes to values used in Announce messages for advertising PTP clocks. The clock class value is used to advertise the quality level of the clock, while the other values are not used.

  • Clock Selection: G.8265.1 profile also defines an alternate Best Master Clock Algorithm (BMCA) to select port states and clocks is defined for the profile. This profile also requires to receive Sync messages (and optionally, Delay-Response messages) to qualify a clock for selection.

  • Port State Decision: The ports are statically configured to be Master or Slave instead of using state machines to dynamically set port states.

  • Packet Rates: The packet rates higher than rates specified in the IEEE 1588-2008 standard are used. They are:

    • Sync/Follow-Up Packets: Rates from 128 packets-per-second to 16 seconds-per-packet.

    • Delay-Request/Delay-Response Packets: Rates from 128 packets-per-second to 16 seconds-per-packet.

    • Announce Packets: Rates from 8 packets-per-second to 64 packets-per-second.

  • Transport Mechanism: G.8265.1 profile only supports IPv4 PTP transport mechanism.

  • Mode: G.8265.1 profile supports transport of data packets only in unicast mode.

  • Clock Type: G.8265.1 profile only supports Ordinary Clock-type (a clock with only one PTP port).

  • Domain Numbers: The domain numbers that can be used in a G.8265.1 profile network ranges from 4 to 23. The default domain number is 4.

  • Port Numbers: All PTP port numbers can only be one (1) because all clocks in this profile network are Ordinary Clocks.

G.8265.1 profile defines an alternate algorithm to select between different master clocks based on the local priority given to each master clock and their quality levels (QL). This profile also defines Packet Timing Signal Fail (PTSF) conditions to identify the master clocks that do not qualify for selection. They are:

  • PTSF-lossSync condition: Raised for master clocks that do not receive a reliable stream of Sync and Delay-Resp messages. Cisco IOS XR software requests Sync and Delay-Resp grants for each configured master clock to track the master clock with this condition.

  • PTSF-lossAnnounce condition: Raised for master clocks that do not receive a reliable stream of Announce messages.

  • PTSF-unusable condition: Raised for master clocks that receives a reliable stream of Announce, Sync, and Delay-Resp messages, but not usable by slave clocks. Cisco IOS XR software does not use this condition.

G.8275.1

G.8275.1 profile fulfills the time-of-day and phase synchronization requirements in telecom networks with all network devices participating in the PTP protocol. G.8275.1 profile provides better frequency stability for the time-of-day and phase synchronization.

Features of G.8275.1 profile are:

  • Synchronization Model: G.8275.1 profile adopts hop-by-hop synchronization model. Each network device in the path from master to slave synchronizes its local clock to upstream devices and provides synchronization to downstream devices.

  • Clock Selection: G.8275.1 profile also defines an alternate BMCA that selects a clock for synchronization and port state for the local ports of all devices in the network is defined for the profile. The parameters defined as a part of the BMCA are:

    • Clock Class

    • Clock Accuracy

    • Offset Scaled Log Variance

    • Priority 2

    • Clock Identity

    • Steps Removed

    • Port Identity

    • notSlave flag

    • Local Priority

  • Port State Decision: The port states are selected based on the alternate BMCA algorithm. A port is configured to a master-only port state to enforce the port to be a master for multicast transport mode.

  • Packet Rates: The nominal packet rate for Announce packets is 8 packets-per-second and 16 packets-per-second for Sync/Follow-Up and Delay-Request/Delay-Response packets.

  • Transport Mechanism: G.8275.1 profile only supports Ethernet PTP transport mechanism.

  • Mode: G.8275.1 profile supports transport of data packets only in multicast mode. The forwarding is done based on forwardable or non-forwardable multicast MAC address.

  • Clock Type: G.8275.1 profile supports the following clock types:

    • Telecom Grandmaster (T-GM): Provides timing for other network devices and does not synchronize its local clock to other network devices.

    • Telecom Time Slave Clock (T-TSC): A slave clock synchronizes its local clock to another PTP clock, but does not provide PTP synchronization to any other network devices.

    • Telecom Boundary Clock (T-BC): Synchronizes its local clock to a T-GM or an upstream T-BC clock and provides timing information to downstream T-BC or T-TSC clocks.

  • Domain Numbers: The domain numbers that can be used in a G.8275.1 profile network ranges from 24 to 43. The default domain number is 24.

The G.8275.1 supports the following:

  • T-GM: The telecom grandmaster (T-GM) provides timing to all other devices on the network. It does not synchronize its local clock with any other network element other than the Primary Reference Time Clock (PRTC).

  • T-BC: The telecom boundary clock (T-BC) synchronizes its local clock to a T-GM or an upstream T-BC, and provides timing information to downstream T-BCs or T-TSCs. If at a given point in time there are no higher-quality clocks available to a T-BC to synchronize to, it may act as a grandmaster.

  • T-TSC: The telecom time slave clock (T-TSC) synchronizes its local clock to another PTP clock (in most cases, the T-BC), and does not provide synchronization through PTP to any other device.

The following figure describes a sample G.8275.1 topology.

Figure 1. A Sample G.8275.1 Topology

G.8275.2

The G.8275.2 is a PTP profile for use in telecom networks where phase or time-of-day synchronization is required. It differs from G.8275.1 in that it is not required that each device in the network participates in the PTP protocol. Also, G.8275.2 uses PTP over IPv4 in unicast mode.

The G.8275.2 profile is based on the partial timing support from the network. Hence nodes using G.8275.2 are not required to be directly connected.

The G.8275.2 profile is used in mobile cellular systems that require accurate synchronization of time and phase. For example, the fifth generation (5G) of mobile telecommunications technology.


Note

G.8275.2 profile is supported on Cisco NCS 5500 Series Routers. However, the performance standards of this profile is not aligned with any of the ITU-T standards because performance specifications for G.8275.2 profile has not yet been made available by ITU-T.

For more information on hardware that supports G.8275.2 profile configurations, refer to Supported Hardware section in this chapter.


Features of G.8275.2 profile are:

  • Clock Selection: G.8275.2 profile also defines an alternate BMCA that selects a clock for synchronization and port state for the local ports of all devices in the network is defined for the profile. The parameters defined as a part of the BMCA are:

    • Clock Class

    • Clock Accuracy

    • Offset Scaled Log Variance

    • Priority 2

    • Clock Identity

    • Steps Removed

    • Port Identity

    • notSlave flag

    • Local Priority


    Note

    See ITU-T G.8275.2 document to determine the valid values for Clock Class parameter.


  • Port State Decision: The port states are selected based on the alternate BMCA algorithm. A port is configured to a master-only port state to enforce the port to be a master for unicast transport mode.

  • Packet Rates:

    • Synchronization/Follow-Up—minimum is one packet-per-second and maximum of 128 packets-per-second.

    • Packet rate for Announce packets—minimum of one packet-per-second and maximum of eight packets-per-second.

    • Delay-Request/Delay-Response packets—minimum is one packet-per-second and maximum of 128 packets-per-second

  • Transport Mechanism: G.8275.2 profile supports only IPv4 PTP transport mechanism.

  • Mode: G.8275.2 profile supports transport of data packets only in unicast mode.

  • Clock Type: G.8275.2 profile supports the following clock types:

    • Telecom Grandmaster (T-GM): Provides timing for other network devices and does not synchronize its local clock to other network devices.

    • Telecom Time Slave Clock (T-TSC): A slave clock synchronizes its local clock to another PTP clock, but does not provide PTP synchronization to any other network devices.

    • Telecom Boundary Clock (T-BC): Synchronizes its local clock to a T-GM or an upstream T-BC clock and provides timing information to downstream T-BC or T-TSC clocks.

  • Domain Numbers: The domain numbers that can be used in a G.8275.2 profile network ranges from 44 to 63. The default domain number is 44.

Configuring PTP

Precision Time Protocol (PTP) is a protocol that defines a method to distribute time around a network. PTP support is based on the IEEE 1588-2008 standard.

This module describes the tasks you need to configure PTP on Cisco IOS XR software.


Note

When a subinterface is configured with encapsulation default or untag configuration, you must configure PTP on that subinterface, instead of the main interface.

Configuring Global G.8275.1 Profile

This below configuration describes the steps involved to create a global configuration profile for a PTP interface that can then be assigned to any interface as required. It uses G.8275.1 profile as an example:


Note

Prior to Cisco IOS XR Software Release 6.3.3, the default PTP timers for G2875.1 were not set to standard values. This could lead to interoperability issues with other routers running the timers with updated values. Hence, to prevent such issues arising due to difference in packet rates, you must explicitly configure the announce interval value to 8, sync frequency value to 16 and delay-request frequency value to 16 while configuring global g.2875.1 profile.



RP/0/RP0/CPU0:router# config terminal
RP/0/RP0/CPU0:router(config)# ptp
RP/0/RP0/CPU0:router(config-ptp)# clock
RP/0/RP0/CPU0:router(config-ptp-clock)# domain 24
RP/0/RP0/CPU0:router(config-ptp-clock)# profile g.8275.1 clock-type T-BC
RP/0/RP0/CPU0:router(config-ptp-clock)# exit
RP/0/RP0/CPU0:router(config-ptp)# profile slave
RP/0/RP0/CPU0:router(config-ptp-profile)# multicast target-address ethernet 01-1B-19-00-00-00
RP/0/RP0/CPU0:router(config-ptp-profile)# transport ethernet
RP/0/RP0/CPU0:router(config-ptp-profile)# sync frequency 16
RP/0/RP0/CPU0:router(config-ptp-profile)# announce frequency 8
RP/0/RP0/CPU0:router(config-ptp-profile)# delay-request frequency 16
RP/0/RP0/CPU0:router(config-ptp-profile)# exit
RP/0/RP0/CPU0:router(config-ptp)# profile master
RP/0/RP0/CPU0:router(config-ptp-profile)# multicast target-address ethernet 01-1B-19-00-00-00
RP/0/RP0/CPU0:router(config-ptp-profile)# transport ethernet
RP/0/RP0/CPU0:router(config-ptp-profile)# sync frequency 16
RP/0/RP0/CPU0:router(config-ptp-profile)# announce frequency 8
RP/0/RP0/CPU0:router(config-ptp-profile)# delay-request frequency 16
RP/0/RP0/CPU0:router(config-ptp-profile)# exit
RP/0/RP0/CPU0:router(config-ptp)# physical-layer-frequency
RP/0/RP0/CPU0:router(config-ptp)# log
RP/0/RP0/CPU0:router(config-ptp-log)# servo events
RP/0/RP0/CPU0:router(config-ptp-log)# commit

Verification

To display the configured PTP profile details, use show run ptp command.


RP/0/RP0/CPU0:router# show run ptp 
   
Wed Feb 28 11:16:05.943 UTC
ptp
 clock
  domain 24
  profile g.8275.1 clock-type T-BC
 !
 profile slave
  multicast target-address ethernet 01-1B-19-00-00-00
  transport ethernet
  sync frequency 16
  announce frequency 8
  delay-request frequency 16
 !
 profile master
  multicast target-address ethernet 01-1B-19-00-00-00
  transport ethernet
  sync frequency 16
  announce frequency 8
  delay-request frequency 16
 !
 physical-layer-frequency
 log
  servo events
!

Configuring PTP Master Interface

The below configuration describes the steps involved to configure a PTP interface to be a Master.


RP/0/RP0/CPU0:router# configure terminal
RP/0/RP0/CPU0:router(config)# interface HundredGigE0/0/0/0
RP/0/RP0/CPU0:router(config-if)# ptp
RP/0/RP0/CPU0:router(config-if-ptp)# profile master
RP/0/RP0/CPU0:router(config-if-ptp)# port state master-only
RP/0/RP0/CPU0:router(config-if-ptp)# commit

Verification

To verify the port state details, use show run interface interface-name command.


RP/0/RP0/CPU0:router# show run interface HundredGigE0/0/0/0
interface HundredGigE0/0/0/0
 ptp
  profile master
  port state master-only
!

Configuring PTP Slave Interface

This procedure describes the steps involved to configure a PTP interface to be a Slave.


RP/0/RP0/CPU0:router# configure terminal
RP/0/RP0/CPU0:router(config)# interface HundredGigE0/0/0/1
RP/0/RP0/CPU0:router(config-if)# ptp
RP/0/RP0/CPU0:router(config-if-ptp)# profile slave
RP/0/RP0/CPU0:router(config-if-ptp)# port state slave-only
RP/0/RP0/CPU0:router(config-if-ptp)# commit

Verification

To verify the port state details, use show run interface interface-name command.


RP/0/RP0/CPU0:router# show run interface HundredGigE0/0/0/1
interface HundredGigE0/0/0/1
 ptp
  profile slave
  port state slave-only
 !
!

Configuring PTP Hybrid Mode

This procedure describes the steps involved to configure router in a hybrid mode. You configure hybrid mode by selecting PTP for phase and time-of-day (ToD) and another source for the frequency.


Note

  • G.8275.1 PTP profile supports only the hybrid mode. By default, the hybrid mode is used, regardless of the physical-layer-frequency configuration.

  • G.8275.2 PTP profile supports both hybrid mode and non-hybrid mode. By default, the non-hybrid mode is used. Hybrid mode is used only when the physical-layer-frequency is configured.


To configure PTP Hybrid mode:

  1. Configure Global Frequency Synchronization

    RP/0/RP0/CPU0:router(config)# frequency synchronization
    RP/0/RP0/CPU0:router(config)# commit
  2. Configure Frequency Synchronization for an Interface. The time-of-day-priority setting specifies that SyncE to be used as a ToD source if there is no source available with a lower priority.

    RP/0/RP0/CPU0:router(config)# interface GigabitEthernet 0/0/0/0
    RP/0/RP0/CPU0:router(config-if)# frequency synchronization
    RP/0/RP0/CPU0:router(config-if-freqsync)# selection input
    RP/0/RP0/CPU0:router(config-if-freqsync)# time-of-day-priority 100
    RP/0/RP0/CPU0:router(config-if-freqsync)# commit
  3. Configure Global PTP. To configure PTP as source for ToD, use ToD priority values in the range from 1 (highest priority) to 254 (lowest priority). Use frequency from the physical layer.

    RP/0/RP0/CPU0:router(config)# ptp
    RP/0/RP0/CPU0:router(config-ptp)# physical-layer-frequency
    RP/0/RP0/CPU0:router(config-ptp)# time-of-day priority 1
    RP/0/RP0/CPU0:router(config)# commit
  4. Configure PTP Interface. To enable this interface as a PTP Master, use master command in ptp-interface configuration mode.

    RP/0/RP0/CPU0:router(config)# interface GigabitEthernet 0/0/0/2 
    RP/0/RP0/CPU0:router(config-if)# ipv4 address 10.0.0.1/24
    RP/0/RP0/CPU0:router(config-if)# ptp
    RP/0/RP0/CPU0:router(config-if-ptp)# master ipv4 10.0.0.2 
    RP/0/RP0/CPU0:router(config-if-ptp)# commit

Verifying PTP Hybrid Mode

RP/0/RP0/CPU0:router # show frequency synchronization selection

Tue Feb  6 06:34:17.627 UTC
Node 0/0/CPU0:
==============
Selection point: ETH_RXMUX (1 inputs, 1 selected)
  Last programmed 3d23h ago, and selection made 3d23h ago
  Next selection points
    SPA scoped    : None
    Node scoped   : None
    Chassis scoped: T0-SEL-B 1588-SEL
    Router scoped : None
  Uses frequency selection
  S  Input                     Last Selection Point         QL  Pri  Status
  == ========================  ========================  =====  ===  ===========
  1  GigabitEthernet0/0/0/2    n/a			 PRC      1  Available
Selection point: LC_TX_SELECT (1 inputs, 1 selected)
  Last programmed 3d23h ago, and selection made 3d23h ago
  Next selection points
    SPA scoped    : None
    Node scoped   : None
    Chassis scoped: None
    Router scoped : None
  Uses frequency selection
  Used for local line interface output
  S  Input                     Last Selection Point         QL  Pri  Status
  == ========================  ========================  =====  ===  ===========
  7  GigabitEthernet0/0/0/2    0/RP0/CPU0 T0-SEL-B 1       PRC    1  Available
Node 0/RP0/CPU0:
==============
Selection point: T0-SEL-B (3 inputs, 1 selected)
  Last programmed 1d00h ago, and selection made 00:36:33 ago
  Next selection points
    SPA scoped    : None
    Node scoped   : CHASSIS-TOD-SEL
    Chassis scoped: LC_TX_SELECT
    Router scoped : None
  Uses frequency selection
  Used for local line interface output
  S  Input                     Last Selection Point         QL  Pri  Status
  == ========================  ========================  =====  ===  ===========
1  GigabitEthernet0/0/0/2	0/0/CPU0 ETH_RXMUX 1       PRC    1  Locked
   PTP [0/RP0/CPU0]		n/a			   SEC  254  Available
   Internal0 [0/RP0/CPU0]	n/a			   SEC  255  Available

Selection point: 1588-SEL (2 inputs, 1 selected)
  Last programmed 3d23h ago, and selection made 00:36:33 ago
  Next selection points
    SPA scoped    : None
    Node scoped   : None
    Chassis scoped: None
    Router scoped : None
  Uses frequency selection
  S  Input		       Last Selection Point      QL     Pri  Status
  == ========================  ========================  =====  ===  ===========
  1  GigabitEthernet0/0/0/2    0/0/CPU0 ETH_RXMUX 1      PRC      1  Locked
     Internal0 [0/RP0/CPU0]    n/a		  	 SEC    255  Available

Selection point: CHASSIS-TOD-SEL (2 inputs, 1 selected)
  Last programmed 1d00h ago, and selection made 1d00h ago
  Next selection points
    SPA scoped    : None
    Node scoped   : None
    Chassis scoped: None
    Router scoped : None
PRC    1  Locked
SEC  255  Available
Last Selection Point
QL Pri Status
Uses time-of-day selection
S  Input		     Last Selection Point      Pri  Time  Status	
== ========================  ========================  ===  ====  ===========
  1  PTP [0/RP0/CPU0]          n/a		       100  Yes   Available
     GigabitEthernet0/0/0/2    0/RP0/CPU0 T0-SEL-B 1   100  No    Available

Configuring PTP Telecom Profile Interface

This procedure describes the steps involved to create an interface for PTP ITU-T Telecom Profiles.


Note

  • It is also possible to make these definitions within a global PTP profile and attach them to the interface using the profile command in PTP interface configuration mode.


  1. To configure an interface, use interface type interface-path-id command in the configuration mode.

    
     RP/0/RP0/CPU0:router(config)# interface gigabitethernet 0/1/0/1
  2. To enter the PTP configuration mode for the given interface, use ptp command in the interface configuration mode.

    
     RP/0/RP0/CPU0:router(config-if)# ptp
  3. To configure a PTP profile (or specify a previously defined profile), use profile name command in the ptp-interface configuration mode.


    Note

    Any additional commands entered in ptp-interface configuration mode overrides the global profile settings.
    
    RP/0/RP0/CPU0:router(config-if-ptp)# profile slave
  4. To configure frequency for Sync or Delay-request messages for the given ptp interface, use sync frequency rate command or delay-request frequency rate command appropriately in the ptp-interface configuration mode. The valid configurable values are 2, 4, 8, 16, 32, 64 or 128.

    
    RP/0/RP0/CPU0:router(config-if-ptp)# sync frequency 128
    
    RP/0/RP0/CPU0:router(config-if-ptp)# delay-request frequency 128
  5. To configure duration for different PTP messages, use one of the following commands in the ptp-interface configuration mode: announce grant-duration duration , sync grant-duration duration , or delay-response grant-duration duration . The duration value can be between 60 and 1000 seconds.


    Note

    This duration value represents the length of grant that is requested by a port in Slave state and represents the maximum grant-duration allowed when the port is in Master state.
    
    RP/0/RP0/CPU0:router(config-if-ptp)# announce grant-duration 120
    
    RP/0/RP0/CPU0:router(config-if-ptp)# sync grant-duration 120
    
    RP/0/RP0/CPU0:router(config-if-ptp)# delay-response grant-duration 120
  6. To configure a timeout value, length of time by when a PTP message must be received (before PTSF-lossSync is raised), use one of the following commands in the ptp-interface configuration mode: sync timeout timeout or delay-response timeout timeout . The timeout value can be between 100 to 10000 micro seconds.

    
    RP/0/RP0/CPU0:router(config-if-ptp)# sync timeout 120
    
    RP/0/RP0/CPU0:router(config-if-ptp)# delay-response timeout 120
  7. To configure a response for unicast-grant invalid-request, use unicast-grant invalid-request {reduce | deny} command. The response for requests with unacceptable parameters would either be denied or granted with reduced parameters.

    RP/0/RP0/CPU0:router(config-if-ptp)# unicast-grant 
    invalid-request reduce
  8. To configure IPv4 address for a PTP master, use master ipv4 ip-address command in the ptp-interface configuration mode.

    RP/0/RP0/CPU0:router(config-if-ptp)# master ipv4 1.7.1.2
    
    
  9. To override the clock-class received in Announce messages from the specified Master, use clock-class class command in the ptp-master-interface configuration mode. The class values can range from 0 to 255.

    RP/0/RP0/CPU0:router(config-if-ptp-master)# clock-class 2

Verification

To display the PTP interface details, use show ptp interfaces brief command.


RP/0/RP0/CPU0:router# show ptp interfaces brief
Fri Feb  9 11:16:45.248 UTC
Intf              Port         Port                  Line
Name              Number       State        Encap    State         Mechanism
--------------------------------------------------------------------------------
Gi0/1/0/0         1            Slave        IPv4     up            1-step DRRM
Gi0/0/0/40        2            Master       IPv4     up            1-step DRRM

To verify the configured profile details, use show run interface interface-name command.


RP/0/RP0/CPU0:router# show run interface Gi0/0/0/33 

Wed Feb 28 11:49:16.940 UTC
interface GigabitEthernet0/0/0/33
ptp
  profile slave
  transport ipv4
  sync frequency 64
  clock operation one-step
  delay-request frequency 64
  !
 physical-layer-frequency
!
ipv4 address 21.1.1.2 255.255.255.0
frequency synchronization
  selection input
  priority 5
  wait-to-restore 0
!
  

Configuring PTP Telecom Profile Clock

This procedure describes the steps involved to configure PTP clock and its settings to be consistent with ITU-T Telecom Profiles for Frequency.

  1. To enter the PTP configuration mode, use ptp command in the configuration mode.

    
     RP/0/RP0/CPU0:router(config)# ptp
  2. To enter the PTP-clock configuration mode, use clock command in the ptp-configuration mode.

    
     RP/0/RP0/CPU0:router(config-ptp)# clock
  3. To configure the domain-number for a PTP profile, use domain number command in the ptp-configuration mode. The allowed domain number range for G.8265.1 profile is between 4 and 23 and the range for G.8275.1 profile is between 24 and 43.

    
     RP/0/RP0/CPU0:router(config-ptp)# domain 24
  4. To exit the ptp-clock configuration mode, use exit command.

    
    RP/0/RP0/CPU0:router(config-ptp-clock)# exit 
  5. To configure the desired telecom profile and the clock type for the profile, use clock profile {g.8275.1 | g.8275.2} clock-type {T-GM | T-BC | T-TSC} command in the ptp configuration mode. For g.8265.1 clock profile, clock type is either master or slave.


    Note

    The clock-selection telecom-profile and clock-advertisement telecom-profile commands are deprecated from Release 6.1.2. They are replaced by the clock profile command.
    
    RP/0/RP0/CPU0:router(config-ptp)# clock profile g.8275.1 clock-type T-GM
    

Verification

To display the configured PTP clock profile details, use show run ptp command.


RP/0/RP0/CPU0:router# show run ptp 
ptp
clock
  domain 24
  profile g.8275.1 clock-type T-GM
  timescale PTP
  time-source GPS
  clock-class 6
!
profile master
  transport ethernet
  sync frequency 16
  announce interval 1
  delay-request frequency 16
!
profile master1
  transport ethernet
  sync frequency 64
  announce interval 1
  delay-request frequency 64
!

To verify that PTP has been enabled on the router and the device is in LOCKED Phase, use show ptp platform servo command.

RP/0/RP0/CPU0:router # show ptp platform servo

Fri Feb  9 11:16:54.568 UTC
Servo status: Running
Servo stat_index: 2
Device status: PHASE_LOCKED
Servo log level: 0
Phase Alignment Accuracy: 1 ns
Sync timestamp updated: 111157
Sync timestamp discarded: 0
Delay timestamp updated: 111157
Delay timestamp discarded: 0
Previous Received Timestamp T1: 1518155252.263409770  T2: 1518155252.263410517  T3: 1518155252.287008362  T4: 1518155252.287009110 
Last Received Timestamp T1: 1518155252.325429435  T2: 1518155252.325430194  T3: 1518155252.348938058  T4: 1518155252.348938796 
Offset from master:  0 secs, 11 nsecs
Mean path delay   :  0 secs, 748 nsecs
setTime():2  stepTime():1  adjustFreq():10413 adjustFreqTime():0
Last setTime: 1.000000000 flag:1  Last stepTime:-736216, Last adjustFreq:465

Configuration Examples

Slave Configuration Example

The following example shows a PTP slave configuration:


 interface TenGigE 0/1/0/5
 ptp
  profile slave
  transport ipv4
  port state slave-only
  master ipv4 1.7.1.2
  !
  announce interval 1
  !
 ipv4 address 1.7.1.1 255.255.255.0
!

Master Configuration Example

This example shows a PTP master configuration:


 ptp
  profile master
  transport ipv4
  announce interval 1
 !
 ipv4 address 1.7.1.2 255.255.255.0
 !
  

PTP Hybrid Mode Configuration Example

This example shows the configuration of PTP hybrid mode:


ptp
 time-of-day priority 10
 !
interface GigabitEthernet0/1/1/0
 ptp
  transport ipv4
  port state slave-only
  master ipv4 1.7.1.2
  !
  sync frequency 64
  announce interval 1
  delay-request frequency 64
 !
interface GigabitEthernet 0/1/0/1
 ipv4 address 1.7.1.2 255.255.255.0
 speed 100
 frequency synchronization
  selection input
  priority 10
  wait-to-restore 0
  ssm disable
  time-of-day-priority 100
 !
  

ITU-T Telecom Profile Examples:

G.8265.1 Profile Configuration Examples

Master Global Configuration:


ptp
 clock
 domain 4
 profile g.8265.1
 !
  profile master
  transport ipv4
  sync frequency 16
  announce interval 1
  delay-request frequency 16
interface gi 0/2/0/4
 ptp
  profile master
  transport ipv4
  clock operation two-step
 !
 ipv4 address 17.1.1.1/24

Slave Global Configuration:


ptp
 clock
 domain 4
 profile g.8265.1
 !
  profile slave
  transport ipv4
  sync frequency 16
  announce interval 1
  delay-request frequency 16
interface gi 0/1/0/0
 ptp
  profile slave
  transport ipv4
  Master ipv4 18.1.1.1
  port state slave-only
  !
  clock operation two-step
  !
 ipv4 address 18.1.1.2/24

Configuring With Clock Type as T-Boundary Clock (T-BC)


ptp
 clock
 domain 4
 profile g.8265.1
 !
  profile master
  transport ipv4
  sync frequency 16
  announce interval 1
  delay-request frequency 16
  exit
  profile slave
  transport ipv4
  sync frequency 16
  announce interval 1
  delay-request frequency 16
  exit
interface gi 0/2/0/4
 ptp
  profile slave
  transport ipv4
  Master ipv4 17.1.1.1
  port state slave-only
  !
  clock operation two-step
  !
ipv4 address 17.1.1.2/24
interface gi 0/2/0/0
 ptp
  profile master
  transport ipv4
  clock operation two-step
  !
 ipv4 address 18.1.1.1/24

G.8275.1 Profile Configuration Examples

Master Global Configuration:


ptp
 clock
 domain 24
 profile g.8275.1 	
 !
  profile master
  transport ethernet
  sync frequency 16
  announce interval 1
  delay-request frequency 16
interface gi 0/2/0/4
 ptp
  profile master
  transport ethernet
  multicast target-address ethernet 01-1B-19-00-00-00
  clock operation two-step
 !
 ipv4 address 17.1.1.1/24

Slave Global Configuration:


ptp
 clock
 domain 24
 profile g.8275.1 clock-type T-TSC
 !
  profile slave
  transport ethernet
  sync frequency 16
  announce interval 1
  delay-request frequency 16
interface gi 0/1/0/0
 ptp
  profile slave
  transport ethernet
  multicast target-address ethernet 01-1B-19-00-00-00
  !
  clock operation two-step
  !
 ipv4 address 18.1.1.2/24

Configuring With Clock Type as T-Boundary Clock (T-BC)



ptp
 clock
 domain 24
 profile g.8275.1 clock-type T-BC
 !
  profile master
  transport ethernet
  sync frequency 16
  announce interval 1
  delay-request frequency 16
  exit
  profile slave
  transport ethernet
  sync frequency 16
  announce interval 1
  delay-request frequency 16
  exit
interface gi 0/2/0/4
 ptp
  profile slave
  transport ethernet
  multicast target-address ethernet 01-1B-19-00-00-00
  !
  clock operation two-step
  !
 ipv4 address 17.1.1.2/24
interface gi 0/2/0/0
 ptp
  profile master
  transport ethernet
  multicast target-address ethernet 01-1B-19-00-00-00
  clock operation two-step
  !
 ipv4 address 18.1.1.1/24

G.8275.2 Profile Configuration Examples

Master Global Configuration:


ptp
 clock
  domain 44
  profile g.8275.2 clock-type T-GM
 !
 profile master
  transport ipv4
  sync frequency 64
  announce frequency 8
  unicast-grant invalid-request deny
  delay-request frequency 64
 !
!
 
interface GigabitEthernet0/2/0/11
 ptp
  profile master
 !
 ipv4 address 17.1.1.1/24

Slave Global Configuration:


ptp
 clock
  domain 44
  profile g.8275.2 clock-type T-TSC
 !
 profile slave
  transport ipv4
  port state slave-only
  sync frequency 64
  announce frequency 8
  unicast-grant invalid-request deny
  delay-request frequency 64
 !
 log
  servo events
  best-master-clock changes
 !        
!
interface GigabitEthernet0/2/0/12
 ptp
  profile slave
  master ipv4 18.1.1.1 
  !
 !
 ipv4 address 18.1.1.2/24
!

Configuring With Clock Type as T-Boundary Clock (T-BC)



ptp
 clock
  domain 44
  profile g.8275.2 clock-type T-BC
 !
 profile slave
  transport ipv4
  port state slave-only
  sync frequency 64
  announce frequency 8
  unicast-grant invalid-request deny
  delay-request frequency 64
 !
 profile master
  transport ipv4
  sync frequency 64
  announce frequency 8
  unicast-grant invalid-request deny
  delay-request frequency 64
 !
 log
  servo events
  best-master-clock changes
 !        
!

interface GigabitEthernet0/2/0/11
 ptp
  profile master
 !
 ipv4 address 18.1.1.1/24
!

interface GigabitEthernet0/2/0/12
 ptp
  profile slave
  master ipv4 17.1.1.1 
  !
 !
 ipv4 address 17.1.1.2/24
!