User Datagram Protocol is Internet standard defined by RFC 768. It meant to be used over IP as a simple connectionless (stateless) protocol. It only provides data integrity via checksums and ports to connect to a specific socket. No guarantee of delivery, order or duplicates. Therefore, it is unreliable but has minimum overhead, suitable for broadcasts and multicasts.
Source Port (16 bits) | Destination Port (16 bits) | Length (!6 bits) | Checksum (16 bits) |
IANA defines 3 groups of ports:
Checksum is optional in IPv4 and mandatory in IPv6. When used in IPv4, it uses pseudo-header: source and destination IP addresses, UDP protocol number 0x11 prepended with 8 zeros, UDP length, which includes UDP real header and payload. In IPv6 it also uses pseudo-header but slightly different.
Some examples of applications utilizing UDP protocol: DNS, SNMP, DHCP, RIP, VoIP, TFTP, NTP, NFS, RPC.