---
title: PTP Configuration Guide
slug: aidc/ptp-configuration-guide
description: PTP Configuration Guide
createdAt: 2025-11-12T12:13:54.615Z
---

## <font color="#1d50a2">Introduction</font>

The Precision Time Protocol (PTP) is a protocol designed to achieve high-precision clock synchronization in computer networks. It was originally developed to meet the stringent timing requirements of applications in fields such as industrial automation, telecommunications, and finance.
The primary goal of PTP is to provide clock synchronization accuracy at the microsecond or even sub-microsecond level within computer networks. This high level of synchronization is critical in many domains, including high-frequency trading systems, power system synchronization, and time stamping for scientific research equipment.

## <font color="#1d50a2">Basic Concepts</font>

<font color="#1d50a2">**PTP Domain**</font>

A network that applies the PTP protocol is called a PTP domain. A network may contain multiple PTP domains, each of which is an independent PTP clock synchronization system. Within a single PTP domain, there is exactly one clock source, and all devices in the domain remain synchronized to this clock source.

****<font color="#1d50a2">**Clock node types**</font>

The node in ptp domain is called clock node.
There are three clock node types defined by IEEE 1588v2.

- <font color="#1d05a2">OC(Ordinary Clock)\: </font>only a single physical port participates in PTP time synchronization in a PTP domain. The device synchronizes time from an upstream node or distributes time to downstream nodes through this port.
- <font color="#1d05a2">BC(Boundary Clock)\:</font> two or more physical ports may participate in PTP time synchronization in a PTP domain. One port synchronizes time from an upstream device, while the remaining multiple ports distribute time to downstream devices. Additionally, when a clock node acts as a time source and simultaneously distributes time to downstream clock nodes through multiple PTP ports, it is also referred to as a BC.
- <font color="#1d05a2">TC(Transparent Clock)\: </font>TC does not synchronize time with any other device. TC has multiple PTP ports and only forwards PTP messages between these ports, applying transit delay correction. It does not synchronize time from any of its ports.

There are four clock node types defined by G8275.1.

- <font color="#1d05a2">T-GM(Telecom Grandmaster)\: </font>T-GM can only act as a Master, serving as a time source to provide timing.
- <font color="#1d05a2">T-BC(Telecom Boundary Clock)\: </font>T-BC has multiple PTP ports. One port synchronizes time from an upstream device, while the remaining multiple ports distribute time to downstream devices.
- <font color="#1d05a2">T-TSC(Telecom Time Slave Clock)\:</font> T-TSC can only act as a Slave, synchronizes time from an upstream node
- <font color="#1d05a2">T-TC(Telecom Transparent clock)\: </font>T-TC does not synchronize time with any other device. T-TC has multiple PTP ports and only forwards PTP messages between these ports, applying transit delay correction. It does not synchronize time from any of its ports.

There are three clock node types defined by G8275.2.

- <font color="#1d05a2">T-GM(Telecom Grandmaster)\: </font>T-GM can only act as a Master, serving as a time source to provide timing.
- <font color="#1d05a2">T-BC-P(Telecom Boundary Clock For Partial Timing Support)\: </font>T-BC-P has multiple PTP ports. One port synchronizes time from an upstream device, while the remaining multiple ports distribute time to downstream devices.
- <font color="#1d05a2">T-TSC-P(Telecom Time Slave Clock For Partial Timing Support)\: </font>T-TSC-P can only act as a Slave, synchronizes time from an upstream node.

****<font color="#1d50a2">**PTP Port**</font>

A port on a device running the PTP protocol is called a PTP port. PTP ports can be classified into the following three roles:

- <font color="#1d05a2">Master Port\:</font> A port that distributes synchronized time, which can exist on a BC or an OC
- <font color="#1d05a2">Slave Port\: </font>A port that receives synchronized time, which can exist on a BC or an OC
- <font color="#1d05a2">Passive Port\:</font> A port that neither receives nor distributes synchronized time, serving as an idle standby port, available only on a BC.

<font color="#1d50a2">**Master-Slave Relationship**</font>

The node devices within a PTP domain perform clock synchronization according to a specific master-slave hierarchy. The master-slave relationship is relative: a node that synchronizes time is called a slave node, and a node that distributes time is called a master node. A single device may simultaneously synchronize time from an upstream node and distribute time to downstream nodes.
For a pair of clock nodes that are synchronizing with each other, the following master-slave relationships apply:

- The node that distributes synchronized time is called the master node, while the node that receives the synchronized time is called the slave node.
- The clock on the master node is referred to as the master clock, and the clock on the slave node is referred to as the slave clock.
- The port that distributes synchronized time is called the master port, and the port that receives synchronized time is called the slave port.

<font color="#1d50a2">**Grandmaster Clock**</font>

