Skip to content
Ask AI

PTP Configuration

[Command] show ptp clock [ domain_id ]

[Purpose] Display the PTP clock information of the device

[View] System configuration view

[Usage Scenario] Use this command to check the PTP clock configuration on the device, including current clock status, mode, clock accuracy, and other information.

[Use Cases]

sonic# show ptp clock
Domain: 25
Profile: g8275.1
PTP Version: 2.1
Clock Type: T-TSC
Clock Step: one_step
Delay Mode: E2E
Transport Mode: ethernet
Clock Source: local
Clock Identity: 60eb5a.fffe.01774a
Clock Accuracy: 0xfe
Clock Class: 140
Clock OffsetScaledLogVariance: 0x4e5d
Clock Priority1: 128
Clock Priority2: 128
ports: Ethernet13
Grandmaster Clock Identity: 60eb5a.fffe.017a1c
Grandmaster Clock Accuracy: 0xfe
Grandmaster Clock Class: 7
Grandmaster OffsetScaledLogVariance: 0x4e5d
Grandmaster Clock Priority1: 128
Grandmaster Clock Priority2: 128
Parent Port Identity: 1
Servo State: locked
Offset To Master: -3
Path Delay: 2327
Max Steps Removed: 255
Steps Removed: 1
Local Time: 1773748219740685989
UTC Time: 2026-03-17 11:50:19.740685989

[Command] show ptp clock sm-tlv domain_id

[Purpose] Display the PTP clock sm-tlv information of the device

[View] System configuration view

[Usage Scenario] Use this command to check the PTP clock sm-tlv information on the device.

[Use Cases]

sonic# show ptp clock sm-tlv
Default Frame Rate: 0/0
GM Lock Status: 0
Time Address Flags: 3
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

[Command] show ptp counter [interface interface_name ] [instance domain_id ]

[Purpose] Display PTP packet statistics on the interface

[View] System configuration view

[Usage Scenario] Use this command to check the PTP packet statistics information on the interface.

[Use Cases]

sonic# show ptp counters
Interface: Ethernet1
Recv Packets Send Packets
---------------------------------------------------------------------------------
Announce 28249 28249
Sync 225857 225857
FollowUp 0 0
DelayReq 0 0
DelayResp 0 0
PdelayReq 0 0
PdelayResp 0 0
PdelayRespFollowUp 0 0
Signaling 0 0
Managment 0 0

[Command] show ptp interface interface_num

[Purpose] Display the PTP operation information of the interface

[View] System configuration view

[Use Cases]

sonic# show ptp interface 1
Ethernet: Ethernet1
Enable: true
Domain: 1
Index: 2
Dscp: 56
Source IP Address: 10.1.10.2
Announce Interval: 1
Announce Receipt Timeout: 3
Delay Req Interval: 0
Pdelay Req Interval: 0
Sync Interval: 0
Mode: slave
Delay Mode: E2E
Unicat Master Address: ['10.1.10.1']

[Command] show gnss info

[Purpose] For equipment with GNSS antenna, use this command to view information related to GNSS antenna and satellite.

[View] System Configuration View

[Use Cases]

Terminal window
sonic# show gnss info
GNSS Enable: true
Valid: true
Lock Status: LOCKED
Fix Type: 2D
Satellites Used: 9
Satellites Tracked: 18
HDOP: 1.00
Antenna Status: Valid
Timing Accuracy: 6.0 ns
Position: 34.248139,109.016493
Altitude: 437.0 m
PPS Locked: true

This command display description table

FieldsDesctiption
GNSS EnableWhether the device uses gnss as the clock source
ValidThe status of Receiver hardware and firmware self-test
Lock StatusCurrent GNSS status of the device
Fix TypePositioning dimension information
Satellites UsedNumber of satellites actually used to calculate position and time
Satellites TrackedTotal number of satellites being tracked by the device
HDOPHorizontal precision factor, reflecting the quality of satellite geometric distribution
Antenna StatusAntenna connection status
Timing AccuracyThe most important time accuracy indicator, the estimation error of the current time evaluated by the receiver relative to UTC
PositionCurrent longitude and latitude coordinates
AltitudeAltitude
PPS Locked1 PPS signal locked

[Command] ptp source ip { A.B.C.D | A::B }

[Purpose] Specify the source IP for PTP packets on the interface or globally

[View] PTP instance configuration view or Interface configuration view

