TCP Congestion Control FSM Lab

TCP Reno · cwnd in MSS · events: new ACK · dup ACK · timeout

State machine

new ACK: cwnd += MSS dup ACK: dupACKs++ new ACK: cwnd += MSS·MSS/cwnd dup ACK: dupACKs++ dup ACK: cwnd += MSS (inflate — keeps pipe full) cwnd ≥ ssthresh 3 dup ACKs: ssthresh←cwnd/2 · cwnd←ssthresh+3 · fast rtx 3 dup ACKs → fast retransmit (same rule as from CA) new ACK: cwnd ← ssthresh (deflate) timeout timeout timeout (any state): ssthresh ← cwnd/2 · cwnd ← 1 MSS · retransmit → Slow Start SLOW START cwnd ≈ ×2 per RTT CONG. AVOIDANCE cwnd ≈ +1 MSS per RTT FAST RECOVERY waiting for new ACK
Slow Start Congestion Avoidance Fast Recovery timeout transition

Live sender

State
—
dup ACKs
0
cwnd
1 MSS
ssthresh
16 MSS
Fire an event — a packet dot travels the edge taken. Keys: a new ACK, d dup ACK, t timeout.
450 ms

Quiz

cwnd over time — watch the sawtooth

Slow Start Congestion Avoidance Fast Recovery ✕timeout ssthresh

Event log

#EventTransitioncwndssthreshWhat happened
Reference — transition table & key ideas
StateEventActionNext
Slow startnew ACKcwnd += MSSSS → CA once cwnd ≥ ssthresh
Slow start3 dup ACKsssthresh = cwnd/2, cwnd = ssthresh + 3, fast retransmitFR
Congestion avoidancenew ACKcwnd += MSS·MSS/cwndCA
Congestion avoidance3 dup ACKsssthresh = cwnd/2, cwnd = ssthresh + 3, fast retransmitFR
Fast recoverydup ACKcwnd += MSS (inflate)FR
Fast recoverynew ACKcwnd = ssthresh (deflate)CA
any statetimeoutssthresh = cwnd/2, cwnd = 1 MSS, retransmitSS
  • Two loss signals, two severities: 3 dup ACKs = mild (later packets still arrive → halve cwnd, keep going). Timeout = severe (nothing gets through → cwnd = 1, restart slow start).
  • ssthresh remembers where congestion happened (cwnd/2), so next time growth turns cautious before the old failure point → sawtooth.
  • Fast recovery's inflate (+1 MSS per dup ACK) keeps the pipe full while the missing segment is retransmitted; the cumulative new ACK deflates back to ssthresh.
  • ssthresh uses max(cwnd/2, 2) here — real TCPs floor the window at ~2 MSS.
  • Tahoe mode: no fast recovery — 3 dup ACKs is treated exactly like a timeout.