Back to the 2025 paper

Module 4: Transport Layer & Congestion Control

20257m

Compare TCP and UDP. When is each used?

Worked SolutionAI Assisted

TCP vs UDP

Basis TCP UDP
Full form Transmission Control Protocol User Datagram Protocol
Connection Connection-oriented (3-way handshake) Connectionless
Reliability Reliable: ACKs, retransmission, ordering Unreliable: no ACK, no ordering
Flow and congestion control Yes (sliding window, congestion control) No
Header size 20-60 bytes 8 bytes
Speed Slower, more overhead Faster, low overhead
Data unit Byte stream (segments) Datagrams (message boundaries kept)
Communication Point-to-point only Unicast, multicast and broadcast

When each is used

TCP: when reliable, ordered delivery matters.

  • Web browsing (HTTP/HTTPS), email (SMTP, IMAP), file transfer (FTP), remote login (SSH, TELNET)

UDP: when speed and low latency matter more than perfect delivery, or for short request-response messages.

  • DNS queries, DHCP, streaming video/audio, VoIP, online gaming, SNMP, TFTP

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.