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
- Network Devices (Hub, Repeater, Bridge, Switch, Router and Gateways)
- Simple Mail Transfer Protocol (SMTP)
- DNS (Domain Name Server) | NetWorking.
- LZW (Lempel–Ziv–Welch) Compression technique
- How DHCP server dynamically assigns IP address to a host?
- Computer Network | EIGRP Configuration
- Computer Network | Open shortest path first (OSPF) protocol States
- Computer Network | Open shortest path first (OSPF) protocol fundamentals
- Computer Network | EIGRP fundamentals
- Digital Subscriber Line (DSL)