DNS UDP or TCP?

Cricket Liu cricket at menandmice.com
Wed Sep 26 23:56:19 UTC 2001


> >  Are DNS queries UDP or TCP?
> 
> Depends.  By default, DNS queries use UDP, but if there is a 
> truncation in the response (i.e., it won't fit into a 512-byte UDP 
> packet), then the server is responsible for retrying the query using 
> TCP.  TCP is also used for zone transfers.  And for any particular 
> query, you can specify if you want to use TCP instead of UDP (for 
> whatever reason).

Actually, there are (or have been) some resolvers that use
TCP by default.  I think an older AIX resolver fell into this
category, as did the resolver on the HP1000.

But it's certainly true that the vast majority of DNS 
queries are UDP-based, and as Brad explained, fall back
to TCP only if the answer is truncated.

cricket

Men & Mice
DNS Software & Services
www.menandmice.com




More information about the bind-users mailing list