01-15 PTP Configuration

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 64

S300, S500, S2700, S5700, and S6700 Series

Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

15 PTP Configuration

15.1 Overview of PTP


15.2 Understanding PTP
15.3 Application Scenarios for PTP
15.4 Summary of PTP Configuration Tasks
15.5 Licensing Requirements and Limitations for PTP
15.6 Default Settings for PTP
15.7 Configuring 1588v2 on an OC
15.8 Configuring 1588v2 on a BC
15.9 Configuring 1588v2 on a TC
15.10 Configuring 1588v2 on a TCandBC
15.11 Configuring G.8275.1
15.12 Maintaining PTP
15.13 Configuration Examples for PTP

15.1 Overview of PTP


Definition
PTP is used to implement high-precision time and frequency synchronization
between devices on an Ethernet network. In this document, PTP includes 1588v2
and G.8275.1.
IEEE 1588 provides high-precision time synchronization. Two versions exist: 1588v1
and 1588v2. IEEE 1588v1 provides sub-millisecond precision time synchronization.
This version has been replaced by IEEE 1588v2, which provides sub-microsecond
precision time synchronization.
Similar to IEEE 1588, G.8275.1 is designed to meet requirements for precise time
synchronization between devices across an entire network. However, unlike IEEE

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 814


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

1588, G.8275.1 can be widely used in a variety of domains, such as power,


measurement and control, military, and telecommunications systems. G.8275.1 is a
telecommunications-specific protocol defined by ITU-T.

Purpose
On wireless networks, clock synchronization is critical in enabling successful
communication between the mobile bearer network and base stations. A number
of methods, such as the global positioning system (GPS), Network Time Protocol
(NTP), and synchronous Ethernet, can be used to implement time and frequency
synchronization. However, GPS requires antennas to be deployed at each base
station, leading to high deployment and maintenance costs. NTP provides only
sub-second precision time synchronization, which is unable to meet precise
synchronization requirements. Synchronous Ethernet supports only high-precision
frequency synchronization but not time synchronization.

PTP addresses the limitations found in the preceding methods. It is inexpensive to


deploy and maintain. 1588v2 and G.8275.1 can provide sub-microsecond precision
time synchronization and offers increased security because it operates
independent of the GPS.

Benefits
● Provides sub-microsecond precision time synchronization for transmission
devices.
● Reduces network construction and maintenance costs because a GPS receiver
does not need to be deployed or maintained for each base station.

15.2 Understanding PTP

15.2.1 PTP Fundamentals

Concepts of Clock Synchronization


Telecommunications services on modern communications networks require that
the frequency offset or time difference between devices be within an acceptable
range. This requirement must be met using network clock synchronization.

Clock synchronization includes frequency synchronization and phase


synchronization.

● Frequency synchronization
Frequency synchronization indicates that signals have the same frequency and
a fixed phase difference. That is, signals are sent or received at an average
rate. All devices on a communications network operate at the same rate.
● Phase synchronization
Phase synchronization, also called time synchronization, indicates that both
frequencies and phases of signals are consistent. That is, the phase offset
between signals is always 0.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 815


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

In the following sections, time synchronization indicates phase synchronization,


and clock synchronization indicates both phase synchronization and frequency
synchronization.

Figure 15-1 Difference between time synchronization and frequency


synchronization

Clock Synchronization Implementation


A network that implements clock synchronization between network devices is
called a clock synchronization network. Such a network uses a two-level
architecture, as shown in Figure 15-2. Level-1 nodes are level-1 clock
synchronization devices, level-2 nodes are level-2 clock synchronization devices,
and nodes below level-2 nodes are clients that require clock synchronization.
A client clock synchronization link connects a node and a client. Any transmission
link can be used as a client clock synchronization link because multiple
synchronization methods, including Ethernet clock synchronization and Network
Time Protocol (NTP), are required between nodes and clients. A node clock
synchronization link connects two nodes. Any transmission link except a link that
runs NTP can be used as a node clock synchronization link.
PTP organizes all clocks into a master-slave synchronization hierarchy, with the
grandmaster clock at the top of the hierarchy. PTP messages are used to
implement clock synchronization. To synchronize its local clock with the master
clock in the hierarchy, a slave clock uses the timestamp carried in PTP messages to
calculate its offset and delay compared with the master clock.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 816


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

Figure 15-2 Clock synchronization network hierarchy

Basic Concepts
● PTP domain
A PTP domain is a logical area that runs PTP. More than one PTP domains
may exist on a network. Each PTP domain is an independent PTP clock
synchronization system and has only one clock source. All devices in a PTP
domain synchronize their clocks with the clock source.
● 1588v2 clock nodes
Clock nodes are nodes in a PTP domain. PTP defines the following types of
clock nodes:
– Ordinary clock (OC) device: provides only one physical port to participate
in time synchronization in a PTP domain. An OC device uses this port to
synchronize time with an upstream device or to send time to a
downstream device.
– Boundary clock (BC) device: provides two or more physical ports to
participate in time synchronization in a PTP domain. One port
synchronizes time with an upstream device, and the others send the time
to downstream devices. A clock node is also a BC device if it functions as
the clock source and sends time to downstream devices through multiple
PTP ports.
– Transparent clock (TC) device: forwards PTP messages between its PTP
ports and measures the link delay of the messages. Different from an OC
device and a BC device, a TC device does not synchronize time with other
devices through ports.
● 1588v2 clock types
– OC: ordinary clock
– BC: boundary clock
– End to end transparent clock (E2ETC) for the delay mechanism: is a TC
using a delay measurement mechanism in delay mode. A device that
functions as an E2ETC does not need to have the delay measurement
mechanism mode configured.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 817


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

– Peer to peer transparent clock (P2PTC) for the Pdelay mechanism: is a TC


using a delay measurement mechanism in Pdelay mode. A device that
functions as a P2PTC does not need to have the delay measurement
mechanism mode configured.
– End to end transparent clock (E2ETC) for the delay mechanism: is an
ordinary TC in terms of time synchronization and a special TC that
synchronizes the frequency with upstream devices based on PTP
messages. For an E2ETCOC, the ports that function as a TC work in the
delay measurement mechanism.
– Peer to peer transparent clock and ordinary clock (P2PTCOC): is similar to
an E2ETCOC. For a P2PTCOC, the ports that function as a TC work in the
Pdelay measurement mechanism.
– Transparent clock and boundary clock (TCandBC): For a TCandBC, some
PTP ports function as a BC that synchronizes the clock with other devices,
and other PTP ports function as a TC that transmits PTP messages and
does not perform delay calculation.
● G.8275.1 clock nodes
The clock nodes supported by G.8275.1 are as follows:
– Telecom grandmaster (T-GM): is a master-only clock that can have one or
more PTP ports. It does not trace other PTP clocks.
– Telecom boundary clock (T-BC): can be a master clock and trace other
PTP clocks.
– Telecom time slave clock (T-TSC): is a slave-only clock.
● G.8275.1 clock type: T-BC
● PTP port
A PTP port is a port running PTP. PTP ports are classified into the following
types based on roles:
– Master port: is located on a BC, T-BC, or OC device and sends
synchronization clock signals to a downstream port.
– Slave port: is located on a BC, T-BC, or OC device and receives
synchronization clock signals from an upstream port.
– Passive port: is an idle port on a T-BC or BC device and does not send or
receive synchronization clock signals.
● Master-slave hierarchy
Nodes in a PTP domain are organized into a master-slave hierarchy. Master
nodes send synchronization clock signals, whereas slave nodes receive
synchronization clock signals. A device may receive synchronization clock
signals from an upstream node and then send the synchronization clock
signals to a downstream device.
If two clock nodes synchronize time with each other:
– The node that sends synchronization clock signals is the master node,
and the node that receives synchronization clock signals is the slave node.
– The clock on the master node is the master clock, and the clock on the
slave node is the slave clock.
– The port that sends synchronization clock signals is the master port, and
the port that receives synchronization clock signals is the slave port.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 818


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

● Grandmaster clock
All clock nodes in a PTP domain are organized into a master-slave hierarchy.
The grandmaster clock (GMC) is at the top of the hierarchy and serves as the
reference clock. Clock nodes exchange PTP messages to synchronize the time
of the GMC to the entire PTP domain. Therefore, the GMC is also called the
clock source. The GMC can be statically configured or dynamically elected
through the best master clock (BMC) algorithm.
● PTP message
Nodes exchange PTP messages to establish the master-slave hierarchy and
implement time and frequency synchronization. PTP messages are classified
into event messages and general messages depending on timestamps:
– Event message: is tagged with a timestamp when reaching or leaving a
port. PTP devices calculate the link delay based on the timestamps
carried in event messages. Event messages include Sync, Delay_Req,
Pdelay_Req, and Pdelay_Resp messages.
– General message: is used to establish master-slave hierarchy, and to
request and send time information. General messages are not tagged
with timestamps. General messages include Announce, Follow_Up,
Delay_Resp, Pdelay_Resp_Follow_Up, Management, and Signaling
messages. Currently, devices do not support Management and Signaling
messages.
Messa 1588 G. Function
ge v2 8275.
1

Sync Supp Supp A Sync message is sent from the master to the
orted orted slave and carries the t1 timestamp sent by the
master.
A Sync message can be sent in either one-step or
two-step mode.
● one-step: In this mode, a Sync message
contains the transmit timestamp.
● two-step: In this mode, a Sync message records
the time when the message is sent, instead of
containing the transmit timestamp. Such a
transmit timestamp is carried in a Follow-Up
message.

Delay Supp Supp A Delay_Req message is sent from the slave to the
_Req orted orted master during delay time synchronization and
carries the t3 timestamp sent by the slave.

Pdelay Supp Not A Pdelay_Req message is sent from the slave to


_Req orted suppo the master during peer delay time synchronization
rted and carries the t3 timestamp sent by the slave.

Pdelay Supp Not A Pdelay_Resp message is sent by the master to


_Resp orted suppo the slave during peer delay time synchronization
rted and carries the t4 timestamp and interface ID sent
by the master.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 819


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

Messa 1588 G. Function


ge v2 8275.
1

Annou Supp Supp An Announce message is used to exchange time


nce orted orted source information between clock nodes to
determine the master-slave hierarchy.

Follow Supp Supp A Follow_Up message is sent from the master to


_Up orted orted the slave following a Sync message in two-way
mode during delay time synchronization. A
Follow_Up message carries the t1 timestamp sent
by the master.

Delay Supp Supp A Delay_Resp message is sent by the master to the


_Resp orted orted slave during delay time synchronization and
carries the t4 timestamp and interface ID sent by
the master.

Pdelay Supp Not A Pdelay_Resp_Follow_Up message is sent from


_Resp orted suppo the master to the slave following a Sync message
_Follo rted in two-way mode during peer delay time
w_Up synchronization. A Pdelay_Resp_Follow_Up
message carries the t1 timestamp sent by the
master.

Mana Supp Not Currently, a switch does not support Management


geme orted suppo messages.
nt rted

Signal Supp Not


ing orted suppo
rted

Packet Encapsulation Modes


1588v2 message encapsulation modes

1588v2 messages can be encapsulated using the MAC or UDP encapsulation mode
for transmission at Layer 2 or Layer 3, respectively.
● MAC encapsulation
This mode applies to 1588v2 messages that are transmitted over a Layer 2
link. In MAC encapsulation, the VLAN ID and 802.1p priority can be carried in
1588v2 messages, and the Ethernet type 0x88F7 is used.

Figure 15-3 Untagged MAC-encapsulated messages

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 820


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

Figure 15-4 Tagged MAC-encapsulated messages

● UDP encapsulation
This mode applies to 1588v2 messages that are transmitted over a Layer 3
link. In UDP encapsulation, the VLAN ID, 802.1p priority, and DSCP priority
can be carried in 1588v2 messages, and the destination UDP port number is
319 (for non-Announce messages) or 320 (for Announce messages).

Figure 15-5 Untagged UDP-encapsulated messages

Figure 15-6 Tagged UDP-encapsulated messages

G.8275.1 packet encapsulation modes

