about Network Time Protocol

about Network Time Protocol

Post by Raymon » Thu, 06 Jan 2000 04:00:00



FreeBSD 2.2.8

Got some questions about xntpd.

Questions 1
When reading the man page about xntpd, it mentions about /etc/ntp.conf.
However, I can't find this conf file.  Am I suppose to create this file
manually?

Question 2
I am just trying to setup my server as a ntp client.  I am thinking that
the only statment I need to put in conf file is...
        server a.a.a.a
Am I correct?  Any suggestions about public NTP server I could use in
North California?

Question 3
Also, would xntpd daemon by default would send log messages to
/var/log/messages?  I want to view the log messages to ensure it is
working correctly.  Do I need to specify any option or parameters to
enable this logging function?  Is "/var/log/messages" the default log
file xntpd would use?

Question 4
If I want xntpd running automatically, what shall I do?

Thanks for your help.

-raymond

 
 
 

about Network Time Protocol

Post by Patrick TJ McPh » Fri, 07 Jan 2000 04:00:00


% Questions 1
% When reading the man page about xntpd, it mentions about /etc/ntp.conf.
% However, I can't find this conf file.  Am I suppose to create this file
% manually?

Yes. Go to http://www.ntp.org for information on time servers &c.
If you look through the distribution notes, there's something on setting
up a config file.

% Question 4
% If I want xntpd running automatically, what shall I do?

Add this line to /etc/rc.conf.local
 xntp_enable="YES"

--

Patrick TJ McPhee
East York  Canada


 
 
 

about Network Time Protocol

Post by Dan O'Conno » Sat, 08 Jan 2000 04:00:00


Quote:>Questions 1
>When reading the man page about xntpd, it mentions about /etc/ntp.conf.
>However, I can't find this conf file.  Am I suppose to create this file
>manually?

Yes.

Quote:>Question 2
>I am just trying to setup my server as a ntp client.  I am thinking that
>the only statment I need to put in conf file is...
> server a.a.a.a
>Am I correct?  Any suggestions about public NTP server I could use in
>North California?

Correct again. If you have a dial-up connection to the Internet, you might
want to also include the 'fudge' command so xntpd doesn't complain when your
Internet connection isn't up.

As far as a good public NTP server, I've had good luck with time.nist.gov
from here in Reno.

Here's what my ntp.conf looks like:

server time.nist.gov prefer
server tick.usno.navy.mil
server tock.usno.navy.mil
server 127.127.1.0
fudge 127.127.1.0 stratum 10
driftfile /etc/ntp.drift

Quote:>Question 3
>Also, would xntpd daemon by default would send log messages to
>/var/log/messages?  I want to view the log messages to ensure it is
>working correctly.  Do I need to specify any option or parameters to
>enable this logging function?  Is "/var/log/messages" the default log
>file xntpd would use?

Wow, you're 3 for 3! Yup, messages go to /var/log/messages, and look like
this:

Jan  3 07:23:00 renata xntpd[127]: xntpd version=3.4e (beta multicast); Mon
Dec 27 17:20:04 PST 1999 (1)
Jan  3 07:23:00 renata xntpd[127]: tickadj = 5, tick = 10000, tvu_maxslew =
495
Jan  3 07:23:00 renata xntpd[127]: using xntpd phase-lock loop
Jan  3 07:43:15 renata xntpd[127]: time reset (step) -0.261166 s
Jan  3 08:41:20 renata xntpd[127]: time reset (step) 0.185935 s

Quote:>Question 4
>If I want xntpd running automatically, what shall I do?

Add these lines to your /etc/rc.conf file:

### Network Time Services options: ###
xntpd_enable="YES"      # Run the Network Time Protocol daemon
xntpd_program="xntpd"   # path to xntpd, if you want a different one.
xntpd_flags="-p /var/run/xntpd.pid"     # Flags to xntpd (if enabled).

There are some caveats to xntpd:

First, it doesn't handle big time differences too well. If it complains and
tells you to set the time manually, use ntpdate to set your clock, then
start xntpd manually.

Second, if you have dialup Internet access, and you're not online a lot,
xntpd will give up. That's where the 'fudge' command comes in: xntpd will
use your system's clock and will thus be happy.

If you use User-PPP to connect to the net, use the following filters in
/etc/ppp/ppp.conf to prevent xntpd from dialling out or keeping the
connection alive:

# Prevent NTP (123) from keeping the connection alive:
 set filter alive 0 deny udp src eq 123
 set filter alive 1 deny udp dst eq 123
 set filter alive 2 permit 0 0

# Prevent NTP (123) from causing a dialup:
 set filter dial 0 deny udp src eq 123
 set filter dial 1 deny udp dst eq 123
 set filter dial 2 permit 0 0

Lastly, if you have a dial-up Internet connection, and really don't care
about making your computer a time server for other computer (over your LAN),
you may find it easier to use ntpdate to set your clock. If you use User-PPP
to connect, you can put your ntpdate command into your ppp.linkup file and
update your clock every time you log on to the Internet.

Have fun,

--
--Dan O'Connor

 
 
 

about Network Time Protocol

Post by Raymon » Tue, 18 Jan 2000 04:00:00


Quote:> Here's what my ntp.conf looks like:

