1-Step vs 2-Step PTP LAN Implementation

1-Step vs 2-Step PTP LAN Implementation

Posted on 08/04/2019

What's the difference between 1-Step and 2-Step PTP, and how should you decide?

 

 3Dpeer2peer2

 

 

Let's start with a quick overview of PTP. PTP (Precision Time Protocol) comes from the IEEE 1588v2 standard. It works by sending a repeating time sync message from a master clock through the network to all the slave clocks or IEDs (see image above). Each slave device also sends a Delay Request and receives a response from the devices directly connected to itself, so it knows the delays from these including its own internal processing time and network latency. It then takes any incoming PTP sync message, adjusts it to compensate for this known delay, and forwards it to the next devices in the chain who then repeat the process with the next devices. This means that no matter how many devices are on the network or how they’re connected, it’s possible for each device to have accurate time. The master clock doesn’t need to know the delay to every device on the network as each device only needs to know its own delay.

 

PTP 1-step is when the time stamp from the master clock is included in the first sync message.

 

This means that fewer PTP messages are sent, but it also means that the master clock must modify the timestamp in the sync message on the fly.  This requires that the timestamp be available when the sync message is being encoded and can delay the message as it takes a small amount of time to process. It also limits Ethernet connections to less than 10 Gigabit due to this delay.

 

1 Step3d 

1-Step PTP

 

PTP 2-step, however, sends the time stamp in a separate message after the sync message has been sent.

 

2 Step3d

2-Step PTP

 

Advantages of 1-Step:

 

1-Step is simpler at the slave end as it must only receive one message, whereas with two-step the slave clock must receive two messages before it can set its own time.

The main advantage of this is that it guarantees that each sync message is correctly linked up with its timestamp, especially when there may be multiple possible network routes.

2-step on the other hand theoretically risks timing packets getting mixed up, which rules it out of end-to-end PTP networks. This is especially true on networks with redundancy protocols such as PRP and HSR in which there’s more than one way a packet can travel to its destination and therefore more than one length of time it could take to get there, meaning the order of receipt could be wrong. This can be alleviated by using packet sequence numbers to match things up correctly at the slave end, however this adds complexity.

 

Advantages of 2-Step:

 

At the sending or Master end it’s easier to go with 2-step due to the processing work involved in appending the required info to a 1-step sync message. 2-step doesn’t need to write timestamps to messages as they leave, which can make 2-step master clocks cheaper up front in terms of hardware. This also increases flexibility – changes can be made to the way packets are coded without changing hardware.

It’s even better when it comes to future proofing. The more relaxed hardware needs mean that in future there’s less chance of needing new hardware to handle updated standards or protocols. This is related to how it’s easier to modify the formatting of packets.

2-Step is also the only option if using a 10 Gigabit or higher Ethernet link, due to the limited time to encode messages at higher bitrates. The simplicity of 2-Step makes this a non-issue. Again – this helps future proof.

 

Why does Tekron use 1-Step?

 

Our clocks support both 1 and 2-Step. This can be chosen in the configuration tool, however they default to a 1-Step sync. Given that Ethernet speeds at or above 1 Gigabit are still rare in typical installations and redundancy is considered important, we’ve chosen this default to comply with the needs of most customers. This works with all C37.238 compliant IEDs. Customers still have the option to choose 2-Step as C37.238 requires that all master clock devices support both one and 2-step. Slave devices may not always support both, so keep this in mind.

 

Which to choose?

 

If you’re on a 10 Gigabit or above network or are not using HSR or PRP redundancy, 2-Step may be a good choice. Care will need to be taken with network topology in these scenarios.

Such setups are still rare, so you might be wondering how this is relevant to the design of your network. The simple answer is it’s unlikely to matter outside of fringe cases. The nature of the standard is such that compliant devices will work with many possible customizations of PTP.

 

 

Please contact us to find out more

You can find out more about PTP here

You can find out more about PRP redundancy here

You can view our IEEE 1588 compliant products here

1-Step vs 2-Step PTP LAN Implementation