Suggest an editImprove this articleRefine the answer for “What protocol does DNS use?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**DNS mainly runs over UDP, but in some cases it uses TCP.** **Key point:** DNS is an application-layer protocol, and UDP and TCP are just the transport it uses - UDP for ordinary requests, TCP for large responses, DNSSEC, and zone transfers.Shown above the full answer for quick recall.Answer (EN)Image**DNS mainly runs over UDP, but in some cases it uses TCP.** In simpler terms: **ordinary DNS requests go over UDP, and TCP is used in special situations**. --- ## The main protocol: UDP ### Why DNS usually uses UDP By default DNS works over **UDP on port 53**, because: - requests and responses are **small** - no connection needs to be established - the answer arrives **quickly** - there is less overhead DNS is a short question and a short answer, so UDP is a perfect fit. --- ## When DNS uses TCP DNS switches to **TCP (also port 53)** in the following cases: ### 1. A large response size If the DNS response: - does not fit in a UDP packet - contains many records (for example, with DNSSEC) TCP is used. --- ### 2. DNS zone transfer When synchronizing DNS zones between servers: - primary -> secondary **TCP is always used**, because: - there is a lot of data - reliability matters --- ### 3. DNSSEC When DNSSEC is used: - responses become larger - TCP is needed more often --- ## Briefly, in a table | Situation | Protocol | |---|---| | Ordinary DNS request | UDP | | Large response | TCP | | Zone transfer (AXFR) | TCP | | DNSSEC | Often TCP | --- ## An important point for an interview *If DNS is an application-layer protocol, why UDP/TCP here?* The answer: - **DNS is an application-layer protocol** - **UDP and TCP are the transport** - DNS **uses transport protocols for delivery** --- ## Real-life example UDP is like: - asking a short question and getting an answer TCP is like: - sending a package of documents with delivery confirmation --- ## Short interview answer Remember this formulation: > **DNS mainly runs over UDP on port 53, while TCP is used for large responses, DNSSEC, and for zone transfers between servers.**For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.