# NTP Client Issues

## gozlan

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

----------

## dmpogo

 *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.
> ...

 

I don't think that order of lines  has much to do with priority of access.  Look at 'stratum' parameter

----------

## Thistled

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.

----------

## gozlan

 *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.
> ...

 

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.

----------

## doctork

 *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)
> ...

 

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

```
$ ntpq -cpee -cass
```

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

----------

## cwr

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

----------

## dmpogo

 *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)
> ...

 

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

----------

## doctork

 *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

----------

## dmpogo

 *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.
> ...

 

That's an experience !   I just remember that

```

.....

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 ...  :Smile: 

I guess the modern ntpd is tolerant to intermittent/non-existent  - still a situation on laptops ?

----------

