UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

#1 2014-11-06 10:12 AM

santoshkumar
Member
Registered: 2007-08-21
Posts: 53

Need help for NTP proxy configuration

Hi all,

I'm stuck with configuring ntp proxy.

Requirement is

Host A(10.102.79.182) sync with remote ntp server(10.102.78.198).

and other machines (Host a1, a2) syncs with the Host A


Host A's /etc/ntp.conf
------------------------------
server 10.102.78.198 //RemoteserverIP
restrict 10.102.78.198 mask 255.255.255.255

server 10.102.79.182//SelfIp
restrict 10.102.79.182 mask 255.255.0.0
restrict 127.0.0.1 mask 255.255.255.255
restrict default ignore
tinker panic 0
driftfile /var/lib/ntp/drift
-----------------------------

Host a1
---------------------
server 10.102.79.182
restrict 10.102.79.182 mask 255.255.255.255 nomodify notrap nopeer
restrict 127.0.0.1 mask 255.255.255.255
restrict default ignore
tinker panic 0
driftfile /var/lib/ntp/drift
---------------------


but a1 is not syncing with Host A awaited for almost 3-4hrs

checked with ntpq seems fine.

[hosta1~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
10.102.79.182 .INIT. 16 u - 1024 0 0.000 0.000 4000.00

[hostA ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
10.102.78.198 .LOCL. 1 u 20 64 377 1.201 4319598 10.081
10.102.79.182 .INIT. 16 u - 1024 0 0.000 0.000 4000.00

Could you let me know what configuration is missing or how to fix this

Offline

#2 2014-11-06 01:32 PM

RobSeace
Administrator
From: Boston, MA
Registered: 2002-06-12
Posts: 3,833
Website

Re: Need help for NTP proxy configuration

I'm not really up on ntpd configuration...  But, I'm pretty sure that if things were going properly, that "ntpq -p" output would have a "*" at the beginning of the line for a valid peer...  Since I see no other character in your included output, I'm guessing it was really a space?  That means (per the man page): "The peer is discarded as unreachable, synchronized to this server (synch loop) or outrageous synchronization distance."...

I think that's because all your NTP servers appear to be stratum 16, and anything above 15 is not considered useful...  You don't show 10.102.78.198's ntp.conf, but I assume that's either syncing with a real NTP server on the Net or using a fake 127.127.* reference clock driver?  If the latter, you'll need a "fudge 127.127.* stratum 10" (or whatever fake stratum you want to give it)...  Then, 10.102.79.182 should end up with a stratum one higher than that after it syncs...

Offline

#3 2014-11-06 01:36 PM

RobSeace
Administrator
From: Boston, MA
Registered: 2002-06-12
Posts: 3,833
Website

Re: Need help for NTP proxy configuration

Well, nevermind; I just noticed that 10.102.78.198 shows as stratum 1 in your output!  So, hmmm...

Oh, in 10.102.79.182's config, I don't think you want a "server" entry for its own IP!  Just the "restrict" line...  That may be the source of the problem: it's trying to sync against itself, and sensing the sync loop...

Offline

#4 2014-11-09 12:48 PM

santoshkumar
Member
Registered: 2007-08-21
Posts: 53

Re: Need help for NTP proxy configuration

Thanks much yes the issue was with reject being used in server's /etc/ntp.conf


ntpq debugging command helped ,  the ntp requests are getting rejected. (http://doc.ntp.org/4.1.2/debug.htm)

it was incorrect entry( which restricted clients request) in server for reject, after removing it worked.

Last edited by santoshkumar (2014-11-09 12:50 PM)

Offline

Board footer

Powered by FluxBB