NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ntp/ntpdate and NAT



On Tue, Jun 04, 2013 at 12:46:46PM -0400, Greg Troxel wrote:
> 
> Basically, NTP (ntpd and ntpdate) assume that the mean of the outgoing
> and incoming local timestamps (in the local machine's time) is the same
> time as the mean of the remote machines incoming and outgoing timestamps
> (in the remote machine's time).  Equating those leads to an estimated
> offset.

Thanks for the clarification.

> 
> Also, ntpdate sends several packets.  If the NAT is slow on outbound
> setup, then the subsequent packets should be faster. 

The problem is that the NAT is not regularily slow. We all know the
example of a clock that is always exactly one hour late: it is a
precise clock since the translation is known and constant. The node
doing the NAT is a "user" Windows workstation, and obviously (from
the speed of a remote connection when I'm connected to the server
via a custom vpn), depending on what the user or user software is
doing at the moment, this varies greatly (if a user is browsing
pages with flash and so on, it is faster to send IP packets via
surface mail...)

> 
> Try a cron job to run ntpdate without setting the clock, just logging,
> and do that every hour and see if you can see any patterns.
> 

I will perhaps do that just to have numbers.

> Why do you say ntpd is not an option because of intermittent
> connectivity?  Did you try it?

This was indirectly tried by a Iomega Storcenter (that is now replaced
by the KerGIS NetBSD that does fileserver too) which went crazy due to
(ab)use of chaotic adjtime (but it is a Debian inside and I wonder if it
doesn't use adjtime for everything, including date(1), since the value
is saved in /etc/adjtime).

I think I would not set ntp but only from time to time, perhaps, ntpdate
without adjtime just to have approximately the correct time (as long as
all the nodes on the LAN agree on the same date---for file timestamps---
it is not really important to be under gregorian or revolutionnary
calendar ;)
-- 
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                      http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C

Attachment: pgp4d4_y3XH3n.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index