rfc-768

User Datagram Protocol

J. Postel
date1980-08 streamLegacy statusINTERNET STANDARD pages3 canonicalhttps://www.rfc-editor.org/rfc/rfc768 doi10.17487/RFC0768

updated by

also

Extracted elements (15)

design-rationale §Fields

If the transmitted checksum value is all zeros, it means the transmitter generated no checksum, intended for debugging or use with higher-level protocols that don't need it. This distinguishes 'no checksum' from a computed checksum of zero.

udp, security

design-rationale §Fields

The pseudo header used in checksum computation includes the IP source address, destination address, protocol, and UDP length. This provides protection against misrouted datagrams by binding the UDP checksum to the IP-layer addressing.

udp, ip, security

design-rationale §Protocol Application

UDP is designed to provide a minimum-mechanism datagram service over IP for application programs. The Internet Name Server and Trivial File Transfer Protocol are cited as the primary intended applications.

udp, dns

design-rationale §Introduction

UDP is transaction oriented and does not guarantee delivery or duplicate protection. Applications requiring ordered reliable delivery of data streams should use TCP instead.

udp, tcp

interoperability-note §IP Interface

One valid UDP/IP interface returns the whole internet datagram including the full IP header in response to a receive operation, and allows UDP to pass a full internet datagram to IP for sending; IP then verifies fields and computes the internet header checksum.

udp, ip

interoperability-note §Fields

The UDP checksum procedure is the same as that used in TCP, enabling consistency in pseudo-header checksum computation across both transport protocols.

udp, tcp

normative-requirement §IP Interface MUST

The UDP module must be able to determine the source and destination internet addresses and the protocol field from the internet (IP) header.

udp, ip

protocol-element §User Interface

A user interface for UDP should support three operations: creation of new receive ports; receive operations returning data octets with source port and address indication; and a send operation specifying data, source/destination ports, and addresses.

udp

protocol-element §Fields

Checksum is the 16-bit one's complement of the one's complement sum of the pseudo header, UDP header, and data. If the computed checksum is zero, it is transmitted as all ones (the one's complement equivalent of zero).

udp, security

protocol-element §Fields

Destination Port is a 16-bit field whose meaning is defined within the context of a particular internet destination address.

udp

protocol-element §Fields

Length is a 16-bit field containing the length in octets of the UDP datagram including the header and data, giving a minimum value of eight (the header size alone).

udp

protocol-element §Fields

Source Port is an optional 16-bit field indicating the sending process's port; when not used, a value of zero is inserted. It may be assumed to be the reply address in the absence of other information.

udp

protocol-element §Protocol Number

UDP is assigned protocol number 17 (21 in octal) when used in the Internet Protocol.

udp, ip, registry

wire-format §Fields

The UDP checksum is computed over a pseudo header conceptually prefixed to the UDP header, containing source address (32 bits), destination address (32 bits), zero (8 bits), protocol (8 bits), and UDP length (16 bits), followed by the UDP header and data padded to a multiple of two octets.

udp, ip, security

wire-format §Format

The UDP header consists of four 16-bit fields: Source Port, Destination Port, Length, and Checksum, totaling 8 octets as the minimum datagram size. Data octets follow the header.

udp, ip