Configuring PTP


Understanding Precision Time Protocol

Configuring PTP

Displaying the PTP Configuration

Understanding Precision Time Protocol

The IEEE 1588 standard describes the use of PTP for fault-tolerant synchronization of network real-time clocks.

The clocks in a PTP network are organized into a master-slave hierarchy. The grandmaster clock is called the Best Master Clock (BMC), and is the root of the master-slave clock hierarchy. PTP uses the BMC algorithm to identify the switch port that is connected to a device that has the most accurate clock which becomes the master clock.

The master clock receives its clock source from the Global Positioning System (GPS) time. The slaves are the other network devices that synchronize their clocks to the master clock. The parent is the clock to which the member-slave clocks synchronize. Timing messages between the master and slave clocks ensure continued synchronization.

Synchronization behavior depends on the PTP clock setting mode that you configure on the switch. The mode can be boundary, end-to-end transparent, or forward.

A switch clock in boundary mode participates in the selection of the most accurate master clock. If more accurate clocks are not detected, that switch clock becomes the master clock. If a more accurate clock is found among the slave clocks, then the switch synchronizes to that clock and becomes a slave clock. After initial synchronization, the switch and the connected devices exchange timing messages to correct the changes caused by clock offsets and network delays.

A switch clock in end-to-end transparent mode synchronizes all switch ports with the master clock. This switch does not participate in master clock selection and uses the default PTP clock mode on all ports.

A switch clock in forward mode allows incoming PTP packets to pass-through the switch as normal multicast traffic.

When the switch is in PTP forward mode, PTP configuration is not available except when changing PTP mode to another mode. You can only configure per-port PTP when the switch is in boundary mode.

You can enable PTP pass-through processing by performing a global configuration on the switch. After PTP pass-through is enabled, all PTP messages are passed to and from the expansion module ports in the VLAN on which the packets are received.

The PTP pass-through feature is not compatible with the Virtual Routing and Forwarding (VRF), Policy Based Routing (PBR), and PVLAN (Private Virtual Local Area Network) features.

Configuring PTP

Default Configuration

Setting Up PTP

Default Configuration

By default, PTP is enabled on all the Fast Ethernet and Gigabit Ethernet ports on the base switch module. The default PTP mode on all ports is end-to-end transparent.

Table 8-1 Default PTP Configuration 

Feature
Default Setting

PTP boundary mode

Disabled

PTP forward mode

Disabled

PTP end-to-end transparent mode

Enabled

PTP priority 1 and PTP priority 2

Default priority number is 128.

PTP announce interval

2 seconds

PTP announce timeout

8 seconds

PTP delay request interval

32 seconds

PTP sync interval

1 second

PTP sync limit

500000000 nanoseconds.

PTP pass-through

Disabled


Setting Up PTP

Beginning in privileged EXEC mode:

 
Command
Purpose

Step 1 

configure terminal

Enters global configuration mode.

Step 2 

ptp {mode {boundary | e2etransparent | forward} | priority1 value | priority2 value | passthrough}

Specifies the synchronization clock.

mode boundary—Acts as a grandmaster clock and the parent clock to all connected devices. Enables the switch to participate in selecting the most accurate master clock.

Use this mode when overload or heavy load conditions produce significant delay jitter.

mode e2etransparent (end-to-end transparent)—Synchronizes all switch ports with the master clock. This is the default clock mode.

Use this mode to reduce jitter and error accumulation.

mode forward—Allows the incoming PTP packets to pass-through the switch as normal multicast traffic.

Specifies the clock priority properties when the switch port is in boundary mode.

priority1 value—Overrides the default criteria (such as clock quality and clock class) for the most accurate master clock selection. Lower values take precedence. The range is from 0 to 255. The default is 128.

priority2 value—Breaks the tie between two switches that match default criteria. For example, you can use a priority 2 value to give a switch priority over identical switches. The range is from 0 to 255. The default is 128.

Specifies the PTP pass-through option.

passthrough—Enables PTP messages on the expansion module ports.

This option is available when the switch port is in boundary or transparent mode.

Step 3 

interface interface-id

Enters interface configuration mode.

Step 4 

ptp {announce {interval value | timeout value} | delay-req interval value | enable | sync {interval value | limit value}}

Specifies the settings for the timing messages. These options are available only when the switch is in boundary mode.

announce interval value—Sets the time to send announce messages. The range is 0 to 4 seconds. The default is 1 (2 seconds).

announce timeout value Sets the time to announce timeout messages. The range is 2 to 10 seconds. The default is 3 (8 seconds).

delay-req interval value—Sets the time for slave devices to send delay request messages when the port is in the master clock state. The range is -1 second to 6 seconds. The default is 5 (32 seconds).

enable—Enables PTP on the port base module.

sync interval value—Sets the time to send synchronization messages. The range is -1 second to 1 second. The default is 1 second.

sync limit value—Sets the maximum clock offset value before PTP attempts to resynchronize. The range is from 50 to 500000000 nanoseconds. The default is 500000000 nanoseconds.

Step 5 

end

Returns to privileged EXEC mode.

Step 6 

show running-config

Verifies your entries.

Step 7 

copy running-config startup-config

(Optional) Saves your entries in the configuration file.

Displaying the PTP Configuration

Table 8-2 Commands for Displaying the PTP Configuration

Command
Purpose

show ptp clock

Displays the PTP clock properties.

show ptp foreign-master-record

Displays the PTP foreign master data set.

show ptp parent

Displays the parent and grandmaster clock properties.

show ptp passthrough

Displays the PTP pass-through information.

show ptp port

Displays all the PTP port properties.

show ptp port FastEthernet interface

Displays the PTP FastEthernet properties on the specified port.

show ptp port GigabitEthernet interface

Displays the PTP Gigabit Ethernet properties on the specified port.

show ptp time-property

Displays the PTP time properties.