FazBrowse Wikipedia Viewer | Main Page |
Search Wikipedia:
|
Viewing: https://en.wikipedia.org/wiki/User_Datagram_Protocol

User Datagram Protocol

Contents
Attributes
Reliability and congestion control
Applications
Comparison of UDP and TCP
Standards

User Datagram Protocol
Protocol stack
AbbreviationUDP
DeveloperDavid P. Reed
Introduction1980;46 years ago (1980)
InfluencedQUIC, UDP-Lite
OSI layerTransport layer (4)
IP number17
RFCs768, 9868
Internet protocol suite
Application layer
Transport layer
Internet layer
Link layer

Attributes

edit

UDP is a simple message-oriented transport layer protocol that is documented in Source Port: 16 bits

This field identifies the sender's port, when used, and should be assumed to be the port to reply to if needed. If the source host is the client, the port number is likely to be an ephemeral port. If the source host is the server, the port number is likely to be a well-known port number from 0 to 1023.
"}},"i":0}}]}'>Destination Port: 16 bits
This field identifies the receiver's port and is required. Similar to the source port number, if the client is the destination host then the port number will likely be an ephemeral port number, and if the destination host is the server, then the port number will likely be a well-known port number.
{{cite book |last=Stevens |first=W. Richard |year=1994 |title=TCP/IP Illustrated: The protocols |volume=1 |edition=2 |publisher=Addison-Wesley |isbn=978-0-20-163346-7}}</ref>\n: Using IPv6 [[jumbogram]]s it is possible to have UDP datagrams of size greater than 65,535 bytes. The length field is set to zero if the length of the UDP header plus UDP data is greater than 65,535.{{Ref RFC|2675}}"}},"i":0}}]}'>Length: 16 bits
This field specifies the length of the UDP datagram (the header fields and Data field) in octets. The minimum length is 8 bytes, the length of the header. The field size sets a theoretical limit of 65,535 bytes (8-byte header + 65,527 bytes of data) for a UDP datagram. However, the actual limit for the data length, which is imposed by the underlying IPv4 protocol, is 65,507 bytes (65,535 bytes − 8-byte UDP header − 20-byte IP header).
Using IPv6 jumbograms it is possible to have UDP datagrams of size greater than 65,535 bytes. The length field is set to zero if the length of the UDP header plus UDP data is greater than 65,535.
RFC 768, and efficient calculation is discussed in Source Address: 32 bits
The source address from the IPv4 header.
Protocol: 8 bits
The protocol value for UDP: 17 (or 0x11).
UDP pseudo-header for checksum computation (IPv6)
Offset Octet 0 1 2 3
Octet Bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 0 Source address
4 32
8 64
12 96
16 128 Destination address
20 160
24 192
28 224
32 256 UDP length
36 288 Zeroes (0) Next Header (17)
40 320 Source port Destination port
44 352 Length Checksum
48 384 Data
52 416

The checksum is computed over the following fields:

UDP length: 32 bits
The length of the UDP header and data (measured in octets).
17.

Reliability and congestion control

edit

Lacking reliability, UDP applications may encounter some packet loss, reordering, errors or duplication. If using UDP, the end-user applications must provide any necessary handshaking, such as real-time confirmation that the message has been received. Certain applications (e.g., TFTP) may incorporate rudimentary reliability mechanisms at the application layer as required. For applications demanding a high degree of reliability, an alternative protocol such as the Transmission Control Protocol may be used instead.

Most often, UDP applications do not employ reliability mechanisms and may even be hindered by them. Streaming media, real-time multiplayer games and voice over IP (VoIP) are typical applications that leverage UDP. In these particular applications, loss of packets is not usually a fatal problem. In VoIP, for example, latency and jitter are the primary concerns. The use of TCP would cause jitter if any packets were lost, as TCP does not provide subsequent data to the application while it is requesting a re-send of the missing data.

Applications

edit

Numerous key Internet applications use UDP, including: the Domain Name System (DNS), the Simple Network Management Protocol (SNMP), the Routing Information Protocol (RIP) and the Dynamic Host Configuration Protocol (DHCP).

Voice and video traffic is generally transmitted using UDP. Real-time video and audio streaming protocols are designed to handle the occasional lost packets, so only slight degradation in quality occurs, compared to the large delays that would occur if lost packets were retransmitted. Because both TCP and UDP run over the same network, in the mid-2000s a few businesses found that an increase in UDP traffic from these real-time applications slightly hindered the performance of applications using TCP such as point of sale, accounting, and database systems (when TCP detects packet loss, it will throttle back its data rate usage).

Some VPN systems, such as OpenVPN, support operation over UDP and provide application-layer error checking as well as mechanisms to enhance transmission reliability. WireGuard uses UDP and performs error checking, but does not provide any reliability guarantees; reliability is delegated to upper-layer protocols within the tunnel or to end applications.

QUIC is a transport protocol built on top of UDP. QUIC provides a reliable and secure connection. HTTP/3 uses QUIC as opposed to earlier versions of HTTPS which use a combination of TCP and TLS to ensure reliability and security respectively. This means that HTTP/3 uses a single handshake to set up a connection, rather than having two separate handshakes for TCP and TLS, meaning the overall time to establish a connection is reduced.

Comparison of UDP and TCP

edit

Transmission Control Protocol is a connection-oriented protocol and requires handshaking to set up end-to-end communications. Once a connection is set up, user data may be sent bi-directionally over the connection.

User Datagram Protocol is a simpler message-based connectionless protocol. Connectionless protocols do not set up a dedicated end-to-end connection. Communication is achieved by transmitting information in one direction from source to destination without verifying the readiness or state of the receiver.

Standards

edit

View original on Wikipedia | Back | FazBrowse Home