[Usage Scenario] It is recommended that source ip be configured for unicast, multicast, and mixed transport modes. unicast and mixed specify the interface IP under interface view, and multicast can be configured in both PTP instance configuration view and interface configuration view.

[Use Cases]

sonic(config-ptp-0)# ptp source ip 10.1.1.1

[Command] ptp enable no ptp enable

[Purpose] Enable PTP function

[View] System configuration view or Interface configuration view

[Usage Scenario] When using PTP synchronization, you must enable PTP globally and on the interface.

[Use Cases]

sonic(config)# ptp enable
## Enable PTP function in interface 1.
sonic(config)# interface ethernet 1
sonic(config-if-1)# ptp instance 0
sonic(config-if-ptp-0)# ptp enable

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

[Purpose] The clock identity attribute of the local clock

[View] PTP instance configuration view

[Usage Scenario] The clock ID is an 8-byte array and should be written as a string in this configuration. It should be unique as it is used to identify a specific clock. The default value is “000000.0000.000000”.If the default is used or not set at all, the clock ID will be automatically generated.

[Use Cases]

sonic(config-ptp-127)# ptp clock-id 000001.0001.000001

[Command] ptp clock-source local {accuracy|class|priority1|priority2|priority|gnss}

[Purpose] Configure relevant parameters of the clock source

[Parameter]

ParameterDescription
accuracyValue range: 0 to 255, default value: 254
classValue range: 0 to 255, default value: 248
priority1Value range: 0 to 255, default value: 128, it’s only supported when profile is smpte-2059-2, 1588v2 or aes67
priority2Value range: 0 to 255, default value: 128
gnssDesignate the satellite signal as the clock synchronization source, including GPS, BeiDou, etc

[View] PTP instance configuration view

[Usage Scenario] When the PTP profile is smpte-2059-2 or 1588v2 or aes67, each clock node in the PTP domain elects the grandmaster clock through the BMC algorithm, they compare the clocks based on the priority1, class, accuracy and priority2 carried in the Announce message. The comparison rules are as follows:

  • The one with higher priority1 wins.
  • If priority1 is the same, the one with a higher class wins.
  • If class is also the same, the one with higher accuracy wins.
  • If accuracy is still the same, the one with higher priority2 wins.
  • If priority2 is still the same, the one with the smaller interface identifier wins.

When the PTP profile is g8275.1 or g8275.2, each clock node in the PTP domain elects the grandmaster clock through the ABMC algorithm, they compare the clocks based on the class, accuracy, priority2 and priority carried in the Announce message. In this algorithm, multiple grandmaster clocks are allowed to be optimal at the same time. If multiple GM clocks exist, each non-GM clock is synchronized by one of the grandmasters in the PTP domain. The comparison rules are as follows:

  • The one with higher class wins.
  • If class is the same, the one with a higher accuracy wins.
  • If accuracy is also the same, the one with higher priority2 wins.
  • If priority2 is still the same, then determine if the class is less than or equal to 127.
  • If the class is less than or equal to 127, in the absence of a better clock node, two or more optimal clocks are elected in the PTP domain, and the slave node chooses an optimal clock as the master node nearby and forms two spanning trees, and the two spanning trees do not interact with each other in terms of PTP message.
  • If the class is greater than 127, the smaller clockID (which consists of the clock identity and interface number together) wins.

Currently, GNSS is supported only within a single PTP domain, and only the CX306P-48Y model equipped with a GNSS antenna hardware module supports this feature.

[Use Cases]

sonic(config-ptp-127)# ptp clock-source local class 64

[Command] ptp clock-step {one_step|two_step}

[Purpose] Configure the mode for carrying timestamps

[Parameter]

ParameterDescription
one_stepSpecifies to one-step mode
two_stepSpecifies to two-step mode

[View] PTP instance configuration view

[Usage Scenario] When the PTP profile is 1588v2, the default is two_step, and when using other profiles, the default is one_step. one_step The Sync egress transmit timestamp is carried in the Sync messages, and Follow_Up messages is not sent. The Pdelay_Resp egress transmit timestamp is carried in the Pdelay_Resp messages, and Pdelay_Resp_Follow_Up messages is not sent. Two_step The Sync egress transmit timestamp is carried in the Follow_up messages. The Pdelay_Resp egress transmit timestamp is carried in the Pdelay_Resp_Follow_Up messages.

[Use Cases]

sonic(config-ptp-127)# ptp clock-step two_step

ptp clock-type {oc|bc|tc|t-gm|t-bc|t-tsc|t-tc|t-bc-p|t-tsc-p}