All clock nodes in a PTP domain are organized in a hierarchical structure, and the reference clock for the entire domain is the Grandmaster Clock (GMC). Through the exchange of PTP messages among clock nodes, the time of the Grandmaster Clock is ultimately synchronized across the entire PTP domain, hence it is also referred to as the time source. The Grandmaster Clock can be statically configured manually or dynamically elected using the Best Master Clock (BMC) or Alternate BMC algorithm.

## <font color="#1d50a2">How It Works</font>

### <font color="#1d50a2">**BMC algorithm**</font>

In a PTP domain, the selection of the grandmaster clock and the establishment of port master-slave relationships are both accomplished using the Best Master Clock (BMC) algorithm. The BMC algorithm compares datasets carried in Announce messages exchanged among clock nodes to select the grandmaster clock and determine the state of each PTP port.
In 1588v2, the BMC algorithm comparison rules are as follows:

- <font color="#1d05a2">Clock Priority 1\:</font> A smaller priority1 value indicates higher priority.
- <font color="#1d05a2">Clock Class\: </font>If priority1 values are equal, a smaller class value indicates higher priority.
- <font color="#1d05a2">Clock Accuracy\:</font> If class values are equal, a smaller accuracy value indicates higher priority.
- <font color="#1d05a2">Clock Priority 2\:</font> If accuracy values are equal, a smaller priority2 value indicates higher priority.
  Priority ranking order: priority1 > class > accuracy > priority2

In G.8275.1 and G.8275.2, the Alternate BMC algorithm comparison rules are as follows:

- <font color="#1d05a2">Clock Class\:</font> A smaller class value indicates higher priority.
- <font color="#1d05a2">Clock Accuracy\: </font>If class values are equal, a smaller accuracy value indicates higher priority.
- <font color="#1d05a2">Clock Priority 2\: </font>If accuracy values are equal, a smaller priority2 value indicates higher priority.
- <font color="#1d05a2">Local Clock Priority\:</font> If priority2 values are equal, a smaller priority value indicates higher priority.
- If local priorities are still equal, determine whether the clock class is less than or equal to 127:
- If the clock class  is less than or equal to 127, in the absence of a superior clock node, two or more grandmaster clocks may be elected within the PTP domain. Slave nodes select the nearest grandmaster as their master, forming two separate spanning trees that do not exchange PTP messages with each other.
- If the clock class is greater than 127, the clock with the smaller clockID wins.
  Priority ranking order: class > accuracy > priority2 > priority.

### <font color="#1d50a2">PTP message type</font>

PTP achieves master-slave relationship establishment and time synchronization through message exchange between master and slave nodes. The PTP message types are shown in the table below.

<font color="#1d05a2">Table 1 PTP message type</font>

| **Message Type**         | **Description**                                                                                                                                                                                                                                                                                                                                    |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Announce                 | Used for exchanging time source information between clock nodes to determine the master-slave hierarchy.                                                                                                                                                                                                                                           |
| Sync                     | The Sync transmission mode can be divided into one-step and two-step\:One-step: The Sync message contains the timestamp of its own transmission time.Two-step: The Sync message does not contain the timestamp of its transmission time; instead, it only records the transmission time, which is then carried in a subsequent Follow\_Up message. |
| Follow\_Up               | Only used in two-step mode. After the Master sends a Sync message to the Slave, Follow\_Up message is sent which carries the timestamp of when the Sync message was sent.                                                                                                                                                                          |
| Delay\_Req               | In the Delay request-response synchronization method, the Slave sends a Delay\_req message to the Master and records the timestamp of when the message was sent.                                                                                                                                                                                   |
| Delay\_Resp              | In the Delay request-response synchronization method, the Master sends a Delay\_Resp message to the Slave. The message carries the timestamp of when the Delay\_req message was received by the Master..                                                                                                                                           |
| Pdelay\_Req              | In the Peer Delay request-response synchronization method, the Slave sends a PDelay\_Req message to the Master and records the timestamp of when the message was sent.                                                                                                                                                                             |
| Pdelay\_Resp             | In the Peer Delay request-response synchronization method, the Master sends a PDelay\_Resp message to the Slave. The message carries the timestamp of when the PDelay\_Req message was received by the Master..                                                                                                                                    |
| Pdelay\_Resp\_Follow\_Up | In the Peer Delay two-step time synchronization method, the Master sends a Pdelay\_Resp\_Follow\_Up message to the Slave, carrying the timestamp of when the Pdelay\_Resp message was transmitted at the Master.                                                                                                                                   |
| Management               | Transmits management information and commands to achieve clock management.                                                                                                                                                                                                                                                                         |
| Signaling                | Carries information, requests, and commands between clocks.                                                                                                                                                                                                                                                                                        |

### <font color="#1d50a2">Timestamp Carrying Method</font>

PTP calculates the path delay and time offset between master and slave devices by recording timestamps generated during message exchanges, thereby achieving time synchronization.
There are two timestamp carrying modes:

