About PTP
PTP is a time synchronization protocol defined in IEEE 1588 for nodes distributed across a network. With PTP, it is possible to synchronize distributed clocks with an accuracy of less than 1 microsecond via Ethernet networks.
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.
PTP supports the following functionality:
-
Multicast PTP transport—In the multicast transport mode, PTP uses multicast destination IP address 224.0.1.129 as per IEEE 1588 standards for communication between devices. For the source IP address, it uses the user configurable global IP address under the PTP domain.
-
PTP multicast configuration is supported only under physical interface for L2 or L3. PTP is not supported for virtual interfaces such as Port-channel, SVI, and tunnel.
-
PTP encapsulation over UDP over IP—PTP uses UDP as the transport protocol over IP. PTP uses UDP ports 319 for event messages and 320 for general messages communication between devices.
-
PTP profiles—PTP supports default (1588) and SMPTE 2059-2 profiles. They all have different ranges of sync and delay request intervals. For information on the default profile, refer to IEEE 1588. For more information on SMPTE 2059-2, refer to the respective specifications.
-
Path delay measurement—We support delay request and response mechanism to measure the delay between the master and slave devices.
-
Message intervals—You can configure the interval at which the announce, sync, and delay request messages needs to be sent between devices.
-
Best master clock (BMC) selection—BMC algorithm is used to select master, slave, and passive states of the PTP enabled interfaces based on the Announce message received as per 1588 specification.
PTP Device Types
The PTP device type is configurable and can be used to set the clock type.
Clocks
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 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. Cisco recommends deployment of a Grand Master Clock (10 MHz) upstream, with servers containing clocks requiring synchronization 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 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.
Note |
Cisco Nexus 3550-T Release 10.2(3t) supports only Two-Step 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
The ordinary and boundary clocks use Sync , Delay_Req , Follow_Up , Delay_Resp event messages to generate and communicate timing information.
These messages are sent in the following sequence:
-
The master sends a Sync message to the slave and notes the time,
t1
at which it was sent. For one-step Sync message carries the time when the message leaves the master and for two-step this time is sent in the subsequent Follow-Up event message. -
The slave receives the Sync message and notes the time of reception,
t2
. -
The master conveys to the slave the timestamp,
t1
by embedding the timestamp in a Follow_Up event message. -
The slave sends a Delay_Req message to the master and notes the time,
t3
at which it was sent. -
The master receives the Delay_Req message and notes the time of reception,
t4
. -
The master conveys to the slave the timestamp,
t4
by embedding it in a Delay_Resp message. -
After this sequence, the slave possesses all four timestamps. These timestamps can be used to compute the offset of the slave clock relative to the master, and the mean propagation time of messages between the two clocks.
The following figure describes the event messages in the PTP process that generate and communicate timing information.
High Availability for PTP
Stateful restarts are not supported for PTP. After a reboot, the running configuration is applied.