User Datagram Protocol : Architecture, Working & Its Applications

The User Datagram Protocol (UDP) in computer networking was developed in 1980 by David P. Reed. It is a standard protocol and is a part of the TCP/IP protocol over the internet. This protocol simply allows the applications of computers to transmit the messages in datagrams form from one computer to other over the IP (Internet Protocol) network. This UDP is an alternative communication protocol to the transmission control protocol. This protocol provides a set of rules like a TCP that rules how the information should be exchanged on the internet. This article discusses an overview of UDP or user datagram protocol – working with applications.

What is User Datagram Protocol?

The communication protocol which is used for establishing reliable as well as fewer latency connections between the internet applications is known as user datagram protocol or UDP. UDP protocol is particularly selected for time-sensitive based applications like playing videos, gaming, etc. This protocol speeds up the communication because it does not use more time in establishing a solid connection through the destination before transmitting the data.

UDP uses IP services to provide the best delivery mechanism. In this protocol, the receiver does not produce a packet acknowledgment received and sequentially, the sender does not remain for any transmitted packet acknowledgment. So this fault will make this protocol unreliable & easier on processing.


The features of the user datagram protocol include the following.

  • This is not a connection-oriented protocol.
  • The data delivery is not guaranteed.
  • This protocol is very simple & appropriate for inquiry-based communications.
  • It transmits the packets in bulk quantity.
  • A UDP datagram is utilized within DNS, NFS, TFTP, SNMP, etc.
  • This protocol is good for data flowing in a single direction.
  • It does not provide a congestion control mechanism.
  • It is appropriate for streaming applications like multimedia streaming, VoIP, etc.
  • No congestion or flow control, so the sender can overrun the buffer of the receiver.
  • It adds process-to-process addressing & checksum to IP.
  • It is used once the socket is opened within datagram mode.
  • For data transfer, a lock-step protocol is necessary with UDP.


The characteristics of user datagram protocol include the following.

  • This protocol is a variable as well as a connectionless type protocol.
  • It is nearly a Null Protocol.
  • This protocol is good when the data flow is in a single direction.
  • By using this protocol, no congestion control mechanism is provided.
  • This protocol provides minimum transport services.
  • UDP is a stateless protocol.
  • UDP datagrams use a similar path & arrive within the right order at the destination.
  • UDP applications are considered unreliable always.
  • UDP supplies data simply to the network once the destination is prepared to get the data.

User Datagram Protocol Architecture

The user datagram protocol packets are normally called User Datagram & the header size is fixed i.e 8 bytes. Let us discuss the user datagram format. The header of UDP includes four fields source port number, destination port number, total length, and checksum where each field is discussed below.

User Datagram Protocol Header Format
User Datagram Protocol Header Format
  • The source port number is 16-bit information that recognizes which port is going to transmit the packet.
  • The destination port number simply recognizes which port is going to allow the data which is a 16-bit data used for identifying application-level service over the destination machine.
  • Length is a 16-bit field that identifies the whole UDP packet length that comprises the header. So the minimum value would be 8-byte because the header size is 8 bytes.
  • The checksum is a 16-bit field, which verifies whether the data is correct or not because there is a chance that the data can be destroyed while transmission. So, the checksum is an optional field, so it mainly depends on the application, whether it needs to write the checksum or not.

If it does not desire to write the checksum, next all the 16 bits are left as  ‘0’. In this protocol, the checksum field is given to the whole packet that is, the header & data part but, the checksum field in IP is applied to the header field only.

How does User Datagram Protocol Works?

User datagram protocol utilizes IP to obtain a datagram from one PC to another. This protocol functions by collecting data within a UDP packet & including its own header data in the packet. So this data includes both the source as well as destination ports IP on which to converse, the packet length & a checksum. Once UDP packets are summarized within an IP packet, then they are sent off to their destinations.

Not like TCP, this protocol doesn’t connect directly to the receiving computer, so it doesn’t give the assurance in transmitting the packets to the correct destinations but it transmits the data out & depends on the devices among the transmitting & receiving computers to obtain the data correctly.

Most applications waits for any replies they suppose to get as a consequence of packets sent through UDP. So, if any application doesn’t get a reply at a particular time then again application transmits the packet or ends trying.

This protocol utilizes a simple transmission model that doesn’t contain handshaking dialogues for providing ordering, reliability, or integrity of data. As a result, this protocol’s service is irresponsible, so packets may appear out of order, come out to have duplicates, or vanish without warning.

Difference B/w TCP vs UDP

The difference between TCP and UDP includes the following.



TCP uses an established connection for transmitting data. UDP is a connectionless protocol.
This protocol is reliable. This protocol is not reliable.
It is capable of data sequencing. It is not capable of data sequencing.
It provides the mechanism for wide error checking. It has a basic error-checking mechanism with checksums.
Its speed is slower than UDP. Its speed is fast than TCP.
It does not support broadcasting. It supports broadcasting.
In this protocol, there is a possibility of retransmission of the lost packet. There is no possibility of lost packet retransmission.
It has a byte stream connection. It has a message stream connection.
It has 20 to 60 variable header lengths. It has a fixed header length of 8 bytes.
The weight of TCP is heavy. The weight of UCP is not heavy.
This protocol uses handshaking techniques like ACK, SYN, and SYN-ACK. It doesn’t use any handshaking techniques.
This protocol is used by FTP, SMTP, HTTP, & HTTPs. This protocol is used by DHCP, DNS, TFTP, RIP,  VoIP & SNMP.
Overhead is high as compared to UDP. Overhead is very low as compared to TCP.

Advantages and Disadvantages

The advantages of UDP include the following.

  • By using this protocol, the transmission of multicast and broadcast is possible.
  • UDP utilizes the bandwidth very efficiently because there is a tiny packet overhead.
  • UDP is very fast.
  • There is no buffering & numbering of packets.
  • There is no requirement for handshaking.
  • There is no congestion control thus it is utilized for real-time-based applications.
  • This protocol uses a checksum through all the packets for detecting errors.
  • This protocol can also be used in events wherever a single data packet needs to be exchanged between the hosts.

The disadvantages of UDP include the following.

  • UDP protocol is an unreliable & connectionless transport protocol.
  • This protocol does not utilize any error control. Therefore if this protocol detects any error within the received packet, then it drops it silently.
  • There is no congestion & flow control mechanism.
  • There is no guaranteed delivery.
  • The consumer datagram protocol suffers mostly from packet loss.
  • UDP causes loss of data.
  • Routers are somewhat careless by this protocol, thus they never retransmit it if it crashes.

Applications/Uses of User Datagram Protocol

The applications or uses of the User Datagram Protocol include the following.

  • UDP is used in time-sensitive applications & also by servers that respond to small queries from a bigger client base.
  • This is well-suited with packet broadcasts especially for transmitting all over the network.
  • It is also utilized within Voice over IP, online games & Domain Name Systems.
  • This protocol is used in network applications like voice, gaming & video communications.
  • These are used where lossless data transmission is required.
  • This protocol is utilized for multicasting as it simply supports packet switching.
  • UDP is used in applications that depend on reliable data exchange but should include their own techniques to respond to packets.
  • UDP is used wherever speed is critical rather than reliability.

Thus, this is all about an overview of user datagram protocol – architecture, working with applications. The different operations of the User Datagram protocol mainly include contactless services, flow & error control, encapsulation & decapsulation. The user datagram protocol examples are; online games, video conferencing, VoIP (voice over IP), and DNA ( domain name system). Here is a question for you, what are UDP ports?