v
TCP
uses sliding window protocol for end-to-end flow control.
v
The
receiver specifies in its acknowledgement (ACK) the amount of bytes it is
willing to receive in advertised window. The advertised window ensures that the
receiver’s buffer will never overflow, since
v
TCP
uses a congestion window in the sender side to avoid congestion. The congestion
window indicates the maximum amount of data that can be sent out on a
connection without being acknowledged.
v
Advertised
window size is used to ensure that receiver’s buffer will not overflow however,
buffers at intermediate routers between source and destination may overflow
v
Congestion
occurs when total arrival rate from all packet flows exceeds R over a sustained
period of time.
v
Buffers
at multiplexer will fill and packets will be lost.
v
Sources
must control their sending rates so that aggregate arrival rate is just before
knee.
v
TCP
sender maintains a congestion window (cwnd) to control congestion at
intermediate routers.
v
Effective
window is minimum of congestion window and advertised window.
v
Problem:
source does not know what its “fair” share of available bandwidth should be
v
Solution:
adapt dynamically to available BW.
v
Sources
probe the network by increasing cwnd.
v
When
congestion detected, sources reduce rate, Ideally, sources sending rate
stabilizes near ideal point
v
TCP
detects congestion when it fails to receive an acknowledgement for a packet
within the estimated timeout.
v
In
such a situation, it decreases the congestion window to one maximum segment
size (MSS), and under other cases it increases the congestion window by one
MSS.
v
There
also exists a congestion window threshold, which is set to half the congestion window
size at the time when a re-transmit was required. The operation of TCP
congestion control algorithm may be divided into three phases and they are as
follows:-
TCP Congestion
Control: Slow Start
Slow start: increase
congestion window size by one segment upon receiving an ACK from receiver
v
initialized
at ≤2 segments
v
used
at (re)start of data transfer
v congestion
window increases exponentially
TCP Congestion
Control: Congestion Avoidance
v
Algorithm
progressively sets a congestion threshold
v
When
cwnd > threshold, slow down rate at which cwnd is increased
v
Increase
congestion window size by one segment per round-triptime (RTT)
v
Each
time an ACK arrives cwnd is increased by 1/cwnd
v
In
one RTT, cwnd segments are sent, so total increase in cwnd is cwnd x 1/cwnd = 1
v cwnd
grows linearly with time
0 comments