2

How can I check other NTP server's NTP version without query the server? NTPv3 and NTPv4 network packet is different, and I know I can just catch the packet and analysis it when ntpd is doing sync. However, I think it is not elegant enough. Do you have any other ways to determine whether a server is NTP v3 or NTP v4?

It's important to do this as NTP v3 are much less accurate(with tens of ms to hundreds of ms error on a typical internet) than NTP v4 (with several ms to tens of ms error on a typical internet).

NTPv4 is out at 2001(http://doc.ntp.org/4.1.0/release.htm), but it seems there is still some servers using ntpv3. I want to remove those servers from my peer list. How can it be finished?

I using a version 4 command at my server list, is that enough?

vxst
  • 31
  • 1
  • 2

3 Answers3

1

Check your time server website to find out for sure. Like me iam using a lot time.nrc.ca, and they direct the user to time4.nrc.ca on their website to use v4. I give the exemple as its best to check the website for information.

yagmoth555
  • 16,758
  • 4
  • 29
  • 50
  • Please **READ MY QUESTION FIRST**. I'm not asking about IPv4. I'm asking NTP version. NTPv3 and NTPv4 have protocol difference. I'm asking how to differentiate NTPv3 and NTPv4, by reliable method. Site information doesn't have to be right, but packet must be. – vxst Dec 27 '14 at 19:15
  • 1
    Please read my answer correctly.i never tell ipv4...I told to check the NTP website as even if you inspect the packet you cant be sure in the long term if they change the dns entry for ntpv4. – yagmoth555 Dec 27 '14 at 20:15
  • But NTP version has nothing to do with dns. – vxst Dec 28 '14 at 20:19
  • @vxst ??????. I gave an exemple. You use an external NTP that you dont control, check their listening to use their official NTPv4 server was my point. – yagmoth555 Dec 28 '14 at 21:34
0

For linux I ran -h its an invalid parameter but the output shows the version of NTP running

# ntpd -h
/usr/sbin/ntpd: illegal option -- h
ntpd - NTP daemon program - Ver. 4.2.8p12
Usage:  ntpd [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \
                [ <server1> ... <serverN> ]
Try 'ntpd --help' for more information.

Above you can see 4.2.8p12

Dave
  • 229
  • 2
  • 10
0

I been googling the same and checked various man pages seems to be when doubt assume Version 4. You can specify your client to user 1-4 and all will be compatible with version 4 ntpd Server.

Source: https://access.redhat.com/solutions/133083