- <font color="#1d05a2">One-step mode\: </font>The Sync and Pdelay\_Resp messages carry the timestamp of their own transmission time.
- <font color="#1d05a2">Two-step mode\:</font> The Sync and Pdelay\_Resp messages do not carry the timestamp of their transmission time; instead, the subsequent Follow\_Up and Pdelay\_Resp\_Follow\_Up messages carry the transmission timestamps. In two-step mode, the generation and announcement of time information are completed in two separate steps, which allows compatibility with devices that do not support timestamping the transmission time of Sync and Pdelay\_Resp messages.

### <font color="#1d50a2">Delay Measurement Method</font>

There are two methods for delay measurement.

- <font color="#1d05a2">E2E(End to End)\: </font>Calculate the time offset based on the overall path delay between master and slave clocks.
- <font color="#1d05a2">P2P(Peer to Peer)\:</font> Calculate the time offset based on the delay of each individual link between master and slave clocks.

The process of the E2E mechanism (two-step mode) is shown in the figure.

::Image[]{src="https://app.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/Inr-B7jKBkCAtKzaGj9iS-20251201-073539.png" size="70" width="454" height="246" position="center" caption="Figure 1 E2E Mechanism" showCaption="true"}

- The master clock sends a Sync message to the slave clock at time t1. In two-step mode, the slave clock records the time t2 after receiving the Sync message.
- The master clock sends a Follow\_Up message to the slave clock. The slave clock obtains the transmission timestamp t1 of the Sync message from the Follow\_Up message.
- The slave clock sends a Delay\_Req message to the master clock. The slave clock records the transmission timestamp t3 of the Delay\_Req message.
- After receiving the Delay\_Req, the master clock sends a Delay\_Resp message to the slave clock. The slave clock obtains the timestamp t4, indicating when the master clock received the Delay\_Req message, from the Delay\_Resp message.

At this point, the slave clock can use t1 to t4 to calculate the path delay and time offset.

- Path\_Delay = \[(t2 – t1) + (t4 – t3)]/2
- t2 = t1 + Path\_Delay + Offset,
- Offset = t2 - t1 - Path\_Delay = t2 - t1 - \[(t2 – t1) + (t4 – t3)]/2 = \[(t2 – t1) – (t4 – t3)]/2

The process of the P2P mechanism (two-step mode) is shown in the figure.

::Image[]{src="https://app.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/3v9UBAscuxpvV6ixgGdws-20251201-073631.png" size="70" width="424" height="198" position="center" caption="Figure 2 P2P Mechanism" showCaption="true"}

At this point, the NodeB can use t1 to t4 to calculate the path delay.

- Path\_Delay = \[(t2 – t1) + (t4 – t3)]/2

The clock offset of the slave clock relative to the master clock, Offset = time when the slave clock receives the Sync message – time when the master clock sends the Sync message – cumulative one-way delay of each link – total residence time of all TCs on the path.

## <font color="#1d50a2">Configure PTP</font>

### <font color="#1d50a2">Enable PTP Feature</font>

<font color="#1d05a2">Table 2 Enable PTP feature</font>

| **Purpose**                     | **Commands**                       | **Description** |
| ------------------------------- | ---------------------------------- | --------------- |
| Enter global configuration view | **configure terminal**             | -               |
| Enable PTP feature              | **feature ptp state enable**       | -               |
| Configure PTP autorestart       | **feature ptp autorestart enable** | -               |

### <font color="#1d50a2">Configure PTP Domain</font>

<font color="#1d05a2">Table 3 Configure PTP domain</font>

| **Purpose**                                                  | **Commands**                                                                         | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Enter global configuration view                              | **configure terminal**                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Create a PTP domain and enter PTP domain configuration view. | **ptp domain** *domain-id*                                                           | The range of domain-id is 0-127.When using the smpte-2059-2 profile, the configurable range for domain-id is 0–127,the default value is 127.When using the 1588v2 profile, the configurable range for domain-id is 0–127, the default value is 0.When using the aes67 profile, domain-id is fixed to 0.When using the g8275.1 profile, the configurable range for domain-id is 24–43, the default value is 24.When using the g8275.2 profile, the configurable range for domain-id is 44–63, with a default value of 44. |
| Configure PTP profile                                        | **ptp profile** \{**smpte-2059-2**\|**1588v2**\|**aes67**\|**g8275.1**\|**g8275.2**} | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Configure PTP clock type                                     | **ptp mode** *clock\_mode*                                                           | When the configured PTP profile is **smpte-2059-2**, **1588v2**, or **aes67**, the available clock types that can be configured are:**oc** **bc** **e2etcp2ptc**When the configured PTP profile is **g.8275.1**, the available clock types that can be configured are:**t-gmt-bct-tsc** **t-tc**When the configured PTP profile is **g.8275.2**, the available clock types that can be configured are:**t-gmt-bc-p** **t-tsc-p**                                                                                         |
| Configure timestamp carrying method                          | **ptp clock-step** \{**one\_step**\|**two\_step**}                                   | The default method is **one\_step**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| Configure PTP message source IP                              | **ptp source ip** \{*A.B.C.D*\|*A\::B*}                                              | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| (Optional)Configure PTP message DSCP                         | **ptp dscp** *dscp\_value*                                                           | The default is 56.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |

