1833876 Members
1763 Online
110063 Solutions
New Discussion

Re: NTP

 
system administrator_15
Frequent Advisor

NTP

hi guys
I am setting up ntp on two of my test servers,should be easy right.
I have set up the time server itself to use its local clock, and the client to look at the Time server.
i have set them using ip addresses as the test servers dont have any details of other machines in there hosts files.
my question is that it does not seem to be working and that if i run NTPQ -p it complains with the following message "/usr/sbin/ntpq: read: Can't assign requested address" on the time server.
on the client it says "No association ID's returned" any ideas why it is not working and why ntpq fails.
regards
6 REPLIES 6
Rita C Workman
Honored Contributor

Re: NTP

You don't mention the steps you used to set up ntp...so maybe a quick review would help..

To save me some typing, take a look here:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x87c3854994d9d4118fef0090279cd0f9,00.html

Rgrds,
Rita
Michael Steele_2
Honored Contributor

Re: NTP

here's a setup procedure to refer yours to:

From client, set time 3 minutes ahead.

NTP Time server
===========
# cd /etc/
# /sbin/init.d/xntp stop
# vi ntp.conf
server 127.127.1.1 minpoll 3 maxpoll 4 prefer
fudge 127.127.1.1 stratum 10
broadcast ip

# /sbin/init.d/xntp start

NTP Client
======
# cd /etc/rc.config.d
# /sbin/init.d/xntp stop
# vi netdaemons

export NTPDATE_SERVER=node name
export XNTPD=1

# ntpdate
# /sbin/init.d/xntp start

Wait for about 5-8 min, run the follwoing to check the status:
# ntpq -p
chk for output of "reftime" it should not be zero if the servers are in
Support Fatherhood - Stop Family Law
system administrator_15
Frequent Advisor

Re: NTP

Thanks for the replys guys.
I was trying to set it up Client server as in the manual, which says that you should not use the Broadcast method with local clock settings.
i have gone into sam on the time server and set in 'NTP Time Sources' then 'Configure Local Clock'
then i have gone to the client and added it in using the 'ADD REMOTE SERVER OR PEER' from sam, i was reading a previous forum entry and apparently this is the way it should be done.
After all all i want it to do is get the time from one server and update itself, how hard is it?.
i dont want to use broadcast untill i have checked out how certain bespoke applications will work with NTP installed, and if i set broadcast there is allways a risk that one of my production servers might collect time and instigate change before i am ready for it to do that.( application issues)
cheers

andy
Stuart Abramson_2
Honored Contributor

Re: NTP

Here is how we did it:

We used external time servers, and used the broadcast capability:

1. First you must identify your plan:

a. Identify two offsite time servers.
b. Identify two local machines to be your local servers.
c. Set up all other local machines to be clients of the time servers.

2. In our case:

a. External time servers:

10.100.51.211 # antares
10.3.65.67 # horus

b. Local time servers:

serv349-d (IP ends in 49 below)
serv345-d (IP ends in 45 below)

3. Set local clients and servers to initiate ntp at boot time:

vi /etc/rc.config.d/netdaemons

export NTPDATE_SERVER=Time server name or IP address
export XNTPD=1
export XNTPD_ARGS=

4. /etc/ntp.conf for a "client"

driftfile /etc/ntp.drift
restrict default notrust nomodify
restrict 151.208.28.49
restrict 151.208.28.45
server 151.208.28.49
server 151.208.28.45

5. /etc/ntp.conf for a "local timeserver", serv349-d:

server 10.100.51.211 prefer # Antares
server 10.3.65.67 # horus
driftfile /etc/ntp.drift
restrict default notrust nomodify
restrict 10.100.51.211
restrict 10.3.65.67
peer 151.208.28.45
broadcast 151.208.28.255

6. /sbin/init.d/xntpd start

Michael Steele_2
Honored Contributor

Re: NTP

If your client doesn't have the ntpd daemon active then its not going to sync up over the network with anyone.
Support Fatherhood - Stop Family Law
Fred Martin_1
Valued Contributor

Re: NTP

Also see this thread; from when I set up NTP:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x54d30bce6f33d6118fff0090279cd0f9,00.html

Fred
fmartin@applicatorssales.com