Contents
Which protocol is used by DNS when response data size exceeds 512 bytes?
TCP
DNS uses UDP port 53 to connect to the server. TCP can also be used for response data size exceeding 512 bytes or for specific tasks such as zone transfers.
What is the maximum size a DNS packet can carry?
It is a common feature of several appliances to discard DNS packets over TCP, although this is clearly a bad practice and will possibly result in breaking DNS resolution. Your device does *NOT* limit DNS packets (either over TCP/UDP or port 53) to a maximum of 512 bytes.
Why does the length of DNS queries and responses vary?
The DNS Name field has no set length because it varies depending on the domain name length as we are going to see soon. For example, a query for www.cisco.com will require DNS Name field to be smaller than a query for support.novell.com simply because the second domain is longer.
Is DNS A TCP?
DNS uses TCP for Zone transfer and UDP for name, and queries either regular (primary) or reverse. UDP can be used to exchange small information whereas TCP must be used to exchange information larger than 512 bytes.
What is the maximum size of UDP packet?
The field size sets a theoretical limit of 65,535 bytes (8-byte header + 65,527 bytes of data) for a UDP datagram. However the actual limit for the data length, which is imposed by the underlying IPv4 protocol, is 65,507 bytes (65,535 bytes − 8-byte UDP header − 20-byte IP header).
Can a DNS packet contain both query and answer information?
The client/server information exchange in DNS is facilitated using query/response messaging. Both queries and responses have the same general format, containing up to five individual sections carrying information.
What’s the block size limit for a DNS query?
DNS operations for example, queries, and zone maintenance operations by default use port 53. For performance reasons, queries use the UDP protocol with a block-size limit of 512 bytes.
What happens if a UDP response is too big?
UDP does not fail over but for DNS specifically if the response is too large to fit when using UDP this will result in a truncated response (the actual response does not contain all the data and the ‘truncated’ flag is set to indicate this), the client can then retry using TCP instead.
Why do DNS packets have a 512 byte payload?
The 512 byte payload guarantees that DNS packets can be reassembled if fragmented in transit. Also, generally speaking there’s less chance of smaller packets being randomly dropped. The IPv4 standard specifies that every host must be able to reassemble packets of 576 bytes or less.
Why is there a 512 byte response size limit?
Historically, exceeding the 512-byte response size limit was typically avoided at all costs, and indeed the limit of 13 IPv4 root-servers was the maximum that could be returned in a single 512-byte UDP transaction. TCP offers several capabilities over UDP like retransmission to guarantee data is received.