Re: [ntp:questions] simple nt.conf cases for ntp-client
On Fri, Jan 24, 2014 at 10:13:15PM +, William Unruh wrote: On 2014-01-24, David Woolley david@ex.djwhome.demon.invalid wrote: If there is a prefer peer and it survives, it uses that one, otherwise as per clock_combine in ntp_proto.c, i.e. weighted by synchronisation distance (which grows with time). The weighting may change between versions. This is 4.2.7p333. y = z = 0; for (i = 0; i npeers; i++) { x = 1. / peers[i].synch; y += x; z += x * peers[i].peer-offset; } sys_offset = z / y; So, if this is calculated immediately after a new selected-by-filter reading comes in, x is infinity and only the latest one is used. The synchronization distance includes also delay, dispersion and precision, so it should never be zero and x should be real. -- Miroslav Lichvar ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] simple nt.conf cases for ntp-client
Il 01/24/2014 12:09 AM, David Woolley ha scritto: 3) second filter: a new value for the error that fits the majority of these C references is calculated; the L references that don't fit in this error interval are called outlyers; the S=C-L references that remain are considered; Ones that don't fall within the the largest mutually consistent set of error bounds are called false tickers, not outlyers. Right, my fault. The outlyers are those N-C that remain from step 2). Apologies, and thanks for pointing it out. -- M ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] simple nt.conf cases for ntp-client
Il 01/23/2014 09:42 PM, Brian Inglis ha scritto: According to book Expert Network Time Protocol from PETER RYBACZYK: I don't have that book. I'd appreciate that anyone in this list that has reviewed the book can give their opinion about it. http://newsgroups.derkeiler.com/Archive/Comp/comp.protocols.time.ntp/2005-10/msg00021.html -- see DLM's recommendation? ;^ An authoritative endorsement, definitely :) Thanks! Ciao -- bronto ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] simple nt.conf cases for ntp-client
On 2014-01-23, David Woolley david@ex.djwhome.demon.invalid wrote: On 23/01/14 13:06, Marco Marongiu wrote: 3) second filter: a new value for the error that fits the majority of these C references is calculated; the L references that don't fit in this error interval are called outlyers; the S=C-L references that remain are considered; Ones that don't fall within the the largest mutually consistent set of error bounds are called false tickers, not outlyers. 4) peer selection: among the references in S, the one that has the smallest dispersion is selected, and ntpd will follow it until the next evaluation of the data collected from the sources. This is used for the figurehead peer that defines the stratum and error statistics. All the ones that are valid and not outlyers or false tickers will be tracked for time synchronisation purposes. (The is a hysteresis mechanism that means that the system peer will not change as often as the description implies.) Does it use the time from that one, or some sort of average? Since the queries of the different servers occur at different times (separated by about and hour, given the initial filter at poll 10) how does it take the averagei if it uses the average? ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] simple nt.conf cases for ntp-client
On 24/01/14 17:42, William Unruh wrote: Does it use the time from that one, or some sort of average? Since the queries of the different servers occur at different times (separated by about and hour, given the initial filter at poll 10) how does it take the averagei if it uses the average? If there is a prefer peer and it survives, it uses that one, otherwise as per clock_combine in ntp_proto.c, i.e. weighted by synchronisation distance (which grows with time). 8,000 seconds is more like two hours. If that poll interval is being used, it is assumed that time errors don't vary much over period several times that. The weighting may change between versions. This is 4.2.7p333. y = z = 0; for (i = 0; i npeers; i++) { x = 1. / peers[i].synch; y += x; z += x * peers[i].peer-offset; } sys_offset = z / y; Jitter code removed. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] simple nt.conf cases for ntp-client
On 2014-01-24 10:42, William Unruh wrote: On 2014-01-23, David Woolley david@ex.djwhome.demon.invalid wrote: On 23/01/14 13:06, Marco Marongiu wrote: 3) second filter: a new value for the error that fits the majority of these C references is calculated; the L references that don't fit in this error interval are called outlyers; the S=C-L references that remain are considered; Ones that don't fall within the the largest mutually consistent set of error bounds are called false tickers, not outlyers. 4) peer selection: among the references in S, the one that has the smallest dispersion is selected, and ntpd will follow it until the next evaluation of the data collected from the sources. This is used for the figurehead peer that defines the stratum and error statistics. All the ones that are valid and not outlyers or false tickers will be tracked for time synchronisation purposes. (The is a hysteresis mechanism that means that the system peer will not change as often as the description implies.) Does it use the time from that one, or some sort of average? Since the queries of the different servers occur at different times (separated by about and hour, given the initial filter at poll 10) how does it take the averagei if it uses the average? Every packet received goes thru the processes below and may update the system clock. [adapted from How NTP Works http://www.eecis.udel.edu/~mills/ntp/html/warp.html#arch] NTP Software Architecture Remote Peer/Poll System Clock Servers Processes Process Discipline Process ++. +---+. ++ . ||-| |. || . |Server 1| |Peer/Poll 1|-|| . ||-| |. || . ++. +---+. || . . ^ . || . . | . || . ++. +---+. || +---+. ||-| |. | Selection |-| |. +--+ |Server 2| |Peer/Poll 2|-|and | | Combine |-| Loop | ||-| |. | Cluster| | Algorithm |. |Filter| ++. +---+. | Algorithms |-| |. +--+ . ^ . || +---+.| . | . || .| ++. +---+. || .| ||-| |. || .| |Server 3| |Peer/Poll 3|-|| .| ||-| |. || .| ++. +---+. ++ .| ...^.|. |.V |. +-+ +--| VFO | +-+ Clock Adjust Process -- Take care. Thanks, Brian Inglis ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] simple nt.conf cases for ntp-client
On 2014-01-24, David Woolley david@ex.djwhome.demon.invalid wrote: On 24/01/14 17:42, William Unruh wrote: Does it use the time from that one, or some sort of average? Since the queries of the different servers occur at different times (separated by about and hour, given the initial filter at poll 10) how does it take the averagei if it uses the average? If there is a prefer peer and it survives, it uses that one, otherwise as per clock_combine in ntp_proto.c, i.e. weighted by synchronisation distance (which grows with time). 8,000 seconds is more like two hours. If that poll interval is being used, it is assumed that time errors don't vary much over period several times that. I took half of that as on average the that will be the delay. Since the time error can certainly vary over that time, especially if the clock drift is changing (temperature, etc) this helps make ntpd as slow as it is in response to changes. The weighting may change between versions. This is 4.2.7p333. y = z = 0; for (i = 0; i npeers; i++) { x = 1. / peers[i].synch; y += x; z += x * peers[i].peer-offset; } sys_offset = z / y; So, if this is calculated immediately after a new selected-by-filter reading comes in, x is infinity and only the latest one is used. Thanks. Jitter code removed. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] simple nt.conf cases for ntp-client
Hi Peter In your questions, you are showing configuration snippets as they were taken from some authoritative source. Would you mind sharing that source? As for me, I consider the following to be *the* authoritative sources for anything NTP: http://www.eecis.udel.edu/~mills/ntp/html/index.html http://doc.ntp.org/ http://support.ntp.org http://www.ntp.org/ntpfaq/NTP-a-faq.htm That said, let's see. On 01/23/2014 08:29 AM, ardi wrote: Below are described some basic cases for ntp.conf on ntp-client: a) In the simplest case of ntp-client the following ntp.conf is defined: restrict default noquery nomodify notrap restrict 127.0.0.1 driftfile /var/lib/ntp/ntp.drift server xx.xx.xx.xx minpoll 4 maxpoll 4 restrict xx.xx.xx.xx Why should i need the restrict line xx.xx.xx.xx? What does the first restrict line means? First things first: why minpoll and maxpoll? The defaults are generally OK -- I had to change that manually only in special cases, and I can count them on one hand. Regarding restrict, everything you need to know about noquery, nomodify, notrap is here, along with all the information about that directive: http://doc.ntp.org/4.2.6p5/accopt.html If you need some guidance to select the right restrictions that work for you, please see http://support.ntp.org/bin/view/Support/AccessRestrictions b1)In case using 2 ntp-servers from which my ntp-client can get time, is my ntp-client taking time from xx.xx.xx.xx and if this server is not reachable then from xx.xx.xx.yy? First: don't use two servers, it's the worst possible configuration. The server selection algorithm and why you should use four servers whenever possible is sketched here: http://www.ntp.org/ntpfaq/NTP-s-algo-real.htm#Q-NTP-ALGO What does prefer do in this case b2)? See this page, section The prefer Peer, after reading the reference above. In short: if the server marked with prefer is selected as a survivor, it will be preferred among all other survivors -- it will be used when the algorithm would otherwise have selected another server. http://doc.ntp.org/4.2.6p5/prefer.html Is there any difference between b1) and b2) case? This is left as an exercise to the reader :) b3) what about this case b3) below? Is time taken for the ntp-client according to order of lines - i mean the xx.xx.xx.xx is taken as time source? or the 2nd server xx.xx.xx.yy is preferred? This should be fairly clear now, if you took the time to check the references I've mentioned. I'd be really curious to check the source of your snippets. Is it a web page we can take a peep at? Ciao! -- bronto ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] simple nt.conf cases for ntp-client
On 23/01/14 07:29, ardi wrote: Why should i need the restrict line xx.xx.xx.xx? What does the first restrict line means? You don't. See the documentation. Sets a fairly safe environment in which you can be used as a server, but not much else, by the general public. b1)In case using 2 ntp-servers from which my ntp-client can get time, is my ntp-client taking time from xx.xx.xx.xx and if this server is not reachable then from xx.xx.xx.yy? No. It is using a weighted average of both. What happens if xx.xx.xx.xx comes up again? Does client take time again from the xx.xx.xx.xx? It starts using both again. b2) What does prefer do in this case b2)? Is there any difference between b1) and b2) case? Never investigated prefer in detail. b3) what about this case b3) below? Is time taken for the ntp-client according to order of lines - i mean the xx.xx.xx.xx is taken as time source? or the 2nd server xx.xx.xx.yy is preferred? See b1. The only time the order of servers may have an effect is if you exceed the maximum number, and I'm not sure of that case. Otherwise time quality metrics determine the weighting of the contribution of each server and which one is the figurehead system peer (there is also some hysteresis to avoid system peers changing too often). I am pretty sure that the effect of the order is not specified. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] simple nt.conf cases for ntp-client
On Thursday, January 23, 2014 9:25:16 AM UTC+1, David Woolley wrote: On 23/01/14 07:29, ardi wrote: Why should i need the restrict line xx.xx.xx.xx? What does the first restrict line means? You don't. See the documentation. Sets a fairly safe environment in which you can be used as a server, but not much else, by the general public. Then I am still lost to understand using the restrict ...:-( Will the following lines on client's ntp.conf be enough?: restrict default noquery nomodify notrap restrict 127.0.0.1 driftfile /var/lib/ntp/ntp.drift server xx.xx.xx.xx b1)In case using 2 ntp-servers from which my ntp-client can get time, is my ntp-client taking time from xx.xx.xx.xx and if this server is not reachable then from xx.xx.xx.yy? No. It is using a weighted average of both. What happens if xx.xx.xx.xx comes up again? Does client take time again from the xx.xx.xx.xx? It starts using both again. b2) What does prefer do in this case b2)? Is there any difference between b1) and b2) case? Never investigated prefer in detail. b3) what about this case b3) below? Is time taken for the ntp-client according to order of lines - i mean the xx.xx.xx.xx is taken as time source? or the 2nd server xx.xx.xx.yy is preferred? See b1. The only time the order of servers may have an effect is if you exceed the maximum number, and I'm not sure of that case. Otherwise time quality metrics determine the weighting of the contribution of each server and which one is the figurehead system peer (there is also some hysteresis to avoid system peers changing too often). I am pretty sure that the effect of the order is not specified. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] simple nt.conf cases for ntp-client
On Thursday, January 23, 2014 9:36:35 AM UTC+1, Marco Marongiu wrote: Hi Peter In your questions, you are showing configuration snippets as they were taken from some authoritative source. Would you mind sharing that source? Hello Marco, Well, I have come across almost all of the pages, you are mentioning below, but it seems, i have combined the info wrongly for my example...:-) As for me, I consider the following to be *the* authoritative sources for anything NTP: http://www.eecis.udel.edu/~mills/ntp/html/index.html http://doc.ntp.org/ http://support.ntp.org http://www.ntp.org/ntpfaq/NTP-a-faq.htm That said, let's see. On 01/23/2014 08:29 AM, ardi wrote: Below are described some basic cases for ntp.conf on ntp-client: a) In the simplest case of ntp-client the following ntp.conf is defined: restrict default noquery nomodify notrap restrict 127.0.0.1 driftfile /var/lib/ntp/ntp.drift server xx.xx.xx.xx minpoll 4 maxpoll 4 restrict xx.xx.xx.xx Why should i need the restrict line xx.xx.xx.xx? What does the first restrict line means? First things first: why minpoll and maxpoll? The defaults are generally OK -- I had to change that manually only in special cases, and I can count them on one hand. Does it mean these minpoll, maxpoll parameters are not needed in most of the cases? According to book Expert Network Time Protocol from PETER RYBACZYK: The minpoll and maxpoll parameters represent minimum and maximum polling intervals for reference clock messages in seconds to the power of 2. For example, if minpoll=3 and maxpoll=4, the minimum polling interval would be 8 seconds, and the maximum polling interval would be 16 seconds. What does minimum and maximum polling intervals for reference clock messages mean? polling = messaging with NTP servers to estimate the offset ??? Regarding restrict, everything you need to know about noquery, nomodify, notrap is here, along with all the information about that directive: http://doc.ntp.org/4.2.6p5/accopt.html If you need some guidance to select the right restrictions that work for you, please see http://support.ntp.org/bin/view/Support/AccessRestrictions b1)In case using 2 ntp-servers from which my ntp-client can get time, is my ntp-client taking time from xx.xx.xx.xx and if this server is not reachable then from xx.xx.xx.yy? First: don't use two servers, it's the worst possible configuration. Why not? what if one of the servers fail? then the client can get time from the other ntp-server. Doesn't the real setup consist of some stratum 1 time servers, then at least two stratum 2 ntp servers which are in peer with each other (and takin time form one or more stratum 1 time servers) and clients are taking time from these stratum 2 servers? see: http://www.ntp.org/ntpfaq/NTP-s-config-adv.htm 6.2.1.3, Figure 5. The server selection algorithm and why you should use four servers whenever possible is sketched here: http://www.ntp.org/ntpfaq/NTP-s-algo-real.htm#Q-NTP-ALGO What does prefer do in this case b2)? See this page, section The prefer Peer, after reading the reference above. In short: if the server marked with prefer is selected as a survivor, it will be preferred among all other survivors -- it will be used when the algorithm would otherwise have selected another server. http://doc.ntp.org/4.2.6p5/prefer.html Is there any difference between b1) and b2) case? This is left as an exercise to the reader :) According to http://doc.ntp.org/4.2.6p5/prefer.html section: The prefer Peer While the rules do not forbid it, it is usually not useful to designate more than one source as preferred; however, if more than one source is so designated, they are used in the order specified in the configuration file; that is, if the first one becomes unselectable, the second one is considered and so forth. i understand from this that only in case if more than one servers or peers have parameter prefer, then they are used in the order specified in the configuration file; that is, if the first one becomes unselectable, the second one is considered. Is that true? b3) what about this case b3) below? Is time taken for the ntp-client according to order of lines - i mean the xx.xx.xx.xx is taken as time source? or the 2nd server xx.xx.xx.yy is preferred? This should be fairly clear now, if you took the time to check the references I've mentioned. Hmm, server xx.xx.xx.yy minpoll 4 maxpoll 4 prefer will be selected? I'd be really curious to check the source of your snippets. Is it a web page we can take a peep at? Ciao! -- bronto ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] simple nt.conf cases for ntp-client
On 01/23/2014 11:00 AM, ardi wrote: On Thursday, January 23, 2014 9:36:35 AM UTC+1, Marco Marongiu wrote: Well, I have come across almost all of the pages, you are mentioning below, but it seems, i have combined the info wrongly for my example...:-) :-) Does it mean these minpoll, maxpoll parameters are not needed in most of the cases? Yes, that's what I mean. According to book Expert Network Time Protocol from PETER RYBACZYK: I don't have that book. I'd appreciate that anyone in this list that has reviewed the book can give their opinion about it. The minpoll and maxpoll parameters represent minimum and maximum polling intervals for reference clock messages in seconds to the power of 2. For example, if minpoll=3 and maxpoll=4, the minimum polling interval would be 8 seconds, and the maximum polling interval would be 16 seconds. What does minimum and maximum polling intervals for reference clock messages mean? polling = messaging with NTP servers to estimate the offset ??? Yes, but you don't need to query the servers every 16 seconds. Normally, once a peer is selected, ntpd gradually extends the polling interval from 64 to 128 seconds, to 256, 512, and finally 1024. Querying every 16 seconds is a bit obsessive and doesn't bring much more accuracy than the standard settings. Not to mention that your references may rate limit you, or refuse to talk to you altogether. First: don't use two servers, it's the worst possible configuration. Why not? what if one of the servers fail? then the client can get time from the other ntp-server. Please, read this section and my previous message carefully: http://www.ntp.org/ntpfaq/NTP-s-algo-real.htm#Q-NTP-ALGO I am not saying that you should use only one server: I am saying that using two is bad, and that you should use four. Ciao -- bronto ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] simple nt.conf cases for ntp-client
On Thursday, January 23, 2014 12:21:15 PM UTC+1, Marco Marongiu wrote: On 01/23/2014 11:00 AM, ardi wrote: On Thursday, January 23, 2014 9:36:35 AM UTC+1, Marco Marongiu wrote: Well, I have come across almost all of the pages, you are mentioning below, but it seems, i have combined the info wrongly for my example...:-) :-) Does it mean these minpoll, maxpoll parameters are not needed in most of the cases? Yes, that's what I mean. According to book Expert Network Time Protocol from PETER RYBACZYK: I don't have that book. I'd appreciate that anyone in this list that has reviewed the book can give their opinion about it. The minpoll and maxpoll parameters represent minimum and maximum polling intervals for reference clock messages in seconds to the power of 2. For example, if minpoll=3 and maxpoll=4, the minimum polling interval would be 8 seconds, and the maximum polling interval would be 16 seconds. What does minimum and maximum polling intervals for reference clock messages mean? polling = messaging with NTP servers to estimate the offset ??? Yes, but you don't need to query the servers every 16 seconds. Normally, once a peer is selected, ntpd gradually extends the polling interval from 64 to 128 seconds, to 256, 512, and finally 1024. Querying every 16 seconds is a bit obsessive and doesn't bring much more accuracy than the standard settings. Not to mention that your references may rate limit you, or refuse to talk to you altogether. First: don't use two servers, it's the worst possible configuration. Why not? what if one of the servers fail? then the client can get time from the other ntp-server. Please, read this section and my previous message carefully: http://www.ntp.org/ntpfaq/NTP-s-algo-real.htm#Q-NTP-ALGO I am not saying that you should use only one server: I am saying that using two is bad, and that you should use four. Ciao -- bronto Reading: http://www.ntp.org/ntpfaq/NTP-s-algo-real.htm#Q-NTP-ALGO Two time sources cannot be split into two parties where one has a majority. What does this majority means? Peter ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] simple nt.conf cases for ntp-client
On 01/23/2014 12:52 PM, ardi wrote: Reading: http://www.ntp.org/ntpfaq/NTP-s-algo-real.htm#Q-NTP-ALGO Two time sources cannot be split into two parties where one has a majority. What does this majority means? It's in the sentence: all values must lie within the error interval the majority of candidates defines I am about to have all the real NTP gurus in this list bash me hard for what I am about to write, but I am willing to help once more. Very informally, and with *no* rigour whatsoever, this is a sketch of what happens: 1) data collection: N references are queried, returning the time and an estimation of their error; 2) first filter: among those N, C references are selected that have a dispersion lower than a maximum (http://en.wikipedia.org/wiki/Statistical_dispersion); those are called candidates; 3) second filter: a new value for the error that fits the majority of these C references is calculated; the L references that don't fit in this error interval are called outlyers; the S=C-L references that remain are considered; 4) peer selection: among the references in S, the one that has the smallest dispersion is selected, and ntpd will follow it until the next evaluation of the data collected from the sources. If you have just two references, the step 2) doesn't bring you anywhere as it is impossible to reach a majority. It's like you're skipping step 2), and the results lose accuracy. If you have three references it's OK, but should one fail you fall back into the two-server case. To reliably survive to the failure of one source, you need to have 4 references. I hope it is clearer now, because if it's not, I can't help further :) Ciao -- bronto ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] simple nt.conf cases for ntp-client
On 2014-01-23, ardi peter.kne...@gmail.com wrote: On Thursday, January 23, 2014 12:21:15 PM UTC+1, Marco Marongiu wrote: [---=| Quote block shrinked by t-prot: 87 lines snipped |=---] Please quote just enough so that your reply makes sense in context. Unless you have a very good reason to quote more, a good guideline is that the amount of quoted matter should be less than the amount of new matter. If the previous author was long-winded and any direct quote is too long, write a one- or two-line summary in lieu of a quote. Play Nice on Usenet http://oakroadsystems.com/genl/unice.htm How do I quote correctly in Usenet? http://www.netmeister.org/news/learn2quote.html Quoting style in newsgroup postings http://www.anta.net/misc/nnq/nquote.shtml Bottom vs. top posting and quotation style on Usenet http://www.cs.tut.fi/~jkorpela/usenet/brox.html The advantages of Usenet's quoting conventions http://www.mccaughan.org.uk/g/remarks/uquote.html I am not saying that you should use only one server: I am saying that using two is bad, and that you should use four. [snip] Reading: http://www.ntp.org/ntpfaq/NTP-s-algo-real.htm#Q-NTP-ALGO Two time sources cannot be split into two parties where one has a majority. What does this majority means? A majority is a subset of a set consisting of more than half of the set's elements. In the case of a set consisting of two members each of the two possible subsets consists of one member; exactly half the set. Neither of these subsets are a majority. Majority subsets may be extracted from sets consisting of three, or more, members. The thread starting at http://lists.ntp.org/pipermail/questions/2011-January/028289.html contains some good discussion which may be pertinent to understanding how NTP finds this majority. -- Steve Kostecke koste...@ntp.org NTP Public Services Project - http://support.ntp.org/ ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] simple nt.conf cases for ntp-client
On 1/23/2014 8:06 AM, Marco Marongiu wrote: If you have just two references, the step 2) doesn't bring you anywhere as it is impossible to reach a majority. It's like you're skipping step 2), and the results lose accuracy. Not to put too fine a point on it, but if you have two servers and one of them has the correct time and one is way off, with only two servers the one that is far off is just as likely to be chosen as the correct one. Worse still is you are subject to clock hopping, where each of the two servers are chosen alternately. Most news versions of NTP have a certain amount of server stickiness built in to suppress clock hopping, but it can still occur, especially if your servers reboot frequently. Clock hopping can destabilize the frequency correction feedback loop which in turn can lead to increasingly large clock offsets. Not what you want. Brian Utterback ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] simple nt.conf cases for ntp-client
On 01/23/2014 04:16 PM, Brian Utterback wrote: On 1/23/2014 8:06 AM, Marco Marongiu wrote: If you have just two references, the step 2) doesn't bring you anywhere as it is impossible to reach a majority. It's like you're skipping step 2), and the results lose accuracy. Not to put too fine a point on it, but if you have two servers and one of them has the correct time and one is way off, with only two servers the one that is far off is just as likely to be chosen as the correct one. Worse still is you are subject to clock hopping, where each of the two servers are chosen alternately. Most news versions of NTP have a certain amount of server stickiness built in to suppress clock hopping, but it can still occur, especially if your servers reboot frequently. Clock hopping can destabilize the frequency correction feedback loop which in turn can lead to increasingly large clock offsets. Not what you want. Thanks for pointing out this Brian, it was not a detail. And it's often referred to with the sentence a man with two clocks never knows what the time is (or a similar sentence in correct English :) Ciao -- M ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] simple nt.conf cases for ntp-client
On 2014-01-23, ardi peter.kne...@gmail.com wrote: On Thursday, January 23, 2014 9:36:35 AM UTC+1, Marco Marongiu wrote: a) Please stop using Google for your mail server. They insert blank lines between every setnece you quote including blank lines which means they rapidly make your posts completely unreadable. b) Unless that server xx.xx.xx.xx is under your own personal control, using minpoll 4 maxpoll 4 is very rude, since it tends to overload someone else's computer. The default is minpoll 6 maxpoll 10 which are usually more than enough. Does it mean these minpoll, maxpoll parameters are not needed in most of the cases? Precisely. According to book Expert Network Time Protocol from PETER RYBACZYK: The minpoll and maxpoll parameters represent minimum and maximum polling intervals for reference clock messages in seconds to the power of 2. For example, if minpoll=3 and maxpoll=4, the minimum polling interval would be 8 seconds, and the maximum polling interval would be 16 seconds. What does minimum and maximum polling intervals for reference clock messages mean? polling = messaging with NTP servers to estimate the offset ??? If the source is a refclock, and minpoll 4 maxpoll 4 make sense. It is also under your own personal control ( connected directly to your computer). That would mean that it got the time from the refclock every 16 seconds. First: don't use two servers, it's the worst possible configuration. Why not? what if one of the servers fail? then the client can get time from the other ntp-server. And how does it know that one of the servers has failed. And which one it is that has failed? Failure usually does not mean tht the server delivers no time at all, it just delivers the wrong time. Doesn't the real setup consist of some stratum 1 time servers, then at least two stratum 2 ntp servers which are in peer with each other (and takin time form one or more stratum 1 time servers) and clients are taking time from these stratum 2 servers? No. that is not the real setup. It is a possible one amongst an infinitude of other possibilities. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] simple nt.conf cases for ntp-client
On 2014-01-23 04:21, Marco Marongiu wrote: On 01/23/2014 11:00 AM, ardi wrote: On Thursday, January 23, 2014 9:36:35 AM UTC+1, Marco Marongiu wrote: Well, I have come across almost all of the pages, you are mentioning below, but it seems, i have combined the info wrongly for my example...:-) :-) According to book Expert Network Time Protocol from PETER RYBACZYK: I don't have that book. I'd appreciate that anyone in this list that has reviewed the book can give their opinion about it. http://newsgroups.derkeiler.com/Archive/Comp/comp.protocols.time.ntp/2005-10/msg00021.html -- see DLM's recommendation? ;^ -- Take care. Thanks, Brian Inglis ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] simple nt.conf cases for ntp-client
On 23/01/14 13:06, Marco Marongiu wrote: 3) second filter: a new value for the error that fits the majority of these C references is calculated; the L references that don't fit in this error interval are called outlyers; the S=C-L references that remain are considered; Ones that don't fall within the the largest mutually consistent set of error bounds are called false tickers, not outlyers. 4) peer selection: among the references in S, the one that has the smallest dispersion is selected, and ntpd will follow it until the next evaluation of the data collected from the sources. This is used for the figurehead peer that defines the stratum and error statistics. All the ones that are valid and not outlyers or false tickers will be tracked for time synchronisation purposes. (The is a hysteresis mechanism that means that the system peer will not change as often as the description implies.) ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] simple nt.conf cases for ntp-client
On 23/01/14 09:18, ardi wrote: Then I am still lost to understand using the restrict ...:-( Will the following lines on client's ntp.conf be enough?: restrict default noquery nomodify notrap restrict 127.0.0.1 driftfile /var/lib/ntp/ntp.drift server xx.xx.xx.xx I am fairly sure that just server xx.xx.xx.xx will be enough to synchronize the time. There are security, management, and reboot recovery times, respectively, in the remaining lines. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
[ntp:questions] simple nt.conf cases for ntp-client
Below are described some basic cases for ntp.conf on ntp-client: a) In the simplest case of ntp-client the following ntp.conf is defined: restrict default noquery nomodify notrap restrict 127.0.0.1 driftfile /var/lib/ntp/ntp.drift server xx.xx.xx.xx minpoll 4 maxpoll 4 restrict xx.xx.xx.xx Why should i need the restrict line xx.xx.xx.xx? What does the first restrict line means? b1)In case using 2 ntp-servers from which my ntp-client can get time, is my ntp-client taking time from xx.xx.xx.xx and if this server is not reachable then from xx.xx.xx.yy? restrict default noquery nomodify notrap restrict 127.0.0.1 driftfile /var/lib/ntp/ntp.drift server xx.xx.xx.xx minpoll 4 maxpoll 4 server xx.xx.xx.yy minpoll 4 maxpoll 4 restrict xx.xx.xx.xx restrict xx.xx.xx.yy What happens if xx.xx.xx.xx comes up again? Does client take time again from the xx.xx.xx.xx? b2) What does prefer do in this case b2)? Is there any difference between b1) and b2) case? restrict default noquery nomodify notrap restrict 127.0.0.1 driftfile /var/lib/ntp/ntp.drift server xx.xx.xx.xx minpoll 4 maxpoll 4 prefer server xx.xx.xx.yy minpoll 4 maxpoll 4 restrict xx.xx.xx.xx restrict xx.xx.xx.yy b3) what about this case b3) below? Is time taken for the ntp-client according to order of lines - i mean the xx.xx.xx.xx is taken as time source? or the 2nd server xx.xx.xx.yy is preferred? restrict default noquery nomodify notrap restrict 127.0.0.1 driftfile /var/lib/ntp/ntp.drift server xx.xx.xx.xx minpoll 4 maxpoll 4 server xx.xx.xx.yy minpoll 4 maxpoll 4 prefer restrict xx.xx.xx.xx restrict xx.xx.xx.yy Thanks for the explanation. Peter ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions