[ntp:questions] Better QoS support

Philip Prindeville philipp_subx at redfish-solutions.com
Wed Dec 27 00:08:40 UTC 2006

Danny Mayer wrote:

>Why do you need to have QOS for NTP?

I created a bug and attached the patches:


Comment #4 should answer this question:


Quoting Section four of RFC-2474:

4. Historical Codepoint Definitions and PHB Requirements

   The DS field will have a limited backwards compatibility with current
   practice, as described in this section.  Backwards compatibility is
   addressed in two ways.  First, there are per-hop behaviors that are
   already in widespread use (e.g., those satisfying the IPv4 Precedence
   queueing requirements specified in [RFC1812]), and we wish to permit
   their continued use in DS-compliant nodes.  In addition, there are
   some codepoints that correspond to historical use of the IP
   Precedence field and we reserve these codepoints to map to PHBs that
   meet the general requirements specified in Sec., though the
   specific differentiated services PHBs mapped to by those codepoints
   MAY have additional specifications.

   No attempt is made to maintain backwards compatibility with the "DTR"
   or TOS bits of the IPv4 TOS octet, as defined in [RFC791].

That last sentence is the clincher, since that's how NTP 4.2.2 currently tags
packets (using the obsolete DTR bits).

The fix that I've attached currently leaves the markings as they are, but to
bring a minimum of compliance to what the Internet uses, we really should
default the tagging to Class Selector 6 (cs6), i.e. 0xc0 (what netinet/ip.h

The fix for that would be:

 #if defined(HAVE_IPTOS_SUPPORT)
 /* set IP_TOS to minimize packet delay */
+# else
 int tos = IPTOS_LOWDELAY;
+# endif

which is eminently reasonable, since there is no universally agreed upon DSCP
(differentiated services code point) value for NTP at this time.

I note also that this is the current value that Cisco IOS routers use, and they
are largely QoS-aware.

More information about the questions mailing list