---
title: PTP Configuration
slug: aidc/ptp-configuration
description: timing protocols configuration
createdAt: 2025-12-01T11:11:10.000Z
---

The Precision Time Protocol (PTP) provides clock accuracy for networked devices. Only the following device models support PTP functionality:

- <font color="#1D05A2">CX308P-48Y-N-V2</font>
- <font color="#1D05A2">CX532P-N-V2</font>
- <font color="#1D05A2">CX732Q-N-V2</font>

# <font color="#1D50A2">PTP View</font>

<font color="#1D05A2">Table 1 PTP View</font>

| **Command**                                                                                | **Purpose**                                      |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------ |
| **show ptp clock** \[*domain-id*]                                                          | Display PTP Clock Information.                   |
| **show ptp clock sm-tlv** *domain-id*                                                      | Display SM-TLV Information.                      |
| **show ptp interface ethernet** *interface\_name*                                          | Display PTP Interface Configuration Information. |
| **show ptp counters** \{**interface ethernet** *interface\_name* \|**domain** *domain-id*} | Display PTP Interface Counters.                  |
| **clear ptp counters**                                                                     | Clear PTP Packet Counters.                       |

## <font color="#1D50A2">show ptp clock \[*domain-id*\]</font>

**\[Command]**
**show ptp clock \[*domain-id*]**
**\[Purpose]**
Display PTP Clock Information.

**\[Parameters]**

| **Parameter** | **Description**                              |
| ------------- | -------------------------------------------- |
| *domain\_id*  | Specify the domain ID, the range is \[0,127] |

**\[View]**
Privileged User View

**\[Use Cases]**

```plaintext
sonic# show ptp clock 127
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:  60eb5a.fffe.0110b1
Local Clock Accuracy:  0xFE
Local Clock Class:  248
Local Clock Priority1:  128
Local Clock Priority2:  128
ports:  Ethernet18
Grandmaster Clock Identity:  001395.fffe.43a733
Grandmaster Clock Accuracy:  0xfe
Grandmaster Clock Class:  248
Grandmaster Clock Priority1:  1
Grandmaster Clock Priority2:  128
Parent Port Identity:  1
Servo State:  locked
Offset To Master:  -2
Path Delay:  659
Max Steps Removed:  255
Local Time:  9921883176191
```

## <font color="#1D50A2">show ptp clock sm-tlv *domain-id*</font>

**\[Command]**
**show ptp clock sm-tlv** *domain-id*

**\[Purpose]**
Display SM-TLV Information.

**\[Parameters]**

| **Parameter** | **Description**                              |
| ------------- | -------------------------------------------- |
| *domain\_id*  | Specify the domain ID, the range is \[0,127] |

**\[View]**
Privileged User View

**\[Use Cases]**

```plaintext
sonic# show ptp clock sm-tlv 127
Default Frame Rate:  0/0
GM Lock Status:  0
Time Address Flags:  0
Current Local Offset:  0
Jump Seconds:  0
Time Of Next Jump:  0
Time Of Next Jam:  0
Time Of Previous Jam:  0
Previous Jam Local Offset:  0
Daylight Saving:  0
Leap Second Jump:  0
```

## <font color="#1D50A2">show ptp interface ethernet *interface\_name*</font>

**\[Command]**
**show ptp interface ethernet** *interface\_name*

**\[Purpose]**
Display PTP Interface Configuration Information.

**\[Parameters]**

| **Parameter**     | **Description**         |
| ----------------- | ----------------------- |
| *interface\_name* | Interface name (eg.0/1) |

**\[View]**
Privileged User View

**\[Use Cases]**

```plaintext
sonic# show ptp interface ethernet 0/18
Ethernet:  Ethernet18
Enable:  true
Domain:  127
Index:  1
Dscp:  56
Announce Interval:  -2
Announce Receipt Timeout:  3
Delay Req Interval:  -3
Pdelay Req Interval:  -3
Sync Interval:  -3
Role:  dynamic
Delay Mechanism:  E2E
Transport Mode:  udpv4
```

## <font color="#1D50A2">show ptp counters \{interface ethernet *interface\_name* | domain *domain-id*\}</font>

**\[Command]**
**show ptp counters** \{**interface ethernet** *interface\_name* |**domain** *domain-id*}

