Professional Documents
Culture Documents
– Congestion Window (cwnd; Initial value is MSS bytes) – with byte-counting, the 3xMSS segment 4
cwnd would increase by segment 5
– Threshhold Value (ssthresh; Initial value is 65536 bytes) the bytes acknowledged segment 6
in an ACK, which means
in the example cwnd
would become 4MSS ents 4+5+6
ACK for segm
• The window size at the sender is set as follows: when the ACK for
cwnd =
4xMSS
segments 2+3 is
Allowed Window = MIN (advertised window, congestion window) received
advertised window: flow-control window at the receiver • TCP slows down the
increase of cwnd when
MSS: Maximum Segment Size (set with option field in TCP header) cwnd > ssthresh
1
Slow Start/Congestion Avoidance Example Computation of cwnd on previous slide
• Assume that ssthresh = 8 • Upto and including ack 2561, this TCP connection is in slow
start, and cwnd is increased by 1 MSS bytes each time an
14 ACK is received.
12 • Note that when cwnd = ssthresh, slow start is still applied.
10 Hence when ack 2561 is received, cwnd = 2560+512 = 3072.
Cwnd (in segments)
0
t= 0 t= 1 t= 2 t=3 t= 4 t=5 t= 6 t=7
Roundtrip times
Example of slow start and congestion When congestion occurs: Congestion Avoidance
avoidance Algorithm
• Assume MSS=512 bytes; advertised window = 5120 bytes • When congestion occurs (indicated by timeout),
PSH 1:513 (512) ack 10
cwnd=512; ssthresh=2560 – ssthresh is set to half the current window size (the
cwnd=1024 ack 513 minimum of the advertised window (AW) and cwnd):
ssthresh = min(cwnd,AW) / 2 but at least 2 segments
– cwnd is changed according to:
cwnd = 1 segsize = 1 MSS bytes (in case of timeout only)
• When new data is acknowledged,cwnd is increased according
PSH 1537:2049 (512) ack 10
PSH 2049:2561(512) ack 10
to whether it is in slow start or CA
ack 2049
cwnd=2560; ssthresh=2560 ack 2561
cwnd=3072; ssthresh=2560 PSH 2561:3073(512) ack 10
Enter congestion avoidance