running NTP on a LAN not connected to the internet

Discussion in 'macOS' started by mark2288, Mar 13, 2010.

  1. mark2288 macrumors regular

    Jan 11, 2006
    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 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!
  2. mark2288 thread starter macrumors regular

    Jan 11, 2006
    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! :/
  3. HenryAZ macrumors 6502a


    Jan 9, 2010
    South Congress AZ
    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

Share This Page