Print

Timing Protocols

The Precision Time Protocol (PTP) provides a greater degree of clock accuracy for networked devices, allowing clocks to be synchronized locally in increments of less than a microsecond. PTP uses a master-slave hierarchy similar to that used by NTP. The most precise clock available is referred to as the master clock, and slave devices use the signal from the master to synchronize their own clocks.

The master clock sends out a sync message (referred to as an announce message in IEEE 1588-2008) at a regular interval. The slave clock responds with a time-stamped delay request message in order to measure and compensate for packet delays between the devices. The slave then receives a message from the master specifying when the delay message was received, which allows the slave to calculate final values for clock synchronization. Synchronization is maintained by the regular exchange of PTP packets between master and slave.

Note: Arista switches do not support setting of the system clock using PTP. System clock synchronization is best supported by the NTP service on the PTP grandmaster.

PTP is disabled globally by default. The following steps are required to enable PTP on an interface:

The following PTP global configurations are optional:

The following PTP interface-level configurations are optional:

Setting the PTP Mode

To allow PTP to be used on switch interfaces, first set the PTP mode using the ptp mode command. PTP mode options include:

  • boundary The device acts as a boundary clock, and both runs and participates in the best master clock algorithm.
  • disabled PTP is disabled, and the device forwards all PTP packets as normal traffic.
  • end-to-end transparent The device acts as an end-to-end transparent clock, synchronizing all ports to a connected master clock and updating the time interval field of forwarded PTP packets using switch residence time.
  • peer-to-peer transparent The device acts as a peer-to-peer transparent clock, synchronizing all ports to a connected master clock and updating the time interval field of forwarded PTP packets using switch residence time and inbound path delays.
  • generalized Precision Time Protocol (gPTP) The device runs generalized Precision Time Protocol (gPTP), participating in the best master clock algorithm but also updating the interval field of forwarded PTP packets using switch residence time and inbound path delays.

To disable PTP globally on the switch, use the no or default forms of the ptp mode command.

Example:
This command configures the device as a PTP boundary clock.
switch(config)#ptp mode boundary
switch(config)#

Enabling PTP on an Interface

To enable PTP on a specific interface on the device, use the ptp enable command.

Example

  • This command enables PTP on Ethernet interface 5.
    switch(config)#interface ethernet 5
    switch(config-if-Et5)#ptp enable
    
    

Configuring the PTP Domain

To set the domain number to use for the clock, use the ptp domain command.

  • This command configures the domain 1 to use with a clock.
    switch(config)#ptp domain 1
    switch(config)#
    

Configuring the Offset Hold Time

To set the PTP offset hold time, use the ptp hold-ptp-time command.

  • This command configures the PTP offset hold time to 600 seconds.
    switch(config)#ptp hold-ptp-time 600
    switch(config)#
    

Setting the PTP Priority

To set the priority 1 value, use the ptp priority1 command. Lower values take precedence.

This command configures the priority 1 value of 120 to use when advertising the clock.
switch(config)#ptp priority1 120
switch(config)#

To set the priority 2 value for the clock, use the ptp priority2 command.

This command configures the priority 2 value of 128.

switch(config)#ptp priority2 128
switch(config)#

Configuring the Source IP

To set the source IP address for all PTP packets, use the ptp source ip command.

  • This command configures the source IP address of 10.0.2.1 for all PTP packets.
    switch(config)#ptp source ip 10.0.2.1
    switch(config)#
    

Configuring the TTL for PTP Packets

To set the time to live (TTL) of PTP packets, use the ptp ttl command. TTL is the maximum number of hops that a PTP packet may make.

  • This command configures a TTL of 64 hops for PTP packets.
    switch(config)#ptp ttl 64
    switch(config)#
    

Configuring PTP Monitoring

PTP monitoring records PTP information including offset from master, mean path delay, and skew values, which can then be viewed using a show command. When this feature is enabled, PTP Syslog messages will also be generated for those metrics for which threshold values have been configured on the switch. PTP monitoring is enabled by default.

Enabling and Disabling PTP Monitoring

Use the ptp monitor command to enable PTP monitoring on the device (it is enabled by default). The no form of the command disables PTP monitoring and clears all the recorded PTP data.

Example

  • This command disables PTP monitoring and clears all recorded PTP data from the switch.
    switch(config)#no ptp monitor

Configuring the Offset-from-master Threshold

The offset is the difference in nanoseconds between master and slave time. Use the ptp monitor threshold offset-from-master command to specify the offset-from-master threshold in nanoseconds. A Syslog message is generated if the most recently calculated time offset from the PTP master is outside of the range (-<threshold>, <threshold>). The maximum offset threshold is one second. The no form of the command clears the threshold value and prevents further Syslog messages from being generated for this parameter.