Section titled “ptp clock-type {oc|bc|tc|t-gm|t-bc|t-tsc|t-tc|t-bc-p|t-tsc-p}”

[Command] ptp clock-type {oc|bc|tc|t-gm|t-bc|t-tsc|t-tc|t-bc-p|t-tsc-p}

[Purpose] Configure basic clock node type for PTP

[Parameter]

ParameterDescription
bcBoundary clock
ocOrdinary clock
tcTransparent Clock
t-gmTelecom Grandmaster
t-bcTelecom Boundary Clock
t-tcTelecom Transparent Clock
t-tscTelecom Time Slave Clock
t-bc-pPartial-Support Telecom Boundary Clock
t-tsc-pPartial-Support Telecom Time Slave Clock

[View] PTP instance configuration view

[Usage Scenario] When the PTP profiles is smpte-2059-2 or 1588v2 or aes67, the clock type can be configured OC, BC, TC.

  • OC (Ordinary Clock): The clock node has only one PTP interface participating in time synchronization within the same PTP domain, and uses it to synchronize time from an upstream clock node or to distributes time to a downstream node.
  • BC (Boundary Clock): The clock node has multiple PTP interfaces participating in time synchronization within the same PTP domain. It synchronizes time from an upstream clock node through one interface and distributes time to downstream clock nodes through the remaining interfaces.
  • TC (Transparent Clock): Unlike BC/OC, which require time synchronization with other clock nodes, TC does not synchronize time with other clock nodes. TC has multiple PTP interfaces, but it only forwards PTP protocol messages between these interfaces and performs forwarding delay correction, without synchronizing time through any interface.

When the PTP profiles is g8275.1, the clock type can be configured T-GM, T-BC, T-TSC, T-TC.

  • T-GM (Telecom Grandmaster): The clock node has one or more PTP interfaces participating in time synchronization within the same PTP domain, and can only act as a master, distributes time to downstream clock nodes.
  • T-BC (Telecom Boundary Clock): The clock node has multiple PTP interfaces participating in time synchronization within the same PTP domain, and it synchronizes time from the upstream clock node through one of the interfaces and distributes time to the downstream clock node through the remaining interfaces.
  • T-TSC (Telecom Time Slave Clock): The clock node has only one PTP interface in the same PTP domain participating in time synchronization, and can only act as a slave to synchronize time from the upstream clock node.
  • T-TC (Telecom Transparent Clock): The clock node is an end-to-end transparent clock (E2E-TC) as defined in [IEEE 1588] and forwards all PTP protocol messages.

When the PTP profiles is g8275.2, the clock type can be configured T-GM, T-BC-P, T-TSC-P.

  • T-GM (Telecom Grandmaster): The clock node has one or more PTP interfaces participating in time synchronization within the same PTP domain, and can only act as a master, distributes time to downstream clock nodes.
  • T-BC-P (Partial-Support Telecom Boundary Clock): The clock node has multiple PTP interfaces participating in time synchronization within the same PTP domain, and it synchronizes time from the upstream clock node through one of the interfaces and distributes time to the downstream clock node through the remaining interfaces.
  • T-TSC-P (Partial-Support Telecom Time Slave Clock): The clock node can enable multiple PTP interfaces in the same PTP domain, but can only act as slave and synchronize the time from the upstream clock node through one interface, and the other interfaces act as passive and do not participate in the time synchronization.

[Use Cases]

sonic(config-ptp-127)# ptp clock-type oc

[Command] ptp instance domain_id

[Purpose] Create a PTP domain or interface to join a PTP domain

[Parameter]

ParameterDescription
domain_idPTP domain

[View] PTP instance configuration view or Interface configuration view

[Usage Scenario] In the same PTP domain, devices follow common rules to ensure stable communication between them. Devices from different domains cannot directly interact. All types of profiles, the domain value can be configured in the range 0-127.

[Use Cases]

sonic(config)# ptp instance 64
sonic(config)# interface ethernet 1
sonic(config-if-1)ptp instance 64

ptp profile <smpte-2059-2|1588v2|g8275.1|g8275.2|aes67>

Section titled “ptp profile <smpte-2059-2|1588v2|g8275.1|g8275.2|aes67>”

[Command] ptp profile <smpte-2059-2|1588v2|g8275.1|g8275.2|aes67>

[Purpose] Configure the protocol standard of PTP

[Parameter]