### <font color="#1d50a2">Configure Clock parameters</font>

<font color="#1d05a2">Table 4 Configure Clock parameters</font>

| **Purpose**                         | **Commands**                          | **Description**                                                                                                                                                                                                                                      |
| ----------------------------------- | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Enter global configuration view     | **configure terminal**                | -                                                                                                                                                                                                                                                    |
| Enter PTP domain configuration view | **ptp domain** *domain-id*            | -                                                                                                                                                                                                                                                    |
| (Optional)Configure clock-id        | **ptp clock-id** *xxxxxx.xxxx.xxxxxx* | By default, it is generated based on the device's MAC address, with "fffe" inserted in the middle of the MAC address.                                                                                                                                |
| (Optional)Configure clock class     | **ptp class** *class*                 | The default value is 248                                                                                                                                                                                                                             |
| (Optional)Configure clock accuracy  | **ptp accuracy** *accuracy*           | The default value is 254                                                                                                                                                                                                                             |
| (Optional)Configure PTP priority1   | **ptp priority1** *priority1*         | The default priority1 is 128.When the configured PTP profile is smpte-2059-2, 1588v2, or aes67, the PTP priority1 parameter can be configured.When the configured PTP profile is g.8275.1 or g.8275.2, the PTP priority1 parameter is not supported. |
| (Optional)Configure PTP priority2   | **ptp priority2** *priority2*         | The default priority2 is 128.                                                                                                                                                                                                                        |

### <font color="#1d50a2">Enable PTP on the interface</font>

<font color="#1d05a2">Table 5 Enable PTP on the interface</font>

| **Purpose**                       | **Commands**                                       | **Description**                 |
| --------------------------------- | -------------------------------------------------- | ------------------------------- |
| Enter global configuration view   | **configure terminal**                             | -                               |
| Enter Ethernet configuration view | **interface ethernet** *interface-name*            | -                               |
| Bind the interface to PTP domain  | **ptp domain** *domain-id*                         | -                               |
| Enable PTP                        | **ptp enable**                                     | -                               |
| (Optional)Configure the PTP role  | **ptp role** \{**dynamic**\|**slave**\|**master**} | The default role is **dynamic** |

### <font color="#1d50a2">Configure Delay Measurement Method</font>

<font color="#1d05a2">Table 6 Configure Delay Measurement Method</font>

| **Purpose**                                  | **Commands**                                | **Description**                  |
| -------------------------------------------- | ------------------------------------------- | -------------------------------- |
| Enter global configuration view              | **configure terminal**                      | -                                |
| Enter Ethernet configuration view            | **interface ethernet** *interface-name*     | -                                |
| (Optional)Configure Delay Measurement Method | **ptp delay-mechanism** \{**E2E**\|**P2P**} | The default mechanism is **E2E** |

:::hint{type="info"}
- **NOTE:&#x20;**&#xA;When PTP is enabled on multiple interfaces, the **ptp delay-mechanism** on the interfaces must be consistent
:::

### <font color="#1d50a2">Configure the message encapsulation mode</font>

<font color="#1d05a2">Table 7 Configure the message encapsulation mode</font>

| **Purpose**                                   | **Commands**                                                                                     | **Description** |
| --------------------------------------------- | ------------------------------------------------------------------------------------------------ | --------------- |
| Enter global configuration view               | **configure terminal**                                                                           | -               |
| Enter Ethernet configuration view             | **interface ethernet** *interface-name*                                                          | -               |
| (Optional)Configure Message transmission mode | **ptp transport**\{\{**ipv4** \|**ipv6**} \{ **multicast**\|**unicast**\|**mixed**}\|**layer2**} | -               |
| (Optional)Configure the destination IP        | **ptp unicast master address** \{*A.B.C.D*\|*A\::B*}                                             | -               |
| (Optional)Configure the destination IP        | **ptp source ip** \{*A.B.C.D*\|*A\::B*}                                                          | -               |

:::hint{type="info"}
**NOTES:**

- When the configured PTP profile is **smpte-2059-2**, the available packet encapsulation format is **\{ipv4|ipv6} \{multicast|unicast|mixed}**. The default format is **ipv4 multicast**.
- When the configured PTP profile is**1588v2**, the available packet encapsulation format is **\{\{ipv4 |ipv6} \{multicast|unicast}|layer2}**. The default format is **ipv4 multicast**.
- When the configured PTP profile is **aes67**,the available packet encapsulation format is **ipv4 \{multicast|unicast|mixed}**. The default format is **ipv4 multicast**.
- When the configured PTP profile is **g.8275.1**, the available packet encapsulation format is **layer2**. The default format is **layer2**.
- When the configured PTP profile is **g.8275.2**, the available packet encapsulation format is **\{ipv4|ipv6}unicast**. The default format is **ipv4 unicast**.
- Only when the **ptp transport** is set to **\{ipv4 | ipv6} unicast and the port is** slave port, the **ptp unicast master address** need to be configured
- When the transmission mode is **unicast** or **mixed**, the **ptp source ip** \{*A.B.C.D*|*A\::B*} need to be configured.
:::

