UDP (User Datagram Protocol)

UDP provides just the basic functions for delivering data segments between the appropriate applications, with very little overhead and data checking. UDP is known as a best-effort delivery protocol. UDP is preferable with applications, such as streaming audio, video, and Voice over IP (VoIP), Internet radio.

UDP is considered a best-effort transport protocol, described in RFC 768. UDP is a lightweight transport protocol.

Features:
  • Connectionless – UDP does not establish a connection between the hosts before data can be sent and received.
  • Unreliable Delivery – UDP does not provide services to ensure that the data will be delivered reliably. There are no processes within UDP to have the sender retransmit any data that is lost or is corrupted.
  • No Ordered Data Reconstruction – Occasionally data is received in a different order than it was sent. UDP does not provide any mechanism for reassembling the data in its original sequence. The data is simply delivered to the application in the order that it arrives. Therefore, UDP simply reassembles the data in the order that it was received and forwards it to the application. If the data sequence is important to the application, the application must identify the proper sequence and determine how the data should be processed.
  • No Flow Control – There are no mechanisms within UDP to control the amount of data transmitted by the source to avoid overwhelming the destination device. The source sends the data. If resources on the destination host become overtaxed, the destination host mostly likely drops data sent until resources become available.
  • UDP-based server applications are assigned well-known or registered port numbers. The UDP client process randomly selects a port number from the range of dynamic port numbers and uses this as the source port for the conversation.

Examples:

  • Tunneling/VPN (lost packets are ok – the tunneled protocol takes care of it)
  • Media streaming (lost frames are ok)
  • Local broadcast mechanisms.
  • VoIP
  • IPTV
  • Online games
  • IP telephony or Voice over IP (VoIP)
  • Trivial File Transfer Protocol (TFTP)
  • Routing Information Protocol (RIP)
  • Dynamic Host Configuration Protocol (DHCP)
  • Simple Network Management Protocol (SNMP)
  • Domain Name System (DNS)
Processes

1. Requests data from a server process.

2. The UDP client process randomly selects a port number from the range of dynamic port numbers and uses this as the source port for the conversation.

3. The destination port is usually the well-known or registered port number assigned to the server process.

4. The server response to the request from the client, for the data returning to the client from the server, the source and destination port numbers in the datagram header are reversed.