Presentation on theme: "TCP EE122 Discussion 10/31/11. TCP Flow Control Keep sender from overwhelming receiver Data not necessarily pushed to app layer ACK Adv_Win: 300 R Push."— Presentation transcript:
TCP EE122 Discussion 10/31/11
TCP Flow Control Keep sender from overwhelming receiver Data not necessarily pushed to app layer ACK Adv_Win: 300 R Push data to application S PKT_MAX = 200 MSS = min(PKT_MAX, Adv_Win) ACK Adv_Win: 100 ACK Adv_Win: 100 Adv_Win: 300
Congestion Control  Avoid overwhelming the network cwnd – congestion window SSTHRESH –threshold until which exponential slow-start happens TCP is either in slow-start mode or AIMD mode
Congestion Control  TCP is either in slow-start mode or AIMD mode Slow-start: for every ACK, increase cwnd by MSS “AI”: for every window of packets being ACK-ed, increase cwnd by MSS
‘Vanilla’ TCP Exponential slow-start till SSTHRESH Set timer, which expires when packets are lost At each new data ACK the timeout is RESET On time-out, set SSTHRESH to (cwnd/2), and cwnd itself to 1 – Timeout = receiving nothing for an entire RTO Usually a disaster!
‘Vanilla’ TCP 6 Set SSTHRESH = 1; Enter directly into AIMD since SSTHRESH is already crossed. Set SSTHRESH = 5; Enter Slow Start SSTHRESH = 5 crossed. Enter AIMD
TCP Retransmission + Fast Recovery 7 Set SS thresh = 1; Enter directly into AIMD since SS thresh is already crossed. Set SSTHRESH = 5; However, enter AIMD directly!
TCP Congestion Control: CWND Flowchart Start Slow Start Additive Increase Additive Increase Simple Fast Retransmission Loss detected by timeout (CWND > SSTHRESH) timeout3 duplicate ACKs timeout3 duplicate ACKs