Transport Layer Protocol

User Datagram Protocol

Connectionless, unreliable transport protocol providing fast, best-effort delivery for real-time applications. Essential knowledge for network engineering and communication systems design.

RFC 768
Port 0-65535
8-byte Header
Checksum Optional

Connectionless

No handshaking or connection establishment. Each datagram is independent, allowing minimal latency overhead—ideal for real-time streaming and gaming.

Unreliable Delivery

No acknowledgments, retransmissions, or sequencing guarantees. Applications must handle loss, duplication, and ordering if required.

Minimal Overhead

8-byte fixed header vs TCP's 20-60 bytes. Maximizes payload efficiency for high-throughput applications like video streaming and VoIP.

UDP Datagram Structure

Interactive breakdown of the 8-byte UDP header. Hover over fields to see detailed specifications.

UDP Header (64 bits)

RFC 768 Standard
Bits 0-15 Source Port
16 bits
0x1F90 (8080)
Bits 16-31 Destination Port
16 bits
0x0035 (53)
Bits 32-47 Length
16 bits
Header + Data (min 8 bytes)
Bits 48-63 Checksum
16 bits
Optional (0x0000 = disabled)
Payload Data 0-65,507 bytes
Application layer data (DNS queries, RTP packets, etc.)

Field Specifications

Source Port (16 bits)

  • • Identifies the sending application/process
  • • Range: 0-65535 (0-1023: Well-known ports)
  • • Optional: Set to 0 if not used (rare in practice)
  • • Example: 53 (DNS), 123 (NTP), 5060 (SIP)

Common Port Numbers

DNS53
DHCP67/68
TFTP69
NTP123
SNMP161
RTP5004
Syslog514
QUIC443

Bit-level Representation

Source Port
Dest Port
Length
Checksum

UDP Operation & Checksum

Transmission Process

1

Application Request

App passes data to UDP with destination IP and port.

2

Header Construction

UDP adds 8-byte header with source port, length, and checksum.

3

Pass to IP

Datagram handed to IP layer with protocol field = 17 (0x11).

4

Transmission

IP routes packet; no delivery guarantees from UDP.

UDP Checksum Pseudo-Header

Includes IP header fields for additional integrity verification:

Source IP Address32 bits
Destination IP Address32 bits
Zero + Protocol (17)16 bits
UDP Length16 bits
Note: Checksum optional in IPv4, mandatory in IPv6.

Checksum Calculator

UDP vs TCP Comparison

Feature UDP TCP
Connection Connectionless Connection-oriented (3-way handshake)
Reliability Best-effort, no guarantees Acks, retransmissions, sequencing
Ordering No ordering guarantees In-order delivery guaranteed
Header Size 8 bytes (fixed) 20-60 bytes (variable)
Speed Fast (low latency) Slower (congestion control)
Flow Control None Sliding window mechanism
Congestion Control None Slow start, congestion avoidance
Use Cases DNS, VoIP, Gaming, Streaming HTTP, FTP, Email, File Transfer

Real-World Applications

DNS

Domain Name System queries use UDP port 53 for fast lookups. Falls back to TCP for large responses (>512 bytes).

Port 53/UDP

VoIP & RTP

Real-time Transport Protocol carries voice/video over UDP. Tolerates packet loss better than delay.

Dynamic Ports/UDP

Online Gaming

Fast-paced games use UDP for position updates. Custom reliability layers built on top for critical data.

Game-specific/UDP

QUIC/HTTP3

Modern web protocol built on UDP. Combines speed with TLS encryption and multiplexed streams.

Port 443/UDP

Latency Comparison: UDP vs TCP

Interactive UDP Transmission Simulator

10%
100ms
Sender (Client)
Receiver (Server)
0
Sent
0
Received
0
Lost
Simulation ready. Press Start to begin...

Knowledge Checklist

Progress 0/6