What is UDP?

Share

User Datagram Protocol (UDP) is a transport layer protocol that is used to create a connection between applications running on hosts that are connected via a network.

Main features

  • UDP provides a process to process communication. Port numbers are appended in the header of the packet to enable this.

  • There is no handshaking required before sending a message; hence, UDP is referred to as a connection-less protocol.

  • UDP is a best-effort delivery service – it does not transmit any lost or corrupt packets.

  • A packet (called a datagram in the case of UDP) contains a checksum field that is used to detect a corrupted datagram. However, it has relatively limited error detection abilities.

UDP is limited in the sense that it does not assemble the received packets in the correct order. Moreover, UDP does not prevent the sender from sending in more data than the receiver can handle and it does not include congestion control.

UDP datagram

The UDP datagram consists of a header and data. The following illustration goes over its structure:

A UDP datagram.
A UDP datagram.

Applications that use UDP

UDP is used in applications where packet loss is preferred over the latency of packet arrival. Such applications include:

  • Voice over IP (e.g., Skype)

  • Domain Name System (DNS)

  • Streaming videos online

Copyright ©2024 Educative, Inc. All rights reserved