Suppose a sender can transmit data very fast, but the receiver is reading it slowly.
If the sender keeps sending without any limit, the receiver's buffer may become full.
At the same time, even if the receiver is ready, the network itself may be congested.
TCP therefore does not simply ask, “How much data do I have?”
It also asks:
“How much can the receiver accept, and how much can the network safely handle?”
rwndReceiver's advertised window
cwndCongestion window
Sliding WindowMoves after acknowledgement
ACKNext byte expected
Direct Answer
TCP window management controls how much unacknowledged data a TCP sender may keep in transit.
For receiver protection, TCP uses the receive window or rwnd. For network congestion control, TCP maintains a congestion window or cwnd.
The amount the sender can safely have outstanding is limited by both values. A useful simplified rule is:
Usable sending limit ≈ min(rwnd, cwnd), while also considering how much data is already in flight.
As acknowledgements arrive, the TCP sending window moves forward. This behaviour is called sliding window management.
What Is TCP Window Management?
TCP allows a sender to transmit more than one byte or segment before waiting for an acknowledgement.
But the sender cannot transmit an unlimited amount of data.
It must control the amount of outstanding or unacknowledged data.
TCP Window Management:
The method used by TCP to control how much unacknowledged data may be sent at one time and how the sending range moves after acknowledgements arrive.
Why Does TCP Need Window Management?
There are two different limits TCP must respect.
Receiver Capacity
The receiver may have limited buffer space.
Network Capacity
The network may become congested.
Reliable Delivery
TCP must remember which bytes are acknowledged and which are still outstanding.
TCP Window Management answers three questions:
1. Which bytes are already acknowledged?
2. Which bytes have been sent but are still unacknowledged?
3. Which new bytes are currently allowed to be sent?
TCP Sliding Window Explained
TCP uses a sliding-window mechanism.
Imagine the entire byte stream as a long line of numbered bytes.
At any moment, only a certain range is allowed to be outstanding.
TCP Sender Byte Track
1000
ACKed
1001
ACKed
1002
Sent
1003
Sent
1004
Can Send
1005
Can Send
1006
Can Send
1007
Can Send
1008
Wait
1009
Wait
Grey = Already ACKedOrange = Sent but not ACKedGreen = Allowed to send nowWhite = Outside current window
Sliding Window Trick:
ACK arrives → left edge moves → new bytes become sendable.
How the Window Slides
Before ACK
1
2
3
4
5
6
7
8
After More Bytes Are ACKed
1
2
3
4
5
6
7
8
TCP Sender Window
The sender-side window can be understood as several regions.
Bytes already acknowledged.
Bytes sent but not yet acknowledged.
Bytes allowed to be sent now.
Bytes that must wait until the window moves.
The exact sender state is maintained with TCP sequence numbers, acknowledgement information, receiver-advertised capacity and congestion-control state.
TCP Receiver Window
The receiver has a finite buffer.
Some part of that buffer may already contain data that the application has not yet read.
Example Receive Buffer
Used
Used
Used
Free
Free
Free
Free
Free
The free amount influences the receive window advertised to the sender.
Advertised Receive Window — rwnd
The receiver advertises how much additional data it can currently accept.
This value is commonly represented as:
rwnd = Receiver Window
The value is communicated through TCP acknowledgement segments using the Window field.
rwnd answers:
“How much more data can the receiver currently buffer?”
What Are Bytes in Flight?
Bytes in flight are bytes that have been transmitted but are not yet cumulatively acknowledged.
Sender
Data already transmitted
Unacknowledged Bytes
Receiver
ACK not yet returned
Bytes in Flight ≈ Highest Byte Sent - Highest Byte Cumulatively ACKed
How an ACK Slides the TCP Window
Suppose the sender has sent bytes beginning from sequence number 1000.
Step 1
Sender transmits bytes 1000–1499.
Step 2
Receiver successfully receives the bytes.
Step 3
Receiver sends ACK = 1500.
ACK 1500 tells the sender:
“All bytes before 1500 are cumulatively acknowledged. I expect byte 1500 next.”
Now the left edge of the sender's usable window can move forward.
TCP Cumulative Acknowledgement
TCP acknowledgements are normally cumulative.
Suppose bytes through 4999 have arrived in order.
The receiver sends:
ACK = 5000
This means:
“I have everything before byte 5000 in sequence.”
What Happens With Out-of-Order TCP Data?
Suppose the receiver expects byte 2000.
A later segment arrives first.
The receiver cannot advance the cumulative acknowledgement beyond the missing byte until the gap is filled.
Example:
Receiver expects byte 2000.
Bytes beginning at 2500 arrive first.
The cumulative ACK can continue indicating the missing starting point, such as ACK 2000, until the missing data arrives.
TCP Flow Control
Flow control protects the receiver.
A fast sender should not fill the receiver's buffer faster than the receiving application can consume data.
Receiver
Advertises rwnd based on available receive-buffer capacity.
Sender
Limits outstanding data according to receiver and network limits.
Network
cwnd limits how aggressively TCP injects data into the network.
Flow Control:
Fast Sender → Controlled Rate → Safe Receiver
TCP Receive Buffer
The operating system allocates receive-buffer memory for a TCP connection.
Incoming TCP data may stay in this buffer until the receiving application reads it.
When the application reads data:
Buffer space becomes free.
The advertised receive window may increase.
The sender may be allowed to transmit more data.
TCP Zero Window
If the receive buffer becomes completely full, the receiver can advertise:
rwnd = 0
Receiver Buffer Full
Advertised Window = 0
Sender
Stops sending normal new data until space becomes available.
Zero Window Trick:
Receiver says “Wait, my buffer is full.”
TCP Persist Timer
A special problem can occur after a receiver advertises zero window.
Later, the application frees buffer space and the receiver sends a window update.
What if that window-update segment is lost?
The sender may continue waiting while the receiver is waiting for new data.
Persist Timer:
TCP uses a persist mechanism to avoid a permanent deadlock when the receive window is zero and a window update is lost.
When the receiving application removes data from its buffer, free space increases.
The receiver can advertise a larger window in a later TCP segment.
Before
Buffer nearly full → rwnd small.
Application Reads
Free buffer space increases.
Window Update
Receiver advertises larger rwnd.
TCP Window Scaling
The original TCP Window field is only 16 bits.
Maximum Basic Window Value = 2^16 - 1
= 65,535 bytes
For high-bandwidth or long-delay networks, 65,535 bytes may be too small.
TCP therefore supports the Window Scale option.
TCP Window Scaling Concept
Base Field
16-bit advertised Window value.
Scale Factor
Negotiated during connection establishment.
Result
Allows a much larger effective receive window.
Important:
Window scaling must be negotiated during TCP connection setup. It is not suddenly enabled in the middle of an already-established connection.
Silly Window Syndrome
Silly Window Syndrome occurs when TCP repeatedly sends very small amounts of data or advertises very small window increases.
This creates unnecessary overhead.
Problem
Receiver repeatedly advertises tiny amounts of free space.
Result
Sender may transmit tiny TCP segments.
Solution
Avoid sending or advertising unnecessarily tiny chunks.
Nagle's Algorithm
Nagle's algorithm is a sender-side technique designed to reduce the number of very small TCP segments.
In simplified form:
Send one small segment.
If unacknowledged data remains, collect additional small writes.
Send more data after acknowledgement arrives or enough data accumulates.
Nagle Trick:
Do not keep sending lots of tiny TCP segments while earlier small data is still unacknowledged.
Nagle's algorithm may be disabled by latency-sensitive applications when immediate small writes are more important than reducing segment overhead.
Clark's Solution for Silly Window Syndrome
Clark's solution is mainly a receiver-side strategy.
Instead of advertising every tiny increase in free buffer space, the receiver waits until a useful amount of space becomes available.
Easy Difference:
Nagle → Sender side
Clark → Receiver side
What Is TCP Congestion Window?
The receiver's buffer is not the only possible bottleneck.
Routers and network links can also become overloaded.
TCP therefore maintains another important value:
cwnd = Congestion Window
The congestion window is maintained by the sender.
It controls how much data TCP may keep outstanding based on estimated network congestion.
cwnd answers:
“How much data does TCP currently believe the network can safely handle?”
rwnd vs cwnd
Point
rwnd
cwnd
Full Form
Receive Window
Congestion Window
Main Purpose
Flow control
Congestion control
Protects
Receiver
Network
Controlled By
Receiver advertises it
Sender maintains it
Main Basis
Available receive-buffer space
Network congestion behaviour
Communicated Directly?
Yes, through TCP Window information
No ordinary TCP header field directly carries cwnd
Best Trick:
rwnd = Receiver limit
cwnd = Network limit
Effective TCP Sending Window
The sender must respect both the receiver limit and the congestion-control limit.
Effective Outstanding Limit ≈ min(rwnd, cwnd)
But some data may already be in flight.
Therefore a simplified usable-window idea is:
New Data Allowed ≈ min(rwnd, cwnd) - Bytes Already in Flight
Example
Suppose:
rwnd = 20,000 bytes
cwnd = 12,000 bytes
Bytes in Flight = 8,000 bytes
First find the limiting window:
min(20,000, 12,000)
= 12,000 bytes
New data that can be sent:
12,000 - 8,000
= 4,000 bytes
Answer = approximately 4,000 bytes of new data may be sent.
TCP Slow Start
TCP should not begin a new connection by immediately flooding the network with a huge amount of data.
Instead, TCP starts cautiously and increases the congestion window as acknowledgements confirm successful delivery.
This phase is called:
Slow Start
RTT 1Small cwnd
RTT 2Growing
RTT 3Faster growth
RTT 4Higher cwnd
ThresholdApproaching ssthresh
AvoidanceGrowth becomes gentler
In textbook explanations, Slow Start is often described as approximately doubling cwnd every round-trip time when acknowledgements arrive normally. Real modern TCP implementations use byte-based rules and algorithm-specific details.
Retransmission Timeout
A timeout is usually treated as a stronger congestion signal. Traditional TCP responds by reducing cwnd significantly and restarting cautious growth.
Duplicate ACK Signal
Multiple duplicate acknowledgements may indicate that one segment is missing while later data still reached the receiver.
Exact cwnd and ssthresh updates depend on the TCP congestion-control algorithm being used. Introductory exam answers usually describe classic Reno-style behaviour.
TCP Fast Retransmit
Suppose one segment is lost but later segments reach the receiver.
The receiver repeatedly acknowledges the same missing-byte position.
Traditional TCP uses repeated duplicate ACKs as an early indication of packet loss.
Classic Exam Rule:
Three duplicate ACKs can trigger Fast Retransmit before the retransmission timer expires.
Fast Retransmit:
Do not wait for timeout if duplicate ACKs strongly indicate missing data.
TCP Fast Recovery
Classic TCP Reno uses Fast Recovery after Fast Retransmit.
Instead of returning all the way to the smallest starting congestion window, TCP reduces its sending rate and then moves toward Congestion Avoidance.
Concept:
Fast Retransmit detects likely loss.
Fast Recovery avoids completely restarting from the beginning when the network is still delivering later packets.
TCP Flow Control vs Congestion Control
Point
Flow Control
Congestion Control
Main Goal
Protect receiver
Protect network
Main Variable
rwnd
cwnd
Who Controls It?
Receiver advertises capacity
Sender maintains congestion state
Problem
Receiver cannot process fast enough
Network cannot carry traffic efficiently
Example
Receive buffer becoming full
Packet loss or increasing congestion signals
One-Line Trick:
Flow Control = “Can the receiver take it?”
Congestion Control = “Can the network take it?”
SACK and TCP Window Management
Standard cumulative ACK tells the sender only the next missing byte.
But the receiver may already have later blocks of data.
TCP Selective Acknowledgement or SACK can tell the sender about specific blocks that arrived successfully.
Example:
The receiver is missing bytes 3000–3499 but has already received later bytes.
With SACK information, the sender can learn which later blocks are already present and focus retransmission on missing data.
SACK Benefit:
Better recovery when multiple segments are lost in one window.
Important TCP Window Formulas
Basic TCP Window Field Maximum = 2^16 - 1 = 65,535
Effective Outstanding Limit ≈ min(rwnd, cwnd)
New Data Allowed ≈ min(rwnd, cwnd) - Bytes in Flight
Next Cumulative ACK = First Missing / Next Expected Byte
Solved TCP Window Management Numericals
Numerical 1: Effective Window
Given:
rwnd = 16 KB
cwnd = 10 KB
Effective Limit = min(16, 10)
= 10 KB
Answer = 10 KB
Numerical 2: New Data Allowed
Suppose:
rwnd = 20,000 bytes
cwnd = 15,000 bytes
Bytes in Flight = 9,000 bytes
Limit = min(20,000, 15,000)
= 15,000
New Data = 15,000 - 9,000
= 6,000 bytes
Answer = 6,000 bytes
Numerical 3: Cumulative ACK
A segment begins with:
Sequence Number = 4000
Data Length = 1000 bytes
The bytes are:
4000 through 4999
Next expected byte:
5000
ACK = 5000
Numerical 4: Basic TCP Window Field
TCP Window field:
16 bits
Maximum = 2^16 - 1
= 65,535
Answer = 65,535
Numerical 5: Receive Buffer Free Space
Suppose:
Receive Buffer = 32,000 bytes
Currently Used = 20,000 bytes
Free Space = 32,000 - 20,000
= 12,000 bytes
A simplified advertised receive window could therefore be approximately:
rwnd = 12,000 bytes
Numerical 6: Slow Start Textbook Example
Suppose a simplified textbook example starts with:
cwnd = 1 MSS
With successful ACKs and simplified doubling each RTT:
RTT 0 = 1 MSS
RTT 1 = 2 MSS
RTT 2 = 4 MSS
RTT 3 = 8 MSS
This doubling pattern is a teaching simplification. Modern TCP implementations can start with a larger initial congestion window and use algorithm-specific byte-level rules.
Numerical 7: rwnd Smaller Than cwnd
Given:
rwnd = 6,000
cwnd = 15,000
Flight Size = 4,000
Effective Limit = min(6,000, 15,000)
= 6,000
New Data = 6,000 - 4,000
= 2,000
Answer = 2,000 bytes
Numerical 8: Zero Receive Window
If:
rwnd = 0
cwnd = 20,000
The normal new-data limit becomes:
min(0, 20,000)
= 0
Normal new TCP data must wait for a receive-window update.
TCP Window Management Remember Tricks
Sliding Window:
ACK comes → Window moves.
rwnd:
Receiver's capacity.
cwnd:
Network congestion limit.
Sending Limit:
Smaller of rwnd and cwnd wins.
Bytes in Flight:
Sent but not yet cumulatively ACKed.
Fast Retransmit:
Duplicate ACKs can signal loss before timeout.
Common TCP Window Management Exam Mistakes
1. TCP sliding window is used only for congestion control.
Wrong. Sliding-window management is also fundamental to flow control and keeping track of outstanding bytes.
2. rwnd and cwnd are the same value.
Wrong. rwnd represents receiver capacity, while cwnd represents congestion-control state.
3. The receiver directly sends cwnd to the sender.
Wrong. cwnd is maintained internally by the TCP sender.
4. rwnd is controlled by routers.
Wrong. The receiver advertises rwnd according to its receive-buffer state.
5. Effective sending limit is always rwnd.
Wrong. The sender must also respect congestion-control limits such as cwnd.
6. ACK means the last byte received.
TCP cumulative ACK normally indicates the next byte expected.
7. Zero window means the TCP connection is immediately terminated.
Wrong. It means the receiver currently cannot accept normal new data because its receive window is zero.
8. Persist timer is a retransmission timeout.
Not the same. Persist timer specifically helps avoid zero-window deadlock.
9. TCP Window field can represent unlimited bytes without options.
Wrong. The basic Window field is 16 bits and has a maximum unscaled value of 65,535.
10. Slow Start means TCP grows slowly.
The name can be confusing. Slow Start begins cautiously but cwnd can grow rapidly as acknowledgements arrive.
11. Congestion Avoidance increases cwnd faster than Slow Start.
Wrong. Congestion Avoidance normally increases cwnd more gently.
12. Nagle's algorithm works at the receiver.
Wrong. Nagle's algorithm is mainly a sender-side technique.
13. Clark's solution is a congestion-control algorithm.
Wrong. Clark's solution is associated with avoiding receiver-side Silly Window Syndrome.
14. Fast Retransmit always waits for a timeout.
Wrong. The main purpose is to retransmit likely-lost data before the timeout when duplicate ACK evidence is strong enough.
40 Important TCP Window Management Questions With Answers
1. What is TCP window management?
TCP window management controls how much unacknowledged data a sender may keep outstanding and how the allowed sending range moves as acknowledgements arrive.
2. What is a TCP sliding window?
It is a moving range of byte sequence numbers that determines which data is acknowledged, outstanding or currently allowed to be sent.
3. Why does the TCP window slide?
It slides forward when acknowledgements confirm that earlier bytes have been successfully received.
4. What is rwnd?
rwnd is the receive window advertised by the receiver to indicate how much additional data it can currently accept.
5. What is cwnd?
cwnd is the congestion window maintained by the sender to limit outstanding data according to network congestion conditions.
6. What is the difference between rwnd and cwnd?
rwnd protects the receiver, while cwnd protects the network from excessive sending.
7. Who advertises rwnd?
The TCP receiver advertises rwnd.
8. Who maintains cwnd?
The TCP sender maintains cwnd as part of its congestion-control algorithm.
9. What is the simplified effective TCP outstanding-data limit?
A useful simplified rule is min(rwnd, cwnd).
10. What are bytes in flight?
They are transmitted bytes that have not yet been cumulatively acknowledged.
11. What is the formula for new data allowed in a simplified model?
New data allowed is approximately min(rwnd, cwnd) minus bytes already in flight.
12. What is TCP flow control?
TCP flow control prevents the sender from overwhelming the receiver's available buffering capacity.
13. Which value is mainly used for TCP flow control?
The advertised receive window, rwnd.
14. What is a receive buffer?
It is memory used to temporarily hold incoming TCP data until the receiving application consumes it.
15. What happens when the receive buffer fills?
The advertised receive window decreases and can eventually reach zero.
16. What is TCP zero window?
It is a condition where the receiver advertises rwnd equal to zero because it currently cannot accept normal new data.
17. Does zero window close the TCP connection?
No. It temporarily stops normal new-data transmission until the receive window opens again.
18. What is the TCP persist timer?
It is used to avoid deadlock when the receive window is zero and a later window-update segment is lost.
19. What is a TCP window update?
It is an advertisement from the receiver showing that its available receive-window space has changed.
20. How large is the original TCP Window field?
16 bits.
21. What is the maximum basic TCP Window value?
65,535.
22. Why is TCP Window Scale needed?
It allows effective receive windows much larger than the 65,535-byte limit of the original 16-bit Window field.
23. When is the Window Scale option negotiated?
During TCP connection establishment.
24. What is Silly Window Syndrome?
It is inefficient TCP behaviour where very small chunks of data or very small window updates cause many tiny TCP segments.
25. What is Nagle's algorithm?
It is a sender-side algorithm that reduces repeated transmission of very small TCP segments.
26. What is Clark's solution?
It is a receiver-side technique that avoids advertising very small increments of receive-window space.
27. What is TCP congestion control?
It controls how aggressively TCP sends data according to network congestion conditions.
28. Which variable is associated with TCP congestion control?
cwnd, the congestion window.
29. What is Slow Start?
Slow Start is the TCP phase where the congestion window starts cautiously and grows rapidly as successful acknowledgements arrive.
30. What is ssthresh?
ssthresh is the Slow Start threshold used to help determine when TCP changes from Slow Start to Congestion Avoidance behaviour.
31. What is Congestion Avoidance?
It is a TCP phase in which cwnd normally grows more cautiously than during Slow Start.
32. What does TCP do after congestion is detected?
It reduces its sending aggressiveness by reducing congestion-control limits according to the algorithm being used.
33. What is Fast Retransmit?
Fast Retransmit allows TCP to retransmit likely-lost data based on duplicate ACK evidence before waiting for the retransmission timeout.
34. What is the classic duplicate-ACK rule for Fast Retransmit?
Introductory TCP normally describes Fast Retransmit after three duplicate ACKs.
35. What is Fast Recovery?
It is a classic TCP Reno mechanism used after Fast Retransmit to reduce the sending rate without fully restarting from the smallest congestion window.
36. What is a cumulative ACK?
It acknowledges all contiguous bytes before the acknowledgement number and indicates the next expected byte.
37. What is SACK?
SACK means Selective Acknowledgement and allows the receiver to report specific blocks of data that arrived successfully.
38. If rwnd is 10 KB and cwnd is 16 KB, which is the limiting value?
rwnd is the limiting value, so the effective outstanding limit is about 10 KB.
39. If rwnd is 20 KB, cwnd is 12 KB and 8 KB is already in flight, how much new data can be sent?
min(20,12) - 8 = 4 KB of new data in the simplified model.
40. Give the easiest TCP window memory line.
TCP sends only what the receiver and network can safely handle: rwnd protects the receiver, cwnd protects the network and ACKs slide the window forward.
20 TCP Window Management MCQs With Answers
1. TCP sliding window mainly manages:
A. Only MAC addresses
B. Outstanding byte data
C. DNS names
D. Router IP classes
Answer: B
2. rwnd stands for:
A. Routing Window
B. Receive Window
C. Retransmission Window
D. Random Window
Answer: B
3. cwnd stands for:
A. Congestion Window
B. Connection Window Number
C. Current Wide Network Data
D. Control Window
Answer: A
4. rwnd mainly protects:
A. Receiver
B. Router only
C. DNS server
D. Physical cable
Answer: A
5. cwnd mainly protects:
A. Application name
B. Network from congestion
C. MAC table
D. File system
Answer: B
6. Who advertises rwnd?
A. Receiver
B. Router
C. DNS server
D. Switch
Answer: A
7. cwnd is maintained by:
A. Sender TCP
B. Receiver application only
C. Ethernet switch
D. DNS resolver
Answer: A
8. A simplified TCP sending limit is:
A. max(rwnd,cwnd)
B. min(rwnd,cwnd)
C. rwnd + cwnd always
D. rwnd × cwnd
Answer: B
9. TCP Window field is originally:
A. 8 bits
B. 16 bits
C. 32 bits
D. 64 bits
Answer: B
10. Maximum unscaled TCP Window value is:
A. 255
B. 1024
C. 65,535
D. 4,294,967,295
Answer: C
11. Zero receive window means:
A. Connection is always closed
B. Receiver currently cannot accept normal new data
C. Router has failed
D. SYN is lost
Answer: B
12. Persist timer helps prevent:
A. Zero-window deadlock
B. IP fragmentation
C. DNS caching
D. MAC duplication
Answer: A
13. Window Scale is used to:
A. Reduce IP address length
B. Support larger TCP receive windows
C. Change port numbers
D. Encrypt TCP
Answer: B
14. Silly Window Syndrome causes:
A. Many very small TCP transfers
B. IPv6 address exhaustion
C. Large Ethernet frames only
D. DNS loops
Answer: A
15. Nagle's algorithm works mainly at:
A. Sender
B. Router
C. Receiver only
D. Switch
Answer: A
16. Clark's solution mainly works at:
A. Receiver
B. Router
C. DNS server
D. Network Layer
Answer: A
17. Slow Start increases:
A. cwnd
B. MAC address
C. Port size
D. IPv4 header length
Answer: A
18. ssthresh stands for:
A. Slow Start Threshold
B. Segment Size Threshold
C. Source State Threshold
D. Sliding System Threshold
Answer: A
19. Classic Fast Retransmit is commonly triggered after:
A. Three duplicate ACKs
B. Three SYN packets
C. One FIN
D. Two DNS replies
Answer: A
20. Flow control mainly handles:
A. Receiver capacity
B. Network routing table
C. IP classes
D. MAC address learning
Answer: A
Frequently Asked Questions
What is TCP sliding window?
TCP sliding window is a mechanism that controls a range of byte sequence numbers that may remain outstanding and moves forward as acknowledgements arrive.
What is rwnd in TCP?
rwnd is the receive window advertised by the receiver according to available receive-buffer capacity.
What is cwnd in TCP?
cwnd is the congestion window maintained by the sender to limit outstanding data according to estimated network congestion.
What is the difference between rwnd and cwnd?
rwnd protects the receiver from buffer overflow, while cwnd protects the network from excessive traffic.
What determines how much TCP data can be outstanding?
A simplified rule is that outstanding data is constrained by the smaller of rwnd and cwnd.
What are bytes in flight?
Bytes in flight are data bytes that have been sent but are not yet cumulatively acknowledged.
What is TCP zero window?
A zero window occurs when the receiver advertises rwnd equal to zero because it currently has no receive-buffer space for normal new data.
What is the TCP persist timer?
The persist timer helps prevent deadlock when a zero receive window later opens but the receiver's window-update message is lost.
What is TCP window scaling?
TCP window scaling allows effective receive windows larger than the 65,535-byte maximum represented directly by the original 16-bit Window field.
What is Silly Window Syndrome?
Silly Window Syndrome is inefficient behaviour in which very small data blocks or very small advertised-window increases cause many tiny TCP segments.
What is Nagle's algorithm?
Nagle's algorithm reduces repeated transmission of very small TCP segments by temporarily combining small writes when unacknowledged data already exists.
What is Slow Start?
Slow Start is a congestion-control phase in which TCP starts with a relatively small congestion window and increases it rapidly as acknowledgements arrive.
What is congestion avoidance?
Congestion Avoidance is the TCP phase in which the congestion window grows more cautiously after the connection reaches the Slow Start threshold.
What is Fast Retransmit?
Fast Retransmit allows TCP to retransmit likely-lost data after duplicate ACK evidence without waiting for the full retransmission timeout.
TCP Window Management Quick Revision
Sliding Window:
Moves after ACKs.
rwnd:
Receiver limit.
cwnd:
Congestion limit.
Effective Limit:
min(rwnd, cwnd).
Bytes in Flight:
Sent but not ACKed.
Cumulative ACK:
Next byte expected.
Window Field:
16 bits.
Unscaled Maximum:
65,535.
Zero Window:
Receiver buffer full.
Persist Timer:
Avoid zero-window deadlock.
Window Scale:
Supports larger receive windows.
SWS:
Tiny windows / tiny segments problem.
Nagle:
Sender-side tiny-segment control.
Clark:
Receiver-side SWS prevention.
Slow Start:
Rapid cwnd growth.
ssthresh:
Slow Start threshold.
Congestion Avoidance:
Cautious cwnd growth.
Fast Retransmit:
Duplicate ACK based early recovery.