DNS UDP or TCP?

Barry Margolin barmar at genuity.net
Thu Sep 27 00:11:09 UTC 2001


In article <9otpp9$3li at pub3.rc.vix.com>,
Chris Parker  <chrisp2 at pacbus.com> wrote:
>Are DNS queries UDP or TCP?

Yes. :)

Normally, ordinary queries use UDP, and zone transfers use TCP.

However, DNS limits UDP queries and responses to about 500 bytes.  If a
response would be larger than that, the server sends back up to 500 bytes
and sets the "truncated" flag.  The client is then supposed to perform the
same query again using TCP, which is almost unlimited in the size of
response it can send (the limit is typically only exceeded by web hosting
organizations that feel the need to create a PTR record for every A record,
and they have thousands of names pointing to the same address).

-- 
Barry Margolin, barmar at genuity.net
Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.


More information about the bind-users mailing list