View previous topic :: View next topic |
Author |
Message |
gozlan n00b
Joined: 15 May 2011 Posts: 2
|
Posted: Sun May 15, 2011 1:13 pm Post subject: NTP Client Issues |
|
|
Hi ...
Using a NTP daemon program - Ver. 4.2.4p7, and a same version for server.
I have 1 server which is syncing with ext NTP servers in order to provide my local pc time services.
In the pc configuration - I have my server in the 1st line while i have other servers (default from the installation) just after this entry.
The problem that I see is that in some cases, the pc is not trying to sync with my server but trying to fetch the time from the 2nd, 3rd, etc entries.
Does any one know why? is there a bug or is it feature?
Thnx,
Oren _________________ Gozlan |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3468 Location: Canada
|
Posted: Sun May 15, 2011 1:22 pm Post subject: Re: NTP Client Issues |
|
|
gozlan wrote: | Hi ...
Using a NTP daemon program - Ver. 4.2.4p7, and a same version for server.
I have 1 server which is syncing with ext NTP servers in order to provide my local pc time services.
In the pc configuration - I have my server in the 1st line while i have other servers (default from the installation) just after this entry.
The problem that I see is that in some cases, the pc is not trying to sync with my server but trying to fetch the time from the 2nd, 3rd, etc entries.
Does any one know why? is there a bug or is it feature?
Thnx,
Oren |
I don't think that order of lines has much to do with priority of access. Look at 'stratum' parameter |
|
Back to top |
|
|
Thistled Guru
Joined: 06 Jan 2011 Posts: 572 Location: Scotland
|
Posted: Sun May 15, 2011 5:37 pm Post subject: |
|
|
I have had the same problem since ntp was updated to 4.2.6_p3 on the 6th May.
I am currently 10 seconds out, and it won't sync. The local time server is however accurate, so I am flummoxed.
It is worthwhile making a backup of /etc/ntp.conf before you update ntp, as the update will overwrite this file and leave it blank.
I am still scratching my head on this, and I hate having an out of sync client on the network. _________________ Whatever you do, do it properly! |
|
Back to top |
|
|
gozlan n00b
Joined: 15 May 2011 Posts: 2
|
Posted: Mon May 16, 2011 6:13 am Post subject: Re: NTP Client Issues |
|
|
dmpogo wrote: | gozlan wrote: | Hi ...
Using a NTP daemon program - Ver. 4.2.4p7, and a same version for server.
I have 1 server which is syncing with ext NTP servers in order to provide my local pc time services.
In the pc configuration - I have my server in the 1st line while i have other servers (default from the installation) just after this entry.
The problem that I see is that in some cases, the pc is not trying to sync with my server but trying to fetch the time from the 2nd, 3rd, etc entries.
Does any one know why? is there a bug or is it feature?
Thnx,
Oren |
I don't think that order of lines has much to do with priority of access. Look at 'stratum' parameter |
So if i get it right ... it should be like:
My local server should be stratum-2 (as it is fetch time over the www)
My local pc should be configured as stratum-3 or lower
is it right?
10x. _________________ Gozlan |
|
Back to top |
|
|
doctork Guru
Joined: 25 Apr 2004 Posts: 370 Location: Cleveland, OH
|
Posted: Mon May 16, 2011 7:20 am Post subject: Re: NTP Client Issues |
|
|
gozlan wrote: |
So if i get it right ... it should be like:
My local server should be stratum-2 (as it is fetch time over the www)
My local pc should be configured as stratum-3 or lower
is it right?
10x. |
Not really right. The NTP daemon will periodically poll each server listed in /etc/ntp.conf. When it decides that it has found the best server, it will synchronize the system's clock with that server. It will then become a stratum N+1 server where N is the stratum of the server to which it is synchronized. So, you don't configure the stratum of the server directly, ntpd sets it when it syncs with another server. You can check the current synchronization status by executing
Note that ntpd will continue to poll all of the servers listed in /etc/ntp.conf and my decide to switch synchronization to a different server if it thinks it is "better."
--
doc |
|
Back to top |
|
|
cwr Veteran
Joined: 17 Dec 2005 Posts: 1969
|
Posted: Mon May 16, 2011 8:46 am Post subject: |
|
|
You might want to check the use of the "restrict" keyword in your /etc/ntp.conf
file; it controls access to your NTP server.
(I use restrict xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx.xxx nomodify nopeer notrap
and restrict 127.0.0.1 on my local ntp server.)
Will |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3468 Location: Canada
|
Posted: Tue May 17, 2011 3:04 am Post subject: Re: NTP Client Issues |
|
|
doctork wrote: | gozlan wrote: |
So if i get it right ... it should be like:
My local server should be stratum-2 (as it is fetch time over the www)
My local pc should be configured as stratum-3 or lower
is it right?
10x. |
Not really right. The NTP daemon will periodically poll each server listed in /etc/ntp.conf. When it decides that it has found the best server, it will synchronize the system's clock with that server. It will then become a stratum N+1 server where N is the stratum of the server to which it is synchronized. So, you don't configure the stratum of the server directly, ntpd sets it when it syncs with another server. You can check the current synchronization status by executing
Note that ntpd will continue to poll all of the servers listed in /etc/ntp.conf and my decide to switch synchronization to a different server if it thinks it is "better."
--
doc |
You can overwrite the default stratum for the server using 'fudge' command with stratum option. It was used extensively in the dialup times to set a localhost as a time server to fall back when there is no external connection, and use stratum to downweight it relatively to real servers when connection is present. Don't know how robustly it works though with modern ntpd |
|
Back to top |
|
|
doctork Guru
Joined: 25 Apr 2004 Posts: 370 Location: Cleveland, OH
|
Posted: Tue May 17, 2011 5:54 am Post subject: Re: NTP Client Issues |
|
|
dmpogo wrote: |
You can overwrite the default stratum for the server using 'fudge' command with stratum option. It was used extensively in the dialup times to set a localhost as a time server to fall back when there is no external connection, and use stratum to downweight it relatively to real servers when connection is present. Don't know how robustly it works though with modern ntpd |
The fudge command is still documented in the ntp.conf man page, but I'd maintain that the usual ntp client would simply be confused by it. I've been using ntp for 20+ years, and I've never found the need for it. I guess that's because when I used dialup I only had a single system connected to the internet. I have, however, configured networks of serveral hundred ntp clients sync'd with a set of ntp servers in turn sync'd with servers on the internet.
--
doc |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3468 Location: Canada
|
Posted: Tue May 17, 2011 2:03 pm Post subject: Re: NTP Client Issues |
|
|
doctork wrote: | dmpogo wrote: |
You can overwrite the default stratum for the server using 'fudge' command with stratum option. It was used extensively in the dialup times to set a localhost as a time server to fall back when there is no external connection, and use stratum to downweight it relatively to real servers when connection is present. Don't know how robustly it works though with modern ntpd |
The fudge command is still documented in the ntp.conf man page, but I'd maintain that the usual ntp client would simply be confused by it. I've been using ntp for 20+ years, and I've never found the need for it. I guess that's because when I used dialup I only had a single system connected to the internet. I have, however, configured networks of serveral hundred ntp clients sync'd with a set of ntp servers in turn sync'd with servers on the internet.
--
doc |
That's an experience ! I just remember that
Code: |
.....
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
.....
|
was a default suggestion in RedHat / early Fedora times. Remember from the fact of still having it in my /etc/ntp.conf ...
I guess the modern ntpd is tolerant to intermittent/non-existent - still a situation on laptops ? |
|
Back to top |
|
|
|