[ntp:questions] Re: This is tougher than I thought?

Danny Mayer mayer at ntp.isc.org
Wed Jan 25 19:02:14 UTC 2006


Axonn wrote:
> Thanks for answering, David, Danny, Maarten...
> 
> David: I think you just saved my life since that code is really
> helpful and is pretty much exactly what I need. I can port it to VC++
> or use it directly from VB. Thank you a lot!!!
> 
> Danny: wasn't thinking at re-inventing the wheel anyway. But I didn't
>  find any ready-to-use tools until David showed me that. I wouldn't
> have imagined NTP is such a big thing but I like it. I would study it
> more but I got a software to finish and priorities to set. I just
> wanted a piece of mind from you experts in this matters. And you
> really saved me of a lot of hours of dirt digging probably.
> 

Please understand that I'm not trying to discourage you in any way. This
is how one learns. Keep up the good work.

I'm only recommending you don't do this since it's a massive undertaking
 to do it right, requires lots of reading and understanding of the
protocols, issues, design which has been developed over 25 years or more.

> Some more questions: 1. I know this is a stupid question probably,
> but I'm still gonna ask it: synchronizing via SNTP should discard
> network latencies right? So if I got a lag of 5 seconds to a server,
> I should still get the time within a pretty accurate margin.

The first question you need to ask yourself is how do you know you have
a lag of 5 seconds? It happens to be one of the tougher questions to
answer. You can measure the round-trip time of a packet, but the best
you can do is to assume it took as long to go as it did to come back and
that's not necessarily true and probably is untrue.

> 
> 2. Why do some servers have "stratum" = 1 and other = 2?
> 
You should read up about this. A stratum 1 server gets its time from a
refclock directly attached to it. The refclock is defined as stratum 0.
A stratum 2 server gets its time from a stratum 1 server and so on. You
always add 1 to the stratum number of the server that you have preferred
based on the algorithms used to select a preference.

Danny



More information about the questions mailing list