G.8275.1 defines the packet encapsulation mode as Layer 2 multicast (without


tags). The corresponding Ethernet Type is 0x88F7. There are two types of multicast
destination MAC addresses: non-forwardable multicast MAC address (0180-
C200-000E) and forwardable multicast MAC address (011B-1900-0000).

Figure 15-7 Untagged Layer 2 multicast encapsulation messages

Clock Synchronization Process


The clock synchronization process consists of three phases:

1. Master-slave hierarchy establishment


PTP selects the GMC and determines the master and slave ports.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 821


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

2. Frequency synchronization
PTP synchronizes the frequency of the slave node with that of the master
node.
3. Time synchronization
PTP synchronizes the time of the slave node with that of the master node.

Comparisons between synchronous Ethernet and other clock


synchronization protocols
Clock Whether Whether Time Signal
Protocol Frequency Time Synchronizati Transmission
Synchronizati Synchronizati on Accuracy Mode
on Is on Is
Supported Supported

NTP No Yes Millisecond Time signals


accuracy are
transmitted
using NTP
packets.

Synchronous Yes No - Clock signals


Ethernet are
transmitted
using serial
data streams
at the
physical layer,
without
affecting
upper-layer
services and
CPU
performance.

PTP Yes Yes Sub- Clock and


microsecond time signals
accuracy are
transmitted
using PTP
packets, and
higher time
accuracy is
achieved with
the assistance
of hardware.

15.2.2 Master-Slave Hierarchy Establishment


During the establishment of the master-slave hierarchy, PTP selects the
grandmaster clock (GMC) and determines the master and slave ports.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 822


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

Process of Establishing the Master-Slave Hierarchy


In PTP, ports receive and send Announce messages to exchange data sets and port
state machine information. The best master clock (BMC) algorithm compares the
data sets and port state machine information to establish the master-slave
hierarchy. The process of establishing the master-slave hierarchy is as follows:
1. The local device receives and processes the Announce message from the peer
port.
2. The local device uses the BMC algorithm to determine the GMC and
recommended state of the local port, namely, master, slave, or passive.
3. The local device updates data sets based on the recommended port state.
4. The local device determines the actual port status based on the port state
machine and establishes the master-slave hierarchy based on the
recommended state and the state decision event. The state decision event
includes the Announce message receiving event and the Announce message
timeout event. When the interval at which a port receives an Announce
message is larger than the Announce message timeout period, the state of
the port is set to master.

BMC Algorithm
The BMC algorithm is used to select the GMC and determine port states in a PTP
domain. It compares the data sets carried in the Announce messages exchanged
between clock nodes to select the GMC and determine the PTP port states.
The BMC algorithm compares the following attributes in Announce messages in
sequence:
● Priority1: indicates clock priority 1. The value is configurable and ranges from
0 to 255. A smaller value indicates a higher priority.
● ClockClass: defines the traceability of the International Atomic Time (TAI) of
the clock time or frequency.
● ClockAccuracy: defines the accuracy of a clock. A smaller value indicates a
higher accuracy.
● OffsetScaledLogVariance: defines the stability of a clock.
● Priority2: indicates clock priority 2. The value is configurable and ranges from
0 to 255. A smaller value indicates a higher priority.
When the BMC algorithm is used by a PTP device for GMC selection, Priority1 of
each candidate time source is compared first, then ClockClass, ClockAccuracy,
OffsetScaledLogVariance, and Priority2. If Priority1 of candidate time sources is
the same, ClockClass is compared, and so on. The time source with the highest
priority, class, and accuracy is selected as the GMC.
You can change the preceding attributes to influence the way the PTP master
clock is selected, and finally select the clock signals to receive. The BMC algorithm
can allocate PTP clock sources and implement protective switchover.

15.2.3 Frequency Synchronization


After the master-slave hierarchy is established, the frequency and time
synchronization process starts. PTP was originally designed to implement only

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 823


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

high-precision time synchronization but now also implements frequency


synchronization between devices.
PTP calculates the link delay and time difference between the master and slave
devices based on the timestamps generated when the devices exchange event
messages. PTP then synchronizes the time and frequency between the master and
slave devices. Timestamps are carried in PTP messages in either of the following
modes:
● One-step clock mode
An event message (Sync or Pdelay_Resp message) carries the timestamp of
when the message is sent. In this mode, time information is generated and
advertised when the message is sent and received.
● Two-step clock mode
An event message (Sync or Pdelay_Resp message) does not carry the
timestamp of when the message is sent. Instead, subsequent general
messages (Follow_Up and Pdelay_Resp_Follow_Up messages) carry the
timestamps of when Sync and PDelay_Resp messages are sent. In this mode,
time information is generated and then advertised. Two-step clock mode
applies to the devices that cannot add timestamps to event messages.

Implementation
The master node periodically sends a Sync message to the slave node. This
message carries the timestamp of when the master node sends the Sync message.
Upon receipt of a Sync message, the slave node generates a timestamp. If the
slave node receives two Sync messages, it compares the difference between the
two timestamps of when the messages are received with the difference between
the two timestamps of when the messages are sent. The slave node uses the
comparison result to adjust its frequency.
Assume that clock B is the master clock, clock A is the slave clock, and frequency
synchronization needs to be performed between clock A and clock B. If the link
delay and resident time are not considered and the frequencies of clock A and
clock B are the same, clock A and clock B should have the same accumulated time
difference within a specified period. That is, t2N-t20 = t1N-t10. If t2N-t20 is greater
than t1N-t10, the frequency of clock A is higher than the frequency of clock B and
needs to be reduced. Conversely, if t2N-t20 is smaller than t1N-t10, the frequency of
clock A is lower than that of clock B and needs to be increased. t1n is the time
when clock B sends the nth Syn message. t2n is the time when clock A receives the
nth Sync message.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 824


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

Figure 15-8 Frequency synchronization

TOn a PTP synchronization system, the link delay and resident time must be
considered in frequency synchronization. The Follow_Up message shown in the
preceding figure is a general message sent in two-step clock mode and carries the
timestamp of when a Sync message is sent.

15.2.4 PTP Time Synchronization


PTP provides two delay measurement mechanisms: delay and Pdelay.
● Delay mechanism: calculates the time difference based on the total link delay
between the master and slave clocks. This mechanism corresponds to the
delay time synchronization mode.
● Pdelay mechanism: calculates the time difference based on the delay of each
link between the master and slave clocks. This mechanism corresponds to the
Pdelay time synchronization mode.
NOTE

G.8275.1 supports only the delay mechanism.

Delay Mechanism
Figure 15-9 shows the process of calculating the link delay and time offset
between the master and slave devices using the delay mechanism.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 825


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

Figure 15-9 Delay mechanism

1. The master device sends a Sync message at t1. If the master device works in
one-step mode, t1 is sent to the slave device through the Sync message. If the
master device works in two-step mode, t1 is sent to the slave device through
the subsequent Follow_Up message.
2. The slave device receives the Sync message at t2 and obtains t1 from the Sync
message in one-step mode or from the Follow_Up message in two-step mode.
3. The slave device sends a Delay_Req message to the master device at t3.
4. The master device receives the Delay_Req message at t4.
5. The master device sends a Delay_Resp message containing t4 to the slave
device.
In the preceding process, the timestamps of when the messages are sent or
received are generated based on the system clock of the devices. PTP defines
the timestamp length as 80 bits in a message.
By exchanging messages with the master device, the slave device obtains t1,
t2, t3, and t4, and calculates the average link delay and time offset between
the master and slave devices. The slave device can then adjust the local time
according to the calculated time offset to synchronize with the master device.
The formulas for calculating the link delay and time offset are as follows:
– Average link delay = [(t4 - t1) - (t3 - t2)]/2
t2 = t1 + Delay + Offset = t1 + [(t4 - t1) - (t3 - t2)]/2 + Offset
– Offset = [(t2 - t1) + (t3 - t4)]/2
In Figure 15-10, the time offset between the local clock and current time is
calculated by PTP, and then the local clock is adjusted based on the time
offset.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 826


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

Figure 15-10 Correcting the local clock

Pdelay Mechanism
The Pdelay mechanism calculates the transmission time (link delay) between two
communication ports that support the P2P mechanism using Pdelay_Req,
Pdelay_Resp, and possible Pdelay_Resp_Follow_Up messages. The P2P mechanism
is similar to the E2E mechanism except that it measures the delay of each link and
transmits the link delay and resident time of a message on a transparent clock
(TC) in a Pdelay_Resp or Pdelay_Resp_Follow_Up message to downstream devices.
The P2P mechanism calculates the average link delay of the master and slave
nodes based on the delay of each link and resident time on the TC.

In the Pdelay mechanism, the link delay can be measured between two connected
ports that support the Pdelay mechanism regardless of their port states.

Figure 15-11 Pdelay mechanism

Timestamps t1 and t2 indicate the time when the Pdelay_Req message is sent and
received. Timestamps t3 and t4 indicate the time when the Pdelay_Resp message is
sent and received. The formula for calculating the delay of each link is as follows:

Link delay = [(t2 - t1) + (t4 - t3)]/2 = [(t2 - t3) + (t4 - t1)]/2

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 827


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

15.3 Application Scenarios for PTP


PTP Application on a Transmission Network
Most of the time-division multiplexing (TDM) service on a traditional fixed
network is the voice service. If the clocks on two ends of the transmission network
are different, the accumulated difference between the clocks will cause clock slip.
In Figure 15-12, an ordinary clock (OC) device encapsulates high-precision clock
information obtained through the GPS into a PTP message and sends the PTP
message to a boundary clock (BC) device on the transmission network. Core
devices on the transmission network function as transparent clock (TC) devices to
transparently transmit the clock information to the entire transmission network.
Then the edge devices of the transmission network function as BC devices to
provide the high-precision clock information obtained through the PTP message to
wireless access devices, such as NodeB and radio network controller (RNC).

Figure 15-12 Application of PTP on a transmission network

Network Protection
PTP supports protective switchover between devices and between components on
the same device to prevent single-point failures. In Figure 15-13, the solid lines
identify the primary clock tracing path. The time source is provided by GPS-1 and
is transmitted to the lower layers in the direction shown by the blue arrows. The

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 828


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

dashed lines identify the protection path. When the primary path is faulty, GPS-2
can replace GPS-1 to provide the time source rapidly.

Figure 15-13 Protective switchover on the time synchronization network

15.4 Summary of PTP Configuration Tasks


Table 15-1 lists PTP configuration tasks.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 829


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

Table 15-1 PTP configuration tasks

Scenario Description Task

Configuring 1588v2 to Clock synchronization is Perform the following


implement clock performed using 1588v2. operations according to
synchronization The network includes the types of the nodes to
multiple types of clock be configured:
nodes, such as OC, BC, ● 15.7 Configuring
TC, and TCandBC. 1588v2 on an OC
● 15.8 Configuring
1588v2 on a BC
● 15.9 Configuring
1588v2 on a TC
● 15.10 Configuring
1588v2 on a
TCandBC

Configuring G.8275.1 to Clock synchronization is 15.11 Configuring G.


implement clock performed using G. 8275.1
synchronization 8275.1.

15.5 Licensing Requirements and Limitations for PTP


Involved Network Elements
None

Licensing Requirements
PTP is a basic feature of a switch and is not under license control.

Feature Support in V200R023C00

Model Supported Part Number Unsupported Part


Number

S6730- ● 02352FSG, 02352FSG-001, ● 02352FSG-007,


H24X6C 02352FSG-003, 02352FSG-005, 02352FSG-008
02352FSG-006 ● 02353GFC-004
● 02353GFC, 02353GFC-001,
02353GFC-003

S6730- ● 02352FSF, 02352FSF-003, ● 02352FSF-009,


H48X6C 02352FSF-005, 02352FSF-007, 02352FSF-010
02352FSF-008, 02352FSF-011 ● 02353FWL-006
● 02353FWL, 02353FWL-003,
02353FWL-005

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 830


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

Model Supported Part Number Unsupported Part


Number

S6730- None No part number supports


H24X4Y4C this model.

S6730- None No part number supports


H28Y4C this model.

