Configuring PTP

This chapter contains the following sections:

Information About PTP

PTP is a time synchronization protocol for nodes distributed across a network. Its hardware timestamp feature provides greater accuracy than other time synchronization protocols such as the Network Time Protocol (NTP).

A PTP system can consist of a combination of PTP and non-PTP devices. PTP devices include ordinary clocks, boundary clocks, and transparent clocks. Non-PTP devices include ordinary network switches, routers, and other infrastructure devices.

PTP is a distributed protocol that specifies how real-time PTP clocks in the system synchronize with each other. These clocks are organized into a master-slave synchronization hierarchy with the grandmaster clock, which is the clock at the top of the hierarchy, determining the reference time for the entire system. Synchronization is achieved by exchanging PTP timing messages, with the members using the timing information to adjust their clocks to the time of their master in the hierarchy. PTP operates within a logical scope called a PTP domain.

Starting from Cisco NXOS Release 6.0(2)A8(3), PTP supports configuring multiple PTP clocking domains, PTP grandmaster capability, PTP cost on interfaces for slave and passive election, and clock identity.

All the switches in a multi-domain environment, belong to one domain. The switches that are the part of boundary clock, must have multi-domain feature enabled on them. Each domain has user configurable parameters such as domain priority, clock class threshold and clock accuracy threshold. The clocks in each domain remain synchronized with the master clock in that domain. If the GPS in a domain fails, the master clock in the domain synchronizes time and data sets associated with the announce messages from the master clock in the domain where the GPS is active. If the master clock from the highest priority domain does not meet the clock quality attributes, a clock in the subsequent domain that match the criteria is selected. The Best Master Clock Algorithm (BMCA) is used to select the master clock if none of the domains has the desired clock quality attributes. If all the domains have equal priority and the threshold values less than master clock attributes or if the threshold values are greater than the master clock attributes, BMCA is used to select the master clock.

Grandmaster capability feature controls the switch’s ability of propagating its clock to other devices that it is connected to. When the switch receives announce messages on an interface, it checks the clock class threshold and clock accuracy threshold values. If the values of these parameters are within the predefined limits, then the switch acts as per PTP standards specified in IEEE 1588v2. If the switch does not receive announce messages from external sources or if the parameters of the announce messages received are not within the predefined limits, the port state will be changed to listening mode. On a switch with no slave ports, the state of all the PTP enabled ports is rendered as listening and on a switch with one slave port, the BMCA is used to determine states on all PTP enabled ports. Convergence time prevents timing loops at the PTP level when grandmaster capability is disabled on a switch. If the slave port is not selected on the switch, all the ports on the switch will be in listening state for a minimum interval specified in the convergence time. The convergence time range is from 3 to 2600 seconds and the default value is 30 seconds.

The interface cost applies to each PTP enabled port if the switch has more than one path to grandmaster clock. The port with the least cost value is elected as slave and the rest of the ports will remain as passive ports.

The clock identity is a unique 8-octet array presented in the form of a character array based on the switch MAC address. The clock identity is determined from MAC according to the IEEE1588v2-2008 specifications. The clock ID is a combination of bytes in a VLAN MAC address as defined in IEEE1588v2.

PTP Time Distribution Hold

In a properly synchronized PTP network, when any PTP node goes down and comes up, the PTP clock is synchronized to its primary time source (GM). During this process, the local node has significant correction and it tries to correct its local clock. At that time, the node can send incorrect time to the downstream nodes and cause issues for all downstream nodes. The Time Distribution (TD) hold feature, introduced in Cisco NX-OS Release 10.5(1)F, resolves this issue by ensuring that the node is properly synchronized to its primary source and distributes time to the downstream nodes during boot up.

The TD hold feature holds the time distribution until a Boundary Clock (BC) node locks to the primary time source and settles down to the target correction value. The TD hold enabled node receives all PTP packets, does the normal state change, and synchronizes time, but it does not send any PTP packets out.


Note


If all nodes reboot at the same time (with a difference of few seconds), each node will be in active hold time, which sometimes results in no nodes having secondary port. This leads to the BMC taking a long time to find the best clock. Hence, the user needs to take this into account when enabling this feature.


PTP Device Types

The following clocks are common PTP devices:

Ordinary clock

Communicates with the network based on a single physical port, similar to an end host. An ordinary clock can function as a grandmaster clock.

Boundary clock

Typically has several physical ports, with each port behaving like a port of an ordinary clock. However, each port shares the local clock, and the clock data sets are common to all ports. Each port decides its individual state, either master (synchronizing other ports connected to it) or slave (synchronizing to a downstream port), based on the best clock available to it through all of the other ports on the boundary clock. Messages that are related to synchronization and establishing the master-slave hierarchy terminate in the protocol engine of a boundary clock and are not forwarded.

Transparent clock

Forwards all PTP messages like an ordinary switch or router but measures the residence time of a packet in the switch (the time that the packet takes to traverse the transparent clock) and in some cases the link delay of the ingress port for the packet. The ports have no state because the transparent clock does not need to synchronize to the grandmaster clock.

There are two kinds of transparent clocks:

End-to-end transparent clock

Measures the residence time of a PTP message and accumulates the times in the correction field of the PTP message or an associated follow-up message.

Peer-to-peer transparent clock

Measures the residence time of a PTP message and computes the link delay between each port and a similarly equipped port on another node that shares the link. For a packet, this incoming link delay is added to the residence time in the correction field of the PTP message or an associated follow-up message.


Note


PTP operates only in boundary clock mode. We recommend that you deploy a Grand Master Clock (10 MHz) upstream. The servers contain clocks that require synchronization and are connected to the switch.

End-to-end transparent clock and peer-to-peer transparent clock modes are not supported.


Clock Modes