**\[Purpose]**
Display PTP Interface Counters.

**\[Parameters]**

| **Parameter**     | **Description**                              |
| ----------------- | -------------------------------------------- |
| *interface\_name* | Interface name (eg.0/1)                      |
| *domain-id*       | Specify the domain ID, the range is \[0,127] |

**\[View]**
Privileged User View

**\[Use Cases]**

```plaintext
sonic# show ptp counters domain 127
Interface: Ethernet18
                                      Recv Packets                   Send Packets
---------------------------------------------------------------------------------
          Announce                          41860                             57
              Sync                          83619                            110
          FollowUp                              0                              0
          DelayReq                          83459                          83459
         DelayResp                          83452                              0
         PdelayReq                              0                              0
        PdelayResp                              0                              0
PdelayRespFollowUp                              0                              0
         Signaling                              0                              0
         Managment                              0                              0
```

## <font color="#1D50A2">clear ptp counters</font>

**\[Command]**
**clear ptp counters**

**\[Purpose]**
Clear PTP Packet Counters.

**\[View]**
Privileged User View

**\[Use Cases]**

```plaintext
sonic# clear ptp counters
```

# <font color="#1D50A2">PTP Config</font>

<font color="#1D05A2">Table 2 PTP Config</font>

| **Command**                                                              | **Purpose**                                                                  |
| ------------------------------------------------------------------------ | ---------------------------------------------------------------------------- |
| **ptp loglevel \{error\|warning\|notice\|info\|debug}**                  | Configure the log level for the ptp4l process in PTP logs.                   |
| **ptp domain** *domain\_id*                                              | Creat a PTP domain.                                                          |
| **ptp profile \{smpte-2059-2\|1588v2\|aes67\|g8275.1\|g8275.2}**         | Configure the PTP Protocol.                                                  |
| **ptp mode** *clock\_mode*                                               | Configure the PTP clock type.                                                |
| **ptp clock-id** *xxxxxx.xxxx.xxxxxx*                                    | Configure the PTP Clock ID                                                   |
| **ptp clock-step \{one\_step\|two\_step}**                               | Configure the timestamping mode for PTP packets.                             |
| **ptp class** *class*                                                    | Configure the PTP clock class.                                               |
| **ptp accuracy** *accuracy*                                              | Configure the PTP clock accuracy.                                            |
| **ptp priority1** *priority1*                                            | Configure the PTP priority1 parameter.                                       |
| **ptp priority2** *priority2*                                            | Configure the PTP priority2 parameter.                                       |
| **ptp priority** *priority*                                              | Configure the PTP priority parameter.                                        |
| **ptp sm-tlv enable**                                                    | Enable SM-TLV.                                                               |
| **ptp sm-tlv default-frame-rates** *numerator denominator*               | Configure the frame rate parameter.                                          |
| **ptp sm-tlv time-address-flags drop-frame**                             | Enable the drop frame timecode.                                              |
| **ptp sm-tlv time-address-flags color-frame**                            | Enable the color frame timecode.                                             |
| **ptp dscp** *dscp\_value*                                               | Configure the DSCP value in the IP encapsulation of PTP packets.             |
| **ptp source ip** \{*A.B.C.D*\|*A\::B*} \[**vrf** *vrf-name*]            | Configure the source IP in the IP encapsulation of PTP packets.              |
| **ptp domain** *domain\_id*                                              | Bind the interface to a specific PTP domain.                                 |
| **ptp enable**                                                           | Enable PTP on an interface.                                                  |
| **ptp role \{dynamic\|slave\|master}**                                   | Configure PTP role on an interface.                                          |
| **ptp delay-mechanism \{E2E\|P2P}**                                      | Configure the PTP delay measurement mechanism.                               |
| **ptp transport \{\{ipv4 \|ipv6} \{multicast\|unicast\|mixed}\|layer2}** | Configure the PTP packet encapsulation format.                               |
| **ptp unicast master address** \{*A.B.C.D*\|*A\::B*}                     | Configure the destination IP in the IP unicast encapsulation of PTP packets. |
| **ptp announce interval** *interval*                                     | Configure the Announce message transmission interval.                        |
| **ptp announce timeout** *times*                                         | Configure the Announce message reception timeout multiplier.                 |
| **ptp sync-message interval** *interval*                                 | Configure the Sync message transmission interval.                            |
| **ptp delay-req interval** *interval*                                    | Configure the Delay-req message transmission interval.                       |
| **ptp pdelay-req interval** *interval*                                   | Configure the Pdelay-req message transmission interval.                      |
| **ptp local priority** *priority*                                        | Configure the PTP priority parameter on the interface.                       |

