Why does DNS use UDP and not TCP? Last Updated : 13 Apr, 2023 Comments Improve Suggest changes 60 Likes Like Report DNS is an application layer protocol. All application layer protocols use one of the two transport layer protocols, UDP and TCP. TCP is reliable and UDP is not reliable. DNS is supposed to be reliable, but it uses UDP, why? There are the following interesting facts about TCP and UDP on the transport layer that justify the above. 1) UDP is much faster. TCP is slow as it requires a 3-way handshake. The load on DNS servers is also an important factor. DNS servers (since they use UDP) don't have to keep connections. 2) DNS requests are generally very small and fit well within UDP segments. 3) UDP is not reliable, but reliability can be added to the application layer. An application can use UDP and can be reliable by using a timeout and resend at the application layer. Actually, DNS primarily uses the User Datagram Protocol (UDP) on port number 53 to serve requests. DNS queries consist of a single UDP request from the client followed by a single UDP reply from the server. When the length of the answer exceeds 512 bytes and both client and server support EDNS, larger UDP packets are used. Otherwise, the query is sent again using the Transmission Control Protocol (TCP). TCP is also used for tasks such as zone transfers. Some resolver implementations use TCP for all queries. Another reason DNS uses UDP is because it is a connectionless protocol, meaning that it does not establish a dedicated end-to-end connection before sending data. This makes it more suitable for DNS queries, which are often short and require quick responses. In contrast, TCP is a connection-oriented protocol, meaning it requires a more complex process to establish a connection before data can be transmitted. Additionally, because DNS is a widely used protocol, there is a significant amount of traffic that needs to be handled by DNS servers. UDP is more scalable and efficient than TCP for handling large amounts of traffic, as it does not require the overhead of connection management.https://en.wikipedia.org/wiki/Domain_Name_System#DNS_protocol_transport Create Quiz Comment K kartik Follow 60 Improve K kartik Follow 60 Improve Article Tags : Computer Networks Explore Computer Network BasicsBasics of Computer Networking4 min readTypes of Computer Networks6 min readIntroduction to Internet5 min readNetwork Devices3 min readWhat is OSI Model? - Layers of OSI Model11 min readTCP/IP Model6 min readDifference Between OSI Model and TCP/IP Model2 min readPhysical LayerPhysical Layer in OSI Model3 min readTypes of Network Topology9 min readTransmission Modes in Computer Networks (Simplex, Half-Duplex and Full-Duplex)3 min readTransmission Media in Computer Networks7 min readData Link LayerData Link Layer in OSI Model4 min readSwitching | Computer Networks2 min readVirtual LAN (VLAN)3 min readFraming in Data Link Layer3 min readError Control in Data Link Layer3 min readFlow Control4 min readPiggybacking in Computer Networks2 min readNetwork LayerNetwork Layer in OSI Model3 min readIntroduction of Classful IP Addressing7 min readClassless Addressing in IP Addressing7 min readWhat is an IP Address?11 min readIPv4 Datagram Header4 min readDifference Between IPv4 and IPv63 min readPublic and Private IP addresses4 min readIntroduction To Subnetting5 min readWhat is Routing?10 min readNetwork Layer Protocols9 min readTransport LayerTransport Layer in OSI Model4 min readTransport Layer Protocols9 min readTransmission Control Protocol - TCP4 min readUser Datagram Protocol - UDP3 min readSession Layer & Presentation LayerSession Layer in OSI model2 min readPresentation Layer in OSI model2 min readSecure Socket Layer (SSL)4 min readPoint-to-Point Tunneling Protocol - PPTP2 min readMultipurpose Internet Mail Extension (MIME) Protocol3 min readApplication LayerApplication Layer in OSI Model4 min readClient-Server Model3 min readWorld Wide Web (WWW)6 min readIntroduction to Electronic Mail4 min readWhat is a Content Distribution Network and how does it work?4 min readProtocols in Application Layer4 min readAdvanced TopicsWhat is Network Security?7 min readQuality of Service and Multimedia5 min readAuthentication in Computer Network3 min readEncryption, Its Algorithms And Its Future6 min readIntroduction of Firewall in Computer Network3 min readMAC Filtering in Computer Network3 min readWi-Fi Standards Explained2 min readWhat is Bluetooth?6 min readGenerations of wireless communication2 min readCloud Networking4 min readPracticeTop 50 Plus Networking Interview Questions and Answers15+ min readTop 50 TCP/IP Interview Questions and Answers 202515+ min readNetwork Fundamentals Interview Questions - Computer Networks15+ min readLast Minute Notes for Computer Networks14 min readComputer Network - Cheat Sheet15+ min read Like