- Table of Contents
-
- 14-Network Management and Monitoring Configuration Guide
- 00-Preface
- 01-System maintenance and debugging configuration
- 02-NQA configuration
- 03-NTP configuration
- 04-PTP configuration
- 05-Network synchronization configuration
- 06-SNMP configuration
- 07-RMON configuration
- 08-NETCONF configuration
- 09-CWMP configuration
- 10-EAA configuration
- 11-Process monitoring and maintenance configuration
- 12-Sampler configuration
- 13-Mirroring configuration
- 14-NetStream configuration
- 15-IPv6 NetStream configuration
- 16-Fast log output configuration
- 17-Flow log configuration
- 18-Information center configuration
- 19-GOLD configuration
- 20-Packet capture configuration
- 21-Flow monitor configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
04-PTP configuration | 200.34 KB |
Contents
Grandmaster clock selection and master-member/subordinate relationship establishment
Restrictions and guidelines: PTP configuration
Specifying PTP for obtaining the system time
Configuring an OC to operate only as a member clock
Configuring the role of a PTP port
Configuring the mode for carrying timestamps
Specifying a delay measurement mechanism
Configuring one of the ports on a TC+OC clock as an OC-type port
Configuring PTP message transmission and receiving
Setting the interval for sending Pdelay_Req messages
Setting the interval for sending Sync messages
Setting the minimum interval for sending Delay_Req messages
Configuring parameters for PTP messages
Specifying UDP encapsulation for PTP messages
Configuring a source IP address for UDP-encapsulated multicast PTP messages
Configuring a unicast destination IP address for UDP-encapsulated PTP messages
Configuring the destination MAC address for PTP messages
Setting a DSCP value for UDP-encapsulated PTP messages
Specifying a VLAN tag for PTP messages
Specifying the maximum number of removed steps (clock nodes) from the GM to the device
Adjusting and correcting clock synchronization
Setting the delay correction value
Setting the cumulative offset between the UTC and TAI
Setting the correction date of the UTC
Configuring ToD input or output
Configuring a priority for a clock
Display and maintenance commands for PTP
Example: Configuring PTP configuration (IEEE 1588 version 2, IEEE 802.3/Ethernet encapsulation)
Example: Configuring PTP (IEEE 1588 version 2, multicast transmission)
Configuring PTP
About PTP
Precision Time Protocol (PTP) provides time synchronization among devices with submicrosecond accuracy. It provides also precise frequency synchronization.
Basic concepts
PTP profile
The device supports only the IEEE 1588 version 2 PTP profile. This profile defines high-accuracy clock synchronization mechanisms. It can be customized, enhanced, or tailored as needed.
PTP domain
A PTP domain refers to a network that is enabled with PTP. A PTP domain has only one reference clock called "grandmaster clock (GM)." All devices in the domain synchronize to the clock.
Clock node and PTP port
A node in a PTP domain is a clock node. A port enabled with PTP is a PTP port.
IEEE 1588 version 2 defines the following types of basic clock nodes:
· Ordinary Clock (OC)—A PTP clock with a single PTP port in a PTP domain for time synchronization. It synchronizes time from its upstream clock node through the port. If an OC operates as the clock source, it sends synchronization time through a single PTP port to its downstream clock nodes.
· Boundary Clock (BC)—A clock with more than one PTP port in a PTP domain for time synchronization. A BC uses one of the ports to synchronize time from its upstream clock node. It uses the other ports to synchronize time to the relevant upstream clock nodes. If a BC operates as the clock source, such as BC 1 in Figure 1, it synchronizes time through multiple PTP ports to its downstream clock nodes.
· Transparent Clock (TC)—A TC does not keep time consistency with other clock nodes. A TC has multiple PTP ports. It forwards PTP messages among these ports and performs delay corrections for the messages, instead of performing time synchronization. TCs include the following types:
¡ End-to-End Transparent Clock (E2ETC)—Forwards non-P2P PTP packets in the network and calculates the delay of the entire link.
¡ Peer-to-Peer Transparent Clock (P2PTC)—Forwards only Sync, Follow_Up, and Announce messages, terminates other PTP messages, and calculates the delay of each link segment.
Figure 1 shows the positions of these basic clock nodes in a PTP domain.
Figure 1 Clock nodes in a PTP domain (IEEE 1588 version 2)
In addition to these basic types of clock nodes, PTP introduces hybrid clock nodes. For example, a TC+OC has multiple PTP ports in a PTP domain. One port is the OC type, and the others are the TC type.
A TC+OC forwards PTP messages through TC-type ports and performs delay corrections. In addition, it synchronizes time through its OC-type port. TC+OCs include these types: E2ETC+OC and P2PTC+OC.
Master-member/subordinate relationship
The master-member/subordinate relationship is automatically determined based on the Best Master Clock (BMC) algorithm. You can also manually specify a role for the clock nodes.
The master-member/subordinate relationship is defined as follows:
· Master/Member node—A master node sends a synchronization message, and a member node receives the synchronization message.
· Master/Member clock—The clock on a master node is a master clock (parent clock) The clock on a member node is a member clock.
· Master/Subordinate port—A master port sends a synchronization message, and a subordinate port receives the synchronization message. The master and subordinate ports can be on a BC or an OC.
A port that neither receives nor sends synchronization messages is a passive port.
Grandmaster clock
As shown in Figure 1, the clock nodes in a PTP domain are organized into a master-member hierarchy, where the GM operates as the reference clock for the entire PTP domain. Time synchronization is implemented through exchanging PTP messages.
Clock type
A clock node of a device can use one of the following clocks:
· Local clock—38.88 MHz clock signals generated by a crystal oscillator inside the clock monitoring module. You cannot configure time class and accuracy for a local clock.
· ToD clock—Clock signals generated by a ToD clock. The signals are sent and received by ToD interfaces (ToD 0 and ToD 1) on the MPU. The device sends the received signals to the clock monitoring module, which then sends them to all interface cards on the device. You can configure time class and accuracy for a ToD clock.
Among the available clock sources, a clock node selects the optimal clock as its clock based on the clock priority, time class, and time accuracy.
Grandmaster clock selection and master-member/subordinate relationship establishment
A GM can be manually specified. It can also be elected through BMC selection as follows:
1. The clock nodes in a PTP domain exchange announce messages and elect a GM by using the following rules in descending order:
a. Clock node with higher priority 1.
b. Clock node with higher time class.
c. Clock node with higher time accuracy.
d. Clock node with higher priority 2.
e. Clock node with a smaller port ID (containing clock number and port number).
The master nodes, member nodes, master ports, and subordinate ports are determined during the process. Then a spanning tree with the GM as the root is generated for the PTP domain.
2. The master node periodically sends announce messages to the member nodes. If the member nodes do not receive announce messages from the master node, they determine that the master node is invalid, and they start to elect another GM.
Synchronization mechanism
After the master-member relationship is established between the clock nodes, PTP sends synchronization messages between the master and member nodes to determine the delay measurement. The one-way delay time is the average of the delay of the transmit and receive messages. The member nodes use this delay time to adjust their local clocks.
Delay measurement mechanisms
PTP defines the following transmission delay measurement mechanisms:
· Request_Response.
· Peer Delay.
Both mechanisms assume a symmetric communication path.
Request_Response
The Request_Response mechanism includes the following modes:
· Single-step mode—t1 is carried in the Sync message, and no Follow_Up message is sent. This mode is not supported in the current software version.
· Two-step mode—t1 is carried in the Follow_Up message.
Figure 2 Operation procedure of the Request_Response mechanism
By default, the system uses multicast messages (including delay_Req, delay_Resp, delay_Resp_Follow_Up, Announce, Sync, and FollowUp messages) for measuring link delay. If you specify a unicast MAC address as the destination MAC address for PTP messages, the system unicasts the PTP messages.
Figure 2 shows an example of the Request_Response mechanism in two-step mode.
1. The master clock sends a Sync message to the member clock, and records the sending time t1. Upon receiving the message, the member clock records the receiving time t2.
2. After sending the Sync message, the master clock immediately sends a Follow_Up message that carries time t1.
3. The member clock sends a Delay_Req message to calculate the transmission delay in the reverse direction, and records the sending time t3. Upon receiving the message, the master clock records the receiving time t4.
4. The master clock returns a Delay_Resp message that carries time t4.
After this procedure, the member clock collects all four timestamps and obtains the round-trip delay to the master clock by using the following calculation:
· [(t2 – t1) + (t4 – t3)]
The member clock also obtains the one-way delay by using the following calculation:
· [(t2 – t1) + (t4 – t3)] / 2
The offset between the member and master clocks is obtained by using the following calculations:
· (t2 – t1) – [(t2 – t1) + (t4 – t3)] / 2
· [(t2 – t1) – (t4 – t3)] / 2
Peer Delay
The Peer Delay mechanism includes the following modes:
· Single-step mode (not supported in the current software version):
¡ t1 is carried in the Sync message, and no Follow_Up message is sent.
¡ The offset between t5 and t4 is carried in the Pdelay_Resp message, and no Pdelay_Resp_Follow_Up message is sent.
· Two-step mode:
¡ t1 is carried in the Follow_Up message.
¡ t4 and t5 are carried in the Pdelay_Resp and Pdelay_Resp_Follow_Up messages.
Figure 3 Operation procedure of the Peer Delay mechanism
By default, the system uses multicast messages (including Pdelay_Req, Pdelay_Resp, Pdelay_Resp_Follow_Up, Announce, Sync, and FollowUp messages) for measuring link delay. If you specify a unicast MAC address as the destination MAC address for PTP messages, the system unicasts the PTP messages.
The Peer Delay mechanism uses Pdelay messages to calculate link delay, which applies only to point-to-point delay measurement. Figure 3 shows an example of the Peer Delay mechanism by using the two-step mode.
1. The master clock sends a Sync message to the member clock, and records the sending time t1. Upon receiving the message, the member clock records the receiving time t2.
2. After sending the Sync message, the master clock immediately sends a Follow_Up message that carries time t1.
3. The member clock sends a Pdelay_Req message to calculate the transmission delay in the reverse direction, and records the sending time t3. Upon receiving the message, the master clock records the receiving time t4.
4. The master clock returns a Pdelay_Resp message that carries time t4, and records the sending time t5. Upon receiving the message, the member clock records the receiving time t6.
5. After sending the Pdelay_Resp message, the master clock immediately sends a Pdelay_Resp_Follow_Up message that carries time t5.
After this procedure, the member clock collects all six timestamps and obtains the round-trip delay to the master clock by using the following calculation:
· [(t4 – t3) + (t6 – t5)]
The member clock also obtains the one-way delay by using the following calculation:
· [(t4 – t3) + (t6 – t5)] / 2
The offset between the member and master clocks is as follows:
· (t2 – t1) – [(t4 – t3) + (t6 – t5)] / 2
Protocols and standards
· IEEE 1588-2008, IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems
· IEEE P802.1AS, Timing and Synchronization for Time-Sensitive Applications in Bridged Local Area Networks
· ITU-T G.8275.1, Precision time protocol telecom profile for phase/time synchronization with full timing support from the network
Restrictions and guidelines: PTP configuration
· PTP is supported only on the following interfaces:
¡ Interfaces on a CEPC-XP48RX card.
¡ Interfaces operating in LAN mode on a CEPC-XP24LX card.
¡ Interfaces on the MIC-CP1L, NIC-CC1L, and NIC-CC2L subcards.
¡ Interfaces operating in LAN mode on the MIC-XP4L1, MIC-XP5, MIC-XP5L1, and MIC-XP20L subcards.
For information about LAN mode, see Ethernet interface configuration in Interface Configuration Guide.
· PTP operates correctly only when the device runs the SR05SRP1L3 and SR05SRP1L3 MPUs.
· The device does not support PTP in an IRF fabric. For information about IRF, see Virtual Technologies Configuration Guide.
PTP tasks at a glance
Configuring PTP
1. Specifying PTP for obtaining the system time
Specify the IEEE 1588 version 2 PTP profile.
¡ Specifying a clock node type
¡ (Optional.) Configuring an OC to operate only as a member clock
4. (Optional.) Specifying a PTP domain
¡ (Optional.) Configuring the role of a PTP port
¡ Configuring the mode for carrying timestamps
¡ Specifying a delay measurement mechanism
¡ Configuring one of the ports on a TC+OC clock as an OC-type port
7. (Optional.) Configuring PTP message transmission and receiving
¡ Setting the interval for sending announce messages and the timeout multiplier for receiving announce messages
¡ Setting the interval for sending Pdelay_Req messages
¡ Setting the interval for sending Sync messages
¡ Setting the minimum interval for sending Delay_Req messages
8. (Optional.) Configuring parameters for PTP messages
¡ Specifying the protocol for encapsulating PTP messages as UDP
¡ Configuring a source IP address for UDP-encapsulated multicast PTP messages
¡ Configuring a destination IP address for UDP-encapsulated unicast PTP message
¡ Configuring the MAC address for PTP messages
¡ Setting a DSCP value for PTP messages transmitted over UDP
¡ Specifying a VLAN tag for PTP messages
9. (Optional.) Adjusting and correcting clock synchronization
¡ Setting the delay correction value
¡ Setting the cumulative offset between the UTC and TAI
¡ Setting the correction date of the UTC
¡ Configuring ToD input or output
10. (Optional.) Setting ToD clock parameters
11. (Optional.) Configuring a priority for a clock
12. (Optional.) Configuring PTP logging
Specifying PTP for obtaining the system time
1. Enter system view.
system-view
2. Specify PTP for obtaining the system time.
clock protocol ptp mdc mdc-id
By default, the device uses NTP for obtaining the system time.
For more information about the clock protocol command, see device management commands in Fundamentals Command Reference.
Specifying a PTP profile
Restrictions and guidelines
You must specify a PTP profile before configuring PTP settings. Changing the PTP profile clears all settings under the profile.
Procedure
1. Enter system view.
system-view
2. Specify the IEEE 1588 version 2 PTP profile.
ptp profile 1588v2
By default, no PTP profile is configured, and PTP is not running on the device.
Configuring clock nodes
Specifying a clock node type
Restrictions and guidelines
You can specify only one clock node type for the device. The clock node types include OC, BC, E2ETC, P2PTC, E2ETC+OC, and P2PTC+OC.
Before you specify a clock node type, specify a PTP profile.
Changing or removing the clock node type restores the default settings of the PTP profile.
Procedure
1. Enter system view.
system-view
2. Specify a clock node type for the device.
ptp mode { bc | e2etc | e2etc-oc | oc | p2ptc | p2ptc-oc }
By default, no clock node type is specified.
Configuring an OC to operate only as a member clock
About configuring an OC to operate only as a member clock
An OC can operate either as a master clock to send synchronization messages or as a member clock to receive synchronization messages. This task allows you to configure an OC to operate only as a member clock.
If an OC is operating only as a member clock, you can use the ptp force-state command to configure its PTP port as a master port or passive port.
Restrictions and guidelines
This task is applicable only to OCs.
Procedure
1. Enter system view.
system-view
2. Configure the OC to operate only as a member clock.
ptp slave-only
By default, an OC operates as a master or member clock.
Specifying a PTP domain
About PTP domains
Within a PTP domain, all devices follow the same rules to communicate with each other. Devices in different PTP domains cannot exchange PTP messages.
Procedure
1. Enter system view.
system-view
2. Specify a PTP domain for the device.
ptp domain value
By default, the device is in PTP domain 0.
Enabling PTP on a port
About enabling PTP on a port
A port enabled with PTP becomes a PTP port.
Restrictions and guidelines
You can enable PTP on only one port on an OC.
Procedure
1. Enter system view.
system-view
2. Enter Layer 2 Ethernet interface view or Layer 3 Ethernet interface view.
interface interface-type interface-number
3. Enable PTP on the port.
ptp enable
By default, PTP is disabled on a port.
Configuring PTP ports
Configuring the role of a PTP port
About configuring the role of a PTP port
You can configure the master, passive, or slave role for a PTP port.
For an OC that operates in slave-only mode, you can perform this task to change its PTP port role to master or slave.
Restrictions and guidelines
Only one subordinate port is allowed to be configured for a device.
After you change the role of a PTP port, you must execute the ptp active force-state command to activate the port role configuration.
Procedure
1. Enter system view.
system-view
2. Enter Layer 2 Ethernet interface view or Layer 3 Ethernet interface view.
interface interface-type interface-number
3. Configure the role of the PTP port.
ptp force-state { master | passive | slave }
By default, the PTP port role is automatically calculated through BMC.
4. Return to system view.
quit
5. Activate the port role configuration.
ptp active force-state
By default, the port role configuration is not activated.
Configuring the mode for carrying timestamps
About the mode for carrying timestamps
Timestamps can be carried in either of the following modes:
· Single-step mode—The following messages contain the message sending time:
¡ Sync message in the Request_Response and Peer Delay mechanisms.
¡ Pdelay_Resp message in the Peer Delay mechanism.
This mode is not supported in the current software version.
· Two-step mode—All messages contain the message sending time, except for the following messages:
¡ Sync message in the Request_Response and Peer Delay mechanisms.
¡ Pdelay_Resp message in the Peer Delay mechanism.
Procedure
1. Enter system view.
system-view
2. Enter Layer 2 Ethernet interface view or Layer 3 Ethernet interface view.
interface interface-type interface-number
3. Configure the mode for carrying timestamps.
ptp clock-step { one-step | two-step }
By default, two-step mode is used for carrying timestamps.
The one-step keyword is not supported in the current software version.
Specifying a delay measurement mechanism
About the delay measurement mechanism
PTP defines two transmission delay measurement mechanisms: Request_Response and Peer Delay. For correct communication, ports on the same link must share the same delay measurement mechanism.
You can configure this task only for BCs and OCs. The delay measurement mechanism is Request_Response for E2ETCs and E2ETC+OCs and Peer Delay for P2PTCs and P2PTC+OCs. You cannot change the delay measurement mechanism for these clock nodes.
Procedure
1. Enter system view.
system-view
2. Enter Layer 2 Ethernet interface view or Layer 3 Ethernet interface view.
interface interface-type interface-number
3. Specify a delay measurement mechanism.
ptp delay-mechanism { e2e | p2p }
The e2e keyword specifies the Request_Response mechanism, and the p2p keyword specifies the Peer Delay mechanism.
By default, the Request_Response mechanism (p2p) applies.
Configuring one of the ports on a TC+OC clock as an OC-type port
About configuring one of the ports on a TC+OC clock as an OC-type port
All ports on a TC+OC (E2ETC+OC or P2PTC+OC) are TC-type ports by default. This feature allows you to configure one of the ports on a TC+OC clock as an OC-type port.
Restrictions and guidelines
This task is applicable only to E2ETC+OCs and P2PTC+OCs.
When a TC+OC is synchronizing time to a downstream clock node through a TC-type port, prevent it from synchronizing with the downstream clock node through an OC-type port.
Procedure
1. Enter system view.
system-view
2. Enter Layer 2 Ethernet interface view or Layer 3 Ethernet interface view.
interface interface-type interface-number
3. Configure the port type as OC.
ptp port-mode oc
By default, the port type for all ports on a TC+OC is TC.
Configuring PTP message transmission and receiving
Setting the interval for sending announce messages and the timeout multiplier for receiving announce messages
About the interval for sending announce messages and the timeout multiplier for receiving announce messages
A master node sends announce messages to the member nodes at the specified interval. If a member node does not receive any announce messages from the master node within the specified interval, it determines that the master node is invalid.
The timeout for receiving announce messages is the announce message sending interval for the subordinate node × multiple-value.
Procedure
1. Enter system view.
system-view
2. Enter Layer 2 Ethernet interface view or Layer 3 Ethernet interface view.
interface interface-type interface-number
3. Set the interval for sending announce messages.
ptp announce-interval interval
The value of the interval argument is 1 and the interval for sending announce messages is 2 (21) seconds.
4. Set the number of intervals before a timeout occurs.
ptp announce-timeout multiple-value
By default, a timeout occurs when three intervals are reached.
Setting the interval for sending Pdelay_Req messages
1. Enter system view.
system-view
2. Enter Layer 2 Ethernet interface view or Layer 3 Ethernet interface view.
interface interface-type interface-number
3. Set the interval for sending Pdelay_Req messages.
ptp pdelay-req-interval interval
The default interval is 1 (20) second.
Setting the interval for sending Sync messages
1. Enter system view.
system-view
2. Enter Layer 2 Ethernet interface view or Layer 3 Ethernet interface view.
interface interface-type interface-number
3. Set the interval for sending Sync messages.
ptp syn-interval interval
By default, the value of the interval argument is 0 and the interval for sending Sync messages is 1 (20) second.
Setting the minimum interval for sending Delay_Req messages
About the minimum interval for sending Delay_Req messages
When receiving a Sync or Follow_Up message, an interface can send Delay_Req messages only when the minimum interval is reached.
Restrictions and guidelines
The configured interval takes effect only if it is set on the master clock. The master clock sends the value to a member clock through PTP messages to control the interval for the member clock to send Delay_Req messages. To view the value on a member clock, execute the display ptp interface command on the member clock.
Procedure
1. Enter system view.
system-view
2. Enter Layer 2 Ethernet interface view or Layer 3 Ethernet interface view.
interface interface-type interface-number
3. Set the minimum interval for sending Delay_Req messages.
ptp min-delayreq-interval interval
The default is 1 (20) second.
Configuring parameters for PTP messages
Specifying UDP encapsulation for PTP messages
About UDP encapsulation for PTP messages
PTP messages can be encapsulated in IEEE 802.3/Ethernet packets or UDP packets.
Restrictions and guidelines
Only interfaces operating in Layer 3 mode on the MIC-CP1L, NIC-CC1L, and NIC-CC2L subcards support UDP encapsulation of PTP messages.
Procedure
1. Enter system view.
system-view
2. Enter Layer 2 Ethernet interface view or Layer 3 Ethernet interface view.
interface interface-type interface-number
3. Specify UDP encapsulation for PTP messages.
ptp transport-protocol udp
By default, PTP messages are encapsulated in IEEE 802.3/Ethernet packets.
Configuring a source IP address for UDP-encapsulated multicast PTP messages
About configuring a source IP address for UDP-encapsulated multicast PTP messages
To multicast UDP-encapsulated PTP messages, you must configure a source IP address for the messages.
Restrictions and guidelines
If a multicast source IP address and a unicast destination IP address are configured for UDP-encapsulated PTP messages, the system unicasts the messages.
Procedure
1. Enter system view.
system-view
2. Configure a source IP address for UDP-encapsulated multicast PTP messages.
ptp source ip-address [ vpn-instance vpn-instance-name ]
By default, no source IP address is configured for UDP-encapsulated multicast PTP messages.
Configuring a unicast destination IP address for UDP-encapsulated PTP messages
About configuring a unicast destination IP address for UDP-encapsulated PTP messages
UDP-encapsulated PTP messages can be transmitted through unicast or multicast.
To unicast UDP-encapsulated messages, specify the IP address of the peer PTP port as its destination IP address.
The multicast destination address for PTP messages is 224.0.1.129 (Request_Response delay mechanism) or 224.0.0.107 (Peer Delay delay mechanism).
Restrictions and guidelines
If you specify both a multicast source IP address and a unicast destination IP address for UDP-encapsulated PTP messages, the system unicasts the messages.
Prerequisites
Configure an IP address for the current interface, and make sure the interface and the peer PTP interface can reach each other.
Procedure
1. Enter system view.
system-view
2. Enter Layer 3 Ethernet interface view.
interface interface-type interface-number
3. Configure a unicast destination IP address for UDP-encapsulated PTP messages.
ptp unicast-destination ip-address
By default, no unicast destination IP address is configured for UDP-encapsulated PTP messages.
Configuring the destination MAC address for PTP messages
About the destination MAC address for PTP messages
IEEE 802.3/Ethernet-encapsulated PTP messages can be sent through multicast or unicast. The destination MAC address for PTP messages can be as follows:
· Any unicast MAC address in unicast mode.
· In multicast mode:
¡ 0180-C200-000E or 011B-1900-0000 for non-Pdelay messages, including delay_Req, delay_Resp, delay_Resp_Follow_Up, Announce, Sync, and FollowUp messages.
¡ 0180-C200-000E for Pdelay messages, including Pdelay_Req, Pdelay_Resp, and Pdelay_Resp_Follow_Up messages.
Restrictions and guidelines
You must specify a PTP profile and a PTP clock node type before configuring this feature.
This feature takes effect only when PTP messages are encapsulated in IEEE 802.3/Ethernet packets.
Procedure
1. Enter system view.
system-view
2. Enter Layer 2 Ethernet interface view or Layer 3 Ethernet interface view.
interface interface-type interface-number
3. Configure the destination MAC address for PTP messages.
ptp destination-mac mac-address
By default, the destination MAC address for non-Pdelay messages is 011B-1900-0000 and the destination MAC address for Pdelay messages is 0180-C200-000E.
Setting a DSCP value for UDP-encapsulated PTP messages
About DSCP values for UDP-encapsulated PTP messages
The DSCP value determines the sending precedence of UDP-encapsulated PTP messages.
Procedure
1. Enter system view.
system-view
2. Enter Layer 2 Ethernet interface view or Layer 3 Ethernet interface view.
interface interface-type interface-number
3. Set a DSCP value for UDP-encapsulated PTP messages.
ptp dscp dscp
By default, the DSCP value for UDP-encapsulated PTP messages is 56.
Specifying a VLAN tag for PTP messages
About specifying a VLAN tag for PTP messages
Perform this task to configure the VLAN ID in the VLAN tag carried by PTP messages.
Procedure
1. Enter system view.
system-view
2. Enter Layer 2 Ethernet interface view.
interface interface-type interface-number
3. Specify a VLAN tag for PTP messages.
ptp vlan vlan-id [ dot1p dot1p-value ]
By default, PTP messages do not have a VLAN tag.
The device uses 7 as the 802.1p precedence regardless of your setting.
Specifying the maximum number of removed steps (clock nodes) from the GM to the device
About specifying the maximum number of removed steps from the GM to the device
If the number of removed steps from the GM to the device on the PTP synchronization path is too large, the time synchronization accuracy will decrease. After you specify the maximum number of removed steps from the GM to the device, the device cannot synchronize time through PTP if the number of the removed steps exceeds the maximum value.
Procedure
1. Enter system view.
system-view
2. Specify the maximum number of removed steps from the GM to the device.
ptp max-steps-removed step-removed-value
By default, the maximum number of removed steps from the GM to the device is 255.
Adjusting and correcting clock synchronization
Setting the delay correction value
About setting the delay correction value
PTP performs time synchronization based on the assumption that the delays in sending and receiving messages are the same. However, this is not practical. If you know the offset between the delays in sending and receiving messages, you can set the delay correction value for more accurate time synchronization.
Procedure
1. Enter system view.
system-view
2. Enter Layer 2 Ethernet interface view or Layer 3 Ethernet interface view.
interface interface-type interface-number
3. Set a delay correction value.
ptp asymmetry-correction { minus | plus } value
The default is 0 nanoseconds. Delay correction is not performed.
Setting the cumulative offset between the UTC and TAI
About setting the cumulative offset between the UTC and TAI
The time displayed on a device is based on the Coordinated Universal Time (UTC). There is an offset between UTC and TAI (International Atomic Time, in English), which is made public periodically. This task allows you to adjust the offset between the UTC and TAI on the device.
Restrictions and guidelines
This configuration is applicable only to the GM.
Procedure
1. Enter system view.
system-view
2. Set the cumulative offset between the UTC and TAI.
ptp utc offset utc-offset
The default is 0 seconds.
Setting the correction date of the UTC
About setting the correction date of the UTC
This task allows you to adjust the UTC at the last minute (23:59) of the specified date.
Restrictions and guidelines
If you configure the setting multiple times, the most recent configuration takes effect.
This configuration takes effect only on the GM.
Procedure
1. Enter system view.
system-view
2. Set the correction date of the UTC.
ptp utc { leap59-date | leap61-date } date
By default, the correction date of the UTC is not configured.
Configuring ToD input or output
About configuring ToD input or output
To use a ToD clock, you must configure ToD input or output:
· ToD input—The device obtains clock signals from an external ToD clock and synchronizes ToD to all cards on the device.
· ToD output—The device operates as a ToD clock to synchronize ToD to other devices in the PTP network.
To implement more accurate time synchronization, you can specify a delay correction value.
Procedure
1. Enter system view.
system-view
2. Configure ToD input or output.
ptp tod0 input [ delay input-delay-time ]
ptp tod1 output [ delay output-delay-time ]
By default, whether to receive or transmit ToD clock signals is not configured.
Setting ToD clock parameters
1. Enter system view.
system-view
2. Set ToD clock parameters.
ptp clock-source { tod0 | tod1 } { accuracy acc-value | class class-value | time-source ts-value }
By default, the time accuracy is 32, the time class is 6, and the attribute value is 32 for a ToD clock.
The tod1 keyword is not supported in the current software version.
Configuring a priority for a clock
About configuring a priority for a clock
Priorities for clocks are used to elect the GM. The smaller the priority value, the higher the priority.
Procedure
1. Enter system view.
system-view
2. Configure the priority for a clock for GM election through BMC.
ptp priority clock-source { local | tod0 | tod1 } { priority1 priority1 | priority2 priority2 }
By default, priority 1 and priority 2 values are both 128.
Configuring PTP logging
About configuring PTP logging
PTP logs are used to monitor the clock source status. The following PTP logs are available:
· PTP log that indicates a lower time class
Each PTP clock source has a class value. For a ToD clock source, you can set its class value by using the ptp clock-source command. The higher the value, the lower the class. When the class value of the clock source crosses the class threshold, the system outputs a log for notification.
· PTP log that indicates a higher time offset between the external reference clock and the PTP clock
If the device uses an external reference clock, it periodically calculates the time offset between the external reference clock and the PTP clock. When the offset exceeds the threshold, the device outputs a log for notification.
Procedure
1. Enter system view.
system-view
2. Configure the class threshold for the clock source.
ptp alarm-threshold clock-source-class class-value
By default, the class threshold for the clock source is 6.
3. Configure the time-offset threshold between the external reference clock and the PTP clock.
ptp alarm-threshold time-offset time-offset-value
By default, the time-offset threshold is 500 between the external reference clock and the PTP clock.
Display and maintenance commands for PTP
Execute display commands in any view and the reset command in user view.
Task |
Command |
Display PTP clock information. |
display ptp clock |
Display the delay correction history. |
display ptp corrections |
Display information about foreign master nodes. |
display ptp foreign-masters-record [ interface interface-type interface-number ] |
Display PTP information on an interface. |
display ptp interface [ interface-type interface-number | brief ] |
Display parent node information for the PTP device. |
display ptp parent |
Display brief information about the PTP synchronization path from the GM to the device. |
display ptp path-trace |
Display PTP statistics. |
display ptp statistics [ interface interface-type interface-number ] |
Display PTP clock time properties. |
display ptp time-property |
Clear PTP statistics. |
reset ptp statistics [ interface interface-type interface-number ] |
PTP configuration examples
Example: Configuring PTP configuration (IEEE 1588 version 2, IEEE 802.3/Ethernet encapsulation)
Network configuration
As shown in Figure 4, a PTP domain contains Device A, Device B, and Device C.
· Configure all devices to use PTP standard IEEE 1588 version 2.
· Configure PTP messages to be encapsulated in IEEE 802.3/Ethernet packets.
· Configure the clock node type of Device A and Device C as OC, and that of Device B as E2ETC. All clock nodes elect a GM through BMC based on their respective default GM attributes.
Procedure
1. Configure Device A:
# Specify the PTP standard as IEEE 1588 version 2.
<DeviceA> system-view
[DeviceA] ptp profile 1588v2
# Specify the clock node type as OC.
[DeviceA] ptp mode oc
# Specify PTP for obtaining the system time.
[DeviceA] clock protocol ptp mdc 1
# Enable PTP on Ten-GigabitEthernet 3/3/1.
[DeviceA] interface ten-gigabitethernet 3/1/1
[DeviceA-Ten-GigabitEthernet3/1/1] ptp enable
[DeviceA-Ten-GigabitEthernet3/1/1] quit
2. Configure Device B:
# Specify the PTP standard as IEEE 1588 version 2.
<DeviceB> system-view
[DeviceB] ptp profile 1588v2
# Specify the clock node type as E2ETC.
[DeviceB] ptp mode e2etc
# Specify PTP for obtaining the system time.
[DeviceB] clock protocol ptp mdc 1
# Enable PTP on Ten-GigabitEthernet 3/1/1.
[DeviceB] interface ten-gigabitethernet 3/1/1
[DeviceB-Ten-GigabitEthernet3/1/1] ptp enable
[DeviceB-Ten-GigabitEthernet3/1/1] quit
# Enable PTP on Ten-GigabitEthernet 3/1/2.
[DeviceB] interface ten-gigabitethernet 3/1/2
[DeviceB-Ten-GigabitEthernet3/1/2] ptp enable
[DeviceB-Ten-GigabitEthernet3/1/2] quit
3. Configure Device C:
# Specify the PTP standard as IEEE 1588 version 2.
<DeviceC> system-view
[DeviceC] ptp profile 1588v2
# Specify the clock node type as OC.
[DeviceC] ptp mode oc
# Specify PTP for obtaining the system time.
[DeviceC] clock protocol ptp mdc 1
# Enable PTP on Ten-GigabitEthernet 3/1/1.
[DeviceC] interface ten-gigabitethernet 3/1/1
[DeviceC-Ten-GigabitEthernet3/1/1] ptp enable
[DeviceC-Ten-GigabitEthernet3/1/1] quit
Verifying the configuration
When the network is stable, perform the following tasks to verify that Device A is elected as the GM, Ten-GigabitEthernet 3/1/1 on Device A is the master port, and Device B has synchronized to Device A:
¡ Use the display ptp clock command to display PTP clock information.
¡ Use the display ptp interface brief command to display brief PTP statistics on an interface.
# Display PTP clock information on Device A.
[DeviceA] display ptp clock
PTP profile : IEEE 1588 Version 2
PTP mode : OC
Slave only : No
Clock ID : 000FE2-FFFE-FF0000
Clock type : Local
Clock domain : 0
Number of PTP ports : 1
Priority1 : 128
Priority2 : 128
Clock quality :
Class : 248
Accuracy : 37
Offset (log variance) : 65535
Offset from master : 0 (ns)
Mean path delay : 0 (ns)
Steps removed : 0
Local clock time : Sun Jan 15 20:57:29 2011
# Display brief PTP statistics on Device A.
[DeviceA] display ptp interface brief
Name State Delay mechanism Clock step Asymmetry correction
XGE3/1/1 Master E2E Two 0
# Display PTP clock information on Device B.
[DeviceB] display ptp clock
PTP profile : IEEE 1588 Version 2
PTP mode : E2ETC
Slave only : No
Clock ID : 000FE2-FFFE-FF0001
Clock type : Local
Clock domain : 0
Number of PTP ports : 2
Priority1 : 128
Priority2 : 128
Clock quality :
Class : 248
Accuracy : 37
Offset (log variance) : 65535
Offset from master : N/A
Mean path delay : N/A
Steps removed : N/A
Local clock time : Sun Jan 15 20:57:29 2011
# Display brief PTP statistics on Device B.
[DeviceB] display ptp interface brief
Name State Delay mechanism Clock step Asymmetry correction
XGE3/1/1 N/A E2E Two 0
XGE3/1/2 N/A E2E Two 0
Example: Configuring PTP (IEEE 1588 version 2, multicast transmission)
Network configuration
As shown in Figure 5, a PTP domain contains Device A, Device B, and Device C.
· Configure all devices to use PTP standard IEEE 1588 version 2.
· Configure the source IP address for multicast PTP message transmission over UDP.
· Configure the clock node type as OC for Device A and Device C, and P2PTC for Device B. All clock nodes elect a GM through BMC based on their respective default GM attributes.
· Configure the delay measurement mechanism for Device A and Device C as p2p.
Procedure
1. Configure Device A:
# Specify the PTP standard as IEEE 1588 version 2.
<DeviceA> system-view
[DeviceA] ptp profile 1588v2
# Specify the clock node type as OC.
[DeviceA] ptp mode oc
# Configure the source IP address for multicast PTP message transmission over UDP.
[DeviceA] ptp source 10.10.10.1
# Specify PTP for obtaining the system time.
[DeviceA] clock protocol ptp mdc 1
# On Ten-GigabitEthernet 3/1/1, specify the PTP transport protocol as UDP, specify the delay measurement mechanism as p2p, and enable PTP.
[DeviceA] interface ten-gigabitethernet 3/1/1
[DeviceA-Ten-GigabitEthernet3/1/1] ptp transport-protocol udp [DeviceA-Ten-GigabitEthernet3/1/1] ptp delay-mechanism p2p
[DeviceA-Ten-GigabitEthernet3/1/1] ptp enable
[DeviceA-Ten-GigabitEthernet3/1/1] quit
2. Configure Device B:
# Specify the PTP standard as IEEE 1588 version 2.
<DeviceB> system-view
[DeviceB] ptp profile 1588v2
# Specify the clock node type as P2PTC.
[DeviceB] ptp mode p2ptc
# Configure the source IP address for multicast PTP message transmission over UDP.
[DeviceB] ptp source 10.10.10.2
# Specify PTP for obtaining the system time.
[DeviceB] clock protocol ptp mdc 1
# On Ten-GigabitEthernet 3/1/1, specify the PTP transport protocol as UDP and enable PTP.
[DeviceB] interface ten-gigabitethernet 3/1/1
DeviceB-Ten-GigabitEthernet3/1/1] ptp transport-protocol udp
[DeviceB-Ten-GigabitEthernet3/1/1] ptp enable
[DeviceB-Ten-GigabitEthernet3/1/1] quit
# On Ten-GigabitEthernet 3/1/2, specify the PTP transport protocol as UDP and enable PTP.
[DeviceB] interface ten-gigabitethernet 3/1/2
[DeviceB-Ten-GigabitEthernet3/1/2] ptp transport-protocol udp
[DeviceB-Ten-GigabitEthernet3/1/2] ptp enable
[DeviceB-Ten-GigabitEthernet3/1/2] quit
3. Configure Device C:
# Specify the PTP standard as IEEE 1588 version 2.
<DeviceC> system-view
[DeviceC] ptp profile 1588v2
# Specify the clock node type as OC.
[DeviceC] ptp mode oc
# Configure the source IP address for multicast PTP message transmission over UDP.
[DeviceC] ptp source 10.10.10.3
# Specify PTP for obtaining the system time.
[DeviceC] clock protocol ptp mdc 1
# On Ten-GigabitEthernet 3/1/1, specify the PTP transport protocol as UDP, specify the delay measurement mechanism as p2p, and enable PTP.
[DeviceC] interface ten-gigabitethernet 3/1/1
[DeviceC-Ten-GigabitEthernet3/1/1] ptp transport-protocol udp [DeviceC-Ten-GigabitEthernet3/1/1] ptp delay-mechanism p2p
[DeviceC-Ten-GigabitEthernet3/1/1] ptp enable
[DeviceC-Ten-GigabitEthernet3/1/1] quit
Verifying the configuration
When the network is stable, perform the following tasks to verify that Device A is elected as the GM, Ten-GigabitEthernet 3/1/1 on Device A is the master port, and Device B has synchronized to Device A:
¡ Use the display ptp clock command to display PTP clock information.
¡ Use the display ptp interface brief command to display brief PTP statistics on an interface.
# Display PTP clock information on Device A.
[DeviceA] display ptp clock
PTP profile : IEEE 1588 Version 2
PTP mode : OC
Slave only : No
Clock ID : 000FE2-FFFE-FF0000
Clock type : Local
Clock domain : 0
Number of PTP ports : 1
Priority1 : 128
Priority2 : 128
Clock quality :
Class : 248
Accuracy : 37
Offset (log variance) : 65535
Offset from master : 0 (ns)
Mean path delay : 0 (ns)
Steps removed : 0
Local clock time : Sun Jan 15 20:57:29 2011
# Display brief PTP statistics on Device A.
[DeviceA] display ptp interface brief
Name State Delay mechanism Clock step Asymmetry correction
XGE3/1/1 Master P2P Two 0
# Display PTP clock information on Device B.
[DeviceB] display ptp clock
PTP profile : IEEE 1588 Version 2
PTP mode : P2PTC
Slave only : No
Clock ID : 000FE2-FFFE-FF0001
Clock type : Local
Clock domain : 0
Number of PTP ports : 2
Priority1 : 128
Priority2 : 128
Clock quality :
Class : 248
Accuracy : 37
Offset (log variance) : 65535
Offset from master : N/A
Mean path delay : N/A
Steps removed : N/A
Local clock time : Sun Jan 15 20:57:29 2011
# Display brief PTP statistics on Device B.
[DeviceB] display ptp interface brief
Name State Delay mechanism Clock step Asymmetry correction
XGE3/1/1 N/A P2P Two 0
XGE3/1/2 N/A P2P Two 0