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 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 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 timeout and resend at application layer.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above
- Computer Network | Address Resolution in DNS
- Computer Network | Dynamic Host Configuration Protocol (DHCP)
- How DHCP server dynamically assigns IP address to a host?
- LZW (Lempel–Ziv–Welch) Compression technique
- Deniel of Service and Prevention
- RSA Algorithm in Cryptography
- Simple Mail Transfer Protocol (SMTP)
- DNS (Domain Name Server) | NetWorking
- Computer Networks | Congestion Control
- What's difference between http:// and https:// ?
- What’s difference between HTML and HTTP ?
- Computer Network | Circuit Switching VS Packet Switching
- Computer Networks | IP Addressing | Question 5
- Network Devices (Hub, Repeater, Bridge, Switch, Router, Gateways and Brouter)
- Let's experiment with Networking