Example

  • This command sets an offset-from-master threshold value of 500 nanoseconds.
    switch(config)#ptp monitor threshold offset-from-master 500 

Configuring the Mean-path-delay Threshold

Mean path delay is the mean time in nanoseconds that PTP packets take to travel between master and slave. Use the ptp monitor threshold mean-path-delay command to specify the mean-path-delay threshold in nanoseconds. A Syslog message is generated if the value of the most recently calculated mean path delay is greater than or equal to this threshold. The maximum mean-path-delay threshold is one second. The no form of the command clears the threshold value and prevents further Syslog messages from being generated for this parameter.

Note:

Mean path delay is always non-negative.

Example

  • This command sets a mean-path-delay threshold value of 2000 nanoseconds.
    switch(config)#ptp monitor threshold mean-path-delay 2000 

Configuring the Skew Threshold

PTP skew is the clock frequency difference between master and slave. Use the ptp monitor threshold skew command to configure the value of the skew-threshold percentage. A Syslog message is generated if the value of the most recently calculated skew is not in the range (1/(1+<threshold>), 1*(1+<threshold>)). Skew threshold percentage is represented a double precision (16 digit) real number ranging from 0 (0%) to 10 (1000%). The no form of the command clears the threshold value and prevents further Syslog messages from being generated for this parameter.

Example

  • This command sets a skew threshold value of 5 (500%).
    switch(config)#ptp monitor threshold skew 5 

Setting the PTP Announce Interval

To set the interval at which an interface sends PTP announce messages, use the ptp announce interval command. The interval is measured in log seconds. This value also affects the timeout interval.

This command configures the interval between PTP announcement messages on Ethernet interface 5 to 4 seconds.
switch(config)#interface ethernet 5
switch(config-if-Et5)#ptp announce interval 2
switch(config-if-Et5)#

Setting the PTP Timeout Interval

To set the timeout multiplier for an interface, use the ptp announce timeout command. The timeout multiplier is the number of announcement intervals that the interface will wait without receiving a PTP announcement before a timeout occurs; values range from 2 to 255. The default multiplier is 3, which results in a 6-second timeout interval when the announcement interval is set to the default of 2 seconds.

This command sets timeout multiplier for the interface to 5; since the announcement interval has just been set to 2 (4 seconds), this means the interface will time out if it doesnt receive a PTP announcement for 20 seconds.
switch(config-if-Et5)#ptp announce timeout 5
switch(config-if-Et5)#

Configuring the PTP Delay Mechanism

To set the delay mechanism used in boundary-mode, use the ptp delay-mechanism command.

  • This command sets the delay mechanism in boundary clock mode for the interface to peer-to-peer.
    switch(config-if-Et5)#ptp delay-mechanism p2p
    switch(config-if-Et5)#
    

Setting the Delay Request Interval

To set the time for the slave devices to send delay request messages, use the ptp delay-req interval command.

  • This command sets the time the slave devices to send delay request messages to the master state to 3 for the interface.
    switch(config-if-Et5)#ptp delay-request interval 3
    switch(config-if-Et5)#
    

Setting the Peer Delay Request Interval

To set the minimum interval between the PTP peer delay-request messages, use the ptp pdelay-req interval command.

This command sets the interval between PTP peer delay-request messages on the interface to 3.
switch(config-if-Et5)#ptp pdelay-request interval 3
switch(config-if-Et5)#

Setting the Peer Link Propagation Threshold

To set the delay threshold for which the peer will be considered unable to run generalized Precision Time Protocol (gPTP), use the ptp pdelay-neighbor-threshold command.

  • This command sets the link propagation delay threshold on the interface to 200000 nanoseconds..
    switch(config-if-Et5)#ptp pdelay-neighbor-threshold 200000
    switch(config-if-Et5)#
    

Setting the Interval for Sending Synchronization Messages

To set the interval (in log seconds) for sending synchronization messages, use the ptp sync-message interval command. Value ranges and defaults vary based on the PTP mode of the switch.

  • This command configures the interval for sending synchronization messages on the interface to 3 (8 seconds).
    switch(config-if-Et5)#ptp sync-message interval 3
    switch(config-if-Et5)#
    

Setting the PTP Transport Type

To set the PTP transport type, use the ptp transport command.

  • This command configures the PTP transport type for the interface to IPv4.
    switch(config-if-Et5)#ptp transport ipv4
    switch(config-if-Et5)#
    
..