What increments stratum in NTP?

Sorry, it's just not that clear to me from the man pages, Wikipedia, etc.

I understand the concept of stratum 0 as an authoritative time source and stratum 1 as the connected server. However, I am not sure what to consider for a larger network that may have additional hops between the stratum 1 time server and ultimately the desktop. Do you consider stratum incremented with each hop as you would see in traceroute... or would these hosts be stratum 2 regardless of network "distance."


Solution 1:

The "official" NTP client software simply increments stratum by one for each connected server. That is all servers connected to a Stratum 0 server are Stratum 1, all servers connected to them are Stratum 2, and so on.

In general this is sensible. You most certainly do not want to increase your stratum by 1 per network hop, as this is:

  1. unreliable, since not all hops will show up in traceroute anyway, and
  2. would result in crazy stratum numbers, it is not uncommon to be 10 or more traceroute hops away from your NTP provider.

In general the NTP protocol is designed to be resilient to "network distance", that is RTT are not terribly relevant. What is much more relevant is the consistency of those RTTs.

Edit: To address one of the comments, the normal "remote" configuration has the local clock as being stratum 12. In general, if a server is being synced up against a stratum 0/1/2 server then it should be considered more reliable than the clock on the computer's motherboard. This means that it should have a stratum less than 12, otherwise "normally configured" clients will believe that they are more reliable.

Solution 2:

We run 2 servers syncing with external stratum-1-sources like ptbtime1.ptb.de, ptbtime2.ptb.de, ntps1-0.cs.tu-berlin.de. Since ptb.de is driven by atomic clocks and ntps1-0.cs.tu-berlin.de uses GPS (atomic clock driven as well), those are stratum-1 and our 2 servers are stratum-2. All the other servers inside our network refer to those 2, so, all the others are stratum-3.