[ih] Why UDP/DNS limited to 512 exactly?

Joe Abley jabley at hopcount.ca
Tue May 25 07:48:31 PDT 2010


On 2010-05-24, at 20:27, John Kristoff wrote:

> I'm curious what the reason was for the specific limit of 512 bytes
> for a UDP/DNS message.
> 
> Was it a convenient value that fell on a word boundary and close
> enough to the 576 IP datagram limit?

By some freak of chance I looked this up earlier this week as part of a document I was scratching together to describe the interaction between fragmentation and DNS responses. I didn't come up with a good reference. I would also be interested in where that specific number came from.

However, in the absence of any better theory I had assumed it was just...

> I would note in theory you could end up with a 512 byte DNS message
> that wouldn't fit into a 576 byte datagram (after adding 8 bytes for
> UDP and 60 bytes for a maximum IPv4 header with a full set of options).

... a safe bet given that it's rare for any IPv4 datagram to carry a full set of options (or, really, any at all), 512 + 8 + 20 = 540.


Joe



More information about the Internet-history mailing list