TCP EE 122 Discussion 103111 TCP Flow Control

  • Slides: 13
Download presentation
TCP EE 122 Discussion 10/31/11

TCP EE 122 Discussion 10/31/11

TCP Flow Control • Keep sender from overwhelming receiver • Data not necessarily pushed

TCP Flow Control • Keep sender from overwhelming receiver • Data not necessarily pushed to app layer S R Adv_Win: 300 PKT_MAX = 200 ACK Adv_Win: 100 ACK Adv_Win: 300 ACK Adv_Win: 100 MSS = min(PKT_MAX, Adv_Win) Push data to application

Congestion Control [1] • Avoid overwhelming the network • cwnd – congestion window •

Congestion Control [1] • 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 [2] • TCP is either in slow-start mode or AIMD mode •

Congestion Control [2] • 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

‘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 Set SSTHRESH = 5; Enter Slow Start SSTHRESH = 5 crossed. Enter

‘Vanilla’ TCP Set SSTHRESH = 5; Enter Slow Start SSTHRESH = 5 crossed. Enter AIMD 6 Set SSTHRESH = 1; Enter directly into AIMD since SSTHRESH is already crossed.

TCP Retransmission + Fast Recovery Set SSTHRESH = 5; However, enter AIMD directly! Set

TCP Retransmission + Fast Recovery Set SSTHRESH = 5; However, enter AIMD directly! Set SSthresh = 1; Enter directly into AIMD since SSthresh is already crossed. 7

TCP Congestion Control: CWND Flowchart Slow Start 3 duplicate ACKs timeout (CWND > SSTHRESH)

TCP Congestion Control: CWND Flowchart Slow Start 3 duplicate ACKs timeout (CWND > SSTHRESH) Simple Fast Retransmission 3 duplicate ACKs Additive Increase timeout Loss detected by timeout

TCP Congestion Control: CWND Flowchart Action when receive ACK CWND+= MSS Start 3 duplicate

TCP Congestion Control: CWND Flowchart Action when receive ACK CWND+= MSS Start 3 duplicate ACKs timeout (CWND > SSTHRESH) 3 duplicate ACKs timeout

Problem 1 Seg# of ACK responding to Seq # Data can send CWND ACK

Problem 1 Seg# of ACK responding to Seq # Data can send CWND ACK Adv Win n/a 0 100 101 350 101 100 201 250 101 201 100 200 301 150 201 301 100 300 201 401 50 301 No Packet Sent

Problem 2 ACK CWND 801 1000 801 1010 801 1020 901 1030 901 1040

Problem 2 ACK CWND 801 1000 801 1010 801 1020 901 1030 901 1040 901 1050 901 525

Problem 3 ACK CWND SSTHRESH 801 800 MAX_INT Timeout! 100 400 901 200 400

Problem 3 ACK CWND SSTHRESH 801 800 MAX_INT Timeout! 100 400 901 200 400 1001 300 400 1101 400 1201 425 400 1301 450 400

Advanced Fast Retransmit Action when receive ACK CWND+= MSS Start 3 duplicate ACKs timeout

Advanced Fast Retransmit Action when receive ACK CWND+= MSS Start 3 duplicate ACKs timeout (CWND > SSTHRESH) duplicate ACK new ACK CWND += MSS CWND = SSTHRESH timeout