LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-07-2005, 12:00 AM   #1
figadiablo
Member
 
Registered: Feb 2002
Location: Virginia USA
Distribution: Slackware, CentOS, Fedora
Posts: 342

Rep: Reputation: 30
NTP with no outside source avalilable


Ok, hi.

I have a small network. In a lab, with no connection whatsoever to the outside. Because of the experiments we are running, I need to have all the computers' clock syncronized. All application log files' date and time should match on all computers.

According to the help files from the ntp site, and from reading the ntp.conf file, using this, aka. "Undisciplined Local Clock" settup:

Code:
server 127.127.1.0
fudge 127.127.1.0 stratum 3
my computer should syncronize with itself. But it is not happening. So far I haven't found a real guide to set up a server, this way. But there should be a way.

If I edit the ntp.conf file, and then start it up, via ntpd, I get no error messages or nothing, but the ntpdate command fails to syncronize. Is the ntpdate command supposed to work with itself.

I did notice this:
Code:
bash-3.00# ps aux | grep ntp
root      6756  0.0  0.3  3588 3584 ?        SLs  01:26   0:00 ntpd
root      6816  0.0  0.0  1688  600 pts/0    R+   01:49   0:00 grep ntp
bash-3.00# ntpd
ntpd     ntpdate  ntpdc    
bash-3.00# ntpdc
ntpdc> sysinfo
system peer:          LOCAL(1)
system peer mode:     client
leap indicator:       00
stratum:              4
precision:            -18
root distance:        0.00000 s
root dispersion:      0.01250 s
reference ID:         [127.127.1.1]
reference time:       c5ff4838.00fb00bc  Thu, Apr  7 2005  1:48:40.003
system flags:         monitor ntp kernel stats 
jitter:               0.000000 s
stability:            0.000 ppm
broadcastdelay:       0.003998 s
authdelay:            0.000000 s
ntpdc> q
bash-3.00# ntpdate 
 7 Apr 01:49:29 ntpdate[6818]: no servers can be used, exiting
bash-3.00#
notice the stratum line:
Code:
stratum:              4
Could it be that it is working and the other computer should sync with this one. I don't have another computers withme right now, But I do at work. I though that maybe someone could shine some light in here.

Thanks,
Figa

Last edited by figadiablo; 04-07-2005 at 12:03 AM.
 
Old 04-07-2005, 02:33 AM   #2
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
I would say that you need to use the localhost address for server i.e. 127.0.0.1 Technically 127.127.1.0 does not exist. With regard to the different stratum layer it will always indicate 1 level below the referenced server. Using localhost as the time source should work. You only then need to configure ntp clients on the other boxes to user server <ip_address of the primary server>. Dont not forget to setup the drift and log files so that ntp can auto-regulate itself and the same goes for the other boxes.

Last edited by TigerOC; 04-07-2005 at 02:35 AM.
 
Old 04-07-2005, 03:45 AM   #3
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Having given your situation some thought here is what I would do. You need a median time so lets say you have 4 boxes, A,B,C and D. Start with A. Configure ntp.conf like so;

server <ip-address of B>
server <ip-address of C>
server <ip-address of D>

moving to B;

server <ip-address of A>
server <ip-address of C>
server <ip-address of D>

You get the drift. Providing you have the drift files setup on each of the boxes they will probably all sync to the box with the least drift and therefore the one with the most stable time oscilator. It may take a few hours for the time to stabilise. You can see how each is getting on with the cli query ntpq -p and you will soon see which box they have focussed on.

Last edited by TigerOC; 04-07-2005 at 03:47 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
ntp race Debian 5 12-16-2004 11:43 AM
NTP cannot work with timeserver, NTP-d can jerryvapps Linux - Networking 0 08-04-2004 02:04 PM
NTP cannot use server, NTP -d can jerryvapps Linux - Newbie 0 07-28-2004 02:22 PM
NTP Help MaverickApollo Linux - Software 0 10-28-2003 08:23 AM
NTP is off. blueplazma Linux - Software 0 11-10-2002 05:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration