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 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 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.
2) UDP is not reliable, but reliability can added on 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.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Full form of FPS
- Internet Relay Chat (IRC)
- Types of Transmission Technology
- Difference between Thunderbolt 2 and Thunderbolt 3
- Difference between Yandex Disk and MiMedia
- Difference between Tencent Weiyun and MiMedia
- Difference between TitanFile and MiMedia
- Difference between Tresorit and MiMedia
- Difference between Wasabi and MiMedia
- Difference between ShareFile and MiMedia
- Credit Card Frauds
- Difference between Wasabi and Wuala
- AFP Fullform
- Difference between 1-Persistent and p-Persistent CSMA
- Difference between 1-Persistent and Non-Persistent CSMA
Improved By : Qu Dongfang