User Datagram Protocol

From Wiki 2005
Jump to: navigation, search


The User Datagram Protocol (UDP) is one of the core protocols of the Internet protocol suite. Using UDP, programs on networked computers can send short messages known as datagrams to one another. UDP does not provide the reliability and ordering guarantees that TCP does; datagrams may arrive out of order or go missing without notice. However, as a result, UDP is faster and more efficient for many lightweight or time-sensitive purposes. Also its stateless nature is useful for servers that answer small queries from huge numbers of clients.

Common network applications that use UDP include the Domain Name System (DNS), streaming media applications, Voice over IP, Trivial File Transfer Protocol (TFTP), and online games.

Technical overview

User Datagram Protocol (UDP) is a minimal message-oriented transport layer protocol that is currently documented in IETF RFC 768.

In the TCP/IP model, UDP provides a very simple interface between a network layer below and an application layer above. UDP provides no guarantees for message delivery and a UDP sender retains no state on UDP messages once sent onto the network. (For this reason UDP is sometimes expanded to "Unreliable Datagram Protocol". Note that this is not its actual name. ) UDP adds only application multiplexing and transactive, header and data checksumming also found in a TCP header on top of an IP datagram. If any kind of reliability for the information transmited is needed, it must be implemented in upper layers.

+ Bits 0 - 15 16 - 31
0 Source Port Destination Port
32 Length Checksum

The UDP header consists of only 4 header fields of which two are optional. The source and destination port fields are 16-bit fields that identify the sending and receiving process. Since UDP is stateless and a UDP sender may not solicit replies, the source port is optional. If not used, the source port should be set to zero. The port fields are followed by a mandatory length field indicating the length in bytes of the UDP datagram including the data. The minimum value is 8 bytes. The remaining header field is a 16-bit checksum field covering the header and data. The checksum is also optional, but is almost always used in practice.

Lacking reliability, UDP applications must generally be willing to accept some loss, errors or duplication. Some applications such as TFTP may add rudimentary reliability mechanisms into the application layer as needed. Most often, UDP applications do not require reliability mechanisms and may even be hindered by them. Streaming media, real-time multiplayer games and voice over IP (VoIP) are examples of applications that often use UDP. If an application requires a high degree of reliability, a protocol such as the Transmission Control Protocol or erasure codes may be used instead.

Lacking any congestion avoidance and control mechanisms, network-based mechanisms are required to minimize potential congestion collapse effects of uncontrolled, high rate UDP traffic loads. In other words, since UDP senders cannot detect congestion, network-based elements such as routers using packet queueing and dropping techniques will often be the only tool available to slow down excessive UDP traffic. The Datagram Congestion Control Protocol (DCCP) is being designed as a partial solution to this potential problem by adding end host congestion control behavior to high-rate UDP streams such as streaming media.

While the total amount of UDP traffic found on a typical network is often on the order of only a few percent, numerous key applications use UDP, including the Domain Name System (DNS), the simple network management protocol (SNMP), the Dynamic Host Configuration Protocol (DHCP) and the Routing Information Protocol (RIP), to name just a few.

See also

External links

ca:UDP cs:UDP da:UDP de:User Datagram Protocol es:UDP eo:UDP fr:User Datagram Protocol gl:Protocolo UDP it:User Datagram Protocol he:UDP nl:User Datagram Protocol no:UDP ja:User Datagram Protocol pl:UDP (informatyka) pt:UDP (protocolo) ro:User Datagram Protocol ru:UDP sl:UDP sv:UDP tr:UDP zh:UDP

Personal tools