[ntp:questions] Re: This is tougher than I thought?
maarten at kittensandcats.net
Tue Jan 24 16:07:04 UTC 2006
"Axonn" <axonnus at gmail.com> wrote in message
news:1138114236.831110.128690 at g49g2000cwa.googlegroups.com...
> 1. I know this is a stupid question probably, but I'm still gonna ask
> it: synchronizing via SNTP should discard network latencies right? ...
People will shortly fall over each other to impress upon you that
anything to do with SNTP can never "synchronise" any clock. They
reserve that term for what the full package does, based on its
communication with reference servers, and insist an SNTP client can
only _set_ the time, as often as you like.
The very word SNTP means you never look at more than one packet at a
time, more or less. Actually two - a request and a reply. That gives
you four timestamps, and a way to estimate the total link delay. No
way to estimate the two links delays separately, because you mustn't
assume the clock in the request tells the same time as the clock in
So SNP only gives you a means to peek at another machine's clock, at
an instant you can only guess, because you receive it one network
latency period later, and you don't know the exact latency. You only
know the sum of it and the latency in the opposite direction.
It's not unlike gazing at different stars through a telescope. The
distance to each star is different, and with that the time it takes
its light to reach you. If you're reading clocks on their surfaces
that _should_ all be running synchronously, of course you should
compensate for the observation delay or their combined times will
never make sense.
> 2. Why do some servers have "stratum" = 1 and other = 2?
Stratum goes from zero to sixteen. Reference clocks are stratum zero
by definition, and every synchronisation hop adds one. In practice,
few if any paths to a reference clock are longer than four or five
hops. That leaves room for tricks such as fudging reference clocks
that don't really know what time it is to stratum 8 or 10 (for
backup purposes), and interpreting 16 as infinity and unsynchronised.
So a stratum-1 server is synchronising its own clock to an attached
(hardware) reference clock, and a stratum-2 server is synchronising
its clock to a stratum-1 server. My Internet gateway is currently
stratum 3, synchronised to one of my ISP's stratum-2 servers, and the
machine I'm typing this on is synchronised to the gateway, making it
stratum 4. If the gateway loses its Internet connection, it will start
using its own internal clock at stratum 8 and become stratum 9 itself,
and all the other machines in my attic will drop to stratum 10.
More information about the questions