Why does DNS use UDP as the transport layer protocol?

Why does DNS use UDP as the transport layer protocol?

+8
udp dns protocols tcp
source share
3 answers
  • UDP is much faster. TCP is slow because it requires a three-way handshake. The load on DNS servers is also an important factor. DNS servers (because they use UDP) do not support connections.
  • DNS queries are usually very small and fit well into UDP segments.
  • UDP is not reliable, but reliability can be added at the application level. An application can use UDP and can be reliable using a timeout and resubmission at the application level.
+6
source share

UDP cheap. UDP alone is not reliable, but higher level protocols - like DNS - can support reliability, for example. repeating the UDP datagram if there is no response.

But the latter does not apply to DNS . DNS itself sometimes uses, in addition to UDP (as the main protocol), a reliable transmission control protocol ( TCP ).

The latter is used when the size of the response data exceeds 512 bytes and for tasks requiring reliable delivery (for example, zone transfer).

In addition, there are some resolver implementations that use TCP for all requests.

+4
source share

From Kurose and Ross Computer Network - A Top-Down Approach Book 6th Edition p. 199.

enter image description here

enter image description here

enter image description here

enter image description here

+1
source share

All Articles