The IEEE 1588 standard specifies two clock modes for the PTP supporting devices to operate in: one-step and two-step.

One-Step Mode:

In one-step mode the clock synchronization messages include the time at which the master port sends the message. The ASIC adds the timestamp to the synchronization message as it leaves the port. The master port operating in one-step mode is available for Cisco Nexus 9508-FM-R and 9504-FM-R fabric modules and Cisco Nexus 9636C-R, 9636Q-R, 9624D-R2, and 9636C-RX line cards.

The slave port uses the timestamp that comes as part of the synchronization messages.

Two-Step Mode:

In two-step mode the time at which the synchronization message leaves the port is sent in a subsequent follow-up message. This is the default mode.

PTP Process

The PTP process consists of two phases: establishing the master-slave hierarchy and synchronizing the clocks.

Within a PTP domain, each port of an ordinary or boundary clock follows this process to determine its state:

  • Examines the contents of all received announce messages (issued by ports in the master state)

  • Compares the data sets of the foreign master (in the announce message) and the local clock for priority, clock class, accuracy, and so on

  • Determines its own state as either master or slave

After the master-slave hierarchy has been established, the clocks are synchronized as follows:

  • The master sends a synchronization message to the slave and notes the time it was sent.

  • The slave receives the synchronization message and notes the time that it was received. For every synchronization message, there is a follow-up message. The number of sync messages should be equal to the number of follow-up messages.

  • The slave sends a delay-request message to the master and notes the time it was sent.

  • The master receives the delay-request message and notes the time it was received.

  • The master sends a delay-response message to the slave. The number of delay request messages should be equal to the number of delay response messages.

  • The slave uses these timestamps to adjust its clock to the time of its master.

High Availability for PTP

Stateful restarts are not supported for PTP

Guidelines and Limitations for PTP

  • In a Cisco Nexus 3500 only environment, PTP clock correction is expected to be in the 1- to 2-digit range, from 1 to 99 nanoseconds. However, in a mixed environment, PTP clock correction is expected to be up to 3 digits, from 100 to 999 nanoseconds.

  • Cisco Nexus 3500 Series switches support mixed non-negotiated mode of operation on master PTP ports. Meaning that when a slave client sends unicast delay request PTP packet, the Cisco Nexus 3500 responds with an unicast delay response packet. And, if the slave client sends multicast delay request PTP packet, the Cisco Nexus 3500 responds with a multicast delay response packet. For mixed non-negotiated mode to work, the source IP address used in the ptp source <IP address> configuration on the BC device must also be configured on any physical or logical interface of the BC device. The recommended best practice is to use the loopback interface of the device.

  • Cisco Nexus 3500 Series switches support a maximum of 48 PTP sessions.

  • Cisco Nexus 3500 Series switches do not support PTP on 40G interfaces.

  • PTP operates only in boundary clock mode. End-to-end transparent clock and peer-to-peer transparent clock modes are not supported.

  • PTP operates when the clock protocol is set to PTP. Configuring PTP and NTP together is not supported.

  • PTP supports transport over User Datagram Protocol (UDP). Transport over Ethernet is not supported.

  • PTP supports only multicast communication. Negotiated unicast communication is not supported.

  • PTP is limited to a single domain per network.

  • When ptp acl-redirect is configured, PTP management packets are software forwarded. The management packets are expected to be within 100 packets/second to avoid CoPP drops.

  • PTP-capable ports do not identify PTP packets and do not time-stamp or redirect those packets to CPU for processing unless you enable PTP on those ports. This means that if the PTP is disabled on a port, then the device will be capable of routing any multicast PTP packets, regardless of their type, assuming that there is a multicast state present for this. None of these multicast PTP packets from this port will be redirected to CPU for processing, because the exception used to redirect them to the CPU is programmed on a per-port basis, based on whether the PTP is enabled or not on the respective port.

  • 1 pulse per second (1 PPS) input is not supported.

  • PTP over IPv6 is not supported.

  • Cisco Nexus switches should be synchronized from the neighboring master using a synchronization log interval that ranges from –3 to 1.

  • All unicast and multicast PTP management messages will be forwarded as per the forwarding rules. All PTP management messages will be treated as regular multicast packets and process these in the same way as the other non-PTP multicast packets are processed by Cisco Nexus 3500 switches.

  • You must configure the incoming port as L3/SVI to enable forwarding of the PTP unicast packets.

  • We recommend that Cisco Nexus 3500 switches do not participate in unicast negotiation between the unicast master and clients.

  • One-step PTP is not supported on Cisco Nexus 3500 series platform switches.

  • Beginning with Cisco NX-OS Release 10.5(1)F, the PTP Time Distribution (TD) hold feature is introduced. This feature allows for holding the time distribution until a Boundary Clock node locks to the primary time source and settles down to the target correction value.

Default Settings for PTP

The following table lists the default settings for PTP parameters.

Table 1. Default PTP Parameters
Parameters Default

PTP

Disabled

PTP version

2

PTP domain

0. PTP multi domain is disabled by default.

PTP priority 1 value when advertising the clock

255

PTP priority 2 value when advertising the clock

255

PTP announce interval

1 log second

PTP sync interval

1 log second

PTP announce timeout

3 announce intervals

PTP minimum delay request interval

1 log second

PTP VLAN

1

Configuring PTP

Configuring PTP Globally

You can enable or disable PTP globally on a device. You can also configure various PTP clock parameters to help determine which clock in the network has the highest priority to be selected as the grandmaster.

