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):
- SYN: Client sends a SYN segment to the server with a random initial sequence number $ISN_C$. (Flag: SYN=1, ACK=0).
- 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).
- 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:
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.
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).
Recommended Deep Dives & Related Study Notes
Explore connected topics in the official Gujarat WPSI & GPSC syllabus
Top 50 Repeated Questions in Computer Networks
OSI model layers, port numbers, and past exam analysis
Related Guide →Mastering IP Addressing and Subnetting
High-yield numerical calculations for WPSI Paper 2
Related Guide →Wireless Communication Standards
Wi-Fi 802.11 and Bluetooth protocols
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.
MCQ Prep Zone Study Hub & Quick Links
Practice syllabus questions, mock exams, and download study notes
Topic-Wise MCQs
Unit-wise practice with detailed explanations.
Mock Tests →Full-Length Mocks
Simulated test papers with negative marking.
Exams Hub →Govt Exams Guides
Gujarat WPSI, GPSC AE, and CCE notifications.
Formulas →Study Notes & PDFs
Concise formula sheets for rapid revision.
Daily Drill →Daily MCQ Challenge
Compete daily, earn points, and build streaks.
Membership →Test Series Plans
Unlock all sectional tests & ranking analytics.
Related Strategy & Syllabus Articles
Strengthen your exam preparation across adjacent subjects