## <font color="#1D50A2">ptp loglevel \{error|warning|notice|info|debug\}</font>

**\[Command]**
**ptp loglevel \{error|warning|notice|info|debug}**

**\[Purpose]**
Configure the log level for the ptp4l process in PTP logs.

**\[View]**
Global Configuration View

**\[Notes]**
The default log level is **notice.**
Run command **no ptp loglevel** to set the log level to default(notice).

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# ptp loglevel info
```

## <font color="#1D50A2">ptp domain *domain\_id*</font>

**\[Command]**
**ptp domain** *domain\_id*

**\[Purpose]**
Creat a PTP domain.

**\[Parameters]**

| **Parameter** | **Description**                              |
| ------------- | -------------------------------------------- |
| *domain\_id*  | Specify the domain ID, the range is \[0,127] |

**\[View]**
Global Configuration View

**\[Notes]**
Only one PTP domain can be configured.
Run command **no ptp domain** *domain\_id* to delete the PTP domain.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# ptp domain 127
```

## <font color="#1D50A2">ptp profile \{smpte-2059-2|1588v2|aes67|g8275.1|g8275.2\}</font>

**\[Command]**
**ptp profile \{smpte-2059-2|1588v2|aes67|g8275.1|g8275.2}**

**\[Purpose]**
Configure the PTP Protocol.

**\[View]**
PTP Domain Configuration View

**\[Notes]**
Only one PTP domain can be configured.
Run command **no ptp profile** to delete the PTP protocol currently in use. All PTP configurations under the current PTP domain will be removed after this operation.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# ptp domain 127
sonic(config-ptp-domain-127)# ptp profile smpte-2059-2
```

## <font color="#1D50A2">ptp mode *clock\_mode*</font>

**\[Command]**
**ptp mode** *clock\_mode*

**\[Purpose]**
Configure the PTP clock type.

**\[Parameters]**

| **Parameter** | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *clock\_mode* | PTP clock type.When the configured PTP profile is **smpte-2059-2**, **1588v2**, or **aes67**, the available clock types that can be configured are: **oc**/**bc**/**e2etc**/**p2ptc**.When the configured PTP profile is **g.8275.1**, the available clock types that can be configured are: **t-gm**/**t-bc**/**t-tsc**/**t-tc**.When the configured PTP profile is **g.8275.2**, the available clock types that can be configured are: **t-gm**/**t-bc-p**/**t-tsc-p**. |

**\[View]**
PTP Domain Configuration View

**\[Notes]**
The default clock type is **bc** when the configured PTP profile is **smpte-2059-2**, **1588v2**, or **aes67.**
The default clock type is **t-bc** when the configured PTP profile is **g8275.1.**
The default clock type is **t-bc-p** when the configured PTP profile is **g8275.2.**
Run command **no ptp mode** to set the ptp clock type to default.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# ptp domain 127
sonic(config-ptp-domain-127)# ptp mode bc
```

## <font color="#1D50A2">ptp clock-id *xxxxxx.xxxx.xxxxxx*</font>

**\[Command]**
**ptp clock-id** *xxxxxx.xxxx.xxxxxx*

**\[Purpose]**
Configure the PTP Clock ID.

**\[Parameters]**

| **Parameter**        | **Description** |
| -------------------- | --------------- |
| *xxxxxx.xxxx.xxxxxx* | PTP Clock ID.   |

**\[View]**
PTP Domain Configuration View

