Truncation Bit

Kevin Darcy kcd at daimlerchrysler.com
Thu Aug 3 22:50:38 UTC 2000


DNS UDP packets are arbitrarily limited to 512 bytes. The reason you're seeing
responses larger than 512 bytes is because smart resolvers (like dig) will, by
default, automatically retry truncated queries with TCP. Use a "+i" (ignore
truncation errors) on your dig command line to inhibit this behavior.


- Kevin

P.S. I'm only getting about 700 bytes in response to that query. How did you
get 2250?

Mark wrote:

> Does anyone know how to get the truncation bit set in a dns response packet?
>
> I am assuming if the response from a nameserver won't fit into a single udp
> packet the truncation bit will be set in the Header of the response packet.
> Ideally this shouldn't happen too often but I would think you would see it
> from time to time. I have looked in the headers a lot of responses and I
> have never seen this bit set.
>
> If the maximum size of an IPv4 datagram is 65535 bytes it seems to me my udp
> payload can be of size
>                   udp payload + udp header + ip header = 65535 bytes or less
>
> digs such as
> $ dig  @ns2.altavista.com. ANY altavista.com
>
> produce quite a long response packet but even this is only 2250 bytes. This
> doesn't come close to exceeding the size limit.  It seems to me this feature
> is unnecessary since the size limit will never reached. Any insights
> appreciated.
>
> Regards,
>
> Mark






More information about the bind-users mailing list