Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DNS UDP or TCP?

61 views
Skip to first unread message

Kevin Darcy

unread,
Sep 26, 2001, 8:08:58 PM9/26/01
to

Chris Parker wrote:

> Are DNS queries UDP or TCP?

Yes :-)

Seriously, they can be either UDP or TCP, although in practice most
queries are UDP. You should be prepared to deal with both protocols.


- Kevin

Brad Knowles

unread,
Sep 26, 2001, 8:08:58 PM9/26/01
to

At 4:32 PM -0700 9/26/01, Chris Parker wrote:

> 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).

--
Brad Knowles, <brad.k...@skynet.be>

H4sICIFgXzsCA2RtYS1zaWcAPVHLbsMwDDvXX0H0kkvbfxiwVw8FCmzAzqqj1F4dy7CdBfn7
Kc6wmyGRFEnvvxiWQoCvqI7RSWTcfGXQNqCUAnfIU+AT8OZ/GCNjRVlH0bKpguJkxiITZqes
MxwpSucyDJzXxQEUe/ihgXqJXUXwD9ajB6NHonLmNrUSK9nacHQnH097szO74xFXqtlbT3il
wMsBz5cnfCR5cEmci0Rj9u/jqBbPeES1I4PeFBXPUIT1XDSOuutFXylzrQvGyboWstCoQZyP
dxX4dLx0eauFe1x9puhoi0Ao1omEJo+BZ6XLVNaVpWiKekxN0VK2VMpmAy+Bk7ZV4SO+p1L/
uErNRS/qH2iFU+iNOtbcmVt9N16lfF7tLv9FXNj8AiyNcOi1AQAA


Cricket Liu

unread,
Sep 26, 2001, 8:11:34 PM9/26/01
to

> Are DNS queries UDP or TCP?

Mostly UDP, but occasionally TCP.

cricket

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


Cricket Liu

unread,
Sep 26, 2001, 8:15:41 PM9/26/01
to

> > 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.

0 new messages