**\[Notes]**
The default PTP Clock ID is generated based on the MAC address. For example, if the MAC address is 00:01:02:03:04:05, the default Clock ID will be 000102.fffe.030405.
When manually configuring a Clock ID using a command, it is essential to ensure that the Clock ID is unique throughout the entire PTP domain.
Run command **no ptp clock-id** to set the ptp Clock ID to default.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# ptp domain 127
sonic(config-ptp-domain-127)# ptp clock-id 000000.fffe.0000101
```

## <font color="#1D50A2">ptp clock-step \{one\_step|two\_step\}</font>

**\[Command]**
**ptp clock-step \{one\_step|two\_step}**

**\[Purpose]**
Configure the timestamping mode for PTP packets.

**\[View]**
PTP Domain Configuration View

**\[Notes]**
The default timestamping mode is **one\_step.**
Run command **no ptp clock-step** to set the timestamping mode to default.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# ptp domain 127
sonic(config-ptp-domain-127)# ptp clock-step two_step
```

## <font color="#1D50A2">ptp class *class*</font>

**\[Command]**
**ptp class** *class*

**\[Purpose]**
Configure the PTP clock class.

**\[Parameters]**

| **Parameter** | **Description**                        |
| ------------- | -------------------------------------- |
| *class*       | PTP clock class, the range is \[0,255] |

**\[View]**
PTP Domain Configuration View

**\[Notes]**
The default clock class is 248.
When local\_class \< 128, the device cannot act as a Slave.
When local\_class > 248, the device cannot act as a Master.
Run command **no ptp class** to set the clock class to default.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# ptp domain 127
sonic(config-ptp-domain-127)# ptp class 200
```

## <font color="#1D50A2">ptp accuracy *accuracy*</font>

**\[Command]**
**ptp accuracy** *accuracy*

**\[Purpose]**
Configure the PTP clock accuracy.

**\[Parameters]**

| **Parameter** | **Description**                           |
| ------------- | ----------------------------------------- |
| *accuracy*    | PTP clock accuracy, the range is \[0,255] |

**\[View]**
PTP Domain Configuration View

**\[Notes]**
The default clock class is 254.
Run command **no ptp accuracy** to set the clock accuracy to default.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# ptp domain 127
sonic(config-ptp-domain-127)# ptp accuracy 200
```

## <font color="#1D50A2">ptp priority1 *priority1*</font>

**\[Command]**
**ptp priority1** *priority1*

**\[Purpose]**
Configure the PTP priority1 parameter.

**\[Parameters]**

| **Parameter** | **Description**                      |
| ------------- | ------------------------------------ |
| *priority1*   | PTP priority1, the range is \[0,255] |

**\[View]**
PTP Domain Configuration View

**\[Notes]**
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.
Run command **no ptp priority1** to set the priority1 to default.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# ptp domain 127
sonic(config-ptp-domain-127)# ptp priority1 100
```

## <font color="#1D50A2">ptp priority2 *priority2*</font>

**\[Command]**
**ptp priority2** *priority2*

**\[Purpose]**
Configure the PTP priority2 parameter.

**\[Parameters]**

| **Parameter** | **Description**                      |
| ------------- | ------------------------------------ |
| *priority2*   | PTP priority2, the range is \[0,255] |

**\[View]**
PTP Domain Configuration View

**\[Notes]**
The default priority2 is 128.
Run command **no ptp priority2** to set the priority2 to default.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# ptp domain 127
sonic(config-ptp-domain-127)# ptp priority2 100
```

## <font color="#1D50A2">ptp priority *priority*</font>

**\[Command]**
**ptp priority** *priority*

**\[Purpose]**
Configure the PTP priority parameter.

**\[Parameters]**

| **Parameter** | **Description**                     |
| ------------- | ----------------------------------- |
| *priority*    | PTP priority, the range is \[1,255] |

**\[View]**
PTP Domain Configuration View

**\[Notes]**
The default priority is 128.
When the configured PTP profile is **smpte-2059-2**, **1588v2**, or **aes67**, the PTP priority parameter is not supported.
When the configured PTP profile is **g.8275.1** or **g.8275.2**, the PTP priority parameter can be configured.
Run command **no ptp priority** to set the priority to default.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# ptp domain 127
sonic(config-ptp-domain-127)# ptp priority 100
```

## <font color="#1D50A2">ptp sm-tlv enable</font>

**\[Command]**
**ptp sm-tlv enable**

**\[Purpose]**
Enable SM-TLV.

**\[View]**
PTP Domain Configuration View

**\[Notes]**
When the configured PTP profile is smpte-2059-2, the SM-TLV is supported.For other PTP profiles, SM-TLV configuration is not supported.
Run command **no ptp sm-tlv enable** to disable SM-TLV.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# ptp domain 127
sonic(config-ptp-domain-127)# ptp sm-tlv enable
```

