Max TXT Size Entry in DNS

Eric Wassenaar e07 at nikhefh.nikhef.nl
Fri Feb 4 14:20:25 UTC 2000


> Tristan> Is there a maximum size a TXT entry can be in DNS (using bind)

The amendment "using bind" is essential.

> The maxiumum length of a string in a  TXT record appears to be 255
> characters.

The rdata field of a TXT record may consist of multiple substrings,
each of which has a maximum of 255 characters.

As far as I'm aware, there is no RFC that restricts the size
of the rdata field of a resource record.

There may be practical limitations, however, such as the maximum size
of a single TCP packet.

> However there's an #ifdef in db_load.c (ALLOW_LONG_TXT_RDATA) which is
> switched on in 8.2.2P5. This allows for TXT records of up to MAXDATA -
> approx. 2Kbytes - to be loaded

The MAXDATA limit in BIND is rather arbitrary.
BIND restricts also the size of the answer buffer in TCP mode.
This may lead to truncated answers (which are not always handled
properly by applications).

There are alternative nameservers out there without such restrictions.
I have seen a TXT record of 17000 bytes :-)

-- Eric Wassenaar
-- 
Organization: Dutch National Institute for Nuclear and High-Energy Physics
Address: Kruislaan 409, P.O. Box 41882, 1009 DB Amsterdam, the Netherlands
Telephone: +31 20 592 5012, Home: +31 20 6909449, Telefax: +31 20 592 5155
Coordinates: Latitude: 52 21 24 N,  Longitude: 04 57 05 E,  Altitude: -4 m



More information about the bind-users mailing list