Five Minute Facts About Packet Timing
By Doug Arnold
As I promised earlier, I will be updating you on what’s in the 2019 edition of IEEE 1588. One of the treasures that you will find is the ability to build modular Transparent Clocks (aka, modular TCs). That is TCs which can be built by installing cards in a modular chassis, or by putting TC capable SFPs in an ordinary Ethernet switch. There are two challenges to implementing this concept. One is how do the modules communicate with each other, and the other is STEPNESS. The IEEE 1588 Working Group boldly asserted that the first problem was out of scope. However, we did take on stepness.
Stepness is the property of being a one-step or a two-step clock. If you recall a two-step master sends Sync and Follow_Up messages, and a one-step master sends just the Sync message. IEEE 1588-2008 TCs also have stepness. A one-step TC can update the correction field of an event message while it is timestamping it, as they say “on the fly.” A tw0-step clock must wait for a second message to update the correction field. Believe it or not you can put both one step and two step TCs in the same communication path and everything works, if all the implementations actually follow the rules required by IEEE 1588-2008. Here are the rules for Sync and Follow_Up:
- A one-step TC which receives a Sync message with the twoStepFlag set to TRUE, updates the Sync message correction field and passes the Follow_Up message through.
- A one-step TC which receives a Sync message with the twoStepFlag set to FALSE, updates the Sync message.
- A two-step TC which receives a Sync message with the twoStepFlag set to TRUE, updates the Follow_Up message.
- A two-step TC which receives a Sync message with the twoStepFlag set to FALSE, timestamps the Sync message, and constructs and sends a Follow_Up message.
- A slave which receives a Sync message with the twoStepFlag set to TRUE adds the correction fields from both the Sync and the Follow_Up message
- A slave which receives a Sync message with the twoStepFlag set to FALSE knows that there will be no Follow_Up message.
The behavior is similar for Delay-Request/Response messages or Peer delay messages. Note: there are no one-step or two-step slaves. Every PTP slave is required to handle either. Buyer beware, there are PTP devices out there which do not obey the rules and will work with only one stepness. Shame on the designers for not following the standard.
Now that you are up to date with stepness in IEEE 1588-2008, lets talk about the new edition and modular TCs. Now a modular TC could have multiple ports which are not all configured with the same stepness. Stepness is no longer a clock property, it is now a port property! Consider Figure 1, below:
So the Bottom line is that modular TC ports need to be able to do the same conversions as the TC clocks used to do. One exception is that now one-step ports are optionally allowed to wait for a Follow_Up message and create a new one-step Sync message from the existing Sync/Follow_up message pair. That means putting the more accurate timestamp from the Follow_Up message in the new Sync message and putting the sum of the two existing correction fields in the new correction field. A key obligation which each TC port must do is make sure that the twoStepFlag is set correctly in the messages it sends. The twoStepFlag set to TRUE means a Follow_Up message is coming, and a twoStepFlag set to FALSE means that no Follow_Up message is coming. It doesn’t matter what type of clocks or ports the messages have been through, the twoStepFlag only refers to message semantics.
Definitely a step in the right direction, don’t you think? I’ll come back later with another exciting new PTP feature preview.
Hector Reyes says
Hi Doug. Thanks for your tutoral on stepness and info on new IEEE 1588 features. I’m still a contractor at Qulsar and keep up with IEEE 1588-2008 topics.
Wish you a Joyous Holiday Season and a New Year filled with opportunities.