Back to the 2017 paper

Module 4: Transport Layer & Congestion Control

20177m

Explain the following terms: (b) User Datagram Protocol

Worked SolutionAI Assisted

User Datagram Protocol (UDP)

UDP (User Datagram Protocol) is a connectionless, unreliable transport-layer protocol of the TCP/IP suite that provides a minimal, low-overhead process-to-process communication service using datagrams.

UDP Header (only 8 bytes)

 0 16 31
+--------+--------+----------------+
| Source | Destination | |
| Port | Port | |
+--------+--------+----------------+
| Length | Checksum | |
+--------+--------+----------------+
  • Source/Destination Port (2 bytes each): process (socket) addressing / multiplexing.
  • Length (2 bytes): header + data (minimum 8).
  • Checksum (2 bytes): optional in IPv4 (mandatory in IPv6); covers UDP header, data and a pseudo-header (source & dest IP, protocol, UDP length).

Key characteristics

Feature Behaviour
Connection No connection setup — no handshake, no session state
Reliability None — no ACK, no retransmission, no ordering, duplicates possible
Flow control None; congestion control left to the application/upper layers
Error control Only an optional checksum; lost/corrupt datagrams are silently discarded
Segmentation Each message = one datagram (no byte stream, no fragmentation at transport layer)
Overhead 8 bytes (vs 20 for TCP) → fast, efficient
Delivery Best-effort; one-to-one (datagram socket) or one-to-many (broadcast/multicast)

Why UDP is still used

  • Real-time apps (VoIP, video streaming, online gaming) where timeliness matters more than perfect delivery — a late packet is useless anyway, and retransmitted data would add jitter.
  • Request–reply protocols with small exchanges (DNS, DHCP, SNMP, TFTP, RIP) where a 3-way handshake would cost more than the query itself.
  • Multicast/broadcast applications — TCP is strictly point-to-point.
  • Encapsulation of other protocols (tunnelling, e.g., IPsec NAT traversal, VXLAN).
  • Applications that need reliability add it themselves in the application layer, keeping the core protocol simple.

Summary: UDP is a thin layer over IP offering port-based multiplexing and an optional checksum with minimal delay and overhead — reliability, ordering and flow control are deliberately left to the application, trading correctness for speed.

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.