ParameterDescription
smpte-2059-2Standard protocol for clock synchronization SMPTE ST-2059-2
1588v2Standard protocol for clock synchronization 1588V2
g8275.1Standard protocol for clock synchronization ITU_T G8275.1
g8275.2Standard protocol for clock synchronization ITU_T G8275.2
aes67Standard protocol for clock synchronization aes67

[View] PTP instance configuration view

[Usage Scenario] The command must be executed before other PTP configurations are issued, and its execution clears all current PTP configurations

[Use Cases]

sonic(config-ptp-127)# ptp profile smpte-2059-2
Deleted all ptp configurations

ptp transport-mode {udpv4|udpv6|ethernet} [unicast|multicast|mixed]

Section titled “ptp transport-mode {udpv4|udpv6|ethernet} [unicast|multicast|mixed]”

[Command] ptp transport-mode {udpv4|udpv6|ethernet} [unicast|multicast|mixed]

[Purpose] Configure the udpv4/udpv6/ethernet PTP transport protocol for PTP messages

[Parameter]

ParameterDescription
udpv4IPv4+UDP encapsulation
udpv6IPv6+UDP encapsulation
ethernetMAC encapsulation
unicastCommunicate with unicast address
multicastCommunicate with multicast address
mixedCommunicate with unicast address for delay_req/delay_resp, and multicast address for others

[View] PTP instance configuration view

[Usage Scenario] If unicast communication is used between clock nodes, you need to configure the IP address of the interface as the source IP, the IP address of the PTP interface at the opposite end as the destination IP address of the PTP message, and make sure that the route from the current interface to the PTP interface at the opposite end is reachable. If mixed communication is used between clock nodes, you need to configure the interface IP address as the source IP. When the PTP profile is smpte-2059-2, it can communicate with udpv4/udpv6 unicast, multicast and mixed. When the PTP profile is aes67,it can only communicate with udpv4 unicast, multicast and mixed. When the PTP profile is 1588v2, it can communicate with udp4/udpv6 unicast, multicast and ethernet. When udpv4 or udpv6 unicast is modified to ethernet, the interface’s unicast master address A.B.C.D/A::B needs to be removed. When the PTP profile is g8275.1, it can only communicate with ethernet. When the PTP profile is g8275.2, it can communicate with udpv4/udpv6 unicast.

[Use Cases]

sonic(config-ptp-127)# ptp transport-mode udpv4

[Command] ptp delay-mode {E2E|P2P}

[Purpose] Configure delay measurement mechanism

[Parameter]

ParameterDescription
E2EEnd-to-End delay mechanism
P2PPeer-to-Peer delay mechanism

[View] PTP instance configuration view

[Usage Scenario] The default is E2E. E2E is End-to-End, which is measure the PTP event message resident time for Sync and Delay_Req messages. P2P is Peer-to-Peer, which is measure the PTP event message resident time for Pdelay_Req messages. The P2P delay measurement mechanism only supports configuration when the profile is smpte-2059-2, 1588v2, or aes67. Configuration scenarios where P2P+one_step is not supported.

[Use Cases]

sonic(config-ptp-127)# ptp delay-mode E2E

[Command] ptp sm-tlv enable

[Purpose] Enable sm-tlv function

[View] PTP instance configuration view

[Usage Scenario] In the SMPTE 2059-2 standard, SM TLV (Stream Mapping Type-Length-Value) is a format for transmitting timecode and synchronization information to convey and manage time synchronization information in multi-device and multi-system environments to ensure accurate synchronization between devices. When sm-tlv is enabled, the BC clock receives the Daylight Saving Time message, records the jump time, prepares for the jump in advance, processes the jump when the seconds arrive, and forwards the message to the OC Clock. so that the system clock jumps forward or backward by one hour at the beginning and end of Daylight Saving Time, which prevents the inconsistency in time synchronization caused by such time jumps. Daylight Saving Time (DST) is a system that artificially defines the local time in order to save energy,and the uniform time used during the implementation of this system is called “Daylight Saving Time”.

[Use Cases]

sonic(config-ptp-127)# ptp sm-tlv enable

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

[Purpose] Configure the default system frame rate, common frame rates are 24fps (movie), 25fps (PAL), 30fps (NTSC) and so on. Helps the system specify how many frames per second for proper processing and synchronization of timecode and media streams

[Parameter]

ParameterDescription
numeratorConfigure the sm-tlv default system frame rate
denominatorConfigure the default system frame rate for sm-tlv, numerator/denominator is the effective frame rate.

