User Datagram Protocol

The User Datagram Protocol, UDP briefly to German user data segment protocol is a minimal connectionless network protocol which belongs to the transport layer of the Internet protocol family. The task of UDP is to allow data to be transmitted over the Internet to the correct application.

The development of UDP began in 1977, when a simpler protocol is needed for the transmission of voice than the existing connection-oriented TCP. There was a protocol required that was only responsible for addressing, without backing up the data transfer, as this would lead to delays in voice transmission.

Operation

To view the data sent with UDP to send the correct program on the target computer, which uses UDP so-called ports. These UDP port number of the service is also sent, who should receive the data. This extension of the host-to- host to a process - to-process communication is referred to as a multiplexing and demultiplexing application.

In addition, UDP offers the possibility of an integrity check by a checksum is transmitted. Thus, a faulty transmission can be detected.

Properties

UDP is a connectionless, non- reliable and unsecured as well as unprotected transmission protocol. This means there is no guarantee that once a packet sent also arrives that packets arrive in the same order in which they were sent, or that a packet arrives at the receiver only once. There is also no guarantee that the data arrives uncorrupted or inaccessible to third parties at the receiver. An application that uses UDP and therefore must be sensitive to lost packets and unsorted or even provide for appropriate corrective action and possibly also security measures. A privacy is not possible with this open communication.

Since before starting transmission not only a connection must be established, one partner may or may begin quickly with the data exchange both partners. The falls mainly in applications to the weight, in which only small amounts of data need to be replaced. Simple question-answer protocols such as the Domain Name System use UDP to keep the network load low and thus to increase the data throughput. A three -way handshake as in the Transmission Control Protocol for establishing the connection would create unnecessary overhead.

In addition, the unsecured transmission also offers the advantage of low transmission delay variations: Go for a TCP connection, a packet is lost, it will automatically be requested again. This takes time, transmission time may vary, therefore, what is bad for multimedia applications. With VoIP, for example, there would be a sudden drop outs, and the playout buffer should be created greater. With connectionless communications services bringing lost packets, however, not the entire transmission to a halt, but only reduce the quality.

The maximum size of a UDP datagram is 65,535 bytes, since the Length field of the UDP header is 16 bits long and the largest representable 16-bit number is even 65,535. Such large segments are fragmented, however, transfer of IP.

Deletes IP packets about regarding transmission errors or in case of overload. Datagrams can therefore be missing. UDP does not distribute detection or correction mechanisms, such as TCP. In the case of several possible routes to the destination IP can choose if required new ways. Thus it is possible in rare cases that data later sent to overtake previously sent. Moreover, once abgesendetes data packet several times to arrive at the receiver.

UDP datagram

In addition to the data to be transmitted further information is broadcast, are always located at the beginning of a UDP message, the so-called header. The UDP header consists of four data fields, which are all 16 bits wide:

Pseudo Header

For the transmission of the UDP packet, the Internet Protocol ( IP ) is provided. This protocol sets before the UDP packet, in turn, another header, which contains the required IP data:

For the generation of the UDP checksum parts are taken by this IP header in a so-called "pseudo - header ." It only serves to create the checksum and is not transmitted.

IPv4

The pseudo header has in IPv4 size of 12 octets (96 bits) and is made up of source IP address (32 bits) Destination IP Address (32 bits), 8 bit empty field, 8-bit protocol ID (UDP has the ID 17), and the length of the UDP datagram (16 bit):

IPv6

In the IPv6 pseudo header has a size of 40 octets (320 bits). He is in this case composed as follows:

Calculate the checksum

The calculation of the checksum at the sender according to the following algorithm:

The receiver first checks if the checksum of the received packet is all zeros. If so, he can receive the package as correct values, since no checksum is present. If not, they shall apply the above algorithm to the received packet and the associated pseudo - header, omits the last step and adds the self-calculated checksum on the received in the checksum field, which corresponds to the one's complement subtraction. The receiver receives 0 as the result of the addition (or subtraction), it evaluates the received data and the sent coincident.

UDP -Lite

The Lightweight User Datagram Protocol (UDP - Lite) according to RFC 3828 is a variation of UDP, especially for the transmission of data in which demand low delay, small errors but can be tolerated. That's about live audio and video transmissions of the case which often use UDP as the transport protocol. Is a bit in a UDP data packet errors, then all data of the packet, i.e., up to several thousand bits discarded. If the packet with the faulty bit is used, however, would be the error, depending on the codec, inaudible or invisible.

UDP -Lite is compatible with UDP, however, interprets the length field as the length over which the checksum is computed ( checksum coverage ). A normal UDP packet is thus also a UDP - Lite package. The length of a UDP or UDP -Lite packet can be calculated using the information from the Internet Protocol layer, the IP length is the sum of the IP header size and UDP packet size.

If, for UDP -Lite has a greater length of the IP header as in the length field of the UDP ( - Lite) header, the packet contains additional unaudited data. A length field of eight means for example that the checksum is calculated only over the header. A value of zero, the checksum is computed over the entire packet. The values ​​1, ..., 7, are not allowed, i.e., the UDP-Lite header is always included in the checksum. The limitation of the maximum packet size of UDP ( 65,535 bytes ) is omitted. The checksum can be calculated in this case either on the whole package or at most the first 65,535 bytes.

When using UDP -Lite checking in the lower layers also should be suppressed ( only possible for UDP -Lite packets), such as the CRC check of Ethernet packets.

Specifications

  • RFC 768 User Datagram Protocol
  • RFC 3828 The Lightweight User Datagram Protocol (UDP - Lite)
512937
de