### <font color="#1d50a2">Configure message interval parameters</font>

<font color="#1d05a2">Table 8 Configure message interval parameters</font>

| **Purpose**                                                       | **Commands**                             | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ----------------------------------------------------------------- | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Enter global configuration view                                   | **configure terminal**                   | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Enter Ethernet configuration view                                 | **interface ethernet** *interface-name*  | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| (Optional)Configure Announce Message transmission interval        | **ptp announce interval** *interval*     | When the configured PTP profile is **smpte-2059-2**, the range is \[-3,1]. The default value is 0.When the configured PTP profile is **1588v2**, the range is \[0,4]. The default value is 1.When the configured PTP profile is **aes67**, the range is \[0,4]. The default value is 1.When the configured PTP profile is **g.8275.1**, the interval cannot be modified. The default value is -3.When the configured PTP profile is **g.8275.2**, the range is \[-3,0]. The default value is -3.     |
| (Optional)Configure Announce message reception timeout multiplier | **ptp announce timeout** *times*         | When the configured PTP profile is **smpte-2059-2,1588v2,aes67**, the announce message reception timeout multiplier can be modified.For other PTP profiles, the configuration cannot be modified.The range is \[2,10]. The default value is 3                                                                                                                                                                                                                                                        |
| (Optional)Configure Sync Message transmission interval            | **ptp sync-message interval** *interval* | When the configured PTP profile is **smpte-2059-2**, the range is \[-7,1]. The default value is -3.When the configured PTP profile is **1588v2**, the range is \[-7,1]. The default value is 0.When the configured PTP profile is **aes67**, the range is \[-4,1]. The default value is -3.When the configured PTP profile is **g.8275.1**, the interval cannot be modified. The default value is -4.When the configured PTP profile is **g.8275.2**, the range is \[-7,0]. The default value is -4. |
| (Optional)Configure Delay\_Req Message transmission interval      | **ptp delay-req interval** *interval*    | When the configured PTP profile is **smpte-2059-2**, the range is \[-3,5]. The default value is -3.When the configured PTP profile is **1588v2**, the range is \[-7,5]. The default value is 0.When the configured PTP profile is **aes67**, the range is \[-4,5]. The default value is 0.When the configured PTP profile is **g.8275.1**, the interval cannot be modified. The default value is -4.When the configured PTP profile is **g.8275.2**, the range is \[-7,0]. The default value is -4.  |
| (Optional)Configure PDelay\_Req Message transmission interval     | **ptp pdelay-req interval** *interval*   | When the configured PTP profile is **smpte-2059-2**, the range is \[-3,5]. The default value is -3.When the configured PTP profile is **1588v2**, the range is \[-7,5]. The default value is 0.When the configured PTP profile is **aes67**, the range is \[-4,5]. The default value is 0.                                                                                                                                                                                                           |

### <font color="#1d50a2">(Optional)Configure SM-TLV</font>

In the SMPTE-2059-2 standard, SM TLV (Stream Mapping Type-Length-Value) is a format used to transmit timecode and synchronization information, enabling the delivery and management of time synchronization information in multi-device and multi-system environments to ensure precise synchronization among devices. Therefore, this function is only available when using the smpte-2059-2 profile.

<font color="#1d50a2">**Enable SM-TLV**</font>

After enabling SM-TLV, the device supports handling of daylight saving time events. When a BC receives daylight saving time information, it records the time jump, prepares in advance for the transition, performs the time adjustment when the designated time is reached, and forwards the message to the OC clock. This ensures that during the start and end of daylight saving time, the system clock advances or retreats by one hour, preventing time inconsistencies in synchronization caused by time jumps.
Daylight saving time, also known as "daylight saving time" or "summer time", is a system that artificially adjusts local time to conserve energy. The uniform time used during this period is referred to as "daylight saving time".

<font color="#1d05a2">Table 9 Enable SM-TLV</font>

| **Purpose**                         | **Commands**               | **Description**                                                                                                                                                              |
| ----------------------------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Enter global configuration view     | **configure terminal**     | -                                                                                                                                                                            |
| Enter PTP domain configuration view | **ptp domain** *domain-id* | -                                                                                                                                                                            |
| Enable SM-TLV                       | **ptp sm-tlv enable**      | When the configured PTP profile is smpte-2059-2, the SM-TLV is supported.For other PTP profiles, SM-TLV configuration is not supported.Only the GM needs to configure SM-TLV |

<font color="#1d50a2">**Configure timecode parameters**</font>