SUMMARY STEPS

  1. configure terminal
  2. [no] feature ptp
  3. [no] ptp source ip-address
  4. (Optional) [no] ptp domain number
  5. (Optional) [no] ptp priority1 value
  6. (Optional) [no] ptp priority2 value
  7. (Optional) [no] ptp acl-redirect
  8. (Optional) show ptp brief
  9. (Optional) show ptp clock
  10. (Optional) [no] ptp time distribution-hold [correction-threshold <corr_limit>] [delay-threshold <max_delay_time>]
  11. copy running-config startup-config

DETAILED STEPS

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal

Enters global configuration mode.

Step 2

[no] feature ptp

Example:

switch(config) # feature ptp

Enables or disables PTP on the device.

Note

 

Enabling PTP on the switch does not enable PTP on each interface.

Step 3

[no] ptp source ip-address

Example:

switch(config) # ptp source 10.2.3.4

Configures the source IP address for all PTP packets.

ip-address: IPv4 format.

Step 4

(Optional) [no] ptp domain number

Example:

switch(config) # ptp domain 24
(Optional)

Configures the domain number to use for this clock. PTP domains allow you to use multiple independent PTP clocking subdomains on a single network.

number: Range is from 0 to 128.

Step 5

(Optional) [no] ptp priority1 value

Example:

switch(config) # ptp priority1 10
(Optional)

Configures the priority1 value to use when advertising this clock. This value overrides the default criteria (clock quality, clock class, and so on) for the best master clock selection. Lower values take precedence.

value: Range is from 0 to 255.

Step 6

(Optional) [no] ptp priority2 value

Example:

switch(config) # ptp priority2 20
(Optional)

Configures the priority2 value to use when advertising this clock. This value is used to decide between two devices that are otherwise equally matched in the default criteria. For example, you can use the priority2 value to give a specific switch priority over other identical switches.

value: Range is from 0 to 255.

Step 7

(Optional) [no] ptp acl-redirect

Example:

switch (config)# ptp acl-redirect
(Optional)

Configures the system to forward PTP unicast packets in hardware using ACL entries.

Note

 

Make sure that the TCAM SUP region size is greater than 48 or the following error message is display when you attempt to enter the command:

switch(config)# ptp acl-redirect 
ERROR: PTP acl-redirect supported only if TCAM sup size is greater than 48
2020 May  6 21:27:04 switch %ACLQOS-SLOT1-2-ACLQOS_OOTR: Tcam resource exhausted: 
Need to reconfigure SUP region 

Step 8

(Optional) show ptp brief

Example:

switch(config) # show ptp brief
(Optional)

Displays the PTP status.

Step 9

(Optional) show ptp clock

Example:

switch(config) # show ptp clock
(Optional)

Displays the properties of the local clock.

Step 10

(Optional) [no] ptp time distribution-hold [correction-threshold <corr_limit>] [delay-threshold <max_delay_time>]

Example:

switch(config)# ptp time distribution-hold correction-threshold 90000ns delay threshold 4000s
(Optional)

Enables the PTP time distribution hold feature.

correction-threshold - Holds the time distribution until the correction settles down to the given specified correction value provided in nanoseconds.

delay-threshold - Sets the maximum time limit in seconds to hold the time-distribution. However, if correction threshold is met before the delay threshold, time distribution resumes.

Default correction threshold is 300 nanoseconds, and default delay threshold is 300 seconds for TOR and 900 seconds for modular chassis.

The maximum correction threshold is 100000 nanoseconds, and the maximum delay threshold is 5000 seconds.

Step 11

copy running-config startup-config

Example:

switch(config) # copy running-config startup-config

Saves the change persistently through reboots and restarts by copying the running configuration to the startup configuration.

Example

The following example shows how to configure PTP globally on the device, specify the source IP address for PTP communications, and configure a preference level for the clock:

switch# configure terminal
switch(config)# feature ptp
switch(config)# ptp source 10.10.10.1
switch(config)# ptp priority1 1
switch(config)# ptp priority2 1
switch(config)# show ptp brief
PTP port status
-----------------------
Port State
------- --------------
switch(config)# show ptp clock
PTP Device Type: Boundary clock
Clock Identity : 0:22:55:ff:ff:79:a4:c1
Clock Domain: 0
Number of PTP ports: 0
Priority1 : 1
Priority2 : 1
Clock Quality:
Class : 248
Accuracy : 254
Offset (log variance) : 65535
Offset From Master : 0
Mean Path Delay : 0
Steps removed : 0
Local clock time:Sun Jul 3 14:13:24 2011
switch(config)#

Configuring PTP on an Interface

After you globally enable PTP, it is not enabled on all supported interfaces by default. You must enable PTP interfaces individually.

Before you begin

Make sure that you have globally enabled PTP on the switch and configured the source IP address for PTP communication.

SUMMARY STEPS

  1. switch# configure terminal
  2. switch(config) # interface ethernet slot/port
  3. switch(config-if) # [no] feature ptp
  4. (Optional) switch(config-if) # [no] ptp announce {interval log seconds | timeout count}
  5. (Optional) switch(config-if) # [no] ptp delay request minimum interval log seconds
  6. (Optional) switch(config-if) # [no] ptp sync interval log seconds
  7. (Optional) switch(config-if) # [no] ptp vlan vlan-id
  8. (Optional) switch(config-if) # show ptp brief
  9. (Optional) switch(config-if) # show ptp port interface interface slot/port
  10. (Optional) switch(config-if)# copy running-config startup-config

DETAILED STEPS

  Command or Action Purpose

Step 1

switch# configure terminal

Enters global configuration mode.

Step 2

switch(config) # interface ethernet slot/port

Specifies the interface on which you are enabling PTP and enters interface configuration mode.

Step 3

switch(config-if) # [no] feature ptp

Enables or disables PTP on an interface.

Step 4

(Optional) switch(config-if) # [no] ptp announce {interval log seconds | timeout count}

(Optional)