S6730S- ● 02353HVK, 02353HVK-001, 02353HVK-004


H24X6C-A 02353HVK-003

NOTE

For details about software mappings, visit Hardware Center and select the desired product
model.
The S5731-L and S5731S-L are remote units and do not support web-based management,
YANG, or commands. They can be configured only through configuration delivery by the
central device. For details, see "Simplified Architecture Configuration (the Solar System
Solution)" in the S300, S500, S2700, S5700, and S6700 V200R023C00 Configuration Guide -
Device Management.

Feature Limitations
PTP Constraints

● All the intermediate devices on the PTP synchronization path must support
PTP.
● Frequency signals are transmitted bidirectionally, and time signals are
transmitted unidirectionally. For frequency signals, a crossover cable is
required; for time signals, a straight-through cable is required.
● PTP Announce messages contain the clock attributes of the peer device to
establish the master-slave hierarchy of interfaces. Therefore, prohibit a PTP
interface from receiving Announce messages from different devices.

PTP Precautions

NOTE

Before configuring PTP for time synchronization, ensure frequency synchronization on the
entire network. To implement frequency synchronization, configure synchronous Ethernet.
This chapter describes only PTP time synchronization. For details about how to configure
PTP for frequency synchronization, see "Synchronous Ethernet Configuration" in Device
Management.
● PTP messages are Layer 2 broadcast messages by default. If incorrect
configuration is performed, loops or broadcast storms occur and downstream
devices are seriously affected. To avoid broadcast storms or loops, configure
VLAN or STP before enabling PTP on an interface.
● By default, a device obtains frequency signals through synchronous Ethernet
and obtains time signals through PTP. When PTP is used for clock
synchronization, you are advised to configure the device to obtain frequency
signals and time signals through PTP.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 831


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

● The switch supports PTP only after its working mode has been set to
enhanced mode using the set service-mode command.

15.6 Default Settings for PTP


Table 15-2 Default settings for PTP
Parameter Default Setting

Global PTP function Disabled

Interface PTP function Disabled

PTP domain Domain 0

Method to process Announce Retaining Announce messages


messages on an interface

Mode in which PTP messages carry One-step


timestamps

Interval for sending Announce 128 ms


messages

Timeout period for receiving Announce 512 ms


messages

Minimum interval for sending 128 ms


DelayReq and PdelayReq messages

Encapsulation mode of 1588v2 MAC multicast encapsulation


messages

Encapsulation mode of G.8275.1 MAC multicast encapsulation


messages

15.7 Configuring 1588v2 on an OC

OC Deployment
As shown in Figure 15-14, when two devices transmit wireless data on the IP
bearer network, low-delay transmission must be guaranteed for real-time wireless
services. The two devices function as OCs and transmit clock information through
1588v2 messages to ensure clock synchronization between them. OCs use 1588v2
messages to synchronize clock signals.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 832


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

Figure 15-14 Configuring 1588v2 on an OC

Pre-configuration Tasks
Before configuring 1588v2 on an OC, complete the following tasks:
● Set link layer protocol parameters for interfaces to ensure that the link layer
protocol status of the interfaces is Up.
● Configure a grandmaster clock to correctly obtain clock and time signals from
the external clock source.
● Configure synchronous Ethernet to synchronize the clock frequency on the
network.

Configuration Procedure
The process of configuring 1588v2 on an OC is as follows.

15.7.1 Configuring a 1588v2 Clock Source

Context
After external time signal input is configured on multiple 1588v2 devices, you can
configure clock source attributes to allow the 1588v2 clock sources to participate
in BMC calculation. The BMC algorithm allows the 1588v2 devices to dynamically
determine the master clock. The master clock provides time signals to the entire
1588v2 network so that the 1588v2 devices use 1588v2 to obtain clock
information from the grandmaster clock.
After dynamic BMC calculation is implemented, the 1588v2 devices select a clock
source based on the following order: priority1 > clock-class > clock-accuracy >
priority2. That is, priority1 of the clock sources is compared first. If the priority1
values of these 1588v2 devices are the same, the clock-class is compared. The
clock source with the highest priority is selected as the master clock.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Configure clock source attributes on all nodes. Generally, clock source attributes
need to be configured only on the grandmaster. After the grandmaster selects the
optimal clock source, the associated attributes are transmitted to lower-layer
devices through Announce messages. In case of special requirements, configure
time source attributes for other nodes.
● Run ptp clock-source local time-source time-source slot slot-id

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 833


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

The type of the clock source to be traced is configured.


NOTE
The time-source parameter can be configured only on the grandmaster clock and
must be set according to the clock source connected to the device. For details about
the time-source parameter and corresponding clock source, see Command Reference.
● Run ptp clock-source local clock-accuracy clock-accuracy slot slot-id
The clock accuracy of the clock source is configured.
● Run ptp clock-source local clock-class clock-class slot slot-id
The class of the clock source is configured.
NOTE
A smaller clock-class value indicates a higher class. A device whose clock class value is
smaller than 128 cannot function as a slave clock. Therefore, do not set a high clock
class for a slave clock. Otherwise, the PTP interface of the slave clock cannot enter the
slave state, and the device cannot synchronize with the master clock.
● Run ptp clock-source local priority1 priority1 slot slot-id
The priority1 value is set for the clock source.
● Run ptp clock-source local priority2 priority2 slot slot-id
The priority2 value is set for the clock source.
----End

15.7.2 Configuring PTP Globally

Context
In a PTP domain, a PTP device functioning as an OC can synchronize time with an
upstream device or send time to a downstream device. To configure a PTP device
as an OC, enable PTP globally on the device, configure the device type as OC, and
perform OC configurations in the system view.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ptp enable
PTP is enabled globally.
By default, PTP is not enabled globally.
Step 3 Run ptp device-type oc slot slot-id
The device type is configured as OC.
By default, no device type is configured for a PTP device.
Step 4 (Optional) Run ptp slaveonly slot slot-id
The OC is configured to work in slave-only mode.
By default, an OC port can be a master or slave port. When a device functions as
an OC to synchronize with other clocks, configure the device to work in slave-only

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 834


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

mode. After the device is configured to work in slave-only mode, ports of the
device are in slave state. This indicates that the device can only function as a slave
clock to receive clock signals from other clocks but cannot function as a master
clock to provide clock signals for other clocks.
Step 5 (Optional) Run ptp domain domain-value
The PTP domain to which the device belongs is configured.
By default, a PTP device belongs to domain 0.

NOTE
Devices that perform clock synchronization through PTP messages must belong to the same
PTP domain.

Step 6 (Optional) Run ptp virtual-clock-id clock-id-value slot slot-id


A virtual clock ID is configured for the device.
Each device in a PTP domain has a virtual clock ID. By default, no virtual clock ID
is configured for a PTP device, and the system generates a clock ID based on the
MAC address of the device. You can configure a virtual clock ID to identify the
device.

NOTE

When running the ptp virtual-clock-id command, ensure that the configured virtual clock ID is
unique in the entire PTP domain.

----End

15.7.3 Configuring PTP on an Interface

Context
On an interface, you can enable PTP and configure the delay measurement
mechanism, method to process Announce messages, and mode in which PTP
messages carry timestamps.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The view of the interface on which PTP needs to be configured is displayed.
Step 3 Run ptp delay-mechanism { delay | pdelay }
A delay measurement mechanism is configured.
By default, no delay measurement mechanism is configured for an OC.
NOTE

Different delay measurement mechanisms are not compatible. Therefore, PTP interfaces on
a link must have the same delay measure mechanism configured.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 835


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

Step 4 Run ptp enable


PTP is enabled on the interface.
By default, PTP is disabled on an interface.
Step 5 Run ptp clock-step { one-step | two-step }
The mode in which PTP devices timestamp PTP messages to perform clock
synchronization is configured.
By default, PTP messages are timestamped in one-step mode.

----End

Configuring an Interface to Drop Announce Messages


After configuring PTP on an interface, you can run the ptp announce-drop
enable command on the interface to configure the interface to drop Announce
messages.
Announce messages are used for PTP clock synchronization. When a user-side
interface and the current PTP interface meet clock synchronization requirements,
you can configure the PTP interface to drop Announce messages to retain the
current master-slave hierarchy. After the interface receives Announce messages, it
drops the messages and does not participate in establishing the master-slave
hierarchy. This saves system resources.

NOTE
By default, an interface does not drop Announce messages.

15.7.4 Configuring the Encapsulation Mode for 1588v2


Messages
Context
You can configure MAC or UDP encapsulation for 1588v2 messages based on the
link type used for 1588v2 message transmission:
● MAC encapsulation: applies to Layer 2 link transmission.
● UDP encapsulation: applies to Layer 3 link transmission.
By default, the system uses multicast MAC encapsulation.

NOTE

Devices that perform clock synchronization through 1588v2 messages must use the same
encapsulation mode of 1588v2 messages. Otherwise, the devices cannot communicate.

You can configure unicast or multicast encapsulation for 1588v2 messages based
on the topology of the master and slave devices:
● Unicast encapsulation: applies to point-to-point clock signal synchronization.
This mode is used when a single device needs to synchronize with the master
clock. If the destination MAC address or IP address of 1588v2 messages to be
sent is set to a unicast address, 1588v2 messages are encapsulated in unicast
encapsulation mode.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 836


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

● Multicast encapsulation: applies to point-to-multipoint clock signal


synchronization. By default, devices that reside in the same PTP domain and
use the same delay measurement mechanism join the same multicast group.
Therefore, when multicast encapsulation is used, the destination MAC address
or IP address does not need to be configured for 1588v2 messages.

Procedure
● Configure the MAC encapsulation mode.
a. Run system-view

The system view is displayed.


b. Run interface interface-type interface-number

The interface view is displayed.


c. Run ptp mac-egress destination-mac destination-mac

The 1588v2 messages to be sent from the interface are encapsulated in


MAC encapsulation mode, and the destination MAC address is
configured.

By default, the multicast destination MAC address is 011B-1900-0000 if


the delay request-response mechanism is used; the multicast destination
MAC address is 0180-C200-000E if the Pdelay mechanism is used.
d. (Optional) Run ptp mac-egress vlan vlan-id [ priority priority-value ]

The VLAN ID and 802.1p priority are configured for MAC-encapsulated


1588v2 messages.
● Configure the UDP encapsulation mode.
a. Run system-view

The system view is displayed.


b. Run interface interface-type interface-number

The interface view is displayed.


c. Run ptp udp-egress source-ip source-ip [ destination-ip destination-ip ]

The 1588v2 messages to be sent from the interface are encapsulated in


UDP encapsulation mode, and the source and destination IP addresses
are configured.

By default, if UDP encapsulation is configured, the destination IP address


is multicast address 224.0.1.129 when the delay request-response
mechanism is used; the destination IP address is multicast address
224.0.0.107 when the Pdelay mechanism is used.
d. (Optional) Run ptp udp-egress destination-mac destination-mac

The next-hop MAC address of 1588v2 messages is configured.


e. (Optional) Run ptp udp-egress source-ip source-ip [ dscp dscp ]

The DSCP priority is configured for UDP-encapsulated 1588v2 messages.


f. (Optional) Run ptp udp-egress source-ip source-ip vlan vlan-id
[ priority priority ]

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 837


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

The VLAN ID and 802.1p priority are configured for UDP-encapsulated


1588v2 messages.
----End

15.7.5 (Optional) Configuring 1588v2 Message Attributes

Context
1588v2 devices periodically send or receive 1588v2 messages to establish the
master-slave hierarchy and transmit time information. 1588v2 messages include
Announce messages and Delay messages. Announce messages are used to
exchange time synchronization information between 1588v2 devices and establish
the master-slave hierarchy. Delay messages are event messages, which are
timestamped when reaching or leaving a 1588v2 device to measure the link delay.
If a 1588v2 device requires high-precision clock synchronization and needs to trace
the master clock frequency, reduce the interval for sending 1588v2 messages.
However, this consumes more bandwidth resources. If the sending link delay and
receiving link delay are different, you can configure correction for sending or
receiving 1588v2 messages to correct the link delay.