After enabling SM-TLV, the default frame rate (default-frame-rates) can be configured on the GM, providing a timing reference that affects the synchronization of all devices. As a relay device, the BC forwards SM-TLV information to ensure smooth data flow throughout the PTP domain. The OC receives the SM-TLV data and applies the included timecode and synchronization information to maintain synchronization with the PTP domain.

<font color="#1d05a2">Table 10 Configure timecode parameters</font>

| **Purpose**                         | **Commands**                                               | **Description** |
| ----------------------------------- | ---------------------------------------------------------- | --------------- |
| Enter global configuration view     | **configure terminal**                                     | -               |
| Enter PTP domain configuration view | **ptp domain** *domain-id*                                 | -               |
| Configure default-frame-rates       | **ptp sm-tlv default-frame-rates** *numerator denominator* | -               |
| Enable drop-frame timecode          | **ptp sm-tlv time-address-flags drop-frame**               | -               |
| Enable color-frame timecode         | **ptp sm-tlv time-address-flags color-frame**              | -               |

## <font color="#1d50a2">Display and Maintenance</font>

<font color="#1d05a2">Table 11 Display and Maintenance</font>

| **Purpose**                                     | **Commands**                                                                                    | **Description**                     |
| ----------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------- |
| Display PTP state                               | **show ptp clock** \[*domain-id*]                                                               | *domain-id*: the created PTP domain |
| Display SM-TLV info                             | **show ptp clock sm-tlv** *domain-id*                                                           | *domain-id*: the created PTP domain |
| Display the PTP configuration of the interface. | **show ptp interface ethernet** *interface\_name*                                               | -                                   |
| Display packet statistics.                      | **show ptp counters** \{**interface** **ethernet** *interface\_name* \| **domain** *domain-id*} | -                                   |

## <font color="#1d50a2">Typical Configuration Example</font>

### <font color="#1d50a2">SMPTE multicast communication method</font>

1. Networking Requirements
   In the network, SwitchA acts as the clock source and needs to synchronize time to SwitchC and SwitchD, with all three devices connected to SwitchB. The customer has high requirements for time accuracy and requires the use of the SMPTE-2059-2 standard and IPv4 UDP multicast communication mode, with one-step timestamping and the E2E delay measurement mechanism.

::Image[]{src="https://app.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/098LeuGurGa7vjIBXL9x6-20251201-073731.png" size="70" width="462" height="169" position="center" caption="Figure 3 Topology For PTP" showCaption="true"}

2. Procedure
   **SwitchA**
   Configure Interface IP and Loopback0 IP

```plaintext
interface ethernet 0/32
 ip address 10.32.1.2/24
 exit
!
interface loopback 0
 ip address 172.16.1.179/32
 exit
```

Configure PTP domain

```plaintext
!
ptp domain 127
 ptp profile smpte-2059-2
 ptp mode oc
 ptp clock-step one_step
 ptp clock-id 000000.fffe.000179
 ptp priority1 100
 ptp class 200
 ptp source ip 172.16.1.179
 exit
```

Enable PTP on the interface

```plaintext
!
interface ethernet 0/32
 ptp domain 127
 ptp enable
```

**SwitchB**
Configure Interface IP and Loopback0 IP

```plaintext
interface ethernet 0/1
 ip address 10.32.1.1/24
 exit
!
interface ethernet 0/2
 ip address 10.32.2.1/24
 exit
!
interface ethernet 0/3
 ip address 10.32.3.1/24
 exit
!
interface loopback 0
 ip address 172.16.1.166/32
 exit
```

Configure PTP domain

```plaintext
!
ptp domain 127
 ptp profile smpte-2059-2
 ptp mode bc
 ptp clock-step one_step
 ptp clock-id 000000.fffe.000166
 ptp priority1 120
 ptp source ip 172.16.1.166
 exit
```

Enable PTP on the interface

```plaintext
!
interface ethernet 0/1
 ptp domain 127
 ptp enable
!
interface ethernet 0/2
 ptp domain 127
 ptp enable
!
interface ethernet 0/3
 ptp domain 127
 ptp enable
```

**SwitchC**
Configure Interface IP and Loopback0 IP

```plaintext
interface ethernet 0/32
 ip address 10.32.2.2/24
 exit
!
interface loopback 0
 ip address 172.16.1.174/32
 exit
```

Configure PTP domain

```plaintext
!
ptp domain 127
 ptp profile smpte-2059-2
 ptp mode oc
 ptp clock-step one_step
 ptp clock-id 000000.fffe.000174
 ptp source ip 172.16.1.174
```

Enable PTP on the interface

```plaintext
!
interface ethernet 0/32
 ptp domain 127
 ptp enable
```

**SwitchD**
Configure Interface IP and Loopback0 IP

```plaintext
interface ethernet 0/32
 ip address 10.32.3.2/24
 exit
!
interface loopback 0
 ip address 172.16.1.141/32
 exit
```

