What is UDP

W

User Datagram Protocol or UDP is a communication protocol for computers that belongs to the Transport Level of the standard OSI model. Together with Internet Protocol (IP), it makes it possible to deliver messages to a network. Unlike the TCP protocol, UDP is a non-connection communication module. It is similar to the postal system, meaning that packets of information (mail) are generally sent without acknowledgment of receipt in the hope that they will arrive without an effective link between the sender and the recipient. There are 2 important protocols in the transport layer, one on the connection and one on the other without a connection. They are complementary to one another. The one without connection is UDP mainly deals with the transmission of packets between applications.

UDP is a simpler protocol without a connection.
Protocols without a connection do not initiate a dedicated connection between the heads. Communication is done by transmitting information in one direction, without checking the status or availability of the handset.
However, a powerful advantage of UDP is speed and is exploited to the fullest for Voice over IP (VoIP) applications.

The features of UDP are as follows:
Unsure: when a message is sent, it is not known if it will reach its destination, it may be lost on the way. Confirmation, retransmission, or timeout concepts are not applied.
No order: if two messages are sent successively to the same receiver, one can not predict the order they will arrive at
Datagram-based operation: Packages are sent individually and are checked for integrity only if they arrive at the destination. Packages have well-defined borders.
There is no congestion control: UDP does not avoid congestion on its own, and high-speed applications may lead to jamming if congestion control methods are not implemented at the application level.
It is useful in client-server communication situations. Often, the client sends a short request to the server and waits for a quick surprise.
If either the response or the request is lost, the customer waits for a time-out and then tries again.
Besides the fact that programming is easier, few messages (one in each direction) are needed than with a protocol that requires an initial setting, like TCP.
An application that uses UDP in this way is DNS (Domain Name Server).
In short, a program that needs to look for an IP host’s IP address can send a UDP package that contains the hostname to a DNS server.
The server responds with a UDP package that contains the IP address of the host. No initial setup and subsequent release of the connection is required.
Video and audio traffic is generally transmitted using UDP. Audio streaming protocols have been designed to support possible packet loss, so there will only be a slight decrease in quality instead of some disturbing delays that would occur in the case of retransmission of lost packets.
The UDP header consists of 4 fields each with a length of 2 bytes.
1. Port source – In IPv4-based addressing this field is optional. If this field is not used, it is zero; when it is significant information, it will indicate the initiating port of the datagram transmission process.
2. The destination port – unlike the source port, the field is mandatory and indicates the port of reception
3. Length – This field indicates the length in bytes of the datagram: header plus data section (minimum length is 8).
4. Summary of control – ensures immunity to errors; is calculated as the complement of 1 (16-bit) pseudo-header with information extracted from IP header, UDP header, and data field, possibly filled with zeros to reach the set length.

About the author

Ilias spiros
By Ilias spiros

Recent Posts

Archives

Categories