1836612 Members
3833 Online
110102 Solutions
New Discussion

Re: xntpd questions

 
Bakos György
Super Advisor

xntpd questions

Is there any command on clents that runs a synchronisation process with the server time.

Another question:
At the moment the xntpd works fine, but why is on the server
/etc/ntp.conf:
server 127.127.1.1


What can be this 127.127.1.1? The localhost is 127.0.0.1


13 REPLIES 13
Bryan D. Quinn
Respected Contributor

Re: xntpd questions

Hello,

As for a command to use on clients to sync, I beleive ntpdate will do the job. You might want to do a man on it to find out more specifics...I have never used it.

The server 127.127.1.1 just says that the server is using it's local clock to sync it's clients.

Hope this helps!
-Bryan
Pete Randall
Outstanding Contributor

Re: xntpd questions

First question:

Try "ntpdate" and/or "ntpq".



Pete

Pete
Bakos György
Super Advisor

Re: xntpd questions

Or is there any command on server that sends a signal to syncronise the clients.

For the first message:
on the server:
cat /etc/ntp.conf

server 127.127.1.1
broadcast 10.0.1.255 version 3
Jeff Schussele
Honored Contributor

Re: xntpd questions

Hi,

127.127.1.1 will resolve to the local clock.

To be served by a remote NTP server you just need to point the ntp.conf file to that server and bouce NTP.

The ntpdate command will initially sync your clock to that server IF you are within 999 seconds of the server. DO NOT run the command with processes active IF you are faster than the server. Most SW does not like time to go backeards.
You can use the ntpq command to check connectivity & your time compared to it without changing anything.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
A. Clay Stephenson
Acclaimed Contributor

Re: xntpd questions

There is , of course, the ntpdate command. Man ntpdate for details but in this respect xntpd can be both a client and a server.


This address has nothing to do with a loopback IP address. 127.127.t.u addresses, by convention, refer to modem and radio clocks. Man xntpd for details and look under REFERENCE CLOCK DRIVERS.
If it ain't broke, I can fix that.
Steven E. Protter
Exalted Contributor

Re: xntpd questions

ntpq -p ip_of_time_source

Most networks have an internal time source inside the firewall because the time port is blocked.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bryan D. Quinn
Respected Contributor

Re: xntpd questions

Hello again,

In response to your last post:

Or is there any command on server that sends a signal to syncronise the clients.

For the first message:
on the server:
cat /etc/ntp.conf

server 127.127.1.1
broadcast 10.0.1.255 version 3

The broadcast entry is telling ntp to broadcast the time out to the clients. That being the case, I beleive the ntp.conf on the clients has to have an entry something like the following:

broadcastclient yes

This tells the xntpd daemon on the client to sync to the broadcast time, depending on whether it is yes or no.

-Bryan
Bakos György
Super Advisor

Re: xntpd questions

That worked:
ntpdate -B server

but that doesn't
remsh client ntpdate -B server
sh: ntpdate: not found

that too

remsh client -l root ntpdate -B server

(clients rhosts is filled with server root)
Bakos György
Super Advisor

Re: xntpd questions

Please answer the last question.
On a client I have uncomment broadcastclient yes, but if I set the date to a false date I wait 10minutes and it is false date +10minutes, why is it not the correct time?

And how is posible that I have in my servers
ntp.conf is the server 127.127.1.1, it is the local server(but not the localhost:127.0.0.1), but how is it pingable? 127.127.1.1 it resolves(It is not the localhost)
How can I print routing table(In linux simply route)

Elmar P. Kolkman
Honored Contributor

Re: xntpd questions

The reason your clock is not synced might be because your clock is more then a half hour off. NTP will only sync within certain limits, unless you force it to sync with ntpdate.

As for the 127.127.1.1: xntpd uses special entries like 127.127.1.1 to specify a special clock. Yours is the internal, in my case I have and entry 127.127.17.1 to specify my DATUM GPS clock, connected to the serial port.

Your problem with remsh ntpdate: probably a PATH problem. Check on the client where ntpdate resides and specify the full path, for instance /usr/sbin/ntpdate.

One more thing to bear in mind: xntpd doesn't set the clock to the right time in a single step. It tries to adjust the speed of the clock so the time will not jump but slide slowly to the correct time. Unix and all software on it find this a better solution. Your 'ntpdate -B' commands do the same. So if you set the clock wrong and waited for 10 minutes, the clock is not correct, but the speed might be changed. More info can be found in /var/adm/syslog/syslog.log or whatever logfile is used on your client (/var/adm/messages is the default on most linux and Solaris environments, for instance).
Every problem has at least one solution. Only some solutions are harder to find.
Bakos György
Super Advisor

Re: xntpd questions

Thanks, only 1 question:
It is posible to sync windows machines to the xntpd server(version 3)?
The windows machines are NT4 machines and 1 is Win 2000.
Elmar P. Kolkman
Honored Contributor

Re: xntpd questions

There are ntpd implementations and ntpdate commands for NT and win2000. Some searching on google or whatever internet search engine you prefer might solve this. Or ask the question on the microsoft forum.
Every problem has at least one solution. Only some solutions are harder to find.
Bakos György
Super Advisor

Re: xntpd questions

How is thaty posible:
I have nettime on windows, it works fine with the server, but only if I make in the configure:
server:server Protocol:SNTP Port:123
but if nmap the server the 123 is not listening, but the 37port is open.
Is there something that i must know.
(Is RFC868 NTP?, because for that is the default port 37, but in this case it doesn't work)