Subject: Some observations on dns-0x20

From: "George Barwood" <[email-masked]>
Date: Tue, 19 Aug 2008 21:41:16 +0100

I have been experimenting with the technique described ( Google for GbDns if interested ), and have a few observations.

(1) A simple way of dealing with case sensitivity when parsing a string in a DNS requests is to preserve case if and only if the section is the Question section.

For other sections I believe that simply reducing to lower case will not cause any problems, at least in a recursive context, and is the simplest and best solution.

(2)  When checking a response, a good model is to estimate the number of bits of entropy (random bits) that have been retained from the original request ( I will refer to this as the Confidence value ).

The port number entropy should be discounted if the program may be behind a NAT device, unless it is known that the device preserves port randomization. I think this might be mentioned somewhere in the standard.

If unusual responses are detected ( for example incorrect IP, Question not copied, Question case not preserved ), the response need not be entirely ignored, rather a suitable discount can be applied in the entropy computation.

(3) A possible implementation technique is to maintain a Confidence field for each cache entry.
When processing a response, the Confidence value computed in (2) can be added in when an exactly matching cache element ( normally with expired TTL ) is found.

A valid cache entry is thus one which has valid TTL and valid Confidence value ( say 50 bits ).

The resolver loop can iterate until either a valid cache entry is found, or an iteration occurs in which the cache is not updated ( this includes updates to TTL or Confidence values ).

Non-existence and error conditions can also be cached, with confidence values.

Lastly, I would like to say that I strongly support dns-0x20, and have communicated a couple of suggested changes privately to Paul, which he has graciously agreed to make, viz.

(a) In section 7.4, to drop the words "by a factor of "several".
(b) In section 5.2 to change "MUST" to "SHOULD".

George Barwood