PTP Configuration
show ptp clock
Section titled “show ptp clock”[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 clockDomain: 25Profile: g8275.1PTP Version: 2.1Clock Type: T-TSCClock Step: one_stepDelay Mode: E2ETransport Mode: ethernetClock Source: localClock Identity: 60eb5a.fffe.01774aClock Accuracy: 0xfeClock Class: 140Clock OffsetScaledLogVariance: 0x4e5dClock Priority1: 128Clock Priority2: 128ports: Ethernet13Grandmaster Clock Identity: 60eb5a.fffe.017a1cGrandmaster Clock Accuracy: 0xfeGrandmaster Clock Class: 7Grandmaster OffsetScaledLogVariance: 0x4e5dGrandmaster Clock Priority1: 128Grandmaster Clock Priority2: 128Parent Port Identity: 1Servo State: lockedOffset To Master: -3Path Delay: 2327Max Steps Removed: 255Steps Removed: 1Local Time: 1773748219740685989UTC Time: 2026-03-17 11:50:19.740685989show ptp clock sm-tlv
Section titled “show ptp clock sm-tlv”[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-tlvDefault Frame Rate: 0/0GM Lock Status: 0Time Address Flags: 3Current Local Offset: 0Jump Seconds: 0Time Of Next Jump: 0Time Of Next Jam: 0Time Of Previous Jam: 0Previous Jam Local Offset: 0Daylight Saving: 0Leap Second Jump: 0show ptp counter [interface] [instance]
Section titled “show ptp counter [interface] [instance]”[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 countersInterface: 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 0show ptp interface
Section titled “show ptp interface”[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 1Ethernet: Ethernet1Enable: trueDomain: 1Index: 2Dscp: 56Source IP Address: 10.1.10.2Announce Interval: 1Announce Receipt Timeout: 3Delay Req Interval: 0Pdelay Req Interval: 0Sync Interval: 0Mode: slaveDelay Mode: E2EUnicat Master Address: ['10.1.10.1']show gnss info
Section titled “show gnss info”[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]
sonic# show gnss infoGNSS Enable: trueValid: trueLock Status: LOCKEDFix Type: 2DSatellites Used: 9Satellites Tracked: 18HDOP: 1.00Antenna Status: ValidTiming Accuracy: 6.0 nsPosition: 34.248139,109.016493Altitude: 437.0 mPPS Locked: trueThis command display description table
| Fields | Desctiption |
|---|---|
| GNSS Enable | Whether the device uses gnss as the clock source |
| Valid | The status of Receiver hardware and firmware self-test |
| Lock Status | Current GNSS status of the device |
| Fix Type | Positioning dimension information |
| Satellites Used | Number of satellites actually used to calculate position and time |
| Satellites Tracked | Total number of satellites being tracked by the device |
| HDOP | Horizontal precision factor, reflecting the quality of satellite geometric distribution |
| Antenna Status | Antenna connection status |
| Timing Accuracy | The most important time accuracy indicator, the estimation error of the current time evaluated by the receiver relative to UTC |
| Position | Current longitude and latitude coordinates |
| Altitude | Altitude |
| PPS Locked | 1 PPS signal locked |
ptp source ip
Section titled “ptp source ip”[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.1ptp enable
Section titled “ptp enable”[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 1sonic(config-if-1)# ptp instance 0sonic(config-if-ptp-0)# ptp enableptp clock-id
Section titled “ptp clock-id”[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.000001ptp clock-source local
Section titled “ptp clock-source local”[Command] ptp clock-source local {accuracy|class|priority1|priority2|priority|gnss}
[Purpose] Configure relevant parameters of the clock source
[Parameter]
| Parameter | Description |
|---|---|
| accuracy | Value range: 0 to 255, default value: 254 |
| class | Value range: 0 to 255, default value: 248 |
| priority1 | Value range: 0 to 255, default value: 128, it’s only supported when profile is smpte-2059-2, 1588v2 or aes67 |
| priority2 | Value range: 0 to 255, default value: 128 |
| gnss | Designate 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 64ptp clock-step {one_step|two_step}
Section titled “ptp clock-step {one_step|two_step}”[Command] ptp clock-step {one_step|two_step}
[Purpose] Configure the mode for carrying timestamps
[Parameter]
| Parameter | Description |
|---|---|
| one_step | Specifies to one-step mode |
| two_step | Specifies 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_stepptp 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]
| Parameter | Description |
|---|---|
| bc | Boundary clock |
| oc | Ordinary clock |
| tc | Transparent Clock |
| t-gm | Telecom Grandmaster |
| t-bc | Telecom Boundary Clock |
| t-tc | Telecom Transparent Clock |
| t-tsc | Telecom Time Slave Clock |
| t-bc-p | Partial-Support Telecom Boundary Clock |
| t-tsc-p | Partial-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 ocptp instance
Section titled “ptp instance”[Command] ptp instance domain_id
[Purpose] Create a PTP domain or interface to join a PTP domain
[Parameter]
| Parameter | Description |
|---|---|
| domain_id | PTP 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 64sonic(config)# interface ethernet 1sonic(config-if-1)ptp instance 64ptp 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]
| Parameter | Description |
|---|---|
| smpte-2059-2 | Standard protocol for clock synchronization SMPTE ST-2059-2 |
| 1588v2 | Standard protocol for clock synchronization 1588V2 |
| g8275.1 | Standard protocol for clock synchronization ITU_T G8275.1 |
| g8275.2 | Standard protocol for clock synchronization ITU_T G8275.2 |
| aes67 | Standard 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-2Deleted all ptp configurationsptp 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]
| Parameter | Description |
|---|---|
| udpv4 | IPv4+UDP encapsulation |
| udpv6 | IPv6+UDP encapsulation |
| ethernet | MAC encapsulation |
| unicast | Communicate with unicast address |
| multicast | Communicate with multicast address |
| mixed | Communicate 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 udpv4ptp delay-mode {E2E|P2P}
Section titled “ptp delay-mode {E2E|P2P}”[Command] ptp delay-mode {E2E|P2P}
[Purpose] Configure delay measurement mechanism
[Parameter]
| Parameter | Description |
|---|---|
| E2E | End-to-End delay mechanism |
| P2P | Peer-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 E2Eptp sm-tlv enable
Section titled “ptp sm-tlv enable”[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 enableptp sm-tlv default-frame-rates
Section titled “ptp sm-tlv default-frame-rates”[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]
| Parameter | Description |
|---|---|
| numerator | Configure the sm-tlv default system frame rate |
| denominator | Configure 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 1001ptp sm-tlv time-address-flags drop-frame
Section titled “ptp sm-tlv time-address-flags drop-frame”[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-frameptp sm-tlv time-address-flags color-frame
Section titled “ptp sm-tlv time-address-flags color-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-frameptp mode {master|slave}
Section titled “ptp mode {master|slave}”[Command] ptp mode {master|slave}
[Purpose] Configure PTP Interface Role
[Parameter]
| Parameter | Description |
|---|---|
| master | Primary Interface, Broadcasting Time Information to Other Devices |
| slave | Secondary 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 1sonic(config-if-1)# ptp instance 127sonic(config-if-ptp-127)# ptp mode masterptp unicast master address
Section titled “ptp unicast master address”[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]
| Parameter | Description |
|---|---|
| A.B.C.D | IPv4 address |
| A::B | IPv6 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 1sonic(config-if-1)# ptp instance 127sonic(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]
| Parameter | Description |
|---|---|
| Interval | The 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 1sonic(config-if-1)# ptp instance 127sonic(config-if-ptp-127)# ptp announce-interval 1ptp announce-receipt-timeout
Section titled “ptp announce-receipt-timeout”[Command] ptp announce-receipt-timeout time
[Purpose] Configure the receive timeout multiplier for announce messages
[Parameter]
| Parameter | Description |
|---|---|
| time | Value 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 1sonic(config-if-1)# ptp instance 127sonic(config-if-ptp-127)# ptp announce-receipt-timeout 2ptp sync-interval
Section titled “ptp sync-interval”[Command] ptp sync-interval interval
[Purpose] Configure the transmission period of Sync messages
[Parameter]
| Parameter | Description |
|---|---|
| interval | The 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 1sonic(config-if-1)# ptp instance 127sonic(config-if-ptp-127)# ptp sync-interval -2ptp delay-req-interval
Section titled “ptp delay-req-interval”[Command] ptp delay-req-interval interval
[Purpose] Configure the transmission period of Delay-req messages
[Parameter]
| Parameter | Description |
|---|---|
| interval | The 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 1sonic(config-if-1)# ptp instance 127sonic(config-if-ptp-127)# ptp delay-req-interval -3ptp pdelay-req-interval
Section titled “ptp pdelay-req-interval”[Command] ptp pdelay-req-interval interval
[Purpose] Configure the transmission period of Pdelay-req messages
[Parameter]
| Parameter | Description |
|---|---|
| interval | The 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 1sonic(config-if-1)# ptp instance 127sonic(config-if-ptp-127)# ptp pdelay-req-interval -3ptp dscp
Section titled “ptp dscp”[Command] ptp dscp value
[Purpose] Configure the dscp of ptp packet
[Parameter]
| Parameter | Description |
|---|---|
| value | Set value range of 0-63 |
[View] PTP instance configuration view or Interface PTP configuration view
[Use Cases]
sonic(config)# interface ethernet 1sonic(config-if-1)# ptp instance 127sonic(config-if-ptp-127)# ptp dscp 10ptp 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]
| Parameter | Description |
|---|---|
| positive | Need to Add Compensation Value |
| negative | Compensation Value Needs to Be Subtracted |
| time | Compensation Value (Unit: ns, Range: 0-1,000,000,000) |
[View] Interface view
[Use Cases]
sonic(config)# interface ethernet 1sonic(config-if-1)# ptp instance 127sonic(config-if-ptp-127)# ptp asymmetry-correction positive 1000ptp 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]
| Parameter | Description |
|---|---|
| error | Configure loglevel to error |
| warning | Configure loglevel to warning |
| notice | Configure loglevel to notice |
| info | Configure loglevel to info, the default level is info |
| debug | Configure loglevel to debug |
[View] System configuration view
[Use Cases]
sonic(config)# ptp loglevel debugptp reset
Section titled “ptp reset”[Command] ptp reset
[Purpose] Clear all PTP configurations
[View] System configuration view
[Use Cases]
sonic(config)# ptp reset