Procedure
● Configure attributes for Announce messages.
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. Run ptp announce-interval announce-interval
The interval for sending Announce messages on the interface is set to
2announce-interval, in milliseconds.
The default value of announce-interval is 7, indicating that the interval
for sending Announce messages on an interface is 128 ms.
If announce-interval is set to a small value, 1588v2 devices frequently
exchange 1588v2 messages, consuming more bandwidth resources. If
announce-interval is set to a large value, high-precision clock
synchronization cannot be guaranteed; however, clock synchronization
accuracy can be guaranteed.
d. Run ptp announce receipt-timeout timeout-value
The maximum number of timeouts for receiving Announce messages is
set.
By default, the maximum number of timeouts for receiving Announce
messages is 3.
● Configure attributes for 1588v2 Delay messages.
a. Run system-view
The system view is displayed.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 838


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

b. Run interface interface-type interface-number

The interface view is displayed.


c. Run ptp sync-interval sync-interval

The interval for sending Sync messages is configured on an interface.

By default, the interval for sending Sync messages is 8 ms.


d. Run ptp min-delayreq-interval min-delayreq-interval

The interval for sending DelayReq messages on the interface is set to


2min-delayreq-interval, in milliseconds.

The default value of min-delayreq-interval is 7, indicating that the


interval for sending DelayReq messages on the interface is 128 ms.
e. Run ptp min-pdelayreq-interval min-pdelayreq-interval

The interval for sending PdelayReq messages on the interface is set to


2min-pdelayreq-interval, in milliseconds.

The default value of min-pdelayreq-interval is 7, indicating that the


interval for sending PdelayReq messages on the interface is 128 ms.
f. Run ptp asymmetry-correction { positive | negative } asymmetry-
correction
The asymmetric correction for sending 1588v2 event messages is
configured on the interface.

By default, no asymmetric correction for sending 1588v2 event messages


is configured because 1588v2 devices consider that the sending link delay
and receiving link delay are the same.

----End

15.7.6 (Optional) Statically Specifying the Interface Status of


a Clock Device

Context
In a PTP clock synchronization network, all clock nodes work in the master-slave
relationship. By default, the master-slave relationships between clock nodes are
calculated through the BMC algorithm. To manually determine the master-slave
relationship between clock nodes, specify the clock status of various interfaces
excluding the TC interface.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ptp set-port-state enable slot slot-id

The function to statically specify the interface status is enabled.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 839


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

Step 3 Run interface interface-type interface-number


The view of the interface whose status is to be statically configured is displayed.
Step 4 Run ptp port-state { slave | passive | master | premaster | listening | faulty |
disabled | initializing }
The interface status is statically specified.
----End

15.7.7 Verifying the PTP Configuration


Procedure
● Run the display ptp all [ state | config ] [ slot slot-id ] command to check
the PTP running status and configuration.
● Run the display ptp interface interface-type interface-number command to
check PTP information on the specified interface.
----End

15.8 Configuring 1588v2 on a BC

BC Deployment
As shown in Figure 15-15, NodeBs need to synchronize clocks with an external
clock source. All devices on the bearer network support 1588v2. Each device on
the bearer network receives clock signals from an upstream device and sends
clock signals to a downstream device. In this manner, NodeBs can synchronize
clocks with the external clock source. Devices are configured as BC nodes to
connect to the external clock source, synchronize with the external clock source,
and send clock information to other devices on the bearer network. Other
backbone nodes on the bearer network are deployed as BCs, which can
synchronize with the external clock source and send clock information to
downstream devices.

Figure 15-15 Configuring 1588v2 on a BC

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 840


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

Pre-configuration Tasks
Before configuring 1588v2 on a BC, complete the following tasks:

● Set link layer protocol parameters for interfaces to ensure that the link layer
protocol status of the interfaces is Up.
● Ensure that the BC obtains the clock signal and time signal from the external
clock source.
● Configure synchronous Ethernet to synchronize the clock frequency on the
network.

Configuration Procedure
The procedure of configuring 1588v2 on a BC is as follows.

15.8.1 Configuring a 1588v2 Clock Source

Context
After external time signal input is configured on multiple 1588v2 devices, you can
configure clock source attributes to allow the 1588v2 clock sources to participate
in BMC calculation. The BMC algorithm allows the 1588v2 devices to dynamically
determine the master clock. The master clock provides time signals to the entire
1588v2 network so that the 1588v2 devices use 1588v2 to obtain clock
information from the grandmaster clock.

After dynamic BMC calculation is implemented, the 1588v2 devices select a clock
source based on the following order: priority1 > clock-class > clock-accuracy >
priority2. That is, priority1 of the clock sources is compared first. If the priority1
values of these 1588v2 devices are the same, the clock-class is compared. The
clock source with the highest priority is selected as the master clock.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Configure clock source attributes on all nodes. Generally, clock source attributes
need to be configured only on the grandmaster. After the grandmaster selects the
optimal clock source, the associated attributes are transmitted to lower-layer
devices through Announce messages. In case of special requirements, configure
time source attributes for other nodes.
● Run ptp clock-source local time-source time-source slot slot-id
The type of the clock source to be traced is configured.
NOTE
The time-source parameter can be configured only on the grandmaster clock and
must be set according to the clock source connected to the device. For details about
the time-source parameter and corresponding clock source, see Command Reference.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 841


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

● Run ptp clock-source local clock-accuracy clock-accuracy slot slot-id


The clock accuracy of the clock source is configured.
● Run ptp clock-source local clock-class clock-class slot slot-id
The class of the clock source is configured.
NOTE
A smaller clock-class value indicates a higher class. A device whose clock class value is
smaller than 128 cannot function as a slave clock. Therefore, do not set a high clock
class for a slave clock. Otherwise, the PTP interface of the slave clock cannot enter the
slave state, and the device cannot synchronize with the master clock.
● Run ptp clock-source local priority1 priority1 slot slot-id
The priority1 value is set for the clock source.
● Run ptp clock-source local priority2 priority2 slot slot-id
The priority2 value is set for the clock source.

----End

15.8.2 Configuring PTP Globally

Context
To enable the master clock to transmit clock signals to multiple devices, configure
a device as a BC. A BC provides multiple physical interfaces to participate in PTP
clock synchronization. One interface receives clock signals from an upstream
device, and the other interfaces send the clock signals to downstream devices.

To configure a PTP device as a BC, enable PTP globally on the device, configure
the device type as BC, and perform BC configurations in the system view.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ptp enable

PTP is enabled.

By default, PTP is disabled.

Step 3 Run ptp device-type bc slot slot-id

The device type is configured as BC.

By default, no device type is configured for a PTP device.

Step 4 (Optional) Run ptp domain domain-value

The PTP domain to which the device belongs is configured.

By default, a PTP device belongs to domain 0.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 842


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

NOTE
Devices that perform clock synchronization through PTP messages must belong to the same
PTP domain.

Step 5 (Optional) Run ptp virtual-clock-id clock-id-value slot slot-id

A virtual clock ID is set for the device.

By default, no virtual clock ID is configured for a PTP device, and the system
generates a clock ID based on the MAC address of the device. You can also
configure a virtual clock ID to identify the device.

NOTE

When running the ptp virtual-clock-id command, ensure that the configured virtual clock ID is
unique in the entire PTP domain.

----End

15.8.3 Configuring PTP on an Interface

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run interface interface-type interface-number

The interface view is displayed.

Step 3 Run ptp delay-mechanism { delay | pdelay }

A delay measurement mechanism is configured.

By default, no delay measurement mechanism is configured for PTP ports.


NOTE
Different delay measurement mechanisms are not compatible. Therefore, PTP interfaces on
a link must have the same delay measure mechanism configured.

Step 4 Run ptp enable

PTP is enabled on the interface.

By default, PTP is disabled on an interface.

Step 5 (Optional) Run ptp clock-step { one-step | two-step }

The mode in which PTP devices timestamp PTP messages to perform clock
synchronization is configured.

By default, PTP messages are timestamped in one-step mode.

----End

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 843


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

Configuring an Interface to Drop Announce Messages


After configuring PTP on an interface, you can run the ptp announce-drop
enable command on the interface to configure the interface to drop Announce
messages.
Announce messages are used for PTP clock synchronization. When a user-side
interface and the current PTP interface meet clock synchronization requirements,
you can configure the PTP interface to drop Announce messages to retain the
current master-slave hierarchy. After the interface receives Announce messages, it
drops the messages and does not participate in establishing the master-slave
hierarchy. This saves system resources.

NOTE
By default, an interface does not drop Announce messages.

15.8.4 Configuring the Encapsulation Mode for 1588v2


Messages
Context
You can configure MAC or UDP encapsulation for 1588v2 messages based on the
link type used for 1588v2 message transmission:
● MAC encapsulation: applies to Layer 2 link transmission.
● UDP encapsulation: applies to Layer 3 link transmission.
By default, the system uses multicast MAC encapsulation.

NOTE

Devices that perform clock synchronization through 1588v2 messages must use the same
encapsulation mode of 1588v2 messages. Otherwise, the devices cannot communicate.

You can configure unicast or multicast encapsulation for 1588v2 messages based
on the topology of the master and slave devices:
● Unicast encapsulation: applies to point-to-point clock signal synchronization.
This mode is used when a single device needs to synchronize with the master
clock. If the destination MAC address or IP address of 1588v2 messages to be
sent is set to a unicast address, 1588v2 messages are encapsulated in unicast
encapsulation mode.
● Multicast encapsulation: applies to point-to-multipoint clock signal
synchronization. By default, devices that reside in the same PTP domain and
use the same delay measurement mechanism join the same multicast group.
Therefore, when multicast encapsulation is used, the destination MAC address
or IP address does not need to be configured for 1588v2 messages.

Procedure
● Configure the MAC encapsulation mode.
a. Run system-view
The system view is displayed.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 844


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

b. Run interface interface-type interface-number


The interface view is displayed.
c. Run ptp mac-egress destination-mac destination-mac
The 1588v2 messages to be sent from the interface are encapsulated in
MAC encapsulation mode, and the destination MAC address is
configured.
By default, the multicast destination MAC address is 011B-1900-0000 if
the delay request-response mechanism is used; the multicast destination
MAC address is 0180-C200-000E if the Pdelay mechanism is used.
d. (Optional) Run ptp mac-egress vlan vlan-id [ priority priority-value ]
The VLAN ID and 802.1p priority are configured for MAC-encapsulated
1588v2 messages.
● Configure the UDP encapsulation mode.
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. Run ptp udp-egress source-ip source-ip [ destination-ip destination-ip ]
The 1588v2 messages to be sent from the interface are encapsulated in
UDP encapsulation mode, and the source and destination IP addresses
are configured.
By default, if UDP encapsulation is configured, the destination IP address
is multicast address 224.0.1.129 when the delay request-response
mechanism is used; the destination IP address is multicast address
224.0.0.107 when the Pdelay mechanism is used.
d. (Optional) Run ptp udp-egress destination-mac destination-mac
The next-hop MAC address of 1588v2 messages is configured.
e. (Optional) Run ptp udp-egress source-ip source-ip [ dscp dscp ]
The DSCP priority is configured for UDP-encapsulated 1588v2 messages.
f. (Optional) Run ptp udp-egress source-ip source-ip vlan vlan-id
[ priority priority ]
The VLAN ID and 802.1p priority are configured for UDP-encapsulated
1588v2 messages.
----End

15.8.5 (Optional) Configuring 1588v2 Message Attributes

Context
1588v2 devices periodically send or receive 1588v2 messages to establish the
master-slave hierarchy and transmit time information. 1588v2 messages include
Announce messages and Delay messages. Announce messages are used to

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 845


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

exchange time synchronization information between 1588v2 devices and establish


the master-slave hierarchy. Delay messages are event messages, which are
timestamped when reaching or leaving a 1588v2 device to measure the link delay.
If a 1588v2 device requires high-precision clock synchronization and needs to trace
the master clock frequency, reduce the interval for sending 1588v2 messages.
However, this consumes more bandwidth resources. If the sending link delay and
receiving link delay are different, you can configure correction for sending or
receiving 1588v2 messages to correct the link delay.

