Title: Sliding Transmission Window in TCP
1Sliding Transmission Window in TCP
- TCP uses a sliding window mechanism to control
transmission. - Increases efficiency
- Send all packets within window without waiting
for an acknowledgement. - As acknowledgments for segments come in, the
window is moved. - Example Consider a transmission window size of
five (next slide).
2TCP Retains Three Pointers
0 1 2 3 4 5 6
7
A B C
3Every packet to the left of A has been sent and
acknowledged. Every packet between A and B has
been transmitted. Packets between B and C are
eligible to send but have not yet been
sent. Packets to the right of C are not eligible
for transmission. All packets between A and C
are sent without waiting for an acknowledgement.
4Moving the Transmission Window
- Assume packets 0 2 and 5 have been
acknowledged. - Slide window to first unacknowledged packet (3 in
this example). - Note TCP sets a separate timer for each
outstanding packet in window.
5TCP and Sliding Window
0 1 2 3 4 5 6
7
A B C
6Flow Control
- Do not want to overwhelm capabilities of the
receiver. - Transmission window size is variable and set by
receiver. - Changed in response to buffer availability.
- Do not want to overwhelm the network.
- Accomplished by limiting number of outstanding
(unacknowledged) packets to the size of the
window. - In terms of performance the larger the window the
better. - More efficient to keep the network busy while
waiting for acknowledgements.
7Network Congestion
- The routers along a network path have finite
capacity. - Limit on their ability to deal with network
packets. - If routers get more data than they can handle
will start queuing packets. - When buffer space is exhausted will start
discarding packets. - Condition termed congestion.
- Results in long delays in transferring data.
8TCP and Congestion
- Recall TCP uses a timer to determine when to
retransmit a packet. - If network is congested then packets and
acknowledgements will be lost. - This will trigger more retransmissions.
- Retransmissions will add to network congestion,
resulting in more packet and acknowledgement
loss, resulting - Condition called congestion collapse.
9Avoiding Congestion Collapse
- TCP defines two mechanisms to avoid congestion
collapse - Slow start.
- Multiplicative Decrease.
- Multiplicative Decrease
- TCP maintains a second limit on the size of the
transmission window called congestion window
limit. - The number of packets placed onto the network is
determined by the minimum of the transmission
window and congestion window. - Congestion window is reduced by 50 for each lost
packet.
10First Loss
0 1 2 3 4 5 6
7
Transmission and Congestion Window
New Congestion Window
11Second Loss
0 1 2 3 4 5 6
7
New Congestion Window
Old Congestion Window
Transmission Window
12Time Between Retransmissions
- In addition to aggressively reducing window size
also modifies the amount of before the next
retransmission. - If one packet lost, TCP doubles the time between
retransmissions. - Quite easily reduce window to one packet, and
wait a long time between retransmissions.
13Slow Start
- TCP does not immediately double the size of the
congestion window when packets start flowing
again. - Increases the congestion window by one packet per
acknowledgement. - Assume congestion window is one.
- Send out packet and wait for acknowledgement.
- When received, increase congestion window to two
and send next two packets. - When both acknowledgements are received increase
congestion window to four. - When four are received, increase to eight.