- Preface
- New and Changed Information
- Overview
- Configuring Switch Profiles
- Configuring Module Pre-Provisioning
- Using Cisco Fabric Services
- Configuring PTP
- Configuring User Accounts and RBAC
- Configuring Session Manager
- Configuring Online Diagnostics
- Configuring System Message Logging
- Configuring Smart Call Home
- Configuring Rollback
- Configuring DNS
- Configuring SNMP
- Configuring RMON
- Configuring SPAN
- Configuring ERSPAN
- Index
Configuring PTP
This chapter contains the following sections:
- Information About PTP
- PTP Device Types
- PTP Process
- Clock Management
- High Availability for PTP
- Licensing Requirements for PTP
- Guidelines and Limitations for PTP
- Default Settings for PTP
- Configuring PTP
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 3 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 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. |
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.
Clock Management
By default, Cisco NX-OS uses NTP to update the system clock. However, if the clock protocol property is configured to PTP, PTP is allowed to update the system clock.
If PTP is enabled, NTP does not update the system time.
High Availability for PTP
Stateful restarts are supported for PTP. After a reboot or a supervisor switchover, the running configuration is applied.
Licensing Requirements for PTP
PTP requires no license. Any feature not included in a license package is bundled with the Cisco NX-OS system images and is provided at no extra charge to you. For a complete explanation of the Cisco NX-OS licensing scheme, see the Cisco NX-OS Licensing Guide.
Guidelines and Limitations for PTP
-
PTP operates only in boundary clock mode. End-to-end transparent clock and peer-to-peer transparent clock modes are 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.
-
All management messages are forwarded on ports on which PTP is enabled. Handling management messages is not supported.
-
PTP is only configurable on switch ports. Configuring PTP on FEX ports is not supported.
-
PTP-capable ports do not identify PTP packets and do not time-stamp or redirect those packets unless you enable PTP on those ports.
-
PTP is only supported on physical Ethernet-based ports.
-
In VPC environments, PTP must be individually configured on each member port.
-
PTP over FabricPath is not supported.
Default Settings for PTP
The following table lists the default settings for 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 |
0 log seconds |
PTP announce timeout |
3 announce intervals |
PTP minimum delay request interval |
0 log seconds |
PTP VLAN |
1 |
Configuring PTP
Configuring PTP Globally
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.
Make sure that you have globally enabled PTP on the switch and configured the source IP address for PTP communication.
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) # [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 | 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 log(-6) to log(1) seconds. Where, log(-2) = 2 frames per second. |
Step 6 | 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 sync interval is from -3 seconds to 1 second. |
Step 7 | 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 | switch(config-if) # show ptp brief | (Optional)
Displays the PTP status. |
Step 9 | switch(config-if) # show ptp port interface interface slot/port | (Optional)
Displays the status of the PTP port. |
Step 10 | 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. |
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)#
Verifying the PTP Configuration
Use one of the following commands to verify the configuration:
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 and grandmaster clock. |
show ptp port interface ethernet slot/port | Displays the status of the PTP port on the switch. |
show ptp time-property | Displays the PTP clock time properties. |
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. |