Procedure
● Configure attributes for Announce messages.
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. Run ptp announce-interval announce-interval
The interval for sending Announce messages on the interface is set to
2announce-interval, in milliseconds.
The default value of announce-interval is 7, indicating that the interval
for sending Announce messages on an interface is 128 ms.
If announce-interval is set to a small value, 1588v2 devices frequently
exchange 1588v2 messages, consuming more bandwidth resources. If
announce-interval is set to a large value, high-precision clock
synchronization cannot be guaranteed; however, clock synchronization
accuracy can be guaranteed.
d. Run ptp announce receipt-timeout timeout-value
The maximum number of timeouts for receiving Announce messages is
set.
By default, the maximum number of timeouts for receiving Announce
messages is 3.
● Configure attributes for 1588v2 Delay messages.
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. Run ptp sync-interval sync-interval
The interval for sending Sync messages is configured on an interface.
By default, the interval for sending Sync messages is 8 ms.
d. Run ptp min-delayreq-interval min-delayreq-interval
The interval for sending DelayReq messages on the interface is set to
2min-delayreq-interval, in milliseconds.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 846


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

The default value of min-delayreq-interval is 7, indicating that the


interval for sending DelayReq messages on the interface is 128 ms.
e. Run ptp min-pdelayreq-interval min-pdelayreq-interval

The interval for sending PdelayReq messages on the interface is set to


2min-pdelayreq-interval, in milliseconds.

The default value of min-pdelayreq-interval is 7, indicating that the


interval for sending PdelayReq messages on the interface is 128 ms.
f. Run ptp asymmetry-correction { positive | negative } asymmetry-
correction

The asymmetric correction for sending 1588v2 event messages is


configured on the interface.

By default, no asymmetric correction for sending 1588v2 event messages


is configured because 1588v2 devices consider that the sending link delay
and receiving link delay are the same.

----End

15.8.6 (Optional) Statically Specifying the Interface Status of


a Clock Device

Context
In a PTP clock synchronization network, all clock nodes work in the master-slave
relationship. By default, the master-slave relationships between clock nodes are
calculated through the BMC algorithm. To manually determine the master-slave
relationship between clock nodes, specify the clock status of various interfaces
excluding the TC interface.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ptp set-port-state enable slot slot-id

The function to statically specify the interface status is enabled.

Step 3 Run interface interface-type interface-number

The view of the interface whose status is to be statically configured is displayed.

Step 4 Run ptp port-state { slave | passive | master | premaster | listening | faulty |
disabled | initializing }

The interface status is statically specified.

----End

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 847


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

15.8.7 Verifying the PTP Configuration


Procedure
● Run the display ptp all [ state | config ] [ slot slot-id ] command to check
the PTP running status and configuration.
● Run the display ptp interface interface-type interface-number command to
check PTP information on the specified interface.
----End

15.9 Configuring 1588v2 on a TC

TC Deployment
As shown in Figure 15-16, NodeBs synchronize with the external clock and
support 1588v2. Core devices on the bearer network synchronize clocks with the
grandmaster clock and send clock signals to downstream devices. Devices
functioning as TCs transmit PTP messages between BCs or OCs. In this manner,
BCs and OCs can synchronize their clocks. This deployment allows devices that do
not have high clock requirements to only transmit 1588v2 messages, ensures
synchronization precision, and improves synchronization efficiency.

Figure 15-16 Configuring 1588v2 on a TC

Pre-configuration Tasks
Before configuring 1588v2 on a TC, complete the following tasks:

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 848


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

● Set link layer protocol parameters for interfaces to ensure that the link layer
protocol status of the interfaces is Up.
● Ensure that the Grandmaster clock correctly receives clock and time signals
from the external clock source.
● Configure synchronous Ethernet to synchronize the clock frequency on the
network.

Configuration Procedure
The process of configuring 1588v2 on a TC is as follows.

15.9.1 Configuring PTP Globally

Context
In certain scenarios, a device may need to transmit multi-channel clock signals
without needing to synchronize with multiple clock sources. You can configure the
device as a transparent clock (TC), which then transmits clock signals and
measures the link delay without needing to synchronize with the clock signals.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ptp enable

PTP is enabled globally.

By default, PTP is not enabled globally on a device.

Step 3 Run ptp device-type { e2etc | e2etcoc | p2ptc | p2ptcoc } slot slot-id

The PTP device type is configured as TC.

By default, no device type is configured for a PTP device.


NOTE
End to end transparent clock and ordinary clock (E2ETCOC) is a transparent ordinary clock
that supports only the end-to-end delay mechanism. Peer to peer transparent clock and
ordinary clock (P2PTCOC) is a transparent ordinary clock that supports only the peer-to-
peer delay mechanism. TCOC is a special TC that functions as an ordinary TC in terms of
time synchronization but can recover the frequency based on PTP messages to synchronize
with the upstream device.

Step 4 (Optional) Run ptp domain domain-value

The PTP domain to which the device belongs is configured.

By default, a PTP device belongs to domain 0.


NOTE
Devices that perform clock synchronization through PTP messages must belong to the same
PTP domain.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 849


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

Step 5 (Optional) Run ptp virtual-clock-id clock-id-value slot slot-id

A virtual clock ID is set for the device.

By default, no virtual clock ID is configured for a PTP device, and the system
generates a clock ID based on the MAC address of the device. You can also
configure a virtual clock ID to identify the device.

NOTE

When running the ptp virtual-clock-id command, ensure that the configured virtual clock ID is
unique in the entire PTP domain.

----End

15.9.2 Configuring PTP on an Interface

Context
On an interface, you can enable PTP and configure the delay measurement
mechanism, method to process Announce messages, and mode in which PTP
messages carry timestamps.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run interface interface-type interface-number

The interface view is displayed.

Step 3 Run ptp enable

PTP is enabled on the interface.

By default, PTP is disabled on an interface.


NOTE
On the TC device, PTP must be enabled on the interfaces that receive and send PTP
messages. Otherwise, the resident time of the device cannot be calculated correctly and
only PTP messages are forwarded.

Step 4 (Optional) Run ptp tcoc-clock-id clock-source-id port-num port-num

The clock source traced by an interface on the TCOC is specified.

By default, no clock source is specified for a TCOC to trace. A TC only transmits


clock signals but not synchronizes clock signals. To enable a device to synchronize
one of multiple clock signals, configure the device as a TCOC and specify a clock
trace for the device to trace.
NOTE
This command takes effect only on a TCOC.

----End

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 850


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

15.9.3 Configuring the Encapsulation Mode for 1588v2


Messages
Context
You can configure MAC or UDP encapsulation for 1588v2 messages based on the
link type used for 1588v2 message transmission:
● MAC encapsulation: applies to Layer 2 link transmission.
● UDP encapsulation: applies to Layer 3 link transmission.
By default, the system uses multicast MAC encapsulation.

NOTE

Devices that perform clock synchronization through 1588v2 messages must use the same
encapsulation mode of 1588v2 messages. Otherwise, the devices cannot communicate.

You can configure unicast or multicast encapsulation for 1588v2 messages based
on the topology of the master and slave devices:
● Unicast encapsulation: applies to point-to-point clock signal synchronization.
This mode is used when a single device needs to synchronize with the master
clock. If the destination MAC address or IP address of 1588v2 messages to be
sent is set to a unicast address, 1588v2 messages are encapsulated in unicast
encapsulation mode.
● Multicast encapsulation: applies to point-to-multipoint clock signal
synchronization. By default, devices that reside in the same PTP domain and
use the same delay measurement mechanism join the same multicast group.
Therefore, when multicast encapsulation is used, the destination MAC address
or IP address does not need to be configured for 1588v2 messages.

Procedure
● Configure the MAC encapsulation mode.
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. Run ptp mac-egress destination-mac destination-mac
The 1588v2 messages to be sent from the interface are encapsulated in
MAC encapsulation mode, and the destination MAC address is
configured.
By default, the multicast destination MAC address is 011B-1900-0000 if
the delay request-response mechanism is used; the multicast destination
MAC address is 0180-C200-000E if the Pdelay mechanism is used.
d. (Optional) Run ptp mac-egress vlan vlan-id [ priority priority-value ]
The VLAN ID and 802.1p priority are configured for MAC-encapsulated
1588v2 messages.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 851


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

● Configure the UDP encapsulation mode.


a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. Run ptp udp-egress source-ip source-ip [ destination-ip destination-ip ]
The 1588v2 messages to be sent from the interface are encapsulated in
UDP encapsulation mode, and the source and destination IP addresses
are configured.
By default, if UDP encapsulation is configured, the destination IP address
is multicast address 224.0.1.129 when the delay request-response
mechanism is used; the destination IP address is multicast address
224.0.0.107 when the Pdelay mechanism is used.
d. (Optional) Run ptp udp-egress destination-mac destination-mac
The next-hop MAC address of 1588v2 messages is configured.
e. (Optional) Run ptp udp-egress source-ip source-ip [ dscp dscp ]
The DSCP priority is configured for UDP-encapsulated 1588v2 messages.
f. (Optional) Run ptp udp-egress source-ip source-ip vlan vlan-id
[ priority priority ]
The VLAN ID and 802.1p priority are configured for UDP-encapsulated
1588v2 messages.
----End

15.9.4 (Optional) Configuring 1588v2 Message Attributes

Context
1588v2 devices periodically send or receive 1588v2 messages to establish the
master-slave hierarchy and transmit time information. 1588v2 messages include
Announce messages and Delay messages. Announce messages are used to
exchange time synchronization information between 1588v2 devices and establish
the master-slave hierarchy. Delay messages are event messages, which are
timestamped when reaching or leaving a 1588v2 device to measure the link delay.
If a 1588v2 device requires high-precision clock synchronization and needs to trace
the master clock frequency, reduce the interval for sending 1588v2 messages.
However, this consumes more bandwidth resources. If the sending link delay and
receiving link delay are different, you can configure correction for sending or
receiving 1588v2 messages to correct the link delay.

Procedure
● Configure attributes for Announce messages.
a. Run system-view
The system view is displayed.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 852


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

b. Run interface interface-type interface-number

The interface view is displayed.


c. Run ptp announce-interval announce-interval

The interval for sending Announce messages on the interface is set to


2announce-interval, in milliseconds.

The default value of announce-interval is 7, indicating that the interval


for sending Announce messages on an interface is 128 ms.

If announce-interval is set to a small value, 1588v2 devices frequently


exchange 1588v2 messages, consuming more bandwidth resources. If
announce-interval is set to a large value, high-precision clock
synchronization cannot be guaranteed; however, clock synchronization
accuracy can be guaranteed.
d. Run ptp announce receipt-timeout timeout-value

The maximum number of timeouts for receiving Announce messages is


set.

By default, the maximum number of timeouts for receiving Announce


messages is 3.
● Configure attributes for 1588v2 Delay messages.
a. Run system-view

The system view is displayed.


b. Run interface interface-type interface-number

The interface view is displayed.


c. Run ptp sync-interval sync-interval

The interval for sending Sync messages is configured on an interface.

By default, the interval for sending Sync messages is 8 ms.


d. Run ptp min-delayreq-interval min-delayreq-interval

The interval for sending DelayReq messages on the interface is set to


2min-delayreq-interval, in milliseconds.

The default value of min-delayreq-interval is 7, indicating that the


interval for sending DelayReq messages on the interface is 128 ms.
e. Run ptp min-pdelayreq-interval min-pdelayreq-interval

The interval for sending PdelayReq messages on the interface is set to


2min-pdelayreq-interval, in milliseconds.

The default value of min-pdelayreq-interval is 7, indicating that the


interval for sending PdelayReq messages on the interface is 128 ms.
f. Run ptp asymmetry-correction { positive | negative } asymmetry-
correction
The asymmetric correction for sending 1588v2 event messages is
configured on the interface.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 853


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

By default, no asymmetric correction for sending 1588v2 event messages


is configured because 1588v2 devices consider that the sending link delay
and receiving link delay are the same.

----End

