1820483 Members
2282 Online
109624 Solutions
New Discussion юеВ

change ntp server

 
thebeatlesguru
Regular Advisor

change ntp server

today my box A should change ntp server ,following are steps that i guess needed,is it right?

1. change server ip in /etc/ntp.conf
server
2. add broadcast in /etc/ntp.conf,cause other boxes should use A as their ntp server,and these boxes ip is 192.168.*.*,so i write:
broadcast 192.168.255.255

3./sbin/init.d/xntpd stop
4./sbin/init.d/xntpd start

is it right??
hihi
12 REPLIES 12
S.K. Chan
Honored Contributor

Re: change ntp server

You would want to stop xntpd first, then make the changes. Double check the broadcast address by running this ..
# ifconfig lan0
Otherwise your steps should work fine. After changes are made check it by running ..
# /usr/sbin/ntpq -p
thebeatlesguru
Regular Advisor

Re: change ntp server

when i use :# /usr/sbin/xntpd start
it show:
usage: /usr/sbin/xntpd [ -abdgmx ] [ -c config_file ] [ -e e_delay ]
[ -f freq_file ] [ -k key_file ] [ -l log_file ][ -p pid_file ] [ -r broad_delay ] [ -s statdir ][ -t trust_key ] [ -v sys_var ] [ -V default_sysvar ]

what's the matter?
hihi
Steven Sim Kok Leong
Honored Contributor

Re: change ntp server

Hi,

It should be

/sbin/init.d/xntpd start

NOT:

/usr/sbin/xntpd start

Hope this helps. Regards.

Steven Sim Kok Leong
S.K. Chan
Honored Contributor

Re: change ntp server

Possible reasons ..
1) IP address in /etc/ntp.conf is wrong
2) Check to make sure /etc/services has these entries ..
ntp 123/tcp
ntp 123/udp
thebeatlesguru
Regular Advisor

Re: change ntp server

when i use ntpdate,there is something wrong:
#ntpdate
5 Mar 15:34:46 ntpdate[1072]: no server suitable for synchronization found


is there something i forget to config in server or client /etc/ntp.conf?
hihi
S.K. Chan
Honored Contributor

Re: change ntp server

The error can be caused if the server being
selected by the ntpdate command is not itself sync up. NTP servers need to be sync up before they will handle requests from NTP clients. Check on te ntp server ..
# ntpq -p
Look for a entry that has a "*" in the left-most position of the "remote" field. If
it is not seen, then either another server must be chosen for your NTP client,
or the server needs to be sync up to someone before it can handle the ntpdate request from your client.
thebeatlesguru
Regular Advisor

Re: change ntp server

i have successfully configed one box,and use ntpq -p to check.
but in another box, use the same way ,i cant bulit xntpd when i use /sbin/init.d/xntpd start
i am so confused.why?

the two boxes are all connect to ntp server.
hihi
S.K. Chan
Honored Contributor

Re: change ntp server

thebeatlesguru
Regular Advisor

Re: change ntp server

fudge 127.127.1.1 stratum 10

what does it mean?
hihi
S.K. Chan
Honored Contributor

Re: change ntp server

1) 127.127.1.1 represents the pseudo IP identifying this system as the time source.
2) Stratum 10 means it's not a reliable time source. Basically this is a measure of distance to the true source of time. The GPS clock is stratum=0, the NTP daemon attached to the GPS clock is stratum=1, and others
(one more step away) are considered stratum=2 by all of their clients.

thebeatlesguru
Regular Advisor

Re: change ntp server

i have done everything i can do,on other boxes i have successfully config,but on one,it always show:
/usr/sbin/ntpq: read: Can't assign requested address

does it mean i need to reboot it?
hihi
S.K. Chan
Honored Contributor

Re: change ntp server

The ntpq sometimes takes a while before it reports any useful information but it your case it looks like the client still cannot synchronize with the server ..

Do you have a firewall between them ? If yes please check to make sure port 123 is open for inbound/outbound signals.