Configures the interval between PTP announce messages on an interface or the number of PTP intervals before a timeout occurs on an interface.

The range for the PTP announcement interval is from 0 to 4 seconds, and the range for the interval timeout is from 2 to 10.

Step 5

(Optional) switch(config-if) # [no] ptp delay request minimum interval log seconds

(Optional)

Configures the minimum interval allowed between PTP delay-request messages when the port is in the master state.

The range is from -1 to -6 log seconds. Where, log (-2) = 4 frames per second.

Step 6

(Optional) switch(config-if) # [no] ptp sync interval log seconds

(Optional)

Configures the interval between PTP synchronization messages on an interface.

The range for the PTP synchronization interval is from -3 log second to 1 log second

Step 7

(Optional) switch(config-if) # [no] ptp vlan vlan-id

(Optional)

Specifies the VLAN for the interface where PTP is being enabled. You can only enable PTP on one VLAN on an interface.

The range is from 1 to 4094.

Step 8

(Optional) switch(config-if) # show ptp brief

(Optional)

Displays the PTP status.

Step 9

(Optional) switch(config-if) # show ptp port interface interface slot/port

(Optional)

Displays the status of the PTP port.

Step 10

(Optional) switch(config-if)# copy running-config startup-config

(Optional)

Saves the change persistently through reboots and restarts by copying the running configuration to the startup configuration.

Example

This example shows how to configure PTP on an interface and configure the intervals for the announce, delay-request, and synchronization messages:

switch# configure terminal
switch(config)# interface ethernet 2/1
switch(config-if)# ptp
switch(config-if)# ptp announce interval 3
switch(config-if)# ptp announce timeout 2
switch(config-if)# ptp delay-request minimum interval 4
switch(config-if)# ptp sync interval -1
switch(config-if)# show ptp brief
PTP port status
-----------------------
Port State
------- --------------
Eth2/1 Master
switch(config-if)# show ptp port interface ethernet 1/1
PTP Port Dataset: Eth1/1
Port identity: clock identity: f4:4e:05:ff:fe:84:7e:7c
Port identity: port number: 0
PTP version: 2
Port state: Slave
VLAN info: 1
Delay request interval(log mean): 0
Announce receipt time out: 3
Peer mean path delay: 0
Announce interval(log mean): 1
Sync interval(log mean): 1
Delay Mechanism: End to End
Cost: 255
Domain: 5
switch(config-if)#

Configuring PTP in Unicast Mode

Configuring Unicast Mode

Traditional PTP messages are delivered to the nodes that are capable of receiving PTP multicast messages. (For example, announce , sync , delay_req , delay_resp and follow_up ). In Unicast mode, all PTP messages are delivered only to a particular PTP node. Multicast address is not used. In unicast mode, you can configure master/slave role and assign corresponding peer slave/master IP addresses.

Up to 8 master IPs can be configured for a slave unicast port and 64 slave IPs can be configured for a master port with a maximum 256 slave IP total for all ports. The following commands are used to configure the unicast slave IPs and unicast master IPs. Unicast packets are only sent to and received from these IPs. Packets received from other IPs are ignored.

For Cisco NX-OS Release 9.3(5) and later:

switch(config-if)# ptp
switch(config-if)# ptp transmission unicast
switch(config-if)# ptp role master
switch(config-if)# ptp slave 10.10.10.2

switch(config-if)# ptp
switch(config-if)# ptp transmission unicast
switch(config-if)# ptp role slave
switch(config-if)# ptp master 10.10.10.1

For Cisco NX-OS Release 9.3(4) and earlier:

switch(config-if)# ptp transport ipv4 ucast master 
switch(config-if-ptp-master)# slave ipv4 10.10.10.2 

switch(config-if)# ptp transport ipv4 ucast slave 
switch(config-if-ptp-slave)# master ipv4 10.10.10.1 

Assigning Master Role

Complete the following steps to assign a master role:

SUMMARY STEPS

  1. configure terminal
  2. interface ethernet slot/port
  3. [no ] ptp transport ipv4 ucast master
  4. slave ipv4 <IP_address>
  5. [no] ptp
  6. ptp transmission unicast
  7. ptp role master
  8. ptp slave ipv4-address

DETAILED STEPS

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

interface ethernet slot/port

Example:

switch(config)# interface ethernet 2/1
switch(config-if)#

Specifies the interface on which you are enabling PTP and enters the interface configuration mode.

Note

 

After configuring this command, for Cisco NX-OS Release 9.3(5) and later, skip to step 5. For Cisco NX-OS Release 9.3(4) and earlier, continue with step 3.

Step 3

[no ] ptp transport ipv4 ucast master

Example:

switch(config-if)# ptp transport ipv4 ucast master
switch(config-if-ptp-master)#

Enables PTP master on a particular port (Layer 3 interface). In the master sub-mode, you can enter the slave IPv4 addresses.

Step 4

slave ipv4 <IP_address>

Example:

switch-1(config)# interface ethernet 1/1
switch-1(config-if)# ptp transport ipv4 ucast master
switch-1(config-if-ptp-master)# slave ipv4 1.2.3.1
switch-1(config-if-ptp-master)# slave ipv4 1.2.3.2
switch-1(config-if-ptp-master)# slave ipv4 1.2.3.3
switch-1(config-if-ptp-master)# slave ipv4 1.2.3.4
switch-1(config-if-ptp-master)#

Enters the slave IPv4 addresses. Maximum of 64 IP addresses are allowed per master, but this number varies and it depends on the sync interval configuration. The master sends announce, sync, follow-up, and delay_resp only to these slave addresses. You must make sure that the slave IP is reachable.

Note

 

For Cisco NX-OS Release 9.3(4) and earlier, this concludes the procedure.

Step 5

[no] ptp

Example:

