Networking Forums

Networking Forums > Computer Networking > Linux Networking > Time Syncronisation

Reply
Thread Tools Display Modes

Time Syncronisation

 
 
Dan
Guest
Posts: n/a

 
      04-29-2004, 04:17 AM

I'm setting up a Debian Sarge box as a mail server. What's the best
way to keep the time syncronised? Should I run ntpdate as a cron
task?

Dan
 
Reply With Quote
 
 
 
 
Andrey Asadchev
Guest
Posts: n/a

 
      04-29-2004, 05:17 AM
Dan wrote:
> I'm setting up a Debian Sarge box as a mail server. What's the best
> way to keep the time syncronised? Should I run ntpdate as a cron
> task?
>
> Dan



Best thing is to run ntp sever imho. Debian comes with two flavors

ntp-refclock - Network Time Protocol: daemon for reference clocks
ntp-simple - Network Time Protocol: daemon for simple systems

if you just want to syncronize one machine, either one of them is ok.
ntp has benefit of constantly syncronizing your time and avoiding large
differences in time you would have with ntpdate updates. That and and
couple more things.

I use ntp-refclock. This way other machines on lan can syncronize to a
local ntp server, which in turn syncronizes with more precise machines.
In case of a network down when more precise machines are not reachable,
ntp-refclock can use local clock to provide ntp service to local
machines. This way you still have syncronized time on local lan.
 
Reply With Quote
 
Frank Elsner
Guest
Posts: n/a

 
      04-29-2004, 08:42 AM
Dan wrote:
>
> I'm setting up a Debian Sarge box as a mail server. What's the best
> way to keep the time syncronised? Should I run ntpdate as a cron
> task?


Do NOT use ntpdate,
use chrony instead, see http://chrony.sunsite.dk/

--Frank Elsner
 
Reply With Quote
 
Christopher Browne
Guest
Posts: n/a

 
      04-29-2004, 12:52 PM
After a long battle with technology, Dan <(E-Mail Removed)>, an earthling, wrote:
> I'm setting up a Debian Sarge box as a mail server. What's the best
> way to keep the time syncronised? Should I run ntpdate as a cron
> task?


No. ntpdate is a utility that is in the process of becoming
deprecated.

Run full-blown NTP.

That involves installing the package "ntp."
--
(reverse (concatenate 'string "moc.enworbbc" "@" "enworbbc"))
http://www.ntlug.org/~cbbrowne/ntp.html
"...Yet terrible as Unix addiction is, there are worse fates. If Unix
is the heroin of operating systems, then VMS is barbiturate addiction,
the Mac is MDMA, and MS-DOS is sniffing glue. (Windows is filling your
sinuses with lucite and letting it set.) You owe the Oracle a
twelve-step program." --The Usenet Oracle
 
Reply With Quote
 
/dev/rob0
Guest
Posts: n/a

 
      04-29-2004, 02:59 PM
On Thu, 29 Apr 2004 01:17:02 -0400, Andrey Asadchev wrote:
> Best thing is to run ntp sever imho. Debian comes with two flavors


I agree. ntpd gives you much more, at the cost of about 2MB RAM. Set it
up once and (unless your selected servers all go out of business)
forget it. Run /usr/sbin/ntptrace occasionally to see that it works.

> ntp-refclock - Network Time Protocol: daemon for reference clocks
> ntp-simple - Network Time Protocol: daemon for simple systems
>
> if you just want to syncronize one machine, either one of them is ok.


This is probably true, if /etc/ntp.conf is properly configured.

> I use ntp-refclock. This way other machines on lan can syncronize to a
> local ntp server, which in turn syncronizes with more precise machines.
> In case of a network down when more precise machines are not reachable,
> ntp-refclock can use local clock to provide ntp service to local
> machines. This way you still have syncronized time on local lan.


I think you've misunderstood what a "reference clock" is. It's an
atomic clock such as is maintained at Stratum 1 sites. If you don't
have one of those (*obviously* you don't) I think you chose the wrong
one.

I don't use Debian and don't know about the packaging, but my guess is
that the -refclock package simply comes preconfigured to use a local
reference clock, whereas the -simple one uses network Stratum 2
servers.

You can use remote servers and still provide synchronisation services
to local machines a la ntpdate (ntpd -q timeserver). They'll still set
their clocks according to the timeserver, even when said timeserver is
unable to ntptrace to a real reference clock.

IAC you should browse the list of public NTP servers and select a set
which is best-suited for your location. Sometimes this means sending
email to notify the maintainer of that server.
--
/dev/rob0 - preferred_email=i$((28*28+28))@softhome.net
or put "not-spam" or "/dev/rob0" in Subject header to reply

 
Reply With Quote
 
Bill Unruh
Guest
Posts: n/a

 
      04-29-2004, 04:18 PM
Dan <(E-Mail Removed)> writes:


]I'm setting up a Debian Sarge box as a mail server. What's the best
]way to keep the time syncronised? Should I run ntpdate as a cron
]task?