[View] PTP instance configuration view

[Usage Scenario] This configuration is used on the Grandmaster clock, which affects the synchronization of all devices through the time base it provides; the BC, as a relay device, will be responsible for forwarding sm-tlv information to ensure the smooth flow of data throughout the PTP domain; the OC receives the sm-tlv data and applies the timecode and synchronization information in it to maintain synchronization with the PTP domain.

[Use Cases]

sonic(config-ptp-127)# ptp sm-tlv default-frame-rates 3000 1001

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

[Purpose] Configure the current time address or time code to be in drop-frame time code format

[View] PTP instance configuration view

[Usage Scenario] In 24-hour time code, two frames per minute of time code are usually discarded in order to keep the time code consistent with the actual time. This compensates for the time deviation in standard time code due to the frame rate. For example, common dropped-frame time code formats include 29.97 fps in NTSC.

[Use Cases]

sonic(config-ptp-127)# ptp sm-tlv time-address-flags drop-frame

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

[Purpose] Configure the time address or time code to be associated with a color frame

[View] PTP instance configuration view

[Usage Scenario] In some video systems, especially where color video is involved (e.g., color video broadcasting), color time code may require special handling. This is because different video formats may have different requirements for timecode, and color timecode is commonly used to represent timing information in color video content.

[Use Cases]

sonic(config-ptp-127)# ptp sm-tlv time-address-flags color-frame

[Command] ptp mode {master|slave}

[Purpose] Configure PTP Interface Role

[Parameter]

ParameterDescription
masterPrimary Interface, Broadcasting Time Information to Other Devices
slaveSecondary Interface, Receiving Time Information from External Sources

[View] Interface PTP configuration view

[Usage Scenario] When configuring interface mode, if the current device interface is master, the value of the clock-source local parameter of the device must be greater than that of the peer. if the current device interface is slave, the value of the clock-source local parameter of the device must be less than that of the peer.

[Use Cases]

sonic(config)# interface ethernet 1
sonic(config-if-1)# ptp instance 127
sonic(config-if-ptp-127)# ptp mode master

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

[Purpose] Configure the interface address of the master device on the opposite end of unicast negotiation

[Parameter]

ParameterDescription
A.B.C.DIPv4 address
A::BIPv6 address

[View] Interface PTP configuration view

[Usage Scenario] After this command is configured, the interface sends signal message to the peer master, requesting the peer to send a announce message, unicast negotiation, and then begins time synchronization.

[Use Cases]

sonic(config)# interface ethernet 1
sonic(config-if-1)# ptp instance 127
sonic(config-if-ptp-127)# ptp unicast master address 10.1.1.1

[Command] ptp announce-interval interval

[Purpose] Configure the transmission period of Announce messages

[Parameter]

ParameterDescription
IntervalThe transmission period of Announce messages

[View] Interface PTP configuration view

[Usage Scenario] When the PTP profile is smpte-2059-2, the announce-interval can be configured in the range -3 to 1, and the default value is 0. When the PTP profile is 1588v2, the announce-interval can be configured in the range 0 to 4, and the default value is -3. When the PTP profile is g8275.2, the announce-interval can be configured in the range -3 to 0, and the default value is -3. When the PTP profile is g8275.1, this announce-interval is not supported for change and the default value is -3. The value of the parameter is the logarithm to base 2 of the time interval in seconds. For example, an interval of 0.25s gives a value of -2, and an interval of 0.5s gives value of -1. In order to facilitate quick synchronization, the default value, or a shorter interval than the default, is recommended.

[Use Cases]

sonic(config)# interface ethernet 1
sonic(config-if-1)# ptp instance 127
sonic(config-if-ptp-127)# ptp announce-interval 1

[Command] ptp announce-receipt-timeout time

[Purpose] Configure the receive timeout multiplier for announce messages

[Parameter]

ParameterDescription
timeValue range is 2 to 10, default value is 3

[View] Interface PTP configuration view

[Usage Scenario] The master node periodically sends an Announce message to the slave node. If the slave node does not receive an Announce message from the master node within the timeout reception time of the message, it is considered that the master node is disabled. Only supported when PTP profile is smpte-2059-2 or 1588v2.

[Use Cases]

sonic(config)# interface ethernet 1
sonic(config-if-1)# ptp instance 127
sonic(config-if-ptp-127)# ptp announce-receipt-timeout 2

[Command] ptp sync-interval interval

[Purpose] Configure the transmission period of Sync messages

