Question

Difficulty: MediumTCP vs UDP Comparison and Protocols

An application developer is optimizing a custom telemetry protocol for bandwidth-constrained satellite links. To minimize transport layer encapsulation overhead, the network architecture replaces TCP with UDP. Assuming standard baseline headers with no TCP options, how many bytes of fixed header overhead are saved per packet by selecting UDP over TCP?

  1. 12 bytesAnswer
  2. B
    8 bytes
  3. C
    16 bytes
  4. D
    4 bytes

Answer

12 bytes of Layer 4 header overhead are saved per datagram by using UDP instead of TCP.
The correct answer is 12 bytes. A standard TCP header without optional fields requires 20 bytes to accommodate features such as sequencing, acknowledgments, dynamic windowing, and flags. Conversely, UDP utilizes a simplified 8-byte header composed of only four fields: Source Port, Destination Port, Length, and Checksum. Subtracting the 8-byte UDP header from the 20-byte baseline TCP header yields a savings of 12 bytes per packet.

Step-by-Step Solution

1
Determine the baseline size of a standard TCP header.
A standard TCP header without optional fields consists of 20 bytes (containing Source/Destination Ports, Sequence Number, Acknowledgment Number, Header Length, Flags, Window Size, Checksum, and Urgent Pointer).
Establishing the default minimum size of a connection-oriented Layer 4 protocol header.
2
Determine the fixed size of a UDP header.
A UDP header is strictly fixed at 8 bytes (consisting of 4 two-byte fields: Source Port, Destination Port, Length, and Checksum).
UDP provides connectionless delivery with minimal control overhead.
3
Calculate the difference in overhead between the two protocols.
20 bytes (TCP baseline header) - 8 bytes (UDP fixed header) = 12 bytes saved.
Subtracting UDP header size from baseline TCP header size identifies the exact per-packet byte savings.

Key Concept

Layer 4 Header Overhead and Structure (TCP 20-byte vs. UDP 8-byte)
Rate this question