110 likes | 128 Views
Variety of TCP1 - Tahoe. Internet Engineering. Window Control. Adjust transmission rate by changing Window Size. Window Size = 1 segment. Window Size = 4 segment. Sequence number. Sequence number. 1. 2. 3. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. Sender. Sender. Data
E N D
Variety of TCP1-Tahoe Internet Engineering
Window Control • Adjust transmission rate by changing Window Size Window Size = 1segment Window Size = 4 segment Sequence number Sequence number 1 2 3 1 2 3 4 5 6 7 8 9 10 11 12 Sender Sender Data Packet Data Packet ACK ACK Receiver Receiver 2 3 4 2 3 4 5 6 7 8 9 10 Next is Next is ACK number ACK number
Window Size Control • Rule 1 • Sent window size is the minimum of window size which calculated by sender (congestion window size) and buffer size of receiver (maximum window size) • Sent window size = min (congestion window size, maximum window size) • Rule 2 • Congestion window increases until network congestion occurs • Since network state is unknown when start sending data, window size is set to a small value and increases rapidly by time • If the window size is large enough, it increase little by little • If congestion occurs, it decreases immediately
TCP ― The change of Window size • Receiver’s window size (rwnd) = 8 segments • Ideally Case • Actuality • Adjust transmission rate by changing window size • Slow Start phase • Congestion Avoidance phase RTT: Round Trip Time RTT Sender Theoretical maximum throughput [Mbps] Data packet ACK rwnd [bytes] RTT [s] Receiver ※ byte = 8 bits
Slow Start Phase • Sending a large amount data from startNetwork will congest rapidly Window Size 1 2 4 8 16 Sender Data Packet ACK Receiver However, window size will increase exponentially How to cope this problem?
Congestion Avoidance Phase • If congestion window exceeds a threshold (ssthresh: slow start threshold) Window Size 1 11 2 4 8 9 10 Sender Data Packet ACK Receiver In this case, ssthresh = 8 Window size increases linearly
Transition of Window Size Congestion Window Calculated by sender Window Size Slow start threshold Exponentially increase Linearly increase Maximum Window Size Send Window Size Time Slow Start Congestion Avoidance Rule 1: Send Window Size = min( Congestion Window Size, Maximum Window Size)
Transition of Window Size Congestion Window Calculated by sender Window Size Window Size Slow start threshold Maximum Window Size Send Window Size Time Slow Start Congestion Avoidance Rule 1: Send Window Size = min( Congestion Window Size, Maximum Window Size)
= = ssthresh ssthresh = = Network Congestion Case • Receive three duplicate ACKs • Time Out Packet was dropped ? Network is congested? Congestion window size is decrease to 1Slow start phase Ssthresh is changed to a half of send window size Window Sizec ssthresh (old) Window Sizec ssthresh (old) Time Time
Summarize of TCP Window Control (Tahoe) Window Size Maximum Window Size Packet loss Packet loss Packet loss ssthresh Time (retransmission) (retransmission)
Experiment 7 0 4 FTP/TCP 25Mbps 5ms 25Mbps 5ms 2 3 Bandwidth: Bw Delay: d 5 1 FTP Download TCP Agent TCPSink Agent Network Router Network