linux - NTP Multicast configuration

07
2014-07
  • Ian

    I'm trying to get NTP multicast set up between a few computers. Right now I'm getting NTP multicast packets from a computer that I have neither access to nor information on (let's call that A) that is serving as a stratum 4 NTP multicast server and I'm trying to get a few computers' time to synchronize to that.

    The computers that I'm trying to sync (let's call them B) are running CentOS6.4 and use ntpd version 4.2.4p8. B can receive the multicast packet from A but can't access A otherwise (can't ping). From B, A is the only NTP server available. ntpd is set to start when computer boots up and is called with the "-g" flag. From the NTP multicast packets I gathered that A is sending to multicast address "224.0.1.1" from IP address "192.168.1.103"

    Below is ntp.conf from B:

    tinker panic 0
    restrict default kod nomodify notrap nopeer noquery
    restrict -6 default kod nomodify notrap nopeer noquery
    restrict 127.0.0.1
    restrict -6 ::1
    driftfile /var/lib/ntp/drift
    keys /etc/ntp/keys
    restrict 192.168.1.103 kod nomodify noquery notrap
    multicastclient 224.0.1.1
    disable auth
    

    Right now computer B receives NTP packets from A, and given enough time, ntpstat on B will show that it is synced to A. If time on B is essentially (within seconds) the same as that on A when I started ntpd on B, then if I change time on B after ntpstat shows "synchronized" on B, time gets changed back within about ~30minutes. If I change the time on B to be minutes different from A or greater and start ntpd on B, ntpstat will eventually say "synchronized" but the time will still be wrong and will not change at all (so far waited for up to 3 days). Using ntpq -pn shows the offset as something in the tens (10~40) while the time on B off by something that's well into minutes or hours.

    I'm hoping to get B set up so that even if the time on B is different from A by some arbitrarily large amount when it syncs to A it will adjust back. I'm wondering if there's a way to either configure ntpd on B to be able to do that or to have something that parses the multicast packets from A and either gives me a correct timestamp or the time difference between A and B.

    So far I've tried ntpdate and sntp, neither worked. I've also tried getting the timestamps using ntpq, but that turned out to be not helpful (either 0 or simply local time).

  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    windows - Software displaying the time of an NTP server
  • Svish

    Is there any software that can display the time from an NTP server? Irregardless of what is going on with the time in the operating system itself. Like, just enter in the hostname of an NTP server and then a digital clock displaying what time it gets from it, staying in sync.

    I'm using the Meinberg NTP and I am getting a lot of stats from their NTP Time Server Monitor, but can't find the current time anywhere :p For some reason, I am not able to get the computer (running Windows XP, unfortunately) to sync with it or any NTP server so can't use the clock in windows. The servers that use this computer as their NTP server seems to be able to get a time from it though, but yeah... would be nice to see what time my NTP server actually have so I could at least try to see if two computers have the same time.

    Looking for software running on either Windows XP or Mac OS X 10.4 or 10.5 (PPC).

    Just to clearify: I don't want software that is an NTP server or that wants to set or show the time in the operating system. I want an NTP client that only asks an NTP server for the time, and then shows that time to me in a clear way.


  • Related Answers
  • msw
    C:\> ntpdate -q -d ntp.example.net
    

    Should be part of the Meinberg suite build and will give good information about what is not working without changing the clock.