Computer Networks

Transport Layer Protocols: TCP vs. UDP

Feb 14, 20268 min read
Back to All Strategy Articles
Subject:Computer Networks
Transport Layer Protocols: TCP vs. UDP
Official Exam Syllabus Alignment
Target Exam: Gujarat Police Wireless PSI (WPSI) Technical Paper 2 & GPSC AE
Syllabus Module: Unit 3: Transport Layer Protocols (TCP/IP Architecture)
Topic Weightage: 8–10 Marks
Preparation Focus: Handshake Sequencing, Header Bit Formats & Port Mappings

At Layer 4 (Transport Layer) of the OSI model, TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) govern how data segments are formatted, delivered, and acknowledged between host application sockets.

1. Key Architectural Differences: TCP vs UDP

Characteristic TCP (Transmission Control Protocol) UDP (User Datagram Protocol)
Connection Model Connection-Oriented (Three-Way Handshake) Connectionless (Fire-and-forget datagrams)
Reliability Guaranteed delivery using ACK and retransmission (PAR) Unreliable; best-effort delivery without ACK
Header Size 20 to 60 bytes (variable with options) 8 bytes (Fixed)
Flow & Congestion Control Yes (Sliding Window, Slow Start, Congestion Avoidance) No flow control; no congestion mechanisms
Transmission Speed Slower due to handshake, ordering, and ACK overhead Extremely fast; minimal latency
Common Applications HTTP (80), HTTPS (443), FTP (20/21), SMTP (25), SSH (22) DNS (53), DHCP (67/68), TFTP (69), SNMP (161), VoIP, Video Streaming

2. The Three-Way Handshake (Connection Establishment)

Before any data payload can be exchanged across a TCP connection, the client and server synchronize their Initial Sequence Numbers (ISNs):

  1. SYN: Client sends a SYN segment to the server with a random initial sequence number $ISN_C$. (Flag: SYN=1, ACK=0).
  2. SYN-ACK: Server acknowledges by sending an ACK segment with $Acknowledgment Number = ISN_C + 1$ and its own sequence number $ISN_S$. (Flags: SYN=1, ACK=1).
  3. ACK: Client sends final confirmation with $Acknowledgment Number = ISN_S + 1$. Connection is now established (ESTABLISHED state).

High-Yield Practice Questions & Worked Examples

Test your understanding with these exam-standard questions specifically calibrated for the syllabus pattern:

Exam Practice MCQ 1 Target Syllabus Drill

Q: What is the exact fixed size of the User Datagram Protocol (UDP) header?

  • (A) 16 bytes
  • (B) 20 bytes
  • (C) 8 bytes
  • (D) 32 bytes

✓ Correct Answer: (C) 8 bytes

Detailed Explanation: A UDP header consists of exactly four 2-byte fields: Source Port (16 bits), Destination Port (16 bits), Length (16 bits), and Checksum (16 bits) = 8 bytes total.

Exam Practice MCQ 2 Target Syllabus Drill

Q: During the TCP Three-Way Handshake, which control flags are set in the segment transmitted from the server back to the client?

  • (A) SYN only
  • (B) ACK only
  • (C) SYN and ACK
  • (D) FIN and ACK

✓ Correct Answer: (C) SYN and ACK

Detailed Explanation: The server simultaneously acknowledges the client's connection attempt (ACK=1) while synchronizing its own initial sequence number (SYN=1).

Sharpen Your Exam Readiness on Mcqprepzone

Mastering technical formulas and theoretical concepts is only step one. Solving timed mock tests under exact exam conditions improves speed, eliminates negative marking, and reveals your weak spots.

Frequently Asked Questions

What is the minimum header size difference between TCP and UDP?

TCP has a minimum header of 20 bytes (up to 60 bytes with options), whereas UDP has a fixed, lightweight header of only 8 bytes.

Does UDP provide any error checking mechanism?

Yes, UDP includes an optional 16-bit Checksum field to detect corrupted bits in the packet, though it does not retransmit corrupted packets.

Which protocols use UDP exclusively in network operations?

DNS (queries), DHCP, SNMP, TFTP, VoIP (SIP/RTP), and NTP rely on UDP for high throughput and low overhead.

Related Strategy & Syllabus Articles

Strengthen your exam preparation across adjacent subjects

All Posts

Never Miss an Exam Update

Join 50,000+ aspirants receiving our weekly Gujarat Police & GPSC strategy emails.