Configure PTP domain

```plaintext
!
ptp domain 127
 ptp profile smpte-2059-2
 ptp mode oc
 ptp clock-step one_step
 ptp clock-id 000000.fffe.000141
 ptp source ip 172.16.1.141
```

Enable PTP on the interface

```plaintext
!
interface ethernet 0/32
 ptp domain 127
 ptp enable
```

3. Verify the configuration

Verfify PTP state on the SwitchB

```plaintext
SwitchB# show ptp clock
Domain:  127
Profile:  smpte-2059-2
Clock Mode:  BC
Clock Step:  one_step
Dscp:  56
Source IP Address:  0.0.0.0
Local Clock Identity:  000000.fffe.000166
Local Clock Accuracy:  0xFE
Local Clock Class:  248
Local Clock Priority1:  120
Local Clock Priority2:  128
ports:  Ethernet1,Ethernet2,Ethernet3
Grandmaster Clock Identity:  000000.fffe.000179
Grandmaster Clock Accuracy:  0xfe
Grandmaster Clock Class:  200
Grandmaster Clock Priority1:  100
Grandmaster Clock Priority2:  128
Parent Port Identity:  1
Servo State:  locked
Offset To Master:  4
Path Delay:  222
Max Steps Removed:  255
Local Time:  1986040939445
```

Verfify PTP state on the SwitchC

```plaintext
SwitchC# show ptp clock
Domain:  127
Profile:  smpte-2059-2
Clock Mode:  OC
Clock Step:  one_step
Dscp:  56
Source IP Address:  0.0.0.0
Local Clock Identity:  000000.fffe.000174
Local Clock Accuracy:  0xFE
Local Clock Class:  248
Local Clock Priority1:  128
Local Clock Priority2:  128
ports:  Ethernet32
Grandmaster Clock Identity:  000000.fffe.000179
Grandmaster Clock Accuracy:  0xfe
Grandmaster Clock Class:  200
Grandmaster Clock Priority1:  100
Grandmaster Clock Priority2:  128
Parent Port Identity:  1
Servo State:  locked
Offset To Master:  -8
Path Delay:  244
Max Steps Removed:  255
Local Time:  1986041830647
```

Verfify PTP state on the SwitchD

```plaintext
SwitchD# show ptp clock
Domain:  127
Profile:  smpte-2059-2
Clock Mode:  OC
Clock Step:  one_step
Dscp:  56
Source IP Address:  0.0.0.0
Local Clock Identity:  000000.fffe.000141
Local Clock Accuracy:  0xFE
Local Clock Class:  248
Local Clock Priority1:  128
Local Clock Priority2:  128
ports:  Ethernet32
Grandmaster Clock Identity:  000000.fffe.000179
Grandmaster Clock Accuracy:  0xfe
Grandmaster Clock Class:  200
Grandmaster Clock Priority1:  100
Grandmaster Clock Priority2:  128
Parent Port Identity:  2
Servo State:  locked
Offset To Master:  5
Path Delay:  245
Max Steps Removed:  255
Local Time:  1987152330444
```

### <font color="#1d50a2">SMPTE unicast communication method</font>

1. Networking Requirements
   In the network, SwitchA acts as the clock source and needs to synchronize time to SwitchC and SwitchD, with all three devices connected to SwitchB. The customer has high requirements for time accuracy and requires the use of the SMPTE-2059-2 standard and IPv4 UDP unicast communication mode, with two-step timestamping and the E2E delay measurement mechanism.

::Image[]{src="https://app.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/9fGejqUWTeBk6KT8q9KYT-20251201-073828.png" size="70" width="462" height="169" position="center" caption="Figure 4 Topology For PTP" showCaption="true"}

2. Procedure
   **SwitchA**
   Configure Interface IP and Loopback0 IP

```plaintext
interface ethernet 0/32
 ip address 10.32.1.2/24
 exit
!
interface loopback 0
 ip address 172.16.1.179/32
 exit
```

Configure PTP domain

```plaintext
!
ptp domain 127
 ptp profile smpte-2059-2
 ptp mode oc
 ptp clock-step two_step
 ptp clock-id 000000.fffe.000179
 ptp priority1 100
 ptp class 200
 ptp source ip 172.16.1.179
 exit
```

Enable PTP on the interface

```plaintext
!
interface ethernet 0/32
 ptp domain 127
 ptp enable
 ptp transport ipv4 unicast
 ptp source ip 10.32.1.2
```

**SwitchB**
Configure Interface IP and Loopback0 IP

```plaintext
interface ethernet 0/1
 ip address 10.32.1.1/24
 exit
!
interface ethernet 0/2
 ip address 10.32.2.1/24
 exit
!
interface ethernet 0/3
 ip address 10.32.3.1/24
 exit
!
interface loopback 0
 ip address 172.16.1.166/32
 exit
```

Configure PTP domain

