RRSet size limitation lower than predicted by RDLENGTH field size

Chris Thompson cet1 at hermes.cam.ac.uk
Mon Apr 21 11:48:50 UTC 2008


On Apr 20 2008, Tom Byrnes wrote:

>I've done some more digging and I have figured at least one reason
>why the responses would be in the 4K range: the TCP message length 
>part before the DNS message header.
>
>That specifies the length of the TCP message excluding it's 2 bytes,
>which limits the entire message to 65535 bytes. 
>
>With a message header of 12 bytes, and 14 bytes for each RR, the 
>total number of A records that can be returned in 65535 bytes is 
>around 4600.

While counting 14 bytes per RR you are still forgetting the owner
name that appears in every RR. Even with maximal compression ("this
name is exactly the same as this other name already in the packet"
... and of course that will be true for almost all of your mammoth
RRset) that's an extra 2 bytes. Hence the 4096 (less a few).

Of course, it's really not a good idea to operate anywhere near
these limits.

-- 
Chris Thompson
Email: cet1 at cam.ac.uk



More information about the bind-users mailing list