When does DNS use TCP instead of UDP?
IntermediateConceptDNS
Answer
UDP/53 is the default for small queries and answers. TCP/53 is used when the response exceeds the size limit and is flagged truncated (TC bit), for zone transfers (AXFR/IXFR), and with DNSSEC or large TXT answers. EDNS0 raises the UDP size to about 1232 bytes to reduce truncation.
Firewalls that allow only 53/udp cause intermittent failures for large responses; allow both.
More on DNS
What does DNS do and what happens when you type a URL into a browser?BeginnerWhat are the common DNS record types?BeginnerWhat is the difference between a recursive resolver and an authoritative server?IntermediateExplain the DNS resolution chain step by step with dig.IntermediateWhat is TTL in DNS and how does it affect changes?BeginnerWhat is negative caching in DNS?Intermediate