```plaintext
!
ptp domain 127
 ptp profile smpte-2059-2
 ptp mode bc
 ptp clock-step two_step
 ptp clock-id 000000.fffe.000166
 ptp priority1 120
 ptp source ip 172.16.1.166
 exit
```

Enable PTP on the interface

```plaintext
!
interface ethernet 0/1
 ptp domain 127
 ptp enable
 ptp transport ipv4 unicast
 ptp source ip 10.32.1.1
 ptp unicast master address 10.32.1.2
!
interface ethernet 0/2
 ptp domain 127
 ptp enable
 ptp source ip 10.32.2.1
 ptp transport ipv4 unicast
!
interface ethernet 0/3
 ptp domain 127
 ptp enable
 ptp source ip 10.32.3.1
 ptp transport ipv4 unicast
```

**SwitchC**
Configure Interface IP and Loopback0 IP

```plaintext
interface ethernet 0/32
 ip address 10.32.2.2/24
 exit
!
interface loopback 0
 ip address 172.16.1.174/32
 exit
```

Configure PTP domain

```plaintext
!
ptp domain 127
 ptp profile smpte-2059-2
 ptp mode oc
 ptp clock-step two_step
 ptp clock-id 000000.fffe.000174
 ptp source ip 172.16.1.174
```

Enable PTP on the interface

```plaintext
!
interface ethernet 0/32
 ptp domain 127
 ptp enable
 ptp source ip 10.32.2.2
 ptp transport ipv4 unicast
 ptp unicast master address 10.32.2.1
```

**SwitchD**
Configure Interface IP and Loopback0 IP

```plaintext
interface ethernet 0/32
 ip address 10.32.3.2/24
 exit
!
interface loopback 0
 ip address 172.16.1.141/32
 exit
```

Configure PTP domain

```plaintext
!
ptp domain 127
 ptp profile smpte-2059-2
 ptp mode oc
 ptp clock-step two_step
 ptp clock-id 000000.fffe.000141
 ptp source ip 172.16.1.141
```

Ehable PTP on the interface

```plaintext
!
interface ethernet 0/32
 ptp domain 127
 ptp enable
 ptp source ip 10.32.3.2
 ptp transport ipv4 unicast
 ptp unicast master address 10.32.3.1
```

3. Verify the configuration
   Verfify PTP state on the SwitchB

```plaintext
SwitchB# show ptp clock
Domain:  127
Profile:  smpte-2059-2
Clock Mode:  BC
Clock Step:  two_step
Dscp:  56
Source IP Address:  0.0.0.0
Local Clock Identity:  000000.fffe.000166
Local Clock Accuracy:  0xFE
Local Clock Class:  248
Local Clock Priority1:  120
Local Clock Priority2:  128
ports:  Ethernet1,Ethernet2,Ethernet3
Grandmaster Clock Identity:  000000.fffe.000179
Grandmaster Clock Accuracy:  0xfe
Grandmaster Clock Class:  200
Grandmaster Clock Priority1:  100
Grandmaster Clock Priority2:  128
Parent Port Identity:  1
Servo State:  locked
Offset To Master:  0
Path Delay:  233
Max Steps Removed:  255
Local Time:  2101144339563
```

Verfify PTP state on the SwitchC

```plaintext
SwitchC# show ptp clock
Domain:  127
Profile:  smpte-2059-2
Clock Mode:  OC
Clock Step:  two_step
Dscp:  56
Source IP Address:  0.0.0.0
Local Clock Identity:  000000.fffe.000174
Local Clock Accuracy:  0xFE
Local Clock Class:  248
Local Clock Priority1:  128
Local Clock Priority2:  128
ports:  Ethernet32
Grandmaster Clock Identity:  000000.fffe.000179
Grandmaster Clock Accuracy:  0xfe
Grandmaster Clock Class:  200
Grandmaster Clock Priority1:  100
Grandmaster Clock Priority2:  128
Parent Port Identity:  1
Servo State:  locked
Offset To Master:  3
Path Delay:  244
Max Steps Removed:  255
Local Time:  2101245256928
```

Verfify PTP state on the SwitchD

```plaintext
SwitchD# show ptp clock
Domain:  127
Profile:  smpte-2059-2
Clock Mode:  OC
Clock Step:  two_step
Dscp:  56
Source IP Address:  0.0.0.0
Local Clock Identity:  000000.fffe.000141
Local Clock Accuracy:  0xFE
Local Clock Class:  248
Local Clock Priority1:  128
Local Clock Priority2:  128
ports:  Ethernet32
Grandmaster Clock Identity:  000000.fffe.000179
Grandmaster Clock Accuracy:  0xfe
Grandmaster Clock Class:  200
Grandmaster Clock Priority1:  100
Grandmaster Clock Priority2:  128
Parent Port Identity:  2
Servo State:  locked
Offset To Master:  8
Path Delay:  245
Max Steps Removed:  255
Local Time:  2103456162289
```

