Configuring PTP
This chapter describes how to configure the Precision Time Protocol (PTP) on the Cisco IE 3000 switch.
•Understanding PTP
•Configuring PTP
•Displaying the PTP Configuration
Understanding PTP
The Precision Time Protocol (PTP), as defined in the IEEE 1588 standard, synchronizes with nanosecond accuracy the real-time clocks of the devices in a network. The clocks are organized into a master-member hierarchy. PTP identifies the switch port that is connected to a device with the most precise clock. This clock is referred to as the master clock. All the other devices on the network synchronize their clocks with the master and are referred to as members. Constantly exchanged timing messages ensure continued synchronization.
PTP is particularly useful for industrial automation systems and process control networks, where motion and precision control of instrumentation and test equipment are important.
You can globally configure the switch to pass PTP packets through the switch as normal multicast traffic (forward mode), to synchronize all switch ports with the grand master clock (end-to-end transparent mode), or you can configure boundary clock mode, where the switch participates in selecting the best master clock and can act as the master clock if no better clocks are detected.
When the switch is in PTP forward or end-to-end transparent mode, no PTP configuration is available except configuring PTP mode to another mode. You can only configure per-port PTP when the switch is in boundary mode.
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. Only the ports on the base switch module are PTP-capable. The switch expansion modules do not support PTP. The default PTP mode on all ports is end-to-end transparent.
Table 9-1 Default PTP Configuration
|
|
PTP boundary mode |
Disabled |
PTP forward mode |
Disabled |
PTP transparent mode |
Enabled |
PTP priority1 and PTP priority2 |
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 |
50000 nanoseconds |
Setting Up PTP
Beginning in privileged EXEC mode, follow these steps to set up PTP:
|
|
|
Step 1 |
configure terminal |
Enter global configuration mode. |
Step 2 |
ptp {mode {boundary | e2etransparent | forward} | priority1 value | priority2 value} |
Set the synchronization clock. •Select boundary mode to enable the switch to participate in selecting the best master clock. If no better clocks are detected, the switch becomes the grandmaster clock on the network and the parent clock to all connected devices. If the best master is determined to be a clock connected to the switch, the switch synchronizes to that clock as a child to the clock, then acts as a parent clock to devices connected to other ports. After initial synchronization, the switch and the connected devices exchange timing messages to correct time skew caused by clock offsets and network delays. Use this mode when overload or heavy load conditions produce significant delay jitter. •Select e2etransparent (end-to-end transparent) mode for the switch to synchronize all switch ports with the grand master clock connected to the switch,. This is the default clock mode. The switch corrects for the delay incurred by every packet passing through it (referred to residence time). This mode causes less jitter and error accumulation than boundary mode. •Select forward mode for incoming PTP packets to pass through the switch as normal multicast traffic.This disables both boundary and end-to-end transparent mode. When the switch port is in boundary mode, set the clock priority properties. •Specify the priority1 value to override the default criteria (clock quality, clock class, etc.) for best master clock selection. Lower values take precedence.The range for both is from 0 to 255. The default is 128. •Specify a priority2 value to be used as a tie-breaker between two devices that are otherwise equally matched in the default criteria. For example, you can use priority2 value to give a specific switch priority over other identical switches. The range for both is from 0 to 255. The default is 128. These values set the clock priority on the PTP network for the purpose of best master selection. |
Step 3 |
interface interface-id |
Specify an interface to configure, and enter interface configuration mode. Enter the number of the switch port, including port type (such as Fa for Fast Ethernet and Gi for Gigabit Ethernet), the base switch number (1), and the specific port number. For example: Fa1/1 is Fast Ethernet port 1 on the base switch. |
Step 4 |
ptp {announce {interval value | timeout value} | delay-req interval value | enable | sync {interval value| limit value}} |
Specify the settings for the timing messages. These options are only available when the switch is in boundary mode. •For announce interval, specify the time for sending announce messages. The range is 0 to 4 seconds. The default is 1 (2 seconds). •For timeout value, specify the time for announcing timeout messages. The range is 2 to 10 seconds. The default is 3 (8 seconds). •For delay request interval, specify the time recommended to the member devices to send delay request messages when the port is in the master state. The range is -1 second to 6 seconds. The default is 5 (32 seconds). •For sync interval, enter the time for sending synchronization messages. The range is -1 second to 1 second. The default is 1 second. •For sync limit, specify the maximum clock offset value before PTP attempts to resynchronize. The range is 50 to 500000000 nanoseconds. The default is 50000 nanoseconds.
Note We recommend against setting the sync limit below the default (50000 nanoseconds). Use values below 50000 nanoseconds only in networks with a high-precision grand master clock.
|
Step 5 |
end |
Return to privileged EXEC mode. |
Step 6 |
show running-config |
Verify your entries. |
Step 7 |
copy running-config startup-config |
(Optional) Save your entries in the configuration file. |
Displaying the PTP Configuration
To display the PTP configuration, use one or more of these privileged EXEC commands in Table 9-2.
Table 9-2 Commands for Displaying the PTP Configuration
|
|
show ptp clock |
Display the PTP clock properties. |
show ptp foreign-master-record |
Display the PTP foreign-master dataset. |
show ptp parent |
Display the parent and grand-master properties. |
show ptp port |
Display all the PTP port properties. |
show ptp FastEthernet interface |
Display the PTP FastEthernet properties on the specified port. |
show ptp GigabitEthernet interface |
Display the PTP GigabitEthernet properties on the specified port. |
show ptp time-property |
Display the PTP time properties. |