Week8 lec2-bscs1

download Week8 lec2-bscs1

of 12

  • date post

  • Category


  • view

  • download


Embed Size (px)


Computer Networks

Transcript of Week8 lec2-bscs1

  • 1. Chapter 3 Transport Layer Computer Networking: A Top Down Approach 4th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

2. TCP Congestion Control: Details Congestion Window Imposes a constraint on the rate at which a TCP sender can send traffic into the network The amount of unacknowledged data at a sender may not exceed the minimum of CongWin and RcvWindow LastByteSent-LastByteAcked min{CongWin, RcvWindow} CongWin is dynamic, function of perceived networkcongestion TCP takes arrival of ACKs as successful delivery Increases Congestion Window Self Clocking TCP uses ACKs to trigger its increase in congestion window size 3. TCP Congestion Control Algorithm: Additive Increase Multiplicative Decrease (AIMD) Additive Increase Increase CongWin by 1 MSS until loss detected Multiplicative Decrease Cut CongWin in half after loss CongWin is 20 Kbytes, cut it to half after loss Continue to drop but not allowed to drop below 1 MSS congestion window 24 Kbytes16 Kbytes8 Kbytestime 4. TCP Slow Start AIMD can take a long timeHost AHost BRTTto ramp up to full capacity from scratch When connection begins, CongWin = 1 MSS Increase rate exponentially until first loss event: Double CongWin every RTT Done by incrementing CongWin for every ACK received Summary: Initial rate is slow but ramps up exponentially fasttime 5. Refinement: Inferring Loss 3 Duplicate ACKs Indicatesnetwork capable of delivering some segments. Timeout Indicatesa more alarming congestion scenario. 6. Refinement: Inferring Loss After timeout eventCongWin instead set to 1 MSS Window then grows exponentially (enters slow start) Till it reaches one half of the value it had before the timeout Window then grows linearly (congestion avoidance) Threshold Value Determines the window size at which slow start will end After three duplicate ACKs:CongWin is cut in half Window then grows linearly Fast Retransmit and Fast Recovery 7. Refinement: Inferring Loss TCP Tahoe For either events Cuts congestion window size to 1 MSS and enters slow start TCP RenoUses Fast Retransmit and Fast Recovery for three Dupicate ACKs. Same as Tahoe for Timeout events. 8. TCP Congestion Control 9. Congestion Window (in segments)TCP Congestion Control 10. TCP Flow Control Eliminate the possibility of sender overflowing receivers buffer by transmitting too much, too fast. Sender maintains a variable receive window Gives the sender an idea of how much free space is available at receiver Example Host A is sending a large file to host B Host B allocates a receive buffer and denotes size by RcvBuffer LastByteRead The number of the last byte read from buffer by process in Host B LastByteRcvd: The number of last byte that has been placed in buffer at B 11. TCP Flow Control RcvWindow is set to the amount of spare room in the buffer RcvWindow= RcvBuffer - [LastByteRcvd - LastByteRead] Host B informs Host A about how much spare room it has in the connection buffer. Places RcvWindow in the receive window field of every segment Host A keeps track of two variables LastByteSent and LastByteAcked 12. TCP Flow Control LastByteSent LastByteAcked It is the amount of unacknowledged data that A has sent into the connection LastByteSent LastByteAckedRcvWindow Keeping the unacknowledged data less than the value of RcvWindow Suppose RcvWindow=0 Host B advertises RcvWindow=0 to Host A Suppose Host B has nothing to send to host A TCP specification require Host A to send one byte of data Persistence Timer? Home Assignment