[ntp:questions] NTP version 2 for control message

Martin Burnicki martin.burnicki at burnicki.net
Wed Apr 27 11:10:32 UTC 2016


Wei Wei A wrote:
> Dear all,
> 
> I am running nptd of version 4.2.4p8 on my linux machine,  from wireshark traceing I can see NTPV2 is using for control message, and NTPV4 for client/server message, could anyone tell me the reason selecting Version 2 for control message, and is that configurable to choose Version 4 for control message.
> 
> Your reply is higly appreciated!!

Hm, I've just run ntpq from the 4.2.8p7 package and indeed wireshark
still reports NTP version 2 in the flags field of the request packet,
and also ntpd 4.2.8p7 replies with version 2.

Even RFC-1305 for NTPv3 states

--------------------------------------------------------------------
NTP Control Message Format

[...]
Version Number (VN): This is a three-bit integer indicating the NTP
version number, currently three (3).
--------------------------------------------------------------------

so this already should have been 3 in NTPv3. Also RFC-5905 for NTP only
mentions the version number VN as 4 and with a quick look I havent found
some exception for control packets. So basically this sounds like a bug.

On the other hand, a quick glance at the source code yields that a
symbol NTP_OLDVERSION is defined as 1 with comment "oldest credible
version", and is used throughout the whole software package.

Specifically, NTP_OLDVERSION+1 is used when handling the mode 6 packets
used by ntpq, so it looks like it has been implemented intentionally
this way. Eventually this just means the mode 6 packet format is
compatible with NTPv2, but this is just a guess, and it's a yet
undetected mismatch between the RFCs and the implementation.

Martin



More information about the questions mailing list