15.9.5 Verifying the PTP Configuration

Procedure
● Run the display ptp all [ state | config ] [ slot slot-id ] command to check
the PTP running status and configuration.
● Run the display ptp interface interface-type interface-number command to
check PTP information on the specified interface.

----End

15.10 Configuring 1588v2 on a TCandBC

TCandBC Deployment
In Figure 15-17, all devices on the bearer network and NodeBs support 1588v2.
CarrierA has NodeBs and an external clock source2, but does not have bearer
network devices. CarrierB leases its bearer network to CarrierA. Devices on the
bearer network synchronize with the external clock source1 of CarrierB. To ensure
that clock synchronization is implemented independently on devices of CarrierA
and CarrierB, you can deploy the network as follows:
● BC1 and OC1 connect to clock1 and clock2 respectively, and send clock
synchronization information to downstream devices through 1588v2
messages.
● TCandBC1 directly connects to BC1 through a BC interface and participates in
clock synchronization in Domain 1. The user-side interface of TCandBC1 is a
TC interface.
● TCandBC2 directly connects to BC1 through a BC interface and participates in
clock synchronization in Domain 1. The user-side interface of TCandBC2 is a
TC interface.
● Interfaces that directly connect TCandBC2 to OC2, TCandBC2 to TCandBC1,
and TCandBC1 to OC1 provide the TC function. OC2 receives 1588v2
messages sent from TCandBC1 through the PW channel between TCandBC1
and TCandBC2, synchronizes clock information with TCandBC1, and then
sends clock information to NodeB using traditional synchronization methods
such as synchronous Ethernet.
● The bearer network has two PTP domains: Domain 1 and Domain 2. All
devices in Domain 1 function as BCs to implement PTP synchronization and
transmit messages between TCandBC1 and TCandBC2. For Domain 2, the
entire bearer network functions as a large TC, which transparently transmits
clock2 information to NodeB.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 854


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

Figure 15-17 Configuring 1588v2 on a TCandBC

Pre-configuration Tasks
Before configuring 1588v2 on a TCandBC, complete the following tasks:
● Set link layer protocol parameters for interfaces to ensure that the link layer
protocol status of the interfaces is Up.
● Ensure that the OC1 and OC2 correctly receive clock and time signals from
the clock.
● Configure synchronous Ethernet to synchronize the clock frequency on the
network.

Configuration Procedure
The process of configuring 1588v2 on a TCandBC is as follows.

15.10.1 Configuring a 1588v2 Clock Source

Context
After external time signal input is configured on multiple 1588v2 devices, you can
configure clock source attributes to allow the 1588v2 clock sources to participate

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 855


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

in BMC calculation. The BMC algorithm allows the 1588v2 devices to dynamically
determine the master clock. The master clock provides time signals to the entire
1588v2 network so that the 1588v2 devices use 1588v2 to obtain clock
information from the grandmaster clock.
After dynamic BMC calculation is implemented, the 1588v2 devices select a clock
source based on the following order: priority1 > clock-class > clock-accuracy >
priority2. That is, priority1 of the clock sources is compared first. If the priority1
values of these 1588v2 devices are the same, the clock-class is compared. The
clock source with the highest priority is selected as the master clock.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Configure clock source attributes on all nodes. Generally, clock source attributes
need to be configured only on the grandmaster. After the grandmaster selects the
optimal clock source, the associated attributes are transmitted to lower-layer
devices through Announce messages. In case of special requirements, configure
time source attributes for other nodes.
● Run ptp clock-source local time-source time-source slot slot-id
The type of the clock source to be traced is configured.
NOTE
The time-source parameter can be configured only on the grandmaster clock and
must be set according to the clock source connected to the device. For details about
the time-source parameter and corresponding clock source, see Command Reference.
● Run ptp clock-source local clock-accuracy clock-accuracy slot slot-id
The clock accuracy of the clock source is configured.
● Run ptp clock-source local clock-class clock-class slot slot-id
The class of the clock source is configured.
NOTE
A smaller clock-class value indicates a higher class. A device whose clock class value is
smaller than 128 cannot function as a slave clock. Therefore, do not set a high clock
class for a slave clock. Otherwise, the PTP interface of the slave clock cannot enter the
slave state, and the device cannot synchronize with the master clock.
● Run ptp clock-source local priority1 priority1 slot slot-id
The priority1 value is set for the clock source.
● Run ptp clock-source local priority2 priority2 slot slot-id
The priority2 value is set for the clock source.

----End

15.10.2 Configuring PTP Globally

Context
If different carriers synchronize clocks with clients through the switch, configure
the switch as a TCandBC. On a TCandBC, a BC interface receives clock signals from

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 856


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

the master clock and sends the clock signals to a downstream device, and a TC
interface only transmits clock signals. A TC interface on a TCandBC is responsible
for forwarding PTP messages of PTP domains.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ptp enable
PTP is enabled globally.
By default, PTP is not enabled globally on a device.
Step 3 Run ptp device-type tcandbc slot slot-id
The device type is configured as TCandBC.
By default, no device type is configured for a PTP device.
Step 4 Run ptp domain domain-value
The domain to which the BC interface of the TCandBC belongs is configured.
By default, a PTP device belongs to domain 0.
NOTE
Devices that perform clock synchronization through PTP messages must belong to the same
PTP domain.

Step 5 (Optional) Run ptp virtual-clock-id clock-id-value slot slot-id


A virtual clock ID is set for the device.
By default, no virtual clock ID is configured for a PTP device, and the system
generates a clock ID based on the MAC address of the device. You can also
configure a virtual clock ID to identify the device.

NOTE

When running the ptp virtual-clock-id command, ensure that the configured virtual clock ID is
unique in the entire PTP domain.

----End

15.10.3 Configuring PTP on an Interface


Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
Step 3 Run ptp port-type { bc | tc }

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 857


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

The clock type of the interface is set to TC or BC.


By default, the clock type is not configured on an interface.
Step 4 Run ptp delay-mechanism { delay | pdelay }
A delay measurement mechanism is configured.
By default, no delay measurement mechanism is configured for PTP ports.
NOTE
Different delay measurement mechanisms are not compatible. Therefore, PTP interfaces on
a link must have the same delay measure mechanism configured.

Step 5 Run ptp enable


PTP is enabled on the interface.
By default, PTP is disabled on an interface.
Step 6 (Optional) Run ptp clock-step { one-step | two-step }
The mode in which PTP devices timestamp PTP messages to perform clock
synchronization is configured.
By default, PTP messages are timestamped in one-step mode.

----End

Configuring an Interface to Drop Announce Messages


After configuring PTP on an interface, you can run the ptp announce-drop
enable command on the interface to configure the interface to drop Announce
messages.
Announce messages are used for PTP clock synchronization. When a user-side
interface and the current PTP interface meet clock synchronization requirements,
you can configure the PTP interface to drop Announce messages to retain the
current master-slave hierarchy. After the interface receives Announce messages, it
drops the messages and does not participate in establishing the master-slave
hierarchy. This saves system resources.

NOTE
By default, an interface does not drop Announce messages.

15.10.4 Configuring the Encapsulation Mode for 1588v2


Messages
Context
You can configure MAC or UDP encapsulation for 1588v2 messages based on the
link type used for 1588v2 message transmission:
● MAC encapsulation: applies to Layer 2 link transmission.
● UDP encapsulation: applies to Layer 3 link transmission.
By default, the system uses multicast MAC encapsulation.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 858


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

NOTE

Devices that perform clock synchronization through 1588v2 messages must use the same
encapsulation mode of 1588v2 messages. Otherwise, the devices cannot communicate.

You can configure unicast or multicast encapsulation for 1588v2 messages based
on the topology of the master and slave devices:
● Unicast encapsulation: applies to point-to-point clock signal synchronization.
This mode is used when a single device needs to synchronize with the master
clock. If the destination MAC address or IP address of 1588v2 messages to be
sent is set to a unicast address, 1588v2 messages are encapsulated in unicast
encapsulation mode.
● Multicast encapsulation: applies to point-to-multipoint clock signal
synchronization. By default, devices that reside in the same PTP domain and
use the same delay measurement mechanism join the same multicast group.
Therefore, when multicast encapsulation is used, the destination MAC address
or IP address does not need to be configured for 1588v2 messages.

Procedure
● Configure the MAC encapsulation mode.
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. Run ptp mac-egress destination-mac destination-mac
The 1588v2 messages to be sent from the interface are encapsulated in
MAC encapsulation mode, and the destination MAC address is
configured.
By default, the multicast destination MAC address is 011B-1900-0000 if
the delay request-response mechanism is used; the multicast destination
MAC address is 0180-C200-000E if the Pdelay mechanism is used.
d. (Optional) Run ptp mac-egress vlan vlan-id [ priority priority-value ]
The VLAN ID and 802.1p priority are configured for MAC-encapsulated
1588v2 messages.
● Configure the UDP encapsulation mode.
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. Run ptp udp-egress source-ip source-ip [ destination-ip destination-ip ]
The 1588v2 messages to be sent from the interface are encapsulated in
UDP encapsulation mode, and the source and destination IP addresses
are configured.
By default, if UDP encapsulation is configured, the destination IP address
is multicast address 224.0.1.129 when the delay request-response

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 859


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

mechanism is used; the destination IP address is multicast address


224.0.0.107 when the Pdelay mechanism is used.
d. (Optional) Run ptp udp-egress destination-mac destination-mac
The next-hop MAC address of 1588v2 messages is configured.
e. (Optional) Run ptp udp-egress source-ip source-ip [ dscp dscp ]
The DSCP priority is configured for UDP-encapsulated 1588v2 messages.
f. (Optional) Run ptp udp-egress source-ip source-ip vlan vlan-id
[ priority priority ]
The VLAN ID and 802.1p priority are configured for UDP-encapsulated
1588v2 messages.
----End

15.10.5 (Optional) Configuring 1588v2 Message Attributes

Context
1588v2 devices periodically send or receive 1588v2 messages to establish the
master-slave hierarchy and transmit time information. 1588v2 messages include
Announce messages and Delay messages. Announce messages are used to
exchange time synchronization information between 1588v2 devices and establish
the master-slave hierarchy. Delay messages are event messages, which are
timestamped when reaching or leaving a 1588v2 device to measure the link delay.
If a 1588v2 device requires high-precision clock synchronization and needs to trace
the master clock frequency, reduce the interval for sending 1588v2 messages.
However, this consumes more bandwidth resources. If the sending link delay and
receiving link delay are different, you can configure correction for sending or
receiving 1588v2 messages to correct the link delay.

Procedure
● Configure attributes for Announce messages.
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. Run ptp announce-interval announce-interval
The interval for sending Announce messages on the interface is set to
2announce-interval, in milliseconds.
The default value of announce-interval is 7, indicating that the interval
for sending Announce messages on an interface is 128 ms.
If announce-interval is set to a small value, 1588v2 devices frequently
exchange 1588v2 messages, consuming more bandwidth resources. If
announce-interval is set to a large value, high-precision clock
synchronization cannot be guaranteed; however, clock synchronization
accuracy can be guaranteed.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 860


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

d. Run ptp announce receipt-timeout timeout-value


The maximum number of timeouts for receiving Announce messages is
set.
By default, the maximum number of timeouts for receiving Announce
messages is 3.
● Configure attributes for 1588v2 Delay messages.
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. Run ptp sync-interval sync-interval
The interval for sending Sync messages is configured on an interface.
By default, the interval for sending Sync messages is 8 ms.
d. Run ptp min-delayreq-interval min-delayreq-interval
The interval for sending DelayReq messages on the interface is set to
2min-delayreq-interval, in milliseconds.
The default value of min-delayreq-interval is 7, indicating that the
interval for sending DelayReq messages on the interface is 128 ms.
e. Run ptp min-pdelayreq-interval min-pdelayreq-interval
The interval for sending PdelayReq messages on the interface is set to
2min-pdelayreq-interval, in milliseconds.
The default value of min-pdelayreq-interval is 7, indicating that the
interval for sending PdelayReq messages on the interface is 128 ms.
f. Run ptp asymmetry-correction { positive | negative } asymmetry-
correction
The asymmetric correction for sending 1588v2 event messages is
configured on the interface.
By default, no asymmetric correction for sending 1588v2 event messages
is configured because 1588v2 devices consider that the sending link delay
and receiving link delay are the same.
----End