No You should run ntp or chrony (which can also keep track of your rtc
performance so on reboots the time is correct)
iThey continually keep the clock updated, going to the web for more info
depending on the reliability of your system clock, and advancing or
retarding the time to compensate for problems. Note that ntpdate will
advance or retard the clock in jumps, which can cause problems
especially on a server where file times change a lot. A jump back can
screw up file operations apparently due to the use of time info for
determining if files are newer or older.
 
Reply With Quote
 
Christopher Browne
Guest
Posts: n/a

 
      04-29-2004, 05:52 PM
A long time ago, in a galaxy far, far away, "/dev/rob0" <(E-Mail Removed)> wrote:
> I don't use Debian and don't know about the packaging, but my guess is
> that the -refclock package simply comes preconfigured to use a local
> reference clock, whereas the -simple one uses network Stratum 2
> servers.


The "refclock" one is specifically for connecting to radio clocks.

> You can use remote servers and still provide synchronisation services
> to local machines a la ntpdate (ntpd -q timeserver). They'll still set
> their clocks according to the timeserver, even when said timeserver is
> unable to ntptrace to a real reference clock.
>
> IAC you should browse the list of public NTP servers and select a set
> which is best-suited for your location. Sometimes this means sending
> email to notify the maintainer of that server.


Alternatively, do a "traceroute" towards the outside, and try the
first couple of hosts that you hit as candidates. They're probably at
your ISP, and you're obviously permitted to use them, as that's how
you're accessing the rest of the Internet. And they are doubtless
geographically nearby.

You might also try "pool.ntp.org," which implements a round-robin
scheme based on DNS to do some load balancing across a fairly large
set of public NTP servers.
--
let name="cbbrowne" and tld="cbbrowne.com" in name ^ "@" ^ tld;;
http://www3.sympatico.ca/cbbrowne/spiritual.html
"I take it all back. Microsoft Exchange is RFC compliant.
RFC 1925, point three." -- Author unknown
 
Reply With Quote
 
/dev/rob0
Guest
Posts: n/a

 
      04-29-2004, 08:04 PM
On Thu, 29 Apr 2004 17:52:41 +0000, Christopher Browne wrote:
> You might also try "pool.ntp.org," which implements a round-robin
> scheme based on DNS to do some load balancing across a fairly large
> set of public NTP servers.


Oooh! This is a very nice tip. Thank you!

I tried it ("host -a pool.ntp.org.") from home and from work (about
1K kilometres away) and I see different results. 15 A records from one,
8 from the other, and only one overlapping in the bunch.
--
/dev/rob0 - preferred_email=i$((28*28+28))@softhome.net
or put "not-spam" or "/dev/rob0" in Subject header to reply

 
Reply With Quote
 
Andrey Asadchev
Guest
Posts: n/a

 
      04-30-2004, 01:44 AM

>>I use ntp-refclock. This way other machines on lan can syncronize to a
>>local ntp server, which in turn syncronizes with more precise machines.
>>In case of a network down when more precise machines are not reachable,
>>ntp-refclock can use local clock to provide ntp service to local
>>machines. This way you still have syncronized time on local lan.

>
>
> I think you've misunderstood what a "reference clock" is. It's an
> atomic clock such as is maintained at Stratum 1 sites. If you don't
> have one of those (*obviously* you don't) I think you chose the wrong
> one.
>
> I don't use Debian and don't know about the packaging, but my guess is
> that the -refclock package simply comes preconfigured to use a local
> reference clock, whereas the -simple one uses network Stratum 2
> servers.


English is not my first language so I may have not made myself clear
This is a snippet of my ntp.conf

server 127.127.1.0
fudge 127.127.1.0 stratum 5

Local server is set to a higher stratum, so if lower stratum servers are
available, local clock will never be used.

If for some reason lower stratum ntp server become unavaiable and local
clock synchronization is not set, local machines will not be able to
synchronize to local server and will start drifting apart.

When you do have local clock configured, local server will still provide
synchronization to local clients since it can reference local clock.
Therefore machines will not drift apart.

Also over the time, ntp server will figure out the drift of your clock
and even when lower stratum servers are not available, it will be able
to keep pretty precise time using this value. Atomic clocks is not the
only way to use refclock.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use 2 minutes time, earn USD5000 monthly!You of part-time dream! veryannie@gmail.com Broadband 1 07-01-2007 07:01 AM
home based online part time full time jobs sachin Home Networking 0 11-22-2006 03:23 AM
Windows Time Service: Is there any free time server available on the internet? Maxwell2006 Windows Networking 2 10-23-2006 06:41 PM
Strange problem missing default gateway from time to time windows Anthony Windows Networking 2 09-28-2005 06:06 PM
[UK-Bug] .. ISP Usenet syncronisation. Andy Jenkins Broadband 0 10-26-2003 06:37 PM



1 2 3 4 5 6 7 8 9 10 11