[Parameter]

ParameterDescription
intervalThe transmission period of Sync messages

[View] Interface PTP configuration view

[Usage Scenario] When the PTP profile is smpte-2059-2, the sync-interval can be configured in the range -7 to 1, and the default value is -3. When the PTP profile is 1588v2, the sync-interval can be configured in the range -7 to 1, and the default value is 0. When the PTP profile is g8275.2, the sync-interval can be configured in the range -7 to 0, and the default value is -4. When the PTP profile is g8275.1, this sync-interval is not supported for change and the default value is -4. The value of the parameter is the logarithm to base 2 of the time interval in seconds. For example, an interval of 0.25s gives a value of -2, and an interval of 0.5s gives value of -1.

[Use Cases]

sonic(config)# interface ethernet 1
sonic(config-if-1)# ptp instance 127
sonic(config-if-ptp-127)# ptp sync-interval -2

[Command] ptp delay-req-interval interval

[Purpose] Configure the transmission period of Delay-req messages

[Parameter]

ParameterDescription
intervalThe transmission period of Delay-req messages

[View] Interface PTP configuration view

[Usage Scenario] When the PTP profile is smpte-2059-2, the delay-req-interval can be configured in the range -3 to 5, and the default value is -3. When the PTP profile is 1588v2, the delay-req-interval can be configured in the range -7 to 5, and the default value is 0. When the PTP profile is g8275.2, the delay-req-interval can be configured in the range -7 to 0, and the default value is -4. When the PTP profile is g8275.1, this delay-req-interval is not supported for change and the default value is -4. The value of the parameter is the logarithm to base 2 of the time interval in seconds. For example, an interval of 0.25s gives a value of -2, and an interval of 0.5s gives value of -1.

[Use Cases]

sonic(config)# interface ethernet 1
sonic(config-if-1)# ptp instance 127
sonic(config-if-ptp-127)# ptp delay-req-interval -3

[Command] ptp pdelay-req-interval interval

[Purpose] Configure the transmission period of Pdelay-req messages

[Parameter]

ParameterDescription
intervalThe transmission period of Pdelay-req messages

[View] Interface PTP configuration view

[Usage Scenario] When the PTP profile is smpte-2059-2, the pdelay-req-interval can be configured in the range -3 to 5, and the default value is -3. When the PTP profile is 1588v2, the pdelay-req-interval can be configured in the range 0 to 5, and the default value is 0. The value of the parameter is the logarithm to base 2 of the time interval in seconds. For example, an interval of 0.25s gives a value of -2, and an interval of 0.5s gives value of -1.

[Use Cases]

sonic(config)# interface ethernet 1
sonic(config-if-1)# ptp instance 127
sonic(config-if-ptp-127)# ptp pdelay-req-interval -3

[Command] ptp dscp value

[Purpose] Configure the dscp of ptp packet

[Parameter]

ParameterDescription
valueSet value range of 0-63

[View] PTP instance configuration view or Interface PTP configuration view

[Use Cases]

sonic(config)# interface ethernet 1
sonic(config-if-1)# ptp instance 127
sonic(config-if-ptp-127)# ptp dscp 10

ptp asymmetry-correction {positive|negative}

Section titled “ptp asymmetry-correction {positive|negative}”

[Command] ptp asymmetry-correction {positive|negative} time

[Purpose] Configure Asymmetric Delay Compensation for PTP on the Interface

[Parameter]

ParameterDescription
positiveNeed to Add Compensation Value
negativeCompensation Value Needs to Be Subtracted
timeCompensation Value (Unit: ns, Range: 0-1,000,000,000)

[View] Interface view

[Use Cases]

sonic(config)# interface ethernet 1
sonic(config-if-1)# ptp instance 127
sonic(config-if-ptp-127)# ptp asymmetry-correction positive 1000

ptp loglevel {error|warning|notice|info|debug}

Section titled “ptp loglevel {error|warning|notice|info|debug}”

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

[Purpose] Configure the ptp4l logging level in ptp.log

[Parameter]

ParameterDescription
errorConfigure loglevel to error
warningConfigure loglevel to warning
noticeConfigure loglevel to notice
infoConfigure loglevel to info, the default level is info
debugConfigure loglevel to debug

[View] System configuration view

[Use Cases]

sonic(config)# ptp loglevel debug

[Command] ptp reset

[Purpose] Clear all PTP configurations

[View] System configuration view

[Use Cases]

sonic(config)# ptp reset