Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mark2288

macrumors regular
Original poster
Jan 11, 2006
239
4
Hey all,
Question - is it possible to run NTP (ntpd) over a local area network that is not connected to the internet to synchronize computer's clocks to another machine on the same network?

In Date and Time preferences could I just change Set date and time automatically from time.apple.com to something like machine.local?

What would I need to run on machine.local (as in ntpd with what arguments) to get everything to work?

Many thanks!
 
Cool. I changed my /etc/ntp.conf file to list the machine I want to synchronize my time with, but my clock hasn't updated. Any thoughts? Do I need to force a synchronization?

Thanks for the help!

EDIT: I also changed the time on the machine I'm syncing to a few hours ahead so I tried running ntpd with the -g flag so it would not panic since the difference in the two clocks is so large. Still no dice! :/
 
I have my MBP set to get time locally, and from the Internet. If they are available, ntpd likes to have multiple servers to average the time.

I also dabble quite a bit with ntp on my local ntp server (FreeBSD with an attached reference clock). I have found the OS X implementation of ntpd to be somewhat hamstrung. The settings in System Preferences, Date & Time control the daemon and write to /etc/ntp.conf. If you check it to "Set date and time automatically", it writes whatever value you have there for servers to /etc/ntp.conf, and starts ntpd. If you uncheck it, it stops ntpd. You can get your own servers into /etc/ntp.conf by adding a comment line and your own servers below that. Then Date & Time will write its server above yours. Better is just to list them in Date & Time, with a comma separated list if you want more than one. You won't be able to add any options to your server line that way, though.

To check whether ntpd is working correctly, run ntpq -p from a shell prompt.

This page will help you understand the output of ntpq -p

http://networking.ringofsaturn.com/Protocols/ntp.php
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.