switch(config-if)# ptp
switch(config-if)#

Enables or disables PTP on an interface.

Note

 

Starting with 9.3(5), this command is required prior to applying below unicast configuration commands on the interface.

Step 6

ptp transmission unicast

Example:

switch(config-if)# ptp transmission unicast
switch(config-if)#

Configures the PTP transmission method that is used by the interface.

Note

 

This command is supported beginning with Cisco NX-OS Release 9.3(5).

Step 7

ptp role master

Example:

switch(config-if)# ptp role master
switch(config-if)#

Configures the PTP role of the interface.

master : The master clock is assigned as the PTP role of the interface.

Note

 

This command is supported beginning with Cisco NX-OS Release 9.3(5).

Step 8

ptp slave ipv4-address

Example:

switch(config-if)# ptp slave 10.10.10.2
switch(config-if)#

Sets the IP address of the slave clock when the PTP role of the interface is set to "master".

Note

 

This command is supported beginning with Cisco NX-OS Release 9.3(5).

Assigning Slave Role

Complete the following steps to assign a slave role:

SUMMARY STEPS

  1. configure terminal
  2. interface ethernet slot/port
  3. [no ] ptp transport ipv4 ucast slave
  4. master ipv4 <IP_address>
  5. [no] ptp
  6. ptp transmission unicast
  7. ptp role slave
  8. ptp master ipv4-address

DETAILED STEPS

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

interface ethernet slot/port

Example:

switch(config)# interface ethernet 2/1
switch(config-if)#

Specifies the interface on which you are enabling PTP and enters the interface configuration mode.

Note

 

After configuring this command, for Cisco NX-OS Release 9.3(5) and later, skip to step 5. For Cisco NX-OS Release 9.3(4) and earlier, continue with step 3.

Step 3

[no ] ptp transport ipv4 ucast slave

Example:

switch(config-if)# ptp transport ipv4 ucast slave
switch(config-if-ptp-slave)#

Enables PTP slave on a particular port (Layer 3 interface). In the slave sub-mode, you can enter the master IPv4 addresses.

Step 4

master ipv4 <IP_address>

Example:


switch-1(config)# interface ethernet 1/1
switch-1(config-if)# ptp transport ipv4 ucast slave
switch-1(config-if-ptp-slave)# master ipv4 4.4.4.1
switch-1(config-if-ptp-slave)# master ipv4 4.4.4.2
switch-1(config-if-ptp-slave)# master ipv4 4.4.4.3

Enters the master IPv4 addresses.

Note

 

For Cisco NX-OS Release 9.3(4) and earlier, this concludes the procedure.

Step 5

[no] ptp

Example:

switch(config-if)# ptp
switch(config-if)#

Enables or disables PTP on an interface.

Note

 

Starting with 9.3(5), this command is required prior to applying below unicast configuration commands on the interface

Step 6

ptp transmission unicast

Example:

switch(config-if)# ptp transmission unicast
switch(config-if)#

Configures the PTP transmission method that is used by the interface.

Note

 

This command is supported beginning with Cisco NX-OS Release 9.3(5).

Step 7

ptp role slave

Example:

switch(config-if)# ptp role slave
switch(config-if)#

Configures the PTP role of the interface.

slave : The slave clock is assigned as the PTP role of the interface.

Note

 

This command is supported beginning with Cisco NX-OS Release 9.3(5).

Step 8

ptp master ipv4-address

Example:

switch(config-if)# ptp master 10.10.10.1
switch(config-if)#

Sets the IP address of the master clock when the PTP role of the interface is set to "slave".

Note

 

This command is supported beginning with Cisco NX-OS Release 9.3(5).

Configuring Unicast Source Address


Note


For all releases up to, and including Cisco NX-OS Release 9.3(4), if the PTP configuration on the interface is changed from unicast to multicast or unicast slave to unicast master, you must reconfigure the unicast source address.

Beginning with Cisco NX-OS Release 9.3(5), if the PTP configuration on the interface is changed from unicast to multicast or unicast slave to unicast master, you do not need to reconfigure the unicast source address.


Complete the following steps to configure unicast source address:

