Course contentsShow
← Computer Science
Lesson 1484 of 2,87234. Internet Protocol SuiteFree lesson

TCP Options and Extensions

Optional TCP features like Maximum Segment Size, Window Scaling, Timestamps, and Selective Acknowledgment (SACK).

TCP Options and Extensions

You'll learn how TCP uses optional header fields to enable features like larger windows, better timing, and smarter retransmissions.

What Are TCP Options?

While the standard TCP header covers the essentials (ports, sequence numbers, flags), TCP reserves space for optional features that enhance performance and reliability. These options appear after the fixed 20-byte header and are negotiated during the three-way handshake or used throughout the connection's lifetime.

Think of TCP options like "premium features" on a car: the basic model works fine, but options like cruise control or parking sensors make the ride smoother and smarter.

Key TCP Options

Maximum Segment Size (MSS)

Tells the other side the largest chunk of data you can accept in a single segment (typically around 1460 bytes). This prevents fragmentation at lower layers and ensures efficient packet sizes.

Window Scaling

The standard TCP window field is only 16 bits, limiting the receive window to 65,535 bytes—too small for high-speed networks. Window scaling allows multiplying the advertised window by powers of two, enabling gigabyte-sized windows for modern connections.

Timestamps

Adds two 4-byte timestamp values to each segment. These help calculate more accurate round-trip times (RTT) and protect against sequence number wraparound on very fast networks. They're crucial for the congestion control algorithms you've learned.

Selective Acknowledgment (SACK)

Instead of just saying "I got everything up to byte X," SACK lets the receiver say "I got bytes X–Y and also M–N, but I'm missing the chunk in between." This allows the sender to retransmit only the missing pieces, not everything after the first loss.

Key Takeaway: TCP options extend the protocol's capabilities beyond its fixed header, enabling performance optimizations like larger windows (Window Scaling), precise timing (Timestamps), and efficient retransmission (SACK) that are essential for modern high-speed networks.