UDP, User Datagram Protocol

Description Glossary RFCs Publications Obsolete RFCs

Description:

Protocol suite: TCP/IP.
Protocol type:Connectionless transport layer protocol.
IP Protocol:17.
Ports:
Related protocols: UDP-Lite, Lightweight User Datagram Protocol.
SNMP MIBs: iso.org.dod.internet.mgmt.mib-2.udp (1.3.6.1.2.1.7).
iso.org.dod.internet.mgmt.mib-2.udpMIB (1.3.6.1.2.1.50).
iso.org.dod.internet.experimental.ipv6UdpMIB (1.3.6.1.3.87).
Working groups:
Links:

RFC 1122, section 4.1:

The User Datagram Protocol offers only a minimal transport service -- non-guaranteed datagram delivery -- and gives applications direct access to the datagram service of the IP layer. UDP is used by applications that do not require the level of service of TCP or that wish to use communications services (e.g., multicast or broadcast delivery) not available from TCP.

UDP is almost a null protocol; the only services it provides over IP are checksumming of data and multiplexing by port number. Therefore, an application program running over UDP must deal directly with end-to-end communication problems that a connection-oriented protocol would have handled -- e.g., retransmission for reliable delivery, packetization and reassembly, flow control, congestion avoidance, etc., when these are required. The fairly complex coupling between IP and TCP will be mirrored in the coupling between UDP and many applications using UDP.


MAC header IP header UDP header Data :::

UDP header:

0001020304050607 0809101112131415 1617181920212223 2425262728293031
Source Port Destination Port
Length Checksum
Data :::

Source Port. 16 bits.
The port number of the sender. Cleared to zero if not used.

Destination Port. 16 bits.
The port this packet is addressed to.

Length. 16 bits.
The length in bytes of the UDP header and the encapsulated data. The minimum value for this field is 8.

Checksum. 16 bits.
Computed as the 16-bit one's complement of the one's complement sum of a pseudo header of information from the IP header, the UDP header, and the data, padded as needed with zero bytes at the end to make a multiple of two bytes. If the checksum is cleared to zero, then checksuming is disabled. If the computed checksum is zero, then this field must be set to 0xFFFF.

When transported by IPv4, the pseudo header contains the following fields:

0001020304050607 0809101112131415 1617181920212223 2425262728293031
Source IPv4 address
Destination IPv4 address
0 Protocol Total length

The checksum is not optional when transported by IPv6. In this case, the pseudo header contains the following fields:

0001020304050607 0809101112131415 1617181920212223 2425262728293031
Source IPv6 address :::
Destination IPv6 address :::
Upper layer packet length
0 Next header

Data. Variable length.


Glossary:


RFCs:

[IEN 88] User Datagram Protocol.

[RFC 768] User Datagram Protocol.

[RFC 1122] Requirements for Internet Hosts -- Communication Layers.

[RFC 1156] Management Information Base for Network Management of TCP/IP-based internets.

[RFC 1180] A TCP/IP Tutorial.

[RFC 1213] Management Information Base for Network Management of TCP/IP-based internets: MIB-II.

[RFC 1240] OSI Connectionless Transport Services on top of UDP Version: 1.

[RFC 1347] TCP and UDP with Bigger Addresses (TUBA), A Simple Proposal for Internet Addressing and Routing.

[RFC 1475] TP/IX: The Next Internet.

[RFC 1705] Six Virtual Inches to the Left: The Problem with IPng.

[RFC 1791] TCP And UDP Over IPX Networks With Fixed Path MTU.

[RFC 1812] Requirements for IP Version 4 Routers.

[RFC 2460] Internet Protocol, Version 6 (IPv6) Specification.

[RFC 2507] IP Header Compression.

[RFC 2508] Compressing IP/UDP/RTP Headers for Low-Speed Serial Links.

[RFC 2556] OSI connectionless transport services on top of UDP Applicability Statement for Historic Status.

[RFC 2675] IPv6 Jumbograms.

[RFC 2780] IANA Allocation Guidelines For Values In the Internet Protocol and Related Headers.

[RFC 3095] RObust Header Compression (ROHC): Framework and four profiles: RTP, UDP, ESP, and uncompressed.

[RFC 3545] Enhanced Compressed RTP (CRTP) for Links with High Delay, Packet Loss and Reordering.

[RFC 4113] Management Information Base for the User Datagram Protocol (UDP).

[RFC 5405] Unicast UDP Usage Guidelines for Application Designers.


Publications:


Obsolete RFCs:

[RFC 1066] Management Information Base for Network Management of TCP/IP-based internets.

[RFC 2013] SNMPv2 Management Information Base for the User Datagram Protocol using SMIv2.

[RFC 2147] TCP and UDP over IPv6 Jumbograms.

[RFC 2454] IP Version 6 Management Information Base for the User Datagram Protocol.


Description Glossary RFCs Publications Obsolete RFCs