SUMMARY STEPS

  1. configure terminal
  2. interface ethernet slot/port
  3. [no] ptp ucast-source {<ipv4-addr>} [vrf <vrf-name>

DETAILED STEPS

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

interface ethernet slot/port

Example:

switch(config)# interface ethernet 2/1
switch(config-if)#

Specifies the interface on which you are enabling PTP and enters the interface configuration mode.

Step 3

[no] ptp ucast-source {<ipv4-addr>} [vrf <vrf-name>

Example:

switch(config-if)# ptp ucast-source 10.10.10.20
switch(config-if)#

Configure PTP source address per interface level. This IP address is used only for unicast PTP messages. The PTP unicast source IP address must be reachable.

ipv4-address: The IPv4 address of the unicast source. This is used when transport is set to IPv4.

vrf vrf-name: If the IP address is in non-default VRF, use the vrf parameter to configure the VRF.

PTP Mixed Mode

PTP supports Mixed mode for delivering PTP messages, which is detected automatically by Cisco Nexus device, based on the type of delay_req message received from connected client and no configuration is required. In this mode when slave sends delay_req in unicast message, master also replies with unicast delay_resp message.

Configuring Multiple PTP Domains

You can configure multiple PTP clocking domains on a single network. Each domain has a priority value associated with it. The default value is 255.

SUMMARY STEPS

  1. switch# configure terminal
  2. switch(config) # [no] feature ptp
  3. switch(config) # [no] ptp source ip-address [vrf vrf]
  4. switch(config) # [no] ptp multi-domain
  5. switch(config) # [no] ptp domain value priority value
  6. switch(config) # [no] ptp domain value clock-class-threshold value
  7. switch(config) # [no] ptp domain value clock-accuracy-threshold value
  8. switch(config) # [no] ptp multi-domain transition-attributes priority1 value
  9. switch(config) # [no] ptp multi-domain transition-attributes priority2 value
  10. switch(config-if) # [no] ptp domain value

DETAILED STEPS

  Command or Action Purpose

Step 1

switch# configure terminal

Enters global configuration mode.

Step 2

switch(config) # [no] feature ptp

Enables or disables PTP on the device.

Note

 

Enabling PTP on the switch does not enable PTP on each interface.

Step 3

switch(config) # [no] ptp source ip-address [vrf vrf]

Configures the source IP address for all PTP packets.

The ip-address can be in IPv4 format.

Step 4

switch(config) # [no] ptp multi-domain

Enables configuring multi domain feature on the switch. It also allow you to set the attributes such as priority, clock-class threshold , clock-accuracy threshold, transition priorities etc. on the switch.

Step 5

switch(config) # [no] ptp domain value priority value

Specify the values for the domain and priority.

The range for the domain value is from 0 to 127. The default value of the domain is 0

The range for the priority value is from 0 to 255. The default value of the priority is 255

Step 6

switch(config) # [no] ptp domain value clock-class-threshold value

Specify the values for domain and clock class threshold. The default value is 248.

The range for the domain value is from 0 to 127.

The range for the clock-class-threshold value is from 0 to 255.

Note

 

It is not necessary that a clock class threshold value ensure election of the slave clock on any ports. The switch uses this value to determine whether the source clock is traceable. If the clock class value from the peer is higher or equal than the clock class threshold value in a domain, the switch runs BMCA to elect the slave port from a domain. If none of the domains has the clock class below the threshold value, the switch runs BMCA on all the PTP enabled ports to elect the best clock.

Step 7

switch(config) # [no] ptp domain value clock-accuracy-threshold value

Specify the values for domain and clock accuracy threshold. The default value is 254.

The range for the domain value is from 0 to 127.

The range for the clock-accuracy-threshold value is from 0 to 255.

Step 8

switch(config) # [no] ptp multi-domain transition-attributes priority1 value

Sets the domain transition-attributes priority1 value that is used when sending a packet out from this domain to a peer domain. The value of the priority1 in the announce message from the remote port is replaced by the value of domain transition-attributes priority1 when the announce message has to be transmitted to a peer in a domain, that is different from that of the slave interface. The default value is 255.

The range for the transition-attributes priority1 value is from 0 to 255.

Step 9

switch(config) # [no] ptp multi-domain transition-attributes priority2 value

Sets the domain transition-attributes priority2 value that is used when sending a packet out from this domain to a peer domain. The value of the priority2 in the announce message from the remote port is replaced by the value of domain transition-attributes priority2 when the announce message has to be transmitted to a peer in a domain, that is different from that of the slave interface. The default value is 255.

The range for the transition-attributes priority2 value is from 0 to 255.

Step 10

switch(config-if) # [no] ptp domain value

Associates a domain on a PTP enabled interface. If you do not configure the domain specifically on an interface, it takes the default value (0).

The range for the domain value is from 0 to 127.

Example

The following example shows the PTP domains configured on a switch:


switch(config)# show ptp domain data
MULTI DOMAIN : ENABLED
GM CAPABILITY : ENABLED
PTP DEFAULT DOMAIN : 0
PTP TRANSITION PRIORITY1 : 20
PTP TRANSITION PRIORITY2 : 255
PTP DOMAIN PROPERTY
Domain-Number Domain-Priority Clock-Class Clock-Accuracy Ports
0         255        248             254             Eth1/1
1           1         1              254

switch(config)#

The following example shows the domains associated with each PTP enabled interfaces:


switch(config)# show ptp interface domain
PTP port interface domain
--------------------------
Port         Domain
-------  -----------------
Eth1/1        0
      1         1              254

switch(config)#

Configuring PTP Grandmaster Clock

You can configure convergence time to prevent timing loops at the PTP level when grandmaster capability is disabled on a switch. Grandmaster capability is enabled on the device by default.

.

SUMMARY STEPS

  1. switch# configure terminal
  2. switch(config) # [no] feature ptp
  3. switch(config) # [no] ptp source ip-address [vrf vrf]
  4. switch(config) # no ptp grandmaster-capable [ convergence-time]
  5. switch(config) # [no] ptp domain value clock-class-threshold value
  6. switch(config) # [no] ptp domain value clock-accuracy-threshold value
  7. switch(config) # ptp grandmaster-capable

DETAILED STEPS

  Command or Action Purpose

Step 1

switch# configure terminal

Enters global configuration mode.

Step 2

switch(config) # [no] feature ptp

Enables or disables PTP on the device.

Note

 

Enabling PTP on the switch does not enable PTP on each interface.

Step 3

switch(config) # [no] ptp source ip-address [vrf vrf]

Configures the source IP address for all PTP packets.

The ip-address can be in IPv4 format.

Step 4

switch(config) # no ptp grandmaster-capable [ convergence-time]

Disables grandmaster capability on the switch. Prevents the device from acting as a grandmaster when there is no external grandmaster available in any domains. The default convergence time is 30 seconds.

Step 5

switch(config) # [no] ptp domain value clock-class-threshold value

Specify the values for domain and clock class threshold. Clock class threshold defines the threshold value of clock class that the device uses to determine whether the source clock can be considered as a grandmaster clock.

The range for the domain value is from 0 to 127.

The range for the clock-class-threshold value is from 0 to 255.

Note

 

The switch uses this value to determine whether the source clock is traceable. If the clock class value from all the peers is higher than the clock class threshold value, the BMCA may change all the port state to listening.

Step 6

switch(config) # [no] ptp domain value clock-accuracy-threshold value

Specify the values for domain and clock accuracy threshold

The range for the domain value is from 0 to 127.

The range for the clock-accuracy-threshold value is from 0 to 255.

Step 7

switch(config) # ptp grandmaster-capable

Enables grandmaster capability on a switch.

Example

The following example displays the PTP clock information:


switch(config-if)# show ptp clock
PTP Device Type: Boundary clock
Clock Identity : f4:4e:05:ff:fe:84:7e:7c
Clock Domain: 5
Number of PTP ports: 2
Priority1 : 129
Priority2 : 255
Clock Quality:
Class : 248
Accuracy : 254
Offset (log variance) : 65535
Offset From Master : 0
Mean Path Delay : 391
Steps removed : 1
Local clock time:Wed Nov 9 10:31:21 2016
switch(config-if)#

Configuring PTP Cost Interface

You can configure interface cost on each PTP enabled port on a Cisco Nexus 3500 switch. The cost applies to each PTP enabled port if the switch has more than one path to grandmaster clock.

.

SUMMARY STEPS

  1. switch# configure terminal
  2. switch(config) # [no] feature ptp
  3. switch(config) # [no] ptp source ip-address [vrf vrf]
  4. switch(config-if) # [no] feature ptp
  5. switch(config-if) # [no] ptp cost value

DETAILED STEPS

  Command or Action Purpose

Step 1

switch# configure terminal

Enters global configuration mode.

Step 2

switch(config) # [no] feature ptp

Enables or disables PTP on the device.

Note

 

Enabling PTP on the switch does not enable PTP on each interface.

Step 3

switch(config) # [no] ptp source ip-address [vrf vrf]

Configures the source IP address for all PTP packets.

The ip-address can be in IPv4 format.

Step 4

switch(config-if) # [no] feature ptp

Enables or disables PTP on the interface.

Step 5

switch(config-if) # [no] ptp cost value

Associate cost on a PTP enabled interface. The interface having the least cost becomes the slave interface.

The range for the cost is from 0 to 255. The default value is 255.

Example

The following example shows cost that is associated with each PTP enabled interfaces:


switch(config)# show ptp cost
PTP port costs
-----------------------
Port         Cost
-------  --------------
Eth1/1        255
switch(config)#

Configuring clock Identity

You can configure clock identity on a Cisco Nexus 3500 switch. The default clock identity is a unique 8-octet array presented in the form of a character array based on the switch MAC address.

.

SUMMARY STEPS

  1. switch# configure terminal
  2. switch(config) # [no] feature ptp
  3. switch(config-if) # ptp clock-identity MAC Address

DETAILED STEPS

  Command or Action Purpose

Step 1

switch# configure terminal

Enters global configuration mode.

Step 2

switch(config) # [no] feature ptp

Enables or disables PTP on the device.

Note

 

Enabling PTP on the switch does not enable PTP on each interface.

Step 3

switch(config-if) # ptp clock-identity MAC Address

Assigns 6 byte MAC address for PTP clock-identity. Default clock identity is based on the MAC address of the switch. The clock-identity is defined as per IEEE standard (MAC-48 Byte0 | MAC-48 Byte1 | MAC-48 Byte2 | FF | FE | MAC-48 Bytes3-5).

Configuring a PTP Interface to Stay in a Master State

This procedure describes how to prevent an endpoint from causing a port to transition to a slave state.

Before you begin

  • Make sure that you have globally enabled PTP on the switch and configured the source IP address for PTP communication.

  • After you globally enable PTP, it is not enabled on all supported interfaces by default. You must enable PTP interfaces individually.

SUMMARY STEPS

  1. switch # configure terminal
  2. switch(config) # interface ethernet slot/port
  3. switch(config-if) # [no] feature ptp
  4. switch(config-if) # ptp multicast master-only

DETAILED STEPS

  Command or Action Purpose

Step 1

switch # configure terminal

Enters global configuration mode.

Step 2

switch(config) # interface ethernet slot/port

Specifies the interface on which you are enabling PTP and enters interface configuration mode.

Step 3

switch(config-if) # [no] feature ptp

Enables or disables PTP on an interface.

Step 4

switch(config-if) # ptp multicast master-only

Configures the port to maintain the master state.

Example

This example shows how to configure PTP on an interface and configure the interface to maintain the Master state:

switch(config)# show ptp brief

PTP port status
----------------------------------
Port                  State 
----------------  ----------------
Eth1/1              Slave
switch(config)# interface ethernet 1/1
switch(config-if)# ptp multicast master-only
2001 Jan  7 07:50:03 A3-MTC-CR-1 %$ VDC-1 %$ %PTP-2-PTP_GM_CHANGE: Grandmaster clock has changed
 from 60:73:5c:ff:fe:62:a1:41 to 58:97:bd:ff:fe:0d:54:01 for the PTP protocol
2001 Jan  7 07:50:03 A3-MTC-CR-1 %$ VDC-1 %$ %PTP-2-PTP_STATE_CHANGE: Interface Eth1/1 change from
 PTP_BMC_STATE_SLAVE to PTP_BMC_STATE_PRE_MASTER
2001 Jan  7 07:50:03 A3-MTC-CR-1 %$ VDC-1 %$ %PTP-2-PTP_TIMESYNC_LOST: Lost sync with  master clock
2001 Jan  7 07:50:07 A3-MTC-CR-1 %$ VDC-1 %$ %PTP-2-PTP_STATE_CHANGE: Interface Eth1/1 change from
 PTP_BMC_STATE_PRE_MASTER to PTP_BMC_STATE_MASTER

Timestamp Tagging

The timestamp tagging feature provides precision time information to track in real time when packets arrive at remote devices. Packets are truncated and timestamped using PTP with nanosecond accuracy. Using the TAP aggregation functionality on the switch, along with the Cisco Nexus Data Broker, you can copy the network traffic using SPAN, filter and timestamp the traffic, and send it for recording and analysis.

Configuring Timestamp Tagging


Note


Configuring timestamp tagging is not supported on Cisco Nexus 9508 switches with 9636C-R, 9636C-RX, and 9636Q-R line cards.

Note


  • When you use the ttag feature in a VXLAN EVPN multisite deployment, make sure that the ttag is stripped (ttag-strip ) on BGW's DCI interfaces that connect to the cloud. To elaborate, if the ttag is attached to non-Nexus 9000 devices that do not support ether-type 0x8905, stripping of ttag is required.

  • BGW back-to-back model of DCI does not require ttag stripping.

  • Cisco Nexus 9800 switches do not support routing of ether-type 0x8905 packets.


Before you begin

Make sure that you have globally enabled PTP offloading.

SUMMARY STEPS

  1. configure terminal
  2. interface type slot/port
  3. [no] ttag

DETAILED STEPS

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

interface type slot/port

Example:

switch(config)# interface ethernet 2/2
switch(config-if)# 

Enters interface configuration mode for the specified interface.

Step 3

[no] ttag

Example:

switch(config-if)# ttag

Configures timestamp tagging on the Layer 2 or Layer 3 egress interface.

Configuring the TTAG Marker Packets and Time Interval

The ttag timestamp field attaches a 48-bit timestamp on the marker packet. This 48-bit timestamp is not a human familiar ASCII based timestamp. To make this 48-bit timestamp human readable, the ttag marker packet can be used to provide additional information to decode the 48-bit timestamp information.

Field

Position (byte:bit)

Length

Definition

Magic

16

By default, this field displays A6A6. This enables to identify ttag-marker packets on the packet stream.

Version

8

Version number. The default version is 1.

Granularity

16

This field represents the granularity of the 48-bit timestamp size. By default, the value is 04, which is 100 picoseconds or 0.1. nanoseconds.

UTc_offset

8

The utc_offset between the ASIC and the UTC clocks. The default value is 0.

Timestamp_hi

32

The high 16-bit of 48- bit ASIC hardware timestamp.

Note

 

Add Correction_hi and Correction_lo to Timestamp_hi and Timestamp_lo fields to get the 64-bit ASIC hardware timestamp.

Timestamp_lo

32

The low 32-bit of 48- bit ASIC hardware timestamp.

Note

 

Add Correction_hi and Correction_lo to Timestamp_hi and Timestamp_lo fields to get the 64-bit ASIC hardware timestamp.

UTC sec

32

The seconds part of UTC timestamp from the CPU clock of the Cisco Nexus 9000 Series switch.

UTC nsec

32

The nanoseconds part of UTC timestamp from the CPU clock of the Cisco Nexus 9000 Series switch.

Reserved

32

Reserved for future use.

Correction_hi

32

The high 32-bit of cumulative PTP correction on the Cisco Nexus 9000 Series switch.

Note

 

Add Correction_hi and Correction_lo to Timestamp_hi and Timestamp_lo fields to get the 64-bit ASIC hardware timestamp.

Correction_lo

32

The low 32-bit of cumulative PTP correction on the Cisco Nexus 9000 Series switch.

Note

 

Add Correction_hi and Correction_lo to Timestamp_hi and Timestamp_lo fields to get the 64-bit ASIC hardware timestamp.

Signature

32

The default value is 0xA5A5A5A5. This allows a forward search of marker packet and provide references to the UTC timestamp, so the client software can use that reference UTC to recover the 32-bit hardware timestamp in each packet header.

Pad

64

This is align byte to convert the ttag-marker align to 4 byte boundary.

Before you begin

Make sure that you have globally enabled PTP offloading.

SUMMARY STEPS

  1. configure terminal
  2. ttag-marker-interval seconds
  3. interface type slot/port
  4. [no] ttag-marker enable
  5. ttag-strip

DETAILED STEPS

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

ttag-marker-interval seconds

Example:

switch(config-if)# ttag-marker-interval 90

Configures the seconds that a switch will take to send a ttag-marker packet to the outgoing ports. This is a global setting to the switch. By default, it sends a ttag-marker packet every 60 seconds. The range for seconds is from 1 to 25200.

Step 3

interface type slot/port

Example:

switch(config)# interface ethernet 2/2
switch(config-if)# 

Enters interface configuration mode for the specified interface.

Step 4

[no] ttag-marker enable

Example:

switch(config-if)# ttag-marker enable

Sends the ttag-marker packets to the outgoing port.

Step 5

ttag-strip

Example:

switch(config-if)# ttag-strip

Removes TTAG from egress packets on the interface.

Verifying the PTP Configuration

Use one of the following commands to verify the configuration:

Table 2. PTP Show Commands
Command Purpose
show ptp brief

Displays the PTP status.

show ptp clock

Displays the properties of the local clock, including the clock identity.

show ptp clock foreign-masters-record

Displays the state of foreign masters known to the PTP process. For each foreign master, the output displays the clock identity, basic clock properties, and whether the clock is being used as a grandmaster.

show ptp corrections

Displays the last few PTP corrections.

show ptp parent

Displays the properties of the PTP parent.

show ptp port interface ethernet slot/port

Displays the status of the PTP port on the switch.

show ptp domain data

Displays multiple domain data, domain priority, clock threshold and information about grandmaster capabilities.

show ptp interface domain

Displays information about the interface to domain association.

show ptp cost

Displays PTP port to cost association.

show ptp detail

Displays the list of all connected peers for each PTP port and indicates whether the role is static or dynamic.

show ptp time-property

Displays the PTP clock properties.