15.10.6 (Optional) Statically Specifying the Interface Status of


a Clock Device

Context
In a PTP clock synchronization network, all clock nodes work in the master-slave
relationship. By default, the master-slave relationships between clock nodes are
calculated through the BMC algorithm. To manually determine the master-slave
relationship between clock nodes, specify the clock status of various interfaces
excluding the TC interface.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 861


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ptp set-port-state enable slot slot-id
The function to statically specify the interface status is enabled.
Step 3 Run interface interface-type interface-number
The view of the interface whose status is to be statically configured is displayed.
Step 4 Run ptp port-state { slave | passive | master | premaster | listening | faulty |
disabled | initializing }
The interface status is statically specified.

----End

15.10.7 Verifying the PTP Configuration


Procedure
● Run the display ptp all [ state | config ] [ slot slot-id ] command to check
the PTP running status and configuration.
● Run the display ptp interface interface-type interface-number command to
check PTP information on the specified interface.
----End

15.11 Configuring G.8275.1


G.8275.1 Deployment
In Figure 15-18, to meet wireless transmission requirements, time synchronization
must be implemented between NodeBs. Therefore, T-BC is connected to an
external clock to synchronize the clock information and advertise clock
information to other devices on the bearer network. In this manner, the bearer
network and wireless network implement time synchronization through a
combination of the traditional clock synchronization mode and G.8275.1.

Figure 15-18 Configuring G.8275.1

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 862


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

Pre-configuration Tasks
Before configuring G.8275.1, complete the following tasks:

● Configure link layer protocol parameters for interfaces to ensure that the link
layer protocol status on the interfaces is Up.
● T-BC has correctly introduced external clock and time signals.

Configuration Procedure
The process of configuring G.8275.1 is as follows:

15.11.1 Configuring a G.8275.1 Clock Source

Context
After external time signal input is configured on multiple G.8275.1 devices, you
can configure clock source attributes for BMC source selection to allow the G.
8275.1 clock sources to participate in BMC calculation. The BMC algorithm allows
the G.8275.1 devices to dynamically determine the master clock. The master clock
provides time signals to the entire G.8275.1 network so that the G.8275.1 devices
use G.8275.1 to obtain clock information from the grandmaster clock.

After dynamic BMC calculation is implemented, the G.8275.1 devices select a clock
source based on the following order: priority2 > local-priority. That is, priority2 of
the clock sources is compared first. If the priority2 values of these G.8275.1 devices
are the same, the local-priority is compared. The clock source with the highest
priority is selected as the master clock.

Perform the following operations on the devices connected to an external clock


source on the G.8275.1 network:

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ptp clock-source local time-source time-source slot slot-id

The type of the clock source to be traced is configured. The time-source parameter
can be configured only on the grandmaster clock and must be set according to the
clock source connected to the device. For details about the time-source parameter
and corresponding clock source, see Command Reference.

Step 3 Run ptp clock-source local priority2 priority2 slot slot-id

The priority2 value is configured for the clock source.

Step 4 Run ptp clock-source local local-priority local-priority-value slot slot-id

The local priority is configured for the time source.

----End

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 863


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

15.11.2 Configuring G.8275.1 Globally

Context
TO configure G.8275.1 globally, enable it in the system view and set the device
type to T-BC. Perform the following operations on T-BC:

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ptp enable

PTP is enabled.

By default, PTP is not enabled.

Step 3 Run ptp profile g-8275-1 enable

ITU-T G.8275.1 is used.

By default, PTP configuration complies with IEEE 1588v2.

Step 4 Run ptp device-type t-bc slot slot-id

The device type is configured as T-BC.

By default, no device type is configured for a PTP device.

Step 5 (Optional) Run ptp domain domain-value

The domain to which the PTP device belongs is configured.

By default, a PTP device belongs to domain 0.

NOTE
Devices that perform clock synchronization through G.8275.1 messages must belong to the
same PTP domain.

Step 6 (Optional) Run ptp virtual-clock-id clock-id-value slot slot-id

A virtual clock ID is set for T-BC.

By default, no virtual clock ID is configured for a PTP device. In this case, the
system automatically generates clock IDs based on device MAC addresses. You can
manually configure a virtual clock ID to identify a PTP device.

NOTE

Ensure that the virtual clock ID configured using the ptp virtual-clock-id command is unique in
the entire PTP domain.

----End

15.11.3 Configuring G.8275.1 on an Interface

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 864


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
Step 3 Run ptp delay-mechanism delay
The delay measurement mechanism is configured as delay.
By default, no delay measurement mechanism is configured for interfaces.
Step 4 Run ptp notslave disable
The G.8275.1 interface is configured to work in slave state.
Step 5 Run ptp enable
PTP is enabled on the interface.
By default, PTP is not enabled on an interface.
Step 6 (Optional) Run ptp announce-drop enable
The interface of the G.8275.1 device is configured to discard the received
Announce messages.
By default, an interface does not discard Announce messages. Announce messages
are used for PTP clock synchronization. If an interface is configured to drop
Announce messages, the device cannot receive clock signals from other devices
through the interface. Generally, a user-side interface is configured to drop
Announce messages.
Step 7 (Optional) Run ptp asymmetry-correction { positive | negative } asymmetry-
correction
The asymmetric correction time for sending G.8275.1 messages on the interface is
set.
Step 8 (Optional) Run ptp clock-step { one-step | two-step }
The mode in which the G.8275.1 device timestamps G.8275.1 messages to perform
clock synchronization is configured.
By default, G.8275.1 messages are timestamped in one-step mode.
Step 9 (Optional) Run ptp local-priority local-priority-value
A local priority is configured for the G.8275.1 interface.
By default, the local priority of a G.8275.1 interface is 128. If multiple clock
sources participate in clock source selection, clock source switching can be
achieved through the local priorities configured for interfaces.

----End

15.11.4 (Optional) Configuring G.8275.1 Message Attributes

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 865


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

Context
G.8275.1 devices periodically send or receive G.8275.1 messages to establish the
master-slave hierarchy and transmit time information. G.8275.1 messages include
Announce messages and Delay messages. Announce messages are used to
exchange time synchronization information between G.8275.1 devices and
establish the master-slave hierarchy. Delay messages are event messages, which
are timestamped when reaching or leaving a G.8275.1 device to measure the link
delay.
If a G.8275.1 device requires high-precision clock synchronization and needs to
trace the master clock frequency, reduce the interval for sending G.8275.1
messages. However, this consumes more bandwidth resources. If the sending link
delay and receiving link delay are different, you can configure correction for
sending or receiving G.8275.1 messages to correct the link delay.

Procedure
● Configure attributes for Announce messages.
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. Run ptp announce-interval announce-interval
The interval for sending Announce messages on the interface is set to
2announce-interval, in milliseconds.
The default value of announce-interval is 7, indicating that the interval
for sending Announce messages on an interface is 128 ms.
If announce-interval is set to a small value, G.8275.1 devices frequently
exchange G.8275.1 messages, consuming more bandwidth resources. If
announce-interval is set to a large value, high-precision clock
synchronization cannot be guaranteed; however, clock synchronization
accuracy can be guaranteed.
d. Run ptp announce receipt-timeout timeout-value
The maximum number of timeouts for receiving Announce messages is
set.
By default, the maximum number of timeouts for receiving Announce
messages is 3.
● Configure attributes for G.8275.1 Delay messages.
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. Run ptp sync-interval sync-interval
The interval for sending Sync messages is configured on an interface.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 866


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

By default, the interval for sending Sync messages is 64 ms.


d. Run ptp min-delayreq-interval min-delayreq-interval
The interval for sending DelayReq messages on the interface is set to
2min-delayreq-interval, in milliseconds.
The default value of min-delayreq-interval is 6, indicating that the
interval for sending DelayReq messages on the interface is 64 ms.
e. Run ptp asymmetry-correction { positive | negative } asymmetry-
correction
The asymmetric correction for sending G.8275.1 event messages is
configured on the interface.
By default, no asymmetric correction for sending G.8275.1 event
messages is configured because G.8275.1 devices consider that the
sending link delay and receiving link delay are the same.
----End

15.11.5 Configuring an Encapsulation Mode for G.8275.1


Messages
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
Step 3 Run ptp mac-egress destination-mac destination-mac
The G.8275.1 messages to be sent from the interface are encapsulated in MAC
encapsulation mode, and the destination MAC address is configured.
The available destination MAC addresses are as follows:
● 011B-1900-0000: forwardable multicast MAC address
● 0180-C200-000E: unforwardable multicast MAC address

----End

15.11.6 (Optional) Statically Specifying the Interface Status of


a Clock Device

Context
In a PTP clock synchronization network, all clock nodes work in the master-slave
relationship. By default, the master-slave relationships between clock nodes are
calculated through the BMC algorithm. To manually determine the master-slave
relationship between clock nodes, specify the clock status of various interfaces
excluding the TC interface.

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 867


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ptp set-port-state enable slot slot-id

The function to statically specify the interface status is enabled.

Step 3 Run interface interface-type interface-number

The view of the interface whose status is to be statically configured is displayed.

Step 4 Run ptp port-state { slave | passive | master | premaster | listening | faulty |
disabled | initializing }

The interface status is statically specified.

----End

15.11.7 Verifying the PTP Configuration

Procedure
● Run the display ptp all [ state | config ] [ slot slot-id ] command to check
the PTP running status and configuration.
● Run the display ptp interface interface-type interface-number command to
check PTP information on the specified interface.

----End

15.12 Maintaining PTP

15.12.1 Monitoring PTP

Context
In routine maintenance, you can run the following command in any view to view
the PTP running status.

Procedure
● Run the display ptp { all [ config | state ] [ slot slot-id ] | interface
interface-type interface-number } command to check the PTP configuration
and running status.

----End

15.12.2 Clearing PTP Statistics

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 868


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

Context

NOTICE

PTP message statistics cannot be restored after being cleared. Confirm your
operation before clearing them.

Procedure
● Run the reset ptp statistics { all [ slot slot-id ] | interface interface-type
interface-number } command in the user view to clear PTP message statistics
on the interface.

----End

15.13 Configuration Examples for PTP

15.13.1 Example for Configuring 1588v2 Time Synchronization

Networking Requirements
In Figure 15-19, the bearer network carries wireless services between NodeBs, and
all bearer network nodes support 1588v2. IN addition, NodeB1 and NodeB2
support 1588v2. In this way, wireless base stations and bearer network devices
achieve frequency and time synchronization. Because all the devices on the bearer
network support 1588v2, clock information can be transmitted in network-wide BC
mode.

Figure 15-19 Networking diagram for clock synchronization

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 869


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure input of external clock signals.
2. Configure the type of 1588v2-capable devices on the bearer network as BC.
3. Configure PE1 and PE2 as system master clocks and connect them to external
clocks. PE1 and PE2 back up each other.
4. Set the delay mechanism to Pdelay.

Procedure
Step 1 Configure a clock source.
# Configure PE1 to input clock signals from the PTP clock source to implement
frequency synchronization. The configurations of PE2, CE1, and CE2 are similar to
the configuration of PE1.
<HUAWEI> system-view
[HUAWEI] sysname PE1
[PE1] clock ethernet-synchronization enable
[PE1] clock source ptp synchronization enable slot 0
[PE1] clock source ptp priority 10 slot 0
[PE1] clock source ptp ssm prc slot 0

Step 2 Globally enable PTP and configure the device type as BC.
# Configure PE1. The configurations of PE2, CE1, and CE2 are similar to the
configuration of PE1.
[PE1] ptp enable
[PE1] ptp device-type bc slot 0

Step 3 Enable PTP on the interface.