> server time.nist.gov prefer
> server tick.usno.navy.mil
> server tock.usno.navy.mil
> server 127.127.1.0
> fudge 127.127.1.0 stratum 10
> driftfile /etc/ntp.drift

Still have several questions.  First, there are more than one "server"
statements.  The first one has "prefer" as parameter, which I would
assume that xntpd will always try to talk to the preferred server
first.  How about those without "prefer"?  Let say if xntpd can't talk
to time.nist.gov, which one would xntpd try next?  Is it based on the
list order?  

Another question is if xntpd would just try talk to one of the time
servers listed for time sync?  Or, it would talk to all of them and
average the result?

The last question is about "stratum 10".  What is that?  And how does
this affect the local system clock (127.127.1.0)?

Thank you.

-raymond

 
 
 

about Network Time Protocol

Post by Raymon » Tue, 18 Jan 2000 04:00:00


Quote:> Here's what my ntp.conf looks like:

> server time.nist.gov prefer
> server tick.usno.navy.mil
> server tock.usno.navy.mil
> server 127.127.1.0
> fudge 127.127.1.0 stratum 10
> driftfile /etc/ntp.drift

Still have several questions.  First, there are more than one "server"
statements.  The first one has "prefer" as parameter, which I would
assume that xntpd will always try to talk to the preferred server
first.  How about those without "prefer"?  Let say if xntpd can't talk
to time.nist.gov, which one would xntpd try next?  Is it based on the
list order?  

Another question is if xntpd would just try talk to one of the time
servers listed for time sync?  Or, it would talk to all of them and
average the result?

The last question is about "stratum 10".  What is that?  And how does
this affect the local system clock (127.127.1.0)?

Thank you.


 
 
 

about Network Time Protocol

Post by Gregory Bon » Wed, 19 Jan 2000 04:00:00



> Still have several questions.  First, there are more than one "server"
> statements.  The first one has "prefer" as parameter, which I would
> assume that xntpd will always try to talk to the preferred server
> first.  How about those without "prefer"?  Let say if xntpd can't talk
> to time.nist.gov, which one would xntpd try next?  Is it based on the
> list order?  

No, the ntp client will always contact all listed servers.  The
"prefer" keyword just says that, if all other things are equal, use
this instead of the other two. If the "preferred" server is returning
worse time (due to congestion in that part of the network etc), then
another server may be chosen.

Quote:> Another question is if xntpd would just try talk to one of the time
> servers listed for time sync?  Or, it would talk to all of them and
> average the result?

Talks to all and picks (by using a very sophisticated analysis), the
one that is closest to "real" time, then syncs with that one.  The
idea is to find the correct time by picking the best source, rather
than averaging several possibly poor sources. It also attempts to
measure the drift in the localclock, and adjust for that as well.  It
is very sophisticated - read the RFC.

Quote:> The last question is about "stratum 10".  What is that?  And how does
> this affect the local system clock (127.127.1.0)?

This makes the local clock a possible time server, but at stratum 10
it is considered much worse than any of the other servers (which start
at stratum 1 and go up as they get more & more hops from a reliable
timse source such as an atomic clock or GPS receiver).

This is usually done on a firewall so that if the link to the Internet
goes down and the other servers are not available, then the firewall
will become a (poor-quality) server and internal machines will at
least all sync to the same poor time source (and hence have the same
time), rather than all the internal machines free-running and getting
different times.

 
 
 

1. How does "Time Synch Protocol" relate to "Network Time Protocol"?

I am administering a SCO ODT system running
Unix System V release 3.2v4.2 on our local
network, and I am looking for some additional
information about the "Time Synchronization Protocol"
as mentioned in the SCO ODT Administrator's Guide.

I am also looking for information on the "Time Synchronization
Protocol" as well - which explains the cross-posting. I
apologize in advance if necessary.

From the manual:

   "...The time daemons communicate with each other
    using the Time Synchronization Protocol (TSP),
    which is built on the DARPA UDP protocol..."

Questions:

   1) Is the TSP proprietary to SCO?
   2) What is the difference (if any) between
       TSP and the "Network Time Protocol"?
   3) Has anyone out there successfully
        time-synched a SCO box with non-SCO
        boxes as either a master or a slave?
   4) If you are running a SCO box as a
       master or a slave, what types of machines
       and operating systems are in your network?
   5) Someone told me that NTP may actually
       be public-domain. If so, does anyone
       know where I might find a copy?
   6) If TSP *is* different than NTP, then
       does anyone know where I may find
       a list of machines that NTP will run on?

I am under the gun on this one, so I'd appreciate
any help you could provide.  "Time pressure, don'cha know"

Thanks

Angelo A. Keene
Lead Engineer Software
Harris Information Systems Division

--- flames cheerfully and promptly ignored ---

2. I/O Magic Video Card

3. network time protocol

4. AMD586 problems

5. Network Time Protocol???

6. ACE Multiport Serial Card

7. Network Time Protocol

8. Linux emu: "Elf binary type not known" (StarOffice, FreeBSD 2.2.2)

9. Network Time Protocol (xntp) help needed

10. network time protocol

11. Network Time Protocol

12. NTP (Network Time Protocol) Questions