Simple Network Time Protocol server for linux?

I like to provide a ntp server for my windows machines.(XP seems to only like sntp protocol)

how can I set up sntp server in linux?
hulkenAsked:
Who is Participating?
 
pjedmondConnect With a Mentor Commented:
Microsoft *REALLY* is presumptuos - Apparently, the ntp on a Windows system is advertised as a stratum 0 for a period of time during and after startup:

http://www.greyware.com/software/domaintime/product/w32time.asp

http://support.microsoft.com/?kbid=223184

gives the default location of the registry values for this service:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters

, and it is possible to alter some of the behaviour - for example the 'blacklisting' of a failed connection by altering these values.

..and guess what, this question is *really* annoying me! - It shouldn't be this difficult, and the MS software shouldn't be this s$£$&d!
0
 
pjedmondCommented:
Instructions and explanation for ntp:

http://www.siliconvalleyccie.com/linux-hn/ntp.htm

Installation:

If your system supports yum, then:

yum install ntp.

Then use chkconfig to ensure that it starts automatically on startup for your linux box.

/etc/init.d/ntp start

to start the daemon.

If yum is not available, then you will need to download the appropriate ntp rpm, then:

rpm -ivh ntp-xx.xx..x.xx-x.rpm

Then chkconfig, and start the daemon.

HTH:)

0
 
pjedmondCommented:
Ooops - you may need to change the default time servers in the /etc/ntp.conf file.

Also note that paths/filenames may change slightly depending on linux distribution and version....so you may need to:

man ntp

after installing the rpm to check the exact locations of some of the files (look at related files, or see also towards the end of the man entry)

HTH:)
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
hulkenAuthor Commented:
This still dont let me sync using sntp only ntp. (as far as I can see)
0
 
hulkenAuthor Commented:
I already have a standard ntpd setup (with corect values for server i ntp.conf and step-tickers)

My linux machines can sync against it. The problem is that windows use simple network time protocol
0
 
pjedmondCommented:
Sorry - my mistake!

There's a nice ntp client for windows here:

http://www.meinberg.de/english/sw/ntp.htm

Meinberg make atomic clocks and the like!

However, I've just set up ntp, and I can happily get an sntp client to sychronise it with it. I've also checked here:

http://www.eecis.udel.edu/~ntp/ntpfaq/NTP-s-def.htm

and a number of other locations which appear to confirm that you should be able to sync your windows setup with an ntp server quite happily. My best guess on this is that you need to edit your /etc/ntp/ntp.cong file and change:

restrict by default is set to 127.0.0.1
authenticate which is by default set to yes

HTH:)
0
 
hulkenAuthor Commented:
NTP is working and not restricted. I can syncronize with ntp clients or using ntp and XP from command line. However, it don't work if you "click at the watch" and set the time server on the "internet time" tab. (since it use sntp)

That's why I want to use sntp.

0
 
pjedmondCommented:
SNTP is a subset of NTP, and I seem to be able to get so called 'SNTP' clients to work with my server.

I think that I might have got your problem sorted? You are getting the following error?:

"An error occurred while Windows was synchronising with 192.168.1.100. The time sample was rejected because: The peer's stratum is less than the host's stratum."

If you change to:

time.nist.gov

and synchronise ,then it works!

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q216734

seems to basically state that the stratum level of a Windows XP system can potentially be 2!!!!!...so I changed the stratum to 1 (from 10) in my ntp.conf + restarted my ntpd..and guess what, it still didnt work. So, restarted my XP client, and suprise, it worked!!!

So, basically, Microsoft have a really horrible method of deciding what strata the system is, and on top of that, if a failure occurs to a specific ntp server, it blacklists that server for about 10 minutes. - Or at least that's my conclusion so far.

I recommend getting ntptime:

http://home.att.net/~Tom.Horsley/ntptime.html

or another client as the thought of statum 1 and 2 systems on my network is enough to make me very uncomfortable - If one goes wrong, then there is a mess in the making - spam filters for a start wil lstart having fits with 'good' mail entering the network. Overall - I think that the Windows version is horrible!

0
 
pjedmondCommented:
Right - now Windows is severely annoying me, and I'd welcome input from anyone else on this. The graphical client on my system appears to have major problems (Windows XP Home), and also on a Windows XP Proffessional system I've booted up. I can't work out what they're doing, as I can sometimes get them to synchronise and other times they wont!

However, my tests have shown that from the command line, even with a stratum of 10 (the default ntpd setting) I can sychronise:

net time \\192.168.1.100 /set

works absolutely fine.

If you want it to not ask you to confirm, then add /yes:

net time \\192.168.1.100 /set /yes

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/net_time.mspx?mfr=true

for definition for command.

Sorry - but my verdict so far on this is that the behavious of the Microsoft code here is bizarre - stick with the recommendation for ntptime.

HTH:)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.