LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 01-24-2007, 03:52 PM   #1
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 419

Rep: Reputation: 31
NTP with Solaris


I'm trying to setup an NTP server on one of my sun boxes, but I'm not getting it to work. It seems pretty strait forward but I seem to be missing something. Here is my procedure. Am I doing something wrong?

Code:
NTP Master
1. Create the file /etc/inet/ntp.conf with the following    
   entries:
   server 127.127.1.0
   driftfile /etc/ntp.drift
2. Create the file /etc/ntp.drift with the following entry:
   0.0
3. Bounce NTP service.
   #> /etc/rc2.d/S74xntd stop
   #> /etc/rc2.d/S74xntd start
4. Check Status
   #> ntpq
   ntpq> peers

NTP Clients
1. Create the file /etc/inet/ntp.conf with the following entries:
   server <NTP Master IP [do not use hostname]>
   driftfile /etc/ntp.drift
2. Create the file /etc/ntp.drift with the following entry:
   0.0
3. Bounce NTP service.
   #> /etc/rc2.d/S74xntd stop
   #> /etc/rc2.d/S74xntd start
4. Check Status
   #> ntpq
   ntpq> peers
When I get into ntpq and type peers I'm getting "Read: Connection Refused" when I try this on the server and the client that I'm testing on. Any suggestions would be great!

Mike Johnston
 
Old 01-24-2007, 10:58 PM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Are you sure of the 127.127.1.0 IP address ?
 
Old 01-24-2007, 11:02 PM   #3
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 419

Original Poster
Rep: Reputation: 31
I was thinking it was 127.0.0.1, but according to the manuals I find it's correct. Could it be that the UDP port is blocked or something? Is there a file that you can edit to unblock ports? I know it uses UDP 123 and maybe that's what not being allowed or something... Thanks for the help!
 
Old 01-25-2007, 12:26 AM   #4
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
After you start the xntpd service, do a netstat -an |grep 123 and see which interfaces it's listening on and what addresses it's bound to.

Personally, I would recommend OpenNTPD as it's much less complex than xntpd and it was designed with security from the ground-up, unlike the other NTP daemons that attempted to get precision accuracy and slapped on security later. Understandably, that's probably not supportable if you have to roll it out to a bunch of clients as a special package, rather than using what's bundled with Solaris, but it might make sense to use OpenNTPD as your daemons and only use xntpd for clients.
 
Old 01-25-2007, 02:12 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
I suggest you to read this quick howto. If you want more details you can follow the links at the bottom, to the Sun's blueprint series.
I guess you problem is that you don't have a "broadcast 224.0.1.1.." in your conf file.
 
Old 01-25-2007, 08:46 AM   #6
Dox Systems - Brian
Member
 
Registered: Nov 2006
Posts: 344

Rep: Reputation: 31
Well, one thing I would recommend is to use svcadm to restart ntpd rather than bouncing it via the scripts.

The other item of note is that IIRC from my Cisco days... 127.0.0.0/8 is ALL reserved for localhost, but many server platforms only respond on 127.0.0.1.
 
Old 01-25-2007, 11:35 AM   #7
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 419

Original Poster
Rep: Reputation: 31
Thanks for the suggestions all... Almost there.

When I do a "netstat -an | grep 123" it doesn't come up with anything. Am I correct to think that that port is being blocked by something or it's disabled?
 
Old 01-25-2007, 11:39 AM   #8
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
That just mean the service doesn't come up.
 
Old 01-25-2007, 02:04 PM   #9
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 419

Original Poster
Rep: Reputation: 31
Oh... So even though I'm starting the service, it's not running. I don't get an error when I start it using "/etc/init.d/xntpd start" so I wonder what's killing it.

I also forgot to add in the previous post that broadcast 224.0.1.1 is in the ntp.config file. I've even tried it as multicastclient with no effect.

Last edited by mijohnst; 01-25-2007 at 02:07 PM.
 
Old 01-25-2007, 03:51 PM   #10
Dox Systems - Brian
Member
 
Registered: Nov 2006
Posts: 344

Rep: Reputation: 31
What happens if you do a "svcadm enable xntpd" and then the netstat?
 
Old 01-26-2007, 10:26 AM   #11
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 419

Original Poster
Rep: Reputation: 31
For some reason I don't have the "svcadm" tool on any of my machines. Is that an addon?
 
Old 01-26-2007, 11:02 AM   #12
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Yes, upgrade to Solaris 10 or later
 
Old 01-26-2007, 11:19 AM   #13
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 419

Original Poster
Rep: Reputation: 31
Doh... I can't do that... It's very complicated but the short of it is that all our development is on version 8 so I can't change that... This is driving me crazy, but it should just work and I can't figure out why. From everything that I've read (thanks for the suggestions) I'm setting it up all correctly.
 
Old 01-26-2007, 04:09 PM   #14
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Just for reference, here is the /etc/inet/ntp.conf for the Solaris 9 sparc machine we use as ntp server:
Code:
server 127.127.1.0 prefer

broadcast 224.0.1.1 ttl 4

enable auth monitor
driftfile /var/ntp/ntp.drift
statsdir /var/ntp/ntpstats/
Note: driftfile and statsdir are under /var/ntp (I guess that's not a real problem in your case) and my ntp.drift contains "0.000"
Also take a look at /var/adm/messages to see if you find any error.

Hope that helps.

Last edited by bathory; 01-26-2007 at 04:42 PM.
 
Old 01-29-2007, 01:24 PM   #15
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 419

Original Poster
Rep: Reputation: 31
Well, looking at my configuration file I see that it is almost exactly like what you've posted bathory. The only thing missing was the ttl 4. I added that with the same result of it still not working. I also disabled the "Enable auth monitor" but that didn't help either. What a pain this is.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
great solaris website for newbies http://solaris-x86.org/ feetyouwell Solaris / OpenSolaris 2 12-06-2006 12:14 AM
Windows and FC3 and Solaris---and only Solaris boot error message zillah Linux - Laptop and Netbook 1 07-07-2005 10:17 PM
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

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 01:54 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
Open Source Consulting | Domain Registration