Back to the 2019 paper

Module 4: Transport Layer & Congestion Control

20197m

Outline the difference between TCP and UDP.

Worked SolutionAI Assisted

Difference between TCP and UDP

Parameter TCP (Transmission Control Protocol) UDP (User Datagram Protocol)
Connection Connection-oriented (3-way handshake first) Connectionless — no setup/teardown
Reliability Reliable: ACKs, retransmission, sequencing Unreliable: best-effort delivery
Ordering Segments delivered in order using sequence numbers No ordering guarantee
Error/flow control Yes — checksum + retransmission, sliding-window flow control Only a checksum; no retransmission, no flow control
Congestion control Yes — slow start, congestion avoidance, fast recovery None
Header overhead 20 bytes minimum (up to 60 B with options) Fixed 8 bytes
Data unit Segment (byte stream, no message boundaries) Datagram (message-oriented, preserves boundaries)
Duplication Duplicates detected and discarded Possible duplicates passed to the app
Application HTTP, SMTP, FTP control, file transfer, web, e-mail — where accuracy matters DNS, DHCP, SNMP, streaming voice/video, VoIP, online games — where speed matters
Speed / latency Slower due to handshakes and ACK overhead Faster, low overhead
Broadcast/multicast Not supported Supported
Termination Graceful connection release (FIN) No termination concept

In brief: TCP trades speed for guaranteed, ordered, error-free delivery over a virtual connection; UDP is lightweight and fast, delivering datagrams with no guarantees — chosen when timeliness matters more than perfect accuracy (or when the application implements its own reliability).

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.