What is UDP?
User Datagram Protocol or UDP is part of the Internet Protocol suite, using which, programs running on different computers on a network can send short messages known as Datagrams to one another. UDP can be used in networks where TCP is traditionally used, but unlike TCP, it does not guarantee reliability or the right sequencing of data. Datagrams may go missing without notice, or arrive in a different order from the one in which they were sent.
Though these factors might seem to suggest that UDP is not a useful protocol, it still finds good use in particular areas where speed, more than reliability, is of utmost importance. Since UDP does not have the overhead of checking whether the data has reached the destination every time it is sent, it makes the protocol that much faster and more efficient. UDP is often used for time-sensitive applications where missing data is preferred to late-arriving data.
UDP is a stateless protocol which is useful for servers engaged in answering short queries from a large number of clients. While TCP is mainly used for communication between a server and a single client, UDP is used for packet broadcast or multicasting whereby the data is sent to all the clients in the network.
Since UDP lacks any kind of mechanism to control or avoid network congestion, other forms of network-based control mechanisms need to be implemented to ensure smooth flow of traffic in a UDP network. One of the solutions being designed to tackle this problem is DCCP or Datagram Congestion Control Protocol which is aimed at monitoring and controlling traffic congestion in a UDP network.
A typical IP network consists of five layers:
1. The Physical Layer consisting of the actual channel for data flow like coaxial, twisted pair or fiber optic cables
2. The Data Link Layer implementing Wi-Fi, ISDN, GPRS etc
3. The Network / Internet Layer
4. Transport Layer implementing TCP, UDP etc
5. Application Layer running DNS, FTP, HTTP, POP3, SMTP, Telnet etc
As shown above, UDP belongs to the fourth layer. Although the entire amount of UDP traffic in a network is a small fraction of the whole, a number of key application in the fifth layer like DNS and SNMP or simple network management protocol use UDP.