3 Questions about setting up NTP
Folks;
I'm setting up a new NTP server to sync time for our network. I have one Linux server that needs to point to that NTP server
My 3 questions are:
1. I added the IP address for the NTP server to the "/etc/hosts" file on the Linux server. Is that all i need to do to make the Linux server point to the NTP server?
2. After pointing the Linux server to the NTP server, do i need to reboot the Linux server or restart any daemon on the Linux server? in other words, what do i need to do to make sure the changes i made in the "/etc/hosts" took affect?
3. Is there a way to test the NTP server to make sure it interact with the Linux server & will work fine if i have a timing issue on the Linux server? I want to test it so if something happens for real i don't look like a dummy
Thanks Folks in advance
Thanks;
Moe
Re: 3 Questions about setting up NTP
unix2266 wrote:[color=blue]
> Folks;
> I'm setting up a new NTP server to sync time for our network. I have one
> Linux server that needs to point to that NTP server My 3 questions are:
>
> 1. I added the IP address for the NTP server to the "/etc/hosts" file on
> the Linux server. Is that all i need to do to make the Linux server point
> to the NTP server?[/color]
The /etc/hosts file is used to convert host names into IP addresses, e.g. in
cases if a DNS server is not available.
To specify a NTP server you have to add the host name or IP address of that
server to the /etc/ntp.conf file.
Then you have to start the NTP daemon. In most cases your Linux version
comes with a startup script, e.g.:
/etc/init.d/ntp start
or similar.
[color=blue]
> 2. After pointing the Linux server to the NTP server, do i need to reboot
> the Linux server or restart any daemon on the Linux server? in other
> words, what do i need to do to make sure the changes i made in the
> "/etc/hosts" took affect?
>
> 3. Is there a way to test the NTP server to make sure it interact with
> the Linux server & will work fine if i have a timing issue on the Linux
> server? I want to test it so if something happens for real i don't look
> like a dummy[/color]
As a primer you may want to have a look at our NTP info page:
[url]http://www.meinberg.de/english/info/ntp.htm[/url]
More detailed information can be found on the NTP support pages:
[url]http://support.ntp.org/bin/view/Support/WebHome[/url]
[url]http://support.ntp.org[/url]
Martin
--
Martin Burnicki
Meinberg Funkuhren
Bad Pyrmont
Germany
Re: 3 Questions about setting up NTP
On Apr 7, 10:15*pm, unix2...@charter.net (unix2266) wrote:
[color=blue]
> 1. I added the IP address for the NTP server to the "/etc/hosts" file on
> the Linux server. Is that all i need to do to make the Linux server point to the NTP server?[/color]
You don't need to mess with /etc/nosts unless you don't have access to
a properly functioning DNS server, or there is no DNS entry for the
NTP server. Can you do an "nslookup <NTPservername>" command? If that
works, you don't need anythingin /etc/hosts.
[color=blue]
> 2. After pointing the Linux server to the NTP server, do i need to reboot the
> Linux server or restart any daemon on the Linux server? in other words, what
> do i need to do to make sure the changes i made in the "/etc/hosts" took affect?[/color]
You need to add a "server <NTPservername>" line to your ntpd.conf file
(without the brackets). Where that ntpd.conf file sits depends upon
your Linux distribution. Most recent Linux distributions already have
a default server line there for you that typically points to the
pool.ntp.org set of NTP servers on the internet.
After reconfiguring the ntpd.conf file, you need to restart NTPd. If
you don't know how to do that, restart the whole system.
[color=blue]
> *3. Is there a way to test the NTP server to make sure it interact with the
> Linux server & will work fine if i have a timing issue on the Linux server?
> I want to test it so if something happens for real i don't look like a dummy[/color]
You can use the ntpq tool to monitor ntpd. Or you can use the ntpdate
command with the -D debug switch to just check to see if you can get
the time from the NTP server without actually setting the time on the
local system.
Re: 3 Questions about setting up NTP
"unix2266" <unix2266@charter.net> wrote in message
news:657024.47666.qm@web55706.mail.re3.yahoo.com...
[color=blue]
> I'm setting up a new NTP server to sync time for our network.
> I have one Linux server that needs to point to that NTP server
> My 3 questions are:
>
> 1. I added the IP address for the NTP server to the "/etc/hosts"
> file on the Linux server. Is that all i need to do to make the Linux
> server point to the NTP server?[/color]
No. /etc/hosts maps hostnames to IP addresses. It has nothing to do
with NTP per se. Add either the hostname or the IP address to the
configuration file for NTP, usually /etc/ntp.conf (but check).
[color=blue]
> 2. After pointing the Linux server to the NTP server, do i need
> to reboot the Linux server or restart any daemon on the Linux server?
> in other words, what do i need to do to make sure the changes i made
> in the "/etc/hosts" took affect?[/color]
No need to reboot. Just start or restart the NTP daemon/service.
How to do that varies.
[color=blue]
> 3. Is there a way to test the NTP server to make sure it interact
> with the Linux server & will work fine if i have a timing issue on
> the Linux server? I want to test it so if something happens for real
> i don't look like a dummy[/color]
Run 'ntpq -p' against it. Specify the hostname of the NTP server as an
additional parameter after the '-p'.
An NTP server should really respond to ntpq. If it doesn't, it _may_ be
working fine but you have no easy way to check. If it does, there will
be lines listing its references; if one has an asterisk in front of it,
it's generally fine.
Assuming, that is, that the reference so marked is itself fine. You
haven't told us where your new NTP server is getting its time from.
Groetjes,
Maarten Wiltink
Re: 3 Questions about setting up NTP
On 2008-04-08, unix2266 <unix2266@charter.net> wrote:
[color=blue]
>I'm setting up a new NTP server to sync time for our network. I have
>one Linux server that needs to point to that NTP server[/color]
The Official NTP Quick Start Page is at
[url]http://www.eecis.udel.edu/~mills/ntp/html/quick.html[/url]
The Community Supported NTP Quick Start Page is at
[url]http://support.ntp.org/bin/view/Support/GettingStarted[/url]
The NTP FAQ addresses configuration at
[url]http://www.ntp.org/ntpfaq/NTP-s-config.htm[/url]
--
Steve Kostecke <kostecke@ntp.org>
NTP Public Services Project - [url]http://support.ntp.org/[/url]
Re: 3 Questions about setting up NTP
[email]unix2266@charter.net[/email] (unix2266) writes:
[color=blue]
>Folks;
> I'm setting up a new NTP server to sync time for our network. I have one Linux server that needs to point to that NTP server
> My 3 questions are:
>
> 1. I added the IP address for the NTP server to the "/etc/hosts" file on the Linux server. Is that all i need to do to make the Linux server point to the NTP server?[/color]
Yup. If your ntp server was in some dns server, you did not even have to do
that.
[color=blue]
>
> 2. After pointing the Linux server to the NTP server, do i need to reboot the Linux server or restart any daemon on the Linux server? in other words, what do i need to do to make sure the changes i made in the "/etc/hosts" took affect?
>[/color]
Nope. YOu do not need to do anything. the hosts file is reread every time
the system needs to do an address lookup.
[color=blue]
> 3. Is there a way to test the NTP server to make sure it interact with the Linux server & will work fine if i have a timing issue on the Linux server? I want to test it so if something happens for real i don't look like a dummy
>[/color]
ntpq -p
will show if your ntp is getting to the server.
[color=blue]
> Thanks Folks in advance[/color]
[color=blue]
>Thanks;
>Moe[/color]
Re: 3 Questions about setting up NTP
Unruh wrote:[color=blue]
> [email]unix2266@charter.net[/email] (unix2266) writes:
>[color=green]
>> Folks;
>> I'm setting up a new NTP server to sync time for our network. I
>> have one Linux server that needs to point to that NTP server
>> My 3 questions are:
>>
>> 1. I added the IP address for the NTP server to the "/etc/hosts"
>> file on the Linux server. Is that all i need to do to make the Linux server
>> point to the NTP server?[/color]
>
> Yup. If your ntp server was in some dns server, you did not even have to do
> that.[/color]
You should not be touching etc/hosts for this purpose. If you want to
use a specific IP address for a server you can do that in the ntp.conf
file. If you have a DNS server you can put it in there and specify the
FQDN on the server line but you shouldn't be messing with /etc/hosts.
That's a long obsolete file and it really should be empty under normal
circumstances.
Danny
Re: 3 Questions about setting up NTP
Danny Mayer wrote:[color=blue]
> Unruh wrote:[color=green]
>> [email]unix2266@charter.net[/email] (unix2266) writes:
>>[color=darkred]
>>> Folks;
>>> I'm setting up a new NTP server to sync time for our network. I
>>> have one Linux server that needs to point to that NTP server
>>> My 3 questions are:
>>>
>>> 1. I added the IP address for the NTP server to the "/etc/hosts"
>>> file on the Linux server. Is that all i need to do to make the Linux server
>>> point to the NTP server?[/color]
>> Yup. If your ntp server was in some dns server, you did not even have to do
>> that.[/color]
>
> You should not be touching etc/hosts for this purpose. If you want to
> use a specific IP address for a server you can do that in the ntp.conf
> file. If you have a DNS server you can put it in there and specify the
> FQDN on the server line but you shouldn't be messing with /etc/hosts.
> That's a long obsolete file and it really should be empty under normal
> circumstances.
>[/color]
/etc/hosts is a perfectly OK thing to use. It's not the only tool for
the job and in most circumstances it's not the best tool but it works!
For example, I have, I think, eleven computers in the house. I'll be
damned if I'll take off my shoes just to count the computers! I have an
RFC-1918 private network. I have not gone to the trouble of setting up
a DNS server for my home. Those of my computers that need to talk to
the others have hosts files! All have DNS resolvers and use my ISP's
DNS servers in the usual manner in order to talk to the outside world.
The host files do have a few key addresses of internet systems that I
might want to talk to even when my ISP is having a bad day! They are
much better than they used to be but I sometimes think they should have
stuck to cable television!!
Re: 3 Questions about setting up NTP
Richard B. Gilbert wrote:[color=blue]
> Danny Mayer wrote:[color=green]
>> Unruh wrote:[color=darkred]
>>> [email]unix2266@charter.net[/email] (unix2266) writes:
>>>
>>>> Folks;
>>>> I'm setting up a new NTP server to sync time for our network. I
>>>> have one Linux server that needs to point to that NTP server
>>>> My 3 questions are:
>>>>
>>>> 1. I added the IP address for the NTP server to the "/etc/hosts"
>>>> file on the Linux server. Is that all i need to do to make the Linux server
>>>> point to the NTP server?
>>> Yup. If your ntp server was in some dns server, you did not even have to do
>>> that.[/color]
>> You should not be touching etc/hosts for this purpose. If you want to
>> use a specific IP address for a server you can do that in the ntp.conf
>> file. If you have a DNS server you can put it in there and specify the
>> FQDN on the server line but you shouldn't be messing with /etc/hosts.
>> That's a long obsolete file and it really should be empty under normal
>> circumstances.
>>[/color]
>
> /etc/hosts is a perfectly OK thing to use. It's not the only tool for
> the job and in most circumstances it's not the best tool but it works!
>[/color]
In this case it's not necessary and causes unnecessary maintenance
tasks. You can use the FQDN or the IP address of the NTP servers to use
so why mess with hosts files?
[color=blue]
> For example, I have, I think, eleven computers in the house. I'll be
> damned if I'll take off my shoes just to count the computers! I have an
> RFC-1918 private network. I have not gone to the trouble of setting up
> a DNS server for my home. Those of my computers that need to talk to
> the others have hosts files! All have DNS resolvers and use my ISP's
> DNS servers in the usual manner in order to talk to the outside world.
>[/color]
Setting up DNS doesn't take much effort to set up though admittedly I
also have worked on the source code.
[color=blue]
> The host files do have a few key addresses of internet systems that I
> might want to talk to even when my ISP is having a bad day! They are
> much better than they used to be but I sometimes think they should have
> stuck to cable television!![/color]
The things that your provider has done makes me leary of anything that
they might provide.
Danny
Re: 3 Questions about setting up NTP
Danny Mayer wrote:[color=blue]
> Richard B. Gilbert wrote:[color=green]
>> Danny Mayer wrote:[color=darkred]
>>> Unruh wrote:
>>>> [email]unix2266@charter.net[/email] (unix2266) writes:
>>>>
>>>>> Folks;
>>>>> I'm setting up a new NTP server to sync time for our network. I
>>>>> have one Linux server that needs to point to that NTP server
>>>>> My 3 questions are:
>>>>>
>>>>> 1. I added the IP address for the NTP server to the "/etc/hosts"
>>>>> file on the Linux server. Is that all i need to do to make the Linux server
>>>>> point to the NTP server?
>>>> Yup. If your ntp server was in some dns server, you did not even have to do
>>>> that.
>>> You should not be touching etc/hosts for this purpose. If you want to
>>> use a specific IP address for a server you can do that in the ntp.conf
>>> file. If you have a DNS server you can put it in there and specify the
>>> FQDN on the server line but you shouldn't be messing with /etc/hosts.
>>> That's a long obsolete file and it really should be empty under normal
>>> circumstances.
>>>[/color]
>> /etc/hosts is a perfectly OK thing to use. It's not the only tool for
>> the job and in most circumstances it's not the best tool but it works!
>>[/color]
>
> In this case it's not necessary and causes unnecessary maintenance
> tasks. You can use the FQDN or the IP address of the NTP servers to use
> so why mess with hosts files?
>[color=green]
>> For example, I have, I think, eleven computers in the house. I'll be
>> damned if I'll take off my shoes just to count the computers! I have an
>> RFC-1918 private network. I have not gone to the trouble of setting up
>> a DNS server for my home. Those of my computers that need to talk to
>> the others have hosts files! All have DNS resolvers and use my ISP's
>> DNS servers in the usual manner in order to talk to the outside world.
>>[/color]
>
> Setting up DNS doesn't take much effort to set up though admittedly I
> also have worked on the source code.
>[/color]
Setting up a DNS server on VMS and TCP/IP Services was an experience
I'll carry to my grave. We had been using the server operated by our
upstream provider until they decided that the load was more than they
could handle.
This was ca. September 1998. I had no training or experience but
neither did anyone else at the site and I got stuck with the job!
The documentation didn't say much about it and most of what it did say
was either incomplete or just flat out wrong! It was obviously written
by someone who had never done the job.
The software, as issued, was broken. I wound up upgrading to the very
latest version of VMS plus the very latest ECO (13) for TCP/IP Services.
I spent a lot of time on the phone with third level tech support, a
wizard named Smiley Smith and, ultimately, with the developer.
I had to do it again, a year or so later and it was none too easy the
second time around either! Copies of "DNS and BIND" and RFCs 1032,
1033, 1034, 1035, and 1183 were my constant companions. I still have
the big three-ring binder with all that stuff in it. Who knows, I might
need it again someday although I hope not unless someone is sufficiently
desperate to pay two or three times my usual rates!
Re: 3 Questions about setting up NTP
Richard B. Gilbert wrote:
[color=blue]
>
> /etc/hosts is a perfectly OK thing to use. It's not the only tool for
> the job and in most circumstances it's not the best tool but it works![/color]
It's neither sufficient nor necessary in this case. It's not sufficient
because it will do nothing unless you also configure the host name in
ntp.conf. It's not necessary because you can put the IP address in
ntp.conf.
Re: 3 Questions about setting up NTP
Richard B. Gilbert wrote:[color=blue]
> Danny Mayer wrote:[color=green]
>> Setting up DNS doesn't take much effort to set up though admittedly I
>> also have worked on the source code.
>>[/color]
>
> Setting up a DNS server on VMS and TCP/IP Services was an experience
> I'll carry to my grave. We had been using the server operated by our
> upstream provider until they decided that the load was more than they
> could handle.
>[/color]
Well VMS is a bit different! I used UCX at the time! :)
[color=blue]
> This was ca. September 1998. I had no training or experience but
> neither did anyone else at the site and I got stuck with the job!
>
> The documentation didn't say much about it and most of what it did say
> was either incomplete or just flat out wrong! It was obviously written
> by someone who had never done the job.
>
> The software, as issued, was broken. I wound up upgrading to the very
> latest version of VMS plus the very latest ECO (13) for TCP/IP Services.
> I spent a lot of time on the phone with third level tech support, a
> wizard named Smiley Smith and, ultimately, with the developer.
>
> I had to do it again, a year or so later and it was none too easy the
> second time around either! Copies of "DNS and BIND" and RFCs 1032,
> 1033, 1034, 1035, and 1183 were my constant companions. I still have
> the big three-ring binder with all that stuff in it. Who knows, I might
> need it again someday although I hope not unless someone is sufficiently
> desperate to pay two or three times my usual rates![/color]
Assuming that this was BIND4 or BIND8 I would not be at all surprised.
Paul and I are old VMS hackers and have several times discussed porting
BIND9 to VMS. Implemented DECThreads code would have been interesting.
It will probably never happen as it's a dying O/S unfortunately.
Danny
Re: 3 Questions about setting up NTP
Danny Mayer wrote:[color=blue]
> Richard B. Gilbert wrote:[color=green]
>> Danny Mayer wrote:[color=darkred]
>>> Setting up DNS doesn't take much effort to set up though admittedly I
>>> also have worked on the source code.
>>>[/color]
>> Setting up a DNS server on VMS and TCP/IP Services was an experience
>> I'll carry to my grave. We had been using the server operated by our
>> upstream provider until they decided that the load was more than they
>> could handle.
>>[/color]
>
> Well VMS is a bit different! I used UCX at the time! :)
>[color=green]
>> This was ca. September 1998. I had no training or experience but
>> neither did anyone else at the site and I got stuck with the job!
>>
>> The documentation didn't say much about it and most of what it did say
>> was either incomplete or just flat out wrong! It was obviously written
>> by someone who had never done the job.
>>
>> The software, as issued, was broken. I wound up upgrading to the very
>> latest version of VMS plus the very latest ECO (13) for TCP/IP Services.
>> I spent a lot of time on the phone with third level tech support, a
>> wizard named Smiley Smith and, ultimately, with the developer.
>>
>> I had to do it again, a year or so later and it was none too easy the
>> second time around either! Copies of "DNS and BIND" and RFCs 1032,
>> 1033, 1034, 1035, and 1183 were my constant companions. I still have
>> the big three-ring binder with all that stuff in it. Who knows, I might
>> need it again someday although I hope not unless someone is sufficiently
>> desperate to pay two or three times my usual rates![/color]
>
> Assuming that this was BIND4 or BIND8 I would not be at all surprised.
> Paul and I are old VMS hackers and have several times discussed porting
> BIND9 to VMS. Implemented DECThreads code would have been interesting.
> It will probably never happen as it's a dying O/S unfortunately.
>
> Danny[/color]
I don't know which version of BIND was ported to UCX V3.3. DEC's
engineers tried to port the Berkeley TCP/IP code about ten years after
Wollongong, TGV, and one or two other vendors had done it. They didn't
have a clue! It took them years to get it right. Ultimately the VMS
version was ported using the Ultrix (DEC Unix) version as a base. It
wasn't until UCX (Ultrix Connection) V5 that they finally managed to get
all their ducks in a row!
Those were interesting times. From late August 1998 to late December, I
learned more about TCP/IP, DNS, and BIND than I ever knew before (or since).
Re: 3 Questions about setting up NTP
On Apr 8, 8:58*pm, "Richard B. Gilbert" <rgilber...@comcast.net>
wrote:[color=blue]
> /etc/hosts is a perfectly OK thing to use. *It's not the only tool for
> the job and in most circumstances it's not the best tool but it works!
>
> For example, I have, I think, eleven computers in the house. *I'll be
> damned if I'll take off my shoes just to count the computers! I have an
> RFC-1918 private network. *I have not gone to the trouble of setting up
> a DNS server for my home. *Those of my computers that need to talk to
> the others have hosts files! *All have DNS resolvers and use my ISP's[/color]
You don't need even need to set up your own DNS, there are lots of
them available for free.
Example: [url]http://www.dyndns.com/services/dns/dyndns/[/url].
Much more maintainable that enditing a bunch of hosts files by hand.
And of course setting up your own local dyanmic DNS takes minutes on a
Windows Server using Microsoft DNS, and minutes with BIND on Linux,
Windows, Solaris, whetever. The default packages on most Linux systems
are set up as forwarders, so all you need to do is add your own zone
info.
Re: 3 Questions about setting up NTP
Ryan Malayter wrote:[color=blue]
> On Apr 8, 8:58 pm, "Richard B. Gilbert" <rgilber...@comcast.net>
> wrote:[color=green]
>> /etc/hosts is a perfectly OK thing to use. It's not the only tool for
>> the job and in most circumstances it's not the best tool but it works!
>>
>> For example, I have, I think, eleven computers in the house. I'll be
>> damned if I'll take off my shoes just to count the computers! I have an
>> RFC-1918 private network. I have not gone to the trouble of setting up
>> a DNS server for my home. Those of my computers that need to talk to
>> the others have hosts files! All have DNS resolvers and use my ISP's[/color]
>
> You don't need even need to set up your own DNS, there are lots of
> them available for free.
> Example: [url]http://www.dyndns.com/services/dns/dyndns/[/url].
> Much more maintainable that enditing a bunch of hosts files by hand.
>
> And of course setting up your own local dyanmic DNS takes minutes on a
> Windows Server using Microsoft DNS, and minutes with BIND on Linux,
> Windows, Solaris, whetever. The default packages on most Linux systems
> are set up as forwarders, so all you need to do is add your own zone
> info.[/color]
This really belongs on the BIND users mailing list rather than here.
However, I would like to point out that if the default packages are set
up as forwarders it's been packaged badly. Forwarders should only be
used if absolutely necessary. There's no benefit to using forwarders
under normal circumstances.
Danny
Re: 3 Questions about setting up NTP
Ryan Malayter wrote:[color=blue]
> On Apr 8, 8:58 pm, "Richard B. Gilbert" <rgilber...@comcast.net>
> wrote:[color=green]
>> /etc/hosts is a perfectly OK thing to use. It's not the only tool for
>> the job and in most circumstances it's not the best tool but it works!
>>
>> For example, I have, I think, eleven computers in the house. I'll be
>> damned if I'll take off my shoes just to count the computers! I have an
>> RFC-1918 private network. I have not gone to the trouble of setting up
>> a DNS server for my home. Those of my computers that need to talk to
>> the others have hosts files! All have DNS resolvers and use my ISP's[/color]
>
> You don't need even need to set up your own DNS, there are lots of
> them available for free.
> Example: [url]http://www.dyndns.com/services/dns/dyndns/[/url].
> Much more maintainable that enditing a bunch of hosts files by hand.
>[/color]
It's all the same hosts file. Edit ONE copy and distribute it. NIS
does the job on my Unix boxes. Since I seldom have reason to add a new
computer, maintenance is not a big issue.
I was introduced to the internet at a time when DNS was a revolutionary
idea rather than a standard. I can appreciate the advantages of DNS but
they don't apply in my particular case.
Re: 3 Questions about setting up NTP
Agreed, it doesn't belong on the list. And I didn't really mean
forwarder, I meant to say the default are set up as recursive
resolvers with root hints (they forward to root servers).
Former security wisdom was that you're not supposed to have
authoritative servers and a resolver on the same server; I'm not sure
if that is still tru with the latest versions of BIND.
On Thu, Apr 10, 2008 at 9:27 AM, Danny Mayer <mayer@ntp.isc.org> wrote:[color=blue]
> Ryan Malayter wrote:[color=green]
> > On Apr 8, 8:58 pm, "Richard B. Gilbert" <rgilber...@comcast.net>
> > wrote:
> >[color=darkred]
> > > /etc/hosts is a perfectly OK thing to use. It's not the only tool for
> > > the job and in most circumstances it's not the best tool but it works!
> > >
> > > For example, I have, I think, eleven computers in the house. I'll be
> > > damned if I'll take off my shoes just to count the computers! I have an
> > > RFC-1918 private network. I have not gone to the trouble of setting up
> > > a DNS server for my home. Those of my computers that need to talk to
> > > the others have hosts files! All have DNS resolvers and use my ISP's
> > >[/color]
> >
> > You don't need even need to set up your own DNS, there are lots of
> > them available for free.
> > Example: [url]http://www.dyndns.com/services/dns/dyndns/[/url].
> > Much more maintainable that enditing a bunch of hosts files by hand.
> >
> > And of course setting up your own local dyanmic DNS takes minutes on a
> > Windows Server using Microsoft DNS, and minutes with BIND on Linux,
> > Windows, Solaris, whetever. The default packages on most Linux systems
> > are set up as forwarders, so all you need to do is add your own zone
> > info.
> >[/color]
>
> This really belongs on the BIND users mailing list rather than here.
> However, I would like to point out that if the default packages are set up
> as forwarders it's been packaged badly. Forwarders should only be used if
> absolutely necessary. There's no benefit to using forwarders under normal
> circumstances.
>
> Danny
>
>[/color]
--
RPM