# Configure PE1. The configurations of PE2, CE1, and CE2 are similar to the
configuration of PE1.
[PE1] interface XGigabitEthernet 0/0/1
[PE1-XGigabitEthernet0/0/1] ptp delay-mechanism pdelay
[PE1-XGigabitEthernet0/0/1] ptp enable
[PE1-XGigabitEthernet0/0/1] quit
[PE1] interface XGigabitEthernet 0/0/2
[PE1-XGigabitEthernet0/0/2] ptp delay-mechanism pdelay
[PE1-XGigabitEthernet0/0/2] ptp enable
[PE1-XGigabitEthernet0/0/2] quit
[PE1] interface XGigabitEthernet 0/0/3
[PE1-XGigabitEthernet0/0/3] ptp delay-mechanism pdelay
[PE1-XGigabitEthernet0/0/3] ptp enable
[PE1-XGigabitEthernet0/0/3] quit

Step 4 Verify the configuration.


After completing the configurations, run the display ptp all command on CE1 and
CE2 to view the PTP synchronization status. The following example uses the
command output on CE1.
[CE1] display ptp all
Device config info
------------------------------------------------------------------------------
PTP state :enabled Domain value :0
Slave only :no Device type :BC
Set port state :no Local clock ID :00259e1000000001
Virtual clock ID :no Time lock success :yes

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 870


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

PTP profile :IEEE1588V2

BMC run info


------------------------------------------------------------------------------
Grand clock ID :00259e1000000002
Receive number :XGigabitEthernet0/0/2
Parent clock ID :00259e1000000002
Parent portnumber :4126
Priority1 :110 Priority2 :110
Step removed :1 Clock accuracy :0x31
Clock class :6 Time Source :0xa0
UTC Offset :35 UTC Offset Valid :False
Timescale :ARB Time traceable :False
Leap :None Frequency traceable :False
Offset scaled :0xffff

Port info
Name State Delay-mech Ann-timeout Type Domain
------------------------------------------------------------------------------
XGigabitEthernet0/0/1 master delay 4 BC 0
XGigabitEthernet0/0/2 slave delay 4 BC 0

Time Performance Statistics(ns): Slot 1 Card 0 Port 1


------------------------------------------------------------------------------
Realtime(T2-T1) :140 Pathdelay :0
Max(T2-T1) :3510286792100
Min(T2-T1) :-5715158684

Clock source info


Clock Pri1 Pri2 Accuracy Class TimeSrc Signal Switch Direction In-Status
------------------------------------------------------------------------------
local 128 128 0x31 187 0xa0 - - - -

----End

Configuration Files
● CE1 configuration file
#
sysname CE1
#
clock ethernet-synchronization enable
clock source ptp priority 10 slot 0
clock source ptp ssm prc slot 0
clock source ptp synchronization enable slot 0
#
ptp enable
ptp device-type bc slot 0
#
interface XGigabitEthernet0/0/1
ptp delay-mechanism pdelay
ptp enable
#
interface XGigabitEthernet0/0/2
ptp delay-mechanism pdelay
ptp enable
#
return

● CE2 configuration file


#
sysname CE2
#
clock ethernet-synchronization enable
clock source ptp priority 10 slot 0
clock source ptp ssm prc slot 0
clock source ptp synchronization enable slot 0
#

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 871


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

ptp enable
ptp device-type bc slot 0
#
interface XGigabitEthernet0/0/1
ptp delay-mechanism pdelay
ptp enable
#
interface XGigabitEthernet0/0/2
ptp delay-mechanism pdelay
ptp enable
#
return

● PE1 configuration file


#
sysname PE1
#
clock ethernet-synchronization enable
clock source ptp priority 10 slot 0
clock source ptp ssm prc slot 0
clock source ptp synchronization enable slot 0
#
ptp enable
ptp device-type bc slot 0
#
interface XGigabitEthernet0/0/1
ptp delay-mechanism pdelay
ptp enable
#
interface XGigabitEthernet0/0/2
ptp delay-mechanism pdelay
ptp enable
#
interface XGigabitEthernet0/0/3
ptp delay-mechanism pdelay
ptp enable
#
return

● PE2 configuration file


#
sysname PE2
#
clock ethernet-synchronization enable
clock source ptp priority 10 slot 0
clock source ptp ssm prc slot 0
clock source ptp synchronization enable slot 0
#
ptp enable
ptp device-type bc slot 0
#
interface XGigabitEthernet0/0/1
ptp delay-mechanism pdelay
ptp enable
#
interface XGigabitEthernet0/0/2
ptp delay-mechanism pdelay
ptp enable
#
interface XGigabitEthernet0/0/3
ptp delay-mechanism pdelay
ptp enable
#
return

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 872


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

15.13.2 Example for Configuring G.8275.1 Time


Synchronization
Networking Requirements
In Figure 15-20, the bearer network carries wireless services between NodeBs, and
all bearer network nodes support G.8275.1. In addition, NodeB1 and NodeB2
support G.8275.1. In this way, wireless base stations and bearer network devices
achieve frequency and time synchronization.

Figure 15-20 Networking diagram for clock synchronization

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure input of external clock signals.
2. Configure the type of G.8275.1-capable devices on the bearer network as T-
BC.
3. Configure PE1 and PE2 as system master clocks and connect them to external
clocks. PE1 and PE2 back up each other.

Procedure
Step 1 Configure input of external clock signals.
# Configure PE1 to input clock signals from the line clock source to implement
frequency synchronization. The configuration of PE2 is similar to the configuration
of PE1.
<HUAWEI> system-view
[HUAWEI] sysname PE1
[PE1] clock ethernet-synchronization enable
[PE1] interface XGigabitEthernet 0/0/1
[PE1-XGigabitEthernet0/0/1] clock synchronization enable

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 873


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

[PE1-XGigabitEthernet0/0/1] quit
[PE1] interface XGigabitEthernet 0/0/2
[PE1-XGigabitEthernet0/0/2] clock synchronization enable
[PE1-XGigabitEthernet0/0/2] quit
[PE1] interface XGigabitEthernet 0/0/3
[PE1-XGigabitEthernet0/0/3] clock synchronization enable
[PE1-XGigabitEthernet0/0/3] clock ssm ssua
[PE1-XGigabitEthernet0/0/3] clock priority 1
[PE1-XGigabitEthernet0/0/3] quit

# Configure CE1 to connect to a clock source through Ethernet interfaces. The


configuration of CE2 is similar to the configuration of CE1.
<HUAWEI> system-view
[HUAWEI] sysname CE1
[CE1] clock ethernet-synchronization enable
[CE1] interface XGigabitEthernet 0/0/1
[CE1-XGigabitEthernet0/0/1] clock synchronization enable
[CE1-XGigabitEthernet0/0/1] clock priority 1
[CE1-XGigabitEthernet0/0/1] quit
[CE1] interface XGigabitEthernet 0/0/2
[CE1-XGigabitEthernet0/0/2] clock synchronization enable
[CE1-XGigabitEthernet0/0/2] clock ssm ssua
[CE1-XGigabitEthernet0/0/2] clock priority 1
[CE1-XGigabitEthernet0/0/2] quit

Step 2 Globally enable PTP, set the PTP protocol to G.8275.1, and set the device type to T-
BC.
# Configure PE1. The configurations of PE2, CE1, and CE2 are similar to the
configuration of PE1.
[PE1] ptp enable
[PE1] ptp profile g-8275-1 enable
[PE1] ptp device-type t-bc slot 0

Step 3 Configure G.8275.1 on an interface.


# Configure PE1. The configurations of PE2, CE1, and CE2 are similar to the
configuration of PE1.
[PE1] interface XGigabitEthernet 0/0/1
[PE1-XGigabitEthernet0/0/1] ptp delay-mechanism delay
[PE1-XGigabitEthernet0/0/1] ptp enable
[PE1-XGigabitEthernet0/0/1] quit
[PE1] interface XGigabitEthernet 0/0/2
[PE1-XGigabitEthernet0/0/2] ptp delay-mechanism delay
[PE1-XGigabitEthernet0/0/2] ptp enable
[PE1-XGigabitEthernet0/0/2] quit
[PE1] interface XGigabitEthernet 0/0/3
[PE1-XGigabitEthernet0/0/3] ptp delay-mechanism delay
[PE1-XGigabitEthernet0/0/3] ptp enable
[PE1-XGigabitEthernet0/0/3] ptp notslave disable
[PE1-XGigabitEthernet0/0/3] quit

Step 4 Verify the configuration.


After completing the configurations, run the display ptp all command on CE1 and
CE2 to view the PTP synchronization status. The following example uses the
command output on CE1.
[CE1] display ptp all
Device config info
------------------------------------------------------------------------------
PTP state :enabled Domain value :0
Slave only :no Device type :T-BC
Set port state :no Local clock ID :00259e1000000001
Virtual clock ID :no Time lock success :yes
PTP profile :G.8275.1

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 874


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

BMC run info


------------------------------------------------------------------------------
Grand clock ID :00259e1000000002
Receive number :XGigabitEthernet0/0/2
Parent clock ID :00259e1000000002
Parent portnumber :4126
Priority1 :110 Priority2 :110
Step removed :1 Clock accuracy :0x31
Clock class :6 Time Source :0xa0
UTC Offset :35 UTC Offset Valid :False
Timescale :ARB Time traceable :False
Leap :None Frequency traceable :False
Offset scaled :0xffff

Port info
Name State Delay-mech Ann-timeout Type Domain
------------------------------------------------------------------------------
XGigabitEthernet0/0/1 slave delay 4 T-BC 0
XGigabitEthernet0/0/2 master delay 4 T-BC 0

Clock source info


Clock Pri1 Pri2 Accuracy Class TimeSrc Signal Switch Direction In-Status
------------------------------------------------------------------------------
local 128 128 0x31 187 0xa0 - - - -

----End

Configuration Files
● CE1 configuration file
#
sysname CE1
#
clock ethernet-synchronization enable
#
ptp enable
ptp profile g-8275-1 enable
ptp device-type t-bc slot 0
#
interface XGigabitEthernet0/0/1
clock synchronization enable
ptp delay-mechanism delay
ptp enable
#
interface XGigabitEthernet0/0/2
clock ssm ssua
clock priority 1
clock synchronization enable
ptp delay-mechanism delay
ptp notslave disable
ptp enable
#
return

● CE2 configuration file


#
sysname CE2
#
clock ethernet-synchronization enable
#
ptp enable
ptp profile g-8275-1 enable
ptp device-type t-bc slot 0
#
interface XGigabitEthernet0/0/1
clock ssm ssua
clock priority 1

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 875


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

clock synchronization enable


ptp delay-mechanism delay
ptp notslave disable
ptp enable
#
interface XGigabitEthernet0/0/2
clock synchronization enable
ptp delay-mechanism delay
ptp enable
#
return

● PE1 configuration file


#
sysname PE1
#
clock ethernet-synchronization enable
#
ptp enable
ptp profile g-8275-1 enable
ptp device-type t-bc slot 0
#
interface XGigabitEthernet0/0/1
clock synchronization enable
ptp delay-mechanism delay
ptp enable
#
interface XGigabitEthernet0/0/2
clock synchronization enable
ptp delay-mechanism delay
ptp enable
#
interface XGigabitEthernet0/0/3
clock ssm ssua
clock priority 1
clock synchronization enable
ptp delay-mechanism delay
ptp notslave disable
ptp enable
#
return

● PE2 configuration file


#
sysname PE2
#
clock ethernet-synchronization enable
#
ptp enable
ptp profile g-8275-1 enable
ptp device-type t-bc slot 0
#
interface XGigabitEthernet0/0/1
clock synchronization enable
ptp delay-mechanism delay
ptp enable
#
interface XGigabitEthernet0/0/2
clock synchronization enable
ptp delay-mechanism delay
ptp enable
#
interface XGigabitEthernet0/0/3
clock ssm ssua
clock priority 1
clock synchronization enable
ptp delay-mechanism delay
ptp notslave disable
ptp enable

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 876


S300, S500, S2700, S5700, and S6700 Series
Ethernet Switches
Configuration Guide - Device Management 15 PTP Configuration

#
return

Issue 01 (2023-09-30) Copyright © Huawei Technologies Co., Ltd. 877

You might also like