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

Week8 lec2-bscs1

Embed Size (px)

DESCRIPTION

Computer Networks

Citation preview

Page 1: Week8 lec2-bscs1

Chapter 3 Transport Layer

Computer Networking: A Top Down Approach 4th edition. Jim Kurose, Keith RossAddison-Wesley, July

2007.

Page 2: Week8 lec2-bscs1

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 RcvWindowLastByteSent-LastByteAcked min{CongWin,

RcvWindow} CongWin is dynamic, function of perceived network

congestion TCP takes arrival of ACKs as successful delivery

Increases Congestion Window Self Clocking

TCP uses ACKs to trigger its increase in congestion window size

Page 3: Week8 lec2-bscs1

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

8 Kbytes

16 Kbytes

24 Kbytes

time

congestionwindow

Page 4: Week8 lec2-bscs1

TCP Slow Start

AIMD can take a long time to 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 fast

Host A

one segment

RTT

Host B

time

two segments

four segments

Page 5: Week8 lec2-bscs1

Refinement: Inferring Loss

3 Duplicate ACKs Indicates network capable of delivering some segments.

Timeout Indicates a “more alarming” congestion scenario.

Page 6: Week8 lec2-bscs1

Refinement: Inferring Loss After timeout event

CongWin 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

Page 7: Week8 lec2-bscs1

Refinement: Inferring Loss

TCP Tahoe For either events

Cuts congestion window size to 1 MSS and enters slow start

TCP Reno Uses Fast Retransmit and Fast Recovery for

three Dupicate ACKs. Same as Tahoe for Timeout events.

Page 8: Week8 lec2-bscs1

TCP Congestion Control

Page 9: Week8 lec2-bscs1

TCP Congestion ControlC

ongest

ion W

indow

(in s

egm

ents

)

Page 10: Week8 lec2-bscs1

TCP Flow Control Eliminate the possibility of sender overflowing

receiver’s 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

Page 11: Week8 lec2-bscs1

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

Page 12: Week8 lec2-bscs1

TCP Flow Control

LastByteSent – LastByteAcked – It is the amount of unacknowledged data that A has

sent into the connection

LastByteSent – LastByteAcked RcvWindow– 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