## <font color="#1D50A2">ptp sm-tlv default-frame-rates *numerator denominator*</font>

**\[Command]**
**ptp sm-tlv default-frame-rates** *numerator denominator*

**\[Purpose]**
Configure the frame rate parameter.

**\[Parameters]**

| **Parameter** | **Description**                                                              |
| ------------- | ---------------------------------------------------------------------------- |
| *numerator*   | the numerator of the frame rate parameter, the range is \[0, 4294967295]     |
| *denominator* | the *denominator* of the frame rate parameter, the range is \[0, 4294967295] |

**\[View]**
PTP Domain Configuration View

**\[Notes]**
When the configured PTP profile is smpte-2059-2, the SM-TLV is supported.For other PTP profiles, SM-TLV configuration is not supported.
Frame Rate = *numerator*/*denominator.*
This configuration is used when the device acts as a GM.
Run command **no ptp sm-tlv default-frame-rates** to set the frame rate to default.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# ptp domain 127
sonic(config-ptp-domain-127)# ptp sm-tlv default-frame-rates 30000 1001
```

## <font color="#1D50A2">ptp sm-tlv time-address-flags drop-frame</font>

**\[Command]**
**ptp sm-tlv time-address-flags drop-frame**

**\[Purpose]**
Enable the drop frame timecode.

**\[View]**
PTP Domain Configuration View

**\[Notes]**
When the configured PTP profile is smpte-2059-2, the SM-TLV is supported.For other PTP profiles, SM-TLV configuration is not supported.
This configuration is used when the device acts as a GM.
Run command **no ptp sm-tlv time-address-flags drop-frame** to disable the drop frame timecode.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# ptp domain 127
sonic(config-ptp-domain-127)# ptp sm-tlv time-address-flags drop-frame
```

## <font color="#1D50A2">ptp sm-tlv time-address-flags color-frame</font>

**\[Command]**
**ptp sm-tlv time-address-flags color-frame**

**\[Purpose]**
Enable the color frame timecode.

**\[View]**
PTP Domain Configuration View

**\[Notes]**
When the configured PTP profile is smpte-2059-2, the SM-TLV is supported.For other PTP profiles, SM-TLV configuration is not supported.
This configuration is used when the device acts as a GM.
Run command **no ptp sm-tlv time-address-flags color-frame** to disable the color frame timecode.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# ptp domain 127
sonic(config-ptp-domain-127)# ptp sm-tlv time-address-flags color-frame
```

## <font color="#1D50A2">ptp dscp *dscp\_value*</font>

**\[Command]**
**ptp dscp** *dscp\_value*

**\[Purpose]**
Configure the DSCP value in the IP encapsulation of PTP packets.

**\[Parameters]**

| **Parameter** | **Description**                   |
| ------------- | --------------------------------- |
| *dscp\_value* | DSCP Value, the range is \[0, 63] |

**\[View]**
PTP Domain / Physical Interface Configuration View

**\[Notes]**
The default DSCP value is 56.
When the ptp dscp value is configured both at the PTP domain configuration view and the interface configuration view, the configuration under the interface view takes precedence for that specific interface.
Run command **no ptp dscp** to set the DSCP value to default.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# ptp domain 127
sonic(config-ptp-domain-127)# ptp dscp 40
```

## <font color="#1D50A2">ptp source ip \{*A.B.C.D*|*A\:\:B*\} \[vrf *vrf-name*\]</font>

**\[Command]**
**ptp source ip** \{*A.B.C.D*|*A\::B*} \[**vrf** *vrf-name*]

**\[Purpose]**
Configure the source IP in the IP encapsulation of PTP packets.

**\[Parameters]**

| **Parameter** | **Description**                                                                               |
| ------------- | --------------------------------------------------------------------------------------------- |
| *A.B.C.D*     | IPv4 Address.It need to be configured when using IPv4 multicast encapsulation for PTP packets |
| *A\::B*       | IPv6 Address.It need to be configured when using IPv6 multicast encapsulation for PTP packets |
| *vrf-name*    | The name of the VRF where the IP is located.                                                  |

**\[View]**
PTP Domain Configuration View / Physical Interface Configuration View

**\[Notes]**
The default source IP is the interface address when there is an address in the interface.
Run command **no ptp source ip** to delete source ip.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# ptp domain 127
sonic(config-ptp-domain-127)# ptp source ip 172.16.1.100
```

## <font color="#1D50A2">ptp domain *domain\_id*</font>

**\[Command]**
**ptp domain** *domain\_id*

**\[Purpose]**
Bind the interface to a specific PTP domain.

**\[Parameters]**

| **Parameter** | **Description**                              |
| ------------- | -------------------------------------------- |
| *domain\_id*  | Specify the domain ID, the range is \[0,127] |

**\[View]**
Physical Interface Configuration View

**\[Notes]**
Run command **no ptp domain** to remove the interface from the PTP domain.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface ethernet 0/18
sonic(config-if-0/18)# ptp domain 127
```

## <font color="#1D50A2">ptp enable</font>

**\[Command]**
**ptp enable**

**\[Purpose]**
Enable PTP on an interface.

**\[View]**
Physical Interface Configuration View

**\[Notes]**
Run command **no ptp enable** to disable PTP on an interface.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface ethernet 0/18
sonic(config-if-0/18)# ptp enable
```

## <font color="#1D50A2">ptp role \{dynamic|slave|master\}</font>

**\[Command]**
**ptp role \{dynamic|slave|master}**

**\[Purpose]**
Configure PTP role on an interface.

**\[View]**
Physical Interface Configuration View

**\[Notes]**
The default role is **dynamic**, where the role is determined through the BMC or ABMC algorithm.
Run command **no ptp role** to set PTP role to default(dynamic).

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface ethernet 0/18
sonic(config-if-0/18)# ptp role slave
```

## <font color="#1D50A2">ptp delay-mechanism \{E2E|P2P\}</font>

**\[Command]**
**ptp delay-mechanism \{E2E|P2P}**

**\[Purpose]**
Configure the PTP delay measurement mechanism.

**\[View]**
Physical Interface Configuration View

**\[Notes]**
The default delay mechanism is **E2E**.
When the configured PTP profile is **smpte-2059-2**, **1588v2**, or **aes67**, the **E2E** and **P2P** can be configured.
When the configured PTP profile is **g.8275.1** or **g.8275.2**, only the **E2E** is supported.
When the delay-mechanism is **P2P**, the timestamping mode needs to be **two\_step**.
When the PTP function is enabled on multiple interfaces, the PTP delay-mechanism configured on these interfaces must be consistent.
Run command **no ptp delay-mechanism** to set the delay-mechanism to default.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface ethernet 0/18
sonic(config-if-0/18)# ptp delay-mechanism E2E
```

## <font color="#1D50A2">ptp transport \{\{ipv4 |ipv6\} \{multicast|unicast|mixed\}|layer2\}</font>

**\[Command]**
**ptp transport \{\{ipv4 |ipv6} \{multicast|unicast|mixed}|layer2}**

**\[Purpose]**
Configure the PTP packet encapsulation format.

**\[View]**
Physical Interface Configuration View

**\[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**.
When the PTP function is enabled on multiple interfaces, the **ptp transport** configured on these interfaces must be consistent.
Run command **no ptp transport** to set the packet format to default.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface ethernet 0/18
sonic(config-if-0/18)# ptp transport ipv4 multicast
```

## <font color="#1D50A2">ptp unicast master address \{*A.B.C.D*|*A\:\:B*\}</font>

**\[Command]**
**ptp unicast master address** \{*A.B.C.D*|*A\::B*}

**\[Purpose]**
Configure the destination IP in the IP unicast encapsulation of PTP packets.

**\[Parameters]**

| **Parameter** | **Description**                                                                             |
| ------------- | ------------------------------------------------------------------------------------------- |
| *A.B.C.D*     | IPv4 Address.It need to be configured when using IPv4 unicast encapsulation for PTP packets |
| *A\::B*       | IPv6 Address.It need to be configured when using IPv6 unicast encapsulation for PTP packets |

**\[View]**
Physical Interface Configuration View

**\[Notes]**
Only slave ports need to configure the **ptp unicast master address**.
This configuration is only valid when the **ptp transport** is set to **\{ipv4|ipv6} unicast**.
The configured **ptp unicast master address** must be in the same subnet as the interface IP address.
Run command **no ptp unicast master address** \{*A.B.C.D*|*A\::B*} to remove the destination IP.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface ethernet 0/18
sonic(config-if-0/18)# ptp unicast master address 10.245.0.17
```

## <font color="#1D50A2">ptp announce interval *interval*</font>

**\[Command]**
**ptp announce interval** *interval*

**\[Purpose]**
Configure the Announce message transmission interval.

**\[Parameters]**

| **Parameter** | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *interval*    | Announce message transmission 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. |

**\[View]**
Physical Interface Configuration View

**\[Notes]**
Interval duration = 2interval seconds.
Run command **no ptp announce interval** to set the announce interval to default.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface ethernet 0/18
sonic(config-if-0/18)# ptp announce interval 0
```

## <font color="#1D50A2">ptp announce timeout *times*</font>

**\[Command]**
**ptp announce timeout** *times*

**\[Purpose]**
Configure the Announce message reception timeout multiplier.

**\[Parameters]**

| **Parameter** | **Description**                                                                              |
| ------------- | -------------------------------------------------------------------------------------------- |
| *times*       | Announce message reception timeout multiplier, the range is \[2,10]. The default value is 3. |

**\[View]**
Physical Interface Configuration View

**\[Notes]**
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.
Run command **no ptp announce timeout** to set the announce message reception timeout multiplier to default.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface ethernet 0/18
sonic(config-if-0/18)# ptp announce timeout 6
```

## <font color="#1D50A2">ptp sync-message interval *interval*</font>

**\[Command]**
**ptp sync-message interval** *interval*

**\[Purpose]**
Configure the Sync message transmission interval.

**\[Parameters]**

| **Parameter** | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *interval*    | Sync message transmission 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. |

**\[View]**
Physical Interface Configuration View

**\[Notes]**
Interval duration = 2interval seconds.
Run command **no ptp sync-message interval** to set the Sync message interval to default.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface ethernet 0/18
sonic(config-if-0/18)# ptp sync-message interval 0
```

## <font color="#1D50A2">ptp delay-req interval *interval*</font>

**\[Command]**
**ptp delay-req interval** *interval*

**\[Purpose]**
Configure the Delay-req message transmission interval.

**\[Parameters]**

| **Parameter** | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *interval*    | Delay-req message transmission 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. |

**\[View]**
Physical Interface Configuration View

**\[Notes]**
Interval duration = 2interval seconds.
Run command **no ptp delay-req interval** to set the Delay-req message interval to default.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface ethernet 0/18
sonic(config-if-0/18)# ptp delay-req interval 0
```

## <font color="#1D50A2">ptp pdelay-req interval *interval*</font>

**\[Command]**
**ptp pdelay-req interval** *interval*

**\[Purpose]**
Configure the Pdelay-req message transmission interval.

**\[Parameters]**

| **Parameter** | **Description**                                                                                                                                                                                                                                                                                                                     |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *interval*    | Pdelay-req message transmission 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. |

**\[View]**
Physical Interface Configuration View

**\[Notes]**
Interval duration = 2interval seconds.
Run command **no ptp pdelay-req interval** to set the Pdelay-req message interval to default.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface ethernet 0/18
sonic(config-if-0/18)# ptp pdelay-req interval 0
```

## <font color="#1D50A2">ptp local priority *priority*</font>

**\[Command]**
**ptp local priority** *priority*

**\[Purpose]**
Configure the PTP priority parameter on the interface.

**\[Parameters]**

| **Parameter** | **Description**                     |
| ------------- | ----------------------------------- |
| *priority*    | PTP priority, the range is \[1,255] |

**\[View]**
Physical Interface Configuration View

**\[Notes]**
The default priority is 128.
When the configured PTP profile is **smpte-2059-2**, **1588v2**, or **aes67**, the PTP priority parameter is not supported.
When the configured PTP profile is **g.8275.1** or **g.8275.2**, the PTP priority parameter can be configured.
Run command **no ptp local priority** to set the priority to default.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface ethernet 0/18
sonic(config-if-0/18)# ptp local priority 10
```

