The PicOS  supports PTP function since 2.9.2.

Introduction to PTP

On a modern communication network, most telecommunications services require that the frequency offset or time difference between devices is within an acceptable range. To meet this requirement, network clock synchronization must be implemented.

Network clock synchronization includes phase synchronization and frequency synchronization.

Phase synchronization

Phase synchronization, also called time synchronization, refers to the consistency of both frequencies and phases between signals. That is to say, the phase difference between signals is always 0.

Frequency synchronization

Frequency synchronization refers to constant phase difference between signals. It ensures that signals are sent or received at the same rate at a moment so that all devices on the communication network operate at the same rate.

Figure 1 Difference between phase synchronization and frequency synchronization

PTP (Precision Time Protocol) is a time synchronization protocol, which is not only used for high-precision time synchronization between devices, but can also be used to synchronize the frequency between devices. Compared to the existing time synchronization mechanism, PTP has the following advantages:

Basic Concepts

PTP domain

A PTP domain is a logical grouping of clocks that synchronize to each other using the protocol IEEE 1588v2, but that are not necessarily synchronized to clocks in another domain. Each PTP domain is an independent PTP clock synchronization system and has only one clock source.

Clock node

Clock nodes are nodes in a PTP domain. PTP defines the following types of clock nodes:

     E2ETC calculate the residence time of the device, which is the time it takes the event message from ingress port to egress port, then add the calculated residence time to the correctionfield of the event message.

PTP port

A PTP port is a port running PTP. PTP ports are classified into the following types based on roles:

Master-slave hierarchy

Nodes in a PTP domain establish the master-slave hierarchy for clock synchronization. Master nodes send synchronization clock signals, while slave nodes receive synchronization clock signals. A device may receive synchronization clock signals from an upstream node and then send the synchronization clock signals to a downstream device.
If two clock nodes synchronize time with each other:

Grandmaster clock

All clock nodes in a PTP domain are organized into the master-slave hierarchy. The grandmaster clock (GMC) is at the top of the hierarchy and is the reference clock in the PTP domain. Clock nodes exchange PTP messages to synchronize the time of the GMC to the entire PTP domain. Therefore, the GMC is also called the clock source. The GMC can be statically configured or dynamically elected through the best master clock (BMC) algorithm.

PTP message

Nodes exchange PTP messages to establish the master-slave hierarchy and implement time and frequency synchronization. PTP messages are classified into event messages and general messages depending on timestamps:

Currently, devices support only E2ETC function, and uses Sync, Delay_Req and Delay_Resp PTP messages.

Delay Request-Response Mechanism

Figure 2 shows the process of calculating the average link delay and time offset between the master and slave devices using the E2E mechanism.

Figure 2 Delay request-response mechanism

  1. The master sends a Sync message to the slave and notes the time t1 at which it was sent.
  2. The slave receives the Sync message and notes the time of reception t2.
  3. The master conveys to the slave the timestamp t1 by:
    a) Embedding the timestamp t1 in the Sync message. This requires some sort of hardware
    processing for highest accuracy and precision.
    b) Embedding the timestamp t1 in a Follow_Up message.
  4. The slave sends a Delay_Req message to the master and notes the time t3 at which it was sent.
  5. The master receives the Delay_Req message and notes the time of reception t4.

The master conveys to the slave the timestamp t4 by embedding it in a Delay_Resp message.
By exchanging messages with the master device, the slave device obtains t1, t2, t3, and t4, and calculates the average link delay and time offset between the master and slave devices. Then the slave device can adjust the local time according to the calculated time offset to synchronize with the master device. The formulas for calculating the link delay and time offset are as follows:

Average link delay = [(t4- t1) - (t3- t2)]/2
Offset = [(t2- t1) + (t3- t4)]/2

Product Support

The table below shows the model and the corresponding switch ASIC that support the PTP function, others do not support.

Switch ASIC 

























PTP Configuration

Configure the device interface as the E2ETC node type, enable the PTP function on the interface, and implement the device to forward the PTP packets directly.


Step 1.   Configure the device interface as the E2ETC node type, enable the PTP function on the interface.

set interface gigabit-ethernet <port> ptp mode {e2etransparent | none}

By default, PTP is disabled on an interface.


  • The PTP function can only be configured on the physical interface.
  • On the TC device, PTP must be enabled on all the interfaces that receive and send PTP messages. Otherwise, the PTP function will work inproperly.

Configuration Example


Step 1.   Configure the port te-1/1/25 that receiving PTP messages and the port te-1/1/26 that sends PTP packets as E2ETC node.

       admin@Xorplus#set interface gigabit-ethernet te-1/1/25 ptp mode e2etransparent

       admin@Xorplus#set interface gigabit-ethernet te-1/1/26 ptp mode e2etransparent

Step 2.   Verify the configuration.

       After the configuration is complete, run the run show interface detail command to view the configuration of PTP.

     admin@Xorplus# run show interface gigabit-ethernet te-1/1/25 detail
     Physical interface: te-1/1/25, Enabled, error-discard False, Physical link is Down 
     Interface index: 25, Mac Learning Enabled 
     Link-level type: Ethernet, MTU: 1514, Speed: Auto, Duplex: Full 
     Source filtering: Disabled, Flow control: Disabled, Auto-negotiation: Enabled 
     Interface flags: Hardware-Down SNMP-Traps Internal: 0x0 
     Interface rate limit ingress:0, egress:0 
     Precision Time Protocol mode:e2etransparent 
     Current address: 48:6e:73:01:00:61, Hardware address: 48:6e:73:01:00:61 
     Traffic statistics: 
     5 sec input rate 0 bits/sec, 0 packets/sec 
     5 sec output rate 0 bits/sec, 0 packets/sec