3 ms·
DNS was limited to 512 bytes for a long time. Not necessarily a strange decision at all.
by bluejekyll 10y ago
DNS was limited to 512 bytes for a long time. Not necessarily a strange decision at all.
- mjevans 10y agoIt's curious but IRC servers also seem to have that limit (for a total message payload size). I can't seem to track down a /reason/ for this common limit. Systems were a lot smaller back in the day, but 512 is fairly easy to hit and I'd honestly expect something in the range of 1-8 KB to be the actual limit.
- bluejekyll 10y agowell, DNS now supports EDNS, which if specified, allows for packets of up to max UDP packets sizes (though in practice this isn't larger than 4096). The larger a UDP packet, the more likely there will be fragmentation at each hop, thus increasing the risk of losing the packet in transit. To reduce this, staying under the MTU of the network is desirable, 1400-1500 bytes for most people. Though, b/c of jerks DDOSing systems, and reflection/amplification attacks, some DNS servers are requiring TCP for any packets larger than 512.
- xenophonf 10y agoIt's in the spec. From RFC 791, "Internet Protocol version 4", page 13 (https://tools.ietf.org/html/rfc791 https://tools.ietf.org/html/rfc791): Total Length is the length of the datagram, measured in octets, including internet header and data. This field allows the length of a datagram to be up to 65,535 octets. Such long datagrams are impractical for most hosts and networks. All hosts must be prepared to accept datagrams of up to 576 octets (whether they arrive whole or in fragments). It is recommended that hosts only send datagrams larger than 576 octets if they have assurance that the destination is prepared to accept the larger datagrams. The number 576 is selected to allow a reasonable sized data block to be transmitted in addition to the required header information. For example, this size allows a data block of 512 octets plus 64 header octets to fit in a datagram. The maximal internet header is 60 octets, and a typical internet header is 20 octets, allowing a margin for headers of higher level protocols. Note: That was published in 1981, when internetwork speeds were likely around 1 Mbps or lower.