Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
Transport Layer 3-1
Chapter 3 outline
31 transport-layer services
32 multiplexing and demultiplexing
33 connectionless transport UDP
34 principles of reliable data transfer
35 connection-oriented transport TCPbull segment structurebull reliable data transferbull flow controlbull connection management
36 principles of congestion control
37 TCP congestion control
Transport Layer 3-2
congestion informally ldquotoo many sources sending too much
data too fast for network to handlerdquo
different from flow control manifestations
bull lost packets (buffer overflow at routers)bull long delays (queueing in router buffers)
a top-10 problem
Principles of congestion control
Transport Layer 3-3
Causescosts of congestion scenario 1
two senders two receivers one router infinite buffers output link capacity R no retransmission
maximum per-connection throughput R2
unlimited shared output link buffers
Host A
original data λin
Host B
throughput λout
R2
R2
λ out
λin R2de
lay
λin large delays as arrival rate λin
approaches capacity
Transport Layer 3-4
one router finite buffers sender retransmission of timed-out packet
bull application-layer input = application-layer output λin = λout
bull transport-layer input includes retransmissions λin λin
finite shared output link buffers
Host A
λin original data
Host B
λoutλin original data plusretransmitted data
lsquo
Causescosts of congestion scenario 2
Transport Layer 3-5
idealization perfect knowledge
sender sends only when router buffers available
finite shared output link buffers
λin original dataλoutλin original data plus
retransmitted data
copy
free buffer space
R2
R2
λ out
λin
Causescosts of congestion scenario 2
Host B
A
Transport Layer 3-6
λin original dataλoutλin original data plus
retransmitted data
copy
no buffer space
Idealization known losspackets can be lost dropped at router due to full buffers
sender only resends if packet known to be lost
Causescosts of congestion scenario 2
A
Host B
Transport Layer 3-7
λin original dataλoutλin original data plus
retransmitted data
free buffer space
Causescosts of congestion scenario 2Idealization known loss
packets can be lost dropped at router due to full buffers
sender only resends if packet known to be lost
R2
R2λin
λ out
when sending at R2 some packets are retransmissions but asymptotic goodput is still R2 (why)
A
Host B
Transport Layer 3-8
A
λin λoutλincopy
free buffer space
timeout
R2
R2λin
λ out
when sending at R2 some packets are retransmissions including duplicated that are delivered
Host B
Realistic duplicates packets can be lost dropped at
router due to full buffers sender times out prematurely
sending two copies both of which are delivered
Causescosts of congestion scenario 2
Transport Layer 3-9
R2
λ out
when sending at R2 some packets are retransmissions including duplicated that are delivered
ldquocostsrdquo of congestion more work (retrans) for given ldquogoodputrdquo unneeded retransmissions link carries multiple copies of pkt
bull decreasing goodput
R2λin
Causescosts of congestion scenario 2Realistic duplicates packets can be lost dropped at
router due to full buffers sender times out prematurely
sending two copies both of which are delivered
Transport Layer 3-10
four senders multihop paths timeoutretransmit
Q what happens as λin and λinrsquo
increase
finite shared output link buffers
Host A λout
Causescosts of congestion scenario 3
Host B
Host CHost D
λin original dataλin original data plus
retransmitted data
A as red λinrsquo increases all arriving
blue pkts at upper queue are dropped blue throughput 0
Transport Layer 3-11
another ldquocostrdquo of congestion when packet dropped any ldquoupstream
transmission capacity used for that packet was wasted
Causescosts of congestion scenario 3
C2
C2
λ out
λinrsquo
Transport Layer 3-12
Chapter 3 outline
31 transport-layer services
32 multiplexing and demultiplexing
33 connectionless transport UDP
34 principles of reliable data transfer
35 connection-oriented transport TCPbull segment structurebull reliable data transferbull flow controlbull connection management
36 principles of congestion control
37 TCP congestion control
Transport Layer 3-13
TCP congestion control additive increase multiplicative decrease
approach sender increases transmission rate (window size) probing for usable bandwidth until loss occursbull additive increase increase cwnd by 1 MSS every
RTT until loss detectedbull multiplicative decrease cut cwnd in half after loss cwnd
TCP
send
er
cong
estio
n w
indo
w s
ize
AIMD saw toothbehavior probing
for bandwidth
additively increase window size helliphellip until loss occurs (then cut window in half)
time
Transport Layer 3-14
TCP Congestion Control details
sender limits transmission
cwnd is dynamic function of perceived network congestion
TCP sending rate roughly send cwnd
bytes wait RTT for ACKS then send more bytes
last byteACKed sent not-
yet ACKed(ldquoin-flightrdquo)
last byte sent
cwnd
LastByteSent-LastByteAcked
lt cwnd
sender sequence number space
rate ~~cwndRTT
bytessec
Transport Layer 3-15
TCP Slow Start
when connection begins increase rate exponentially until first loss event
bull initially cwnd = 1 MSSbull double cwnd every RTTbull done by incrementing cwnd for every ACK received
summary initial rate is slow but ramps up exponentially fast
Host A
RTT
Host B
time
Transport Layer 3-16
TCP detecting reacting to loss
loss indicated by timeoutbull cwnd set to 1 MSS bull window then grows exponentially (as in slow start)
to threshold then grows linearly loss indicated by 3 duplicate ACKs TCP RENO
bull dup ACKs indicate network capable of delivering some segments
bull cwnd is cut in half window then grows linearly TCP Tahoe always sets cwnd to 1 (timeout or 3
duplicate acks)
Transport Layer 3-17
Q when should the exponential increase switch to linear
A when cwnd gets to 12 of its value before timeout
Implementation variable ssthresh on loss event ssthresh
is set to 12 of cwnd just before loss event
TCP switching from slow start to CA
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Transport Layer 3-18
Summary TCP Congestion Control
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
Λcwnd gt ssthresh
congestionavoidance
cwnd = cwnd + MSS (MSScwnd)dupACKcount = 0
transmit new segment(s) as allowed
new ACK
dupACKcount++duplicate ACK
fastrecovery
cwnd = cwnd + MSStransmit new segment(s) as allowed
duplicate ACK
ssthresh= cwnd2cwnd = ssthresh + 3
retransmit missing segment
dupACKcount == 3
timeoutssthresh = cwnd2cwnd = 1 dupACKcount = 0retransmit missing segment
ssthresh= cwnd2cwnd = ssthresh + 3retransmit missing segment
dupACKcount == 3cwnd = ssthreshdupACKcount = 0
New ACK
slow start
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
cwnd = cwnd+MSSdupACKcount = 0transmit new segment(s) as allowed
new ACKdupACKcount++duplicate ACK
Λcwnd = 1 MSS
ssthresh = 64 KBdupACKcount = 0
NewACK
NewACK
NewACK
Transport Layer 3-19
TCP throughput avg TCP thruput as function of window size RTT
bull ignore slow start assume always data to send W window size (measured in bytes) where loss occurs
bull avg window size ( in-flight bytes) is frac34 Wbull avg thruput is 34W per RTT
W
W2
avg TCP thruput = 34
WRTT bytessec
Transport Layer 3-20
TCP Futures TCP over ldquolong fat pipesrdquo
example 1500 byte segments 100ms RTT want 10 Gbps throughput requires W = 83333 in-flight segments throughput in terms of segment loss probability L
[Mathis 1997]
to achieve 10 Gbps throughput need a loss rate of L = 210-10 ndash a very small loss rate
new versions of TCP for high-speed
TCP throughput = 122 MSSRTT L
Transport Layer 3-21
fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK
TCP connection 1
bottleneckrouter
capacity R
TCP Fairness
TCP connection 2
Transport Layer 3-22
Why is TCP fairtwo competing sessions additive increase gives slope of 1 as throughout increases multiplicative decrease decreases throughput proportionally
R
R
equal bandwidth share
Connection 1 throughput
congestion avoidance additive increaseloss decrease window by factor of 2
congestion avoidance additive increaseloss decrease window by factor of 2
Transport Layer 3-23
Fairness (more)Fairness and UDP multimedia apps often
do not use TCPbull do not want rate
throttled by congestion control
instead use UDPbull send audiovideo at
constant rate tolerate packet loss
Fairness parallel TCP connections application can open
multiple parallel connections between two hosts web browsers do this eg link of rate R with 9
existing connectionsbull new app asks for 1 TCP gets
rate R10bull new app asks for 11 TCPs
gets R2
Transport Layer 3-24
network-assisted congestion control two bits in IP header (ToS field) marked by network router
to indicate congestion congestion indication carried to receiving host receiver (seeing congestion indication in IP datagram) )
sets ECE bit on receiver-to-sender ACK segment to notify sender of congestion
Explicit Congestion Notification (ECN)
sourceapplicationtransportnetwork
linkphysical
destinationapplicationtransportnetwork
linkphysical
ECN=00 ECN=11
ECE=1
IP datagram
TCP ACK segment
Transport Layer 3-25
Chapter 3 summary principles behind transport
layer servicesbull multiplexing
demultiplexingbull reliable data transferbull flow controlbull congestion control
instantiation implementation in the Internet
bull UDPbull TCP
next leaving the network
ldquoedgerdquo (application transport layers) into the network
ldquocorerdquo
two network layer chapters
bull data planebull control plane
Transport Layer 3-2
congestion informally ldquotoo many sources sending too much
data too fast for network to handlerdquo
different from flow control manifestations
bull lost packets (buffer overflow at routers)bull long delays (queueing in router buffers)
a top-10 problem
Principles of congestion control
Transport Layer 3-3
Causescosts of congestion scenario 1
two senders two receivers one router infinite buffers output link capacity R no retransmission
maximum per-connection throughput R2
unlimited shared output link buffers
Host A
original data λin
Host B
throughput λout
R2
R2
λ out
λin R2de
lay
λin large delays as arrival rate λin
approaches capacity
Transport Layer 3-4
one router finite buffers sender retransmission of timed-out packet
bull application-layer input = application-layer output λin = λout
bull transport-layer input includes retransmissions λin λin
finite shared output link buffers
Host A
λin original data
Host B
λoutλin original data plusretransmitted data
lsquo
Causescosts of congestion scenario 2
Transport Layer 3-5
idealization perfect knowledge
sender sends only when router buffers available
finite shared output link buffers
λin original dataλoutλin original data plus
retransmitted data
copy
free buffer space
R2
R2
λ out
λin
Causescosts of congestion scenario 2
Host B
A
Transport Layer 3-6
λin original dataλoutλin original data plus
retransmitted data
copy
no buffer space
Idealization known losspackets can be lost dropped at router due to full buffers
sender only resends if packet known to be lost
Causescosts of congestion scenario 2
A
Host B
Transport Layer 3-7
λin original dataλoutλin original data plus
retransmitted data
free buffer space
Causescosts of congestion scenario 2Idealization known loss
packets can be lost dropped at router due to full buffers
sender only resends if packet known to be lost
R2
R2λin
λ out
when sending at R2 some packets are retransmissions but asymptotic goodput is still R2 (why)
A
Host B
Transport Layer 3-8
A
λin λoutλincopy
free buffer space
timeout
R2
R2λin
λ out
when sending at R2 some packets are retransmissions including duplicated that are delivered
Host B
Realistic duplicates packets can be lost dropped at
router due to full buffers sender times out prematurely
sending two copies both of which are delivered
Causescosts of congestion scenario 2
Transport Layer 3-9
R2
λ out
when sending at R2 some packets are retransmissions including duplicated that are delivered
ldquocostsrdquo of congestion more work (retrans) for given ldquogoodputrdquo unneeded retransmissions link carries multiple copies of pkt
bull decreasing goodput
R2λin
Causescosts of congestion scenario 2Realistic duplicates packets can be lost dropped at
router due to full buffers sender times out prematurely
sending two copies both of which are delivered
Transport Layer 3-10
four senders multihop paths timeoutretransmit
Q what happens as λin and λinrsquo
increase
finite shared output link buffers
Host A λout
Causescosts of congestion scenario 3
Host B
Host CHost D
λin original dataλin original data plus
retransmitted data
A as red λinrsquo increases all arriving
blue pkts at upper queue are dropped blue throughput 0
Transport Layer 3-11
another ldquocostrdquo of congestion when packet dropped any ldquoupstream
transmission capacity used for that packet was wasted
Causescosts of congestion scenario 3
C2
C2
λ out
λinrsquo
Transport Layer 3-12
Chapter 3 outline
31 transport-layer services
32 multiplexing and demultiplexing
33 connectionless transport UDP
34 principles of reliable data transfer
35 connection-oriented transport TCPbull segment structurebull reliable data transferbull flow controlbull connection management
36 principles of congestion control
37 TCP congestion control
Transport Layer 3-13
TCP congestion control additive increase multiplicative decrease
approach sender increases transmission rate (window size) probing for usable bandwidth until loss occursbull additive increase increase cwnd by 1 MSS every
RTT until loss detectedbull multiplicative decrease cut cwnd in half after loss cwnd
TCP
send
er
cong
estio
n w
indo
w s
ize
AIMD saw toothbehavior probing
for bandwidth
additively increase window size helliphellip until loss occurs (then cut window in half)
time
Transport Layer 3-14
TCP Congestion Control details
sender limits transmission
cwnd is dynamic function of perceived network congestion
TCP sending rate roughly send cwnd
bytes wait RTT for ACKS then send more bytes
last byteACKed sent not-
yet ACKed(ldquoin-flightrdquo)
last byte sent
cwnd
LastByteSent-LastByteAcked
lt cwnd
sender sequence number space
rate ~~cwndRTT
bytessec
Transport Layer 3-15
TCP Slow Start
when connection begins increase rate exponentially until first loss event
bull initially cwnd = 1 MSSbull double cwnd every RTTbull done by incrementing cwnd for every ACK received
summary initial rate is slow but ramps up exponentially fast
Host A
RTT
Host B
time
Transport Layer 3-16
TCP detecting reacting to loss
loss indicated by timeoutbull cwnd set to 1 MSS bull window then grows exponentially (as in slow start)
to threshold then grows linearly loss indicated by 3 duplicate ACKs TCP RENO
bull dup ACKs indicate network capable of delivering some segments
bull cwnd is cut in half window then grows linearly TCP Tahoe always sets cwnd to 1 (timeout or 3
duplicate acks)
Transport Layer 3-17
Q when should the exponential increase switch to linear
A when cwnd gets to 12 of its value before timeout
Implementation variable ssthresh on loss event ssthresh
is set to 12 of cwnd just before loss event
TCP switching from slow start to CA
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Transport Layer 3-18
Summary TCP Congestion Control
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
Λcwnd gt ssthresh
congestionavoidance
cwnd = cwnd + MSS (MSScwnd)dupACKcount = 0
transmit new segment(s) as allowed
new ACK
dupACKcount++duplicate ACK
fastrecovery
cwnd = cwnd + MSStransmit new segment(s) as allowed
duplicate ACK
ssthresh= cwnd2cwnd = ssthresh + 3
retransmit missing segment
dupACKcount == 3
timeoutssthresh = cwnd2cwnd = 1 dupACKcount = 0retransmit missing segment
ssthresh= cwnd2cwnd = ssthresh + 3retransmit missing segment
dupACKcount == 3cwnd = ssthreshdupACKcount = 0
New ACK
slow start
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
cwnd = cwnd+MSSdupACKcount = 0transmit new segment(s) as allowed
new ACKdupACKcount++duplicate ACK
Λcwnd = 1 MSS
ssthresh = 64 KBdupACKcount = 0
NewACK
NewACK
NewACK
Transport Layer 3-19
TCP throughput avg TCP thruput as function of window size RTT
bull ignore slow start assume always data to send W window size (measured in bytes) where loss occurs
bull avg window size ( in-flight bytes) is frac34 Wbull avg thruput is 34W per RTT
W
W2
avg TCP thruput = 34
WRTT bytessec
Transport Layer 3-20
TCP Futures TCP over ldquolong fat pipesrdquo
example 1500 byte segments 100ms RTT want 10 Gbps throughput requires W = 83333 in-flight segments throughput in terms of segment loss probability L
[Mathis 1997]
to achieve 10 Gbps throughput need a loss rate of L = 210-10 ndash a very small loss rate
new versions of TCP for high-speed
TCP throughput = 122 MSSRTT L
Transport Layer 3-21
fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK
TCP connection 1
bottleneckrouter
capacity R
TCP Fairness
TCP connection 2
Transport Layer 3-22
Why is TCP fairtwo competing sessions additive increase gives slope of 1 as throughout increases multiplicative decrease decreases throughput proportionally
R
R
equal bandwidth share
Connection 1 throughput
congestion avoidance additive increaseloss decrease window by factor of 2
congestion avoidance additive increaseloss decrease window by factor of 2
Transport Layer 3-23
Fairness (more)Fairness and UDP multimedia apps often
do not use TCPbull do not want rate
throttled by congestion control
instead use UDPbull send audiovideo at
constant rate tolerate packet loss
Fairness parallel TCP connections application can open
multiple parallel connections between two hosts web browsers do this eg link of rate R with 9
existing connectionsbull new app asks for 1 TCP gets
rate R10bull new app asks for 11 TCPs
gets R2
Transport Layer 3-24
network-assisted congestion control two bits in IP header (ToS field) marked by network router
to indicate congestion congestion indication carried to receiving host receiver (seeing congestion indication in IP datagram) )
sets ECE bit on receiver-to-sender ACK segment to notify sender of congestion
Explicit Congestion Notification (ECN)
sourceapplicationtransportnetwork
linkphysical
destinationapplicationtransportnetwork
linkphysical
ECN=00 ECN=11
ECE=1
IP datagram
TCP ACK segment
Transport Layer 3-25
Chapter 3 summary principles behind transport
layer servicesbull multiplexing
demultiplexingbull reliable data transferbull flow controlbull congestion control
instantiation implementation in the Internet
bull UDPbull TCP
next leaving the network
ldquoedgerdquo (application transport layers) into the network
ldquocorerdquo
two network layer chapters
bull data planebull control plane
Transport Layer 3-3
Causescosts of congestion scenario 1
two senders two receivers one router infinite buffers output link capacity R no retransmission
maximum per-connection throughput R2
unlimited shared output link buffers
Host A
original data λin
Host B
throughput λout
R2
R2
λ out
λin R2de
lay
λin large delays as arrival rate λin
approaches capacity
Transport Layer 3-4
one router finite buffers sender retransmission of timed-out packet
bull application-layer input = application-layer output λin = λout
bull transport-layer input includes retransmissions λin λin
finite shared output link buffers
Host A
λin original data
Host B
λoutλin original data plusretransmitted data
lsquo
Causescosts of congestion scenario 2
Transport Layer 3-5
idealization perfect knowledge
sender sends only when router buffers available
finite shared output link buffers
λin original dataλoutλin original data plus
retransmitted data
copy
free buffer space
R2
R2
λ out
λin
Causescosts of congestion scenario 2
Host B
A
Transport Layer 3-6
λin original dataλoutλin original data plus
retransmitted data
copy
no buffer space
Idealization known losspackets can be lost dropped at router due to full buffers
sender only resends if packet known to be lost
Causescosts of congestion scenario 2
A
Host B
Transport Layer 3-7
λin original dataλoutλin original data plus
retransmitted data
free buffer space
Causescosts of congestion scenario 2Idealization known loss
packets can be lost dropped at router due to full buffers
sender only resends if packet known to be lost
R2
R2λin
λ out
when sending at R2 some packets are retransmissions but asymptotic goodput is still R2 (why)
A
Host B
Transport Layer 3-8
A
λin λoutλincopy
free buffer space
timeout
R2
R2λin
λ out
when sending at R2 some packets are retransmissions including duplicated that are delivered
Host B
Realistic duplicates packets can be lost dropped at
router due to full buffers sender times out prematurely
sending two copies both of which are delivered
Causescosts of congestion scenario 2
Transport Layer 3-9
R2
λ out
when sending at R2 some packets are retransmissions including duplicated that are delivered
ldquocostsrdquo of congestion more work (retrans) for given ldquogoodputrdquo unneeded retransmissions link carries multiple copies of pkt
bull decreasing goodput
R2λin
Causescosts of congestion scenario 2Realistic duplicates packets can be lost dropped at
router due to full buffers sender times out prematurely
sending two copies both of which are delivered
Transport Layer 3-10
four senders multihop paths timeoutretransmit
Q what happens as λin and λinrsquo
increase
finite shared output link buffers
Host A λout
Causescosts of congestion scenario 3
Host B
Host CHost D
λin original dataλin original data plus
retransmitted data
A as red λinrsquo increases all arriving
blue pkts at upper queue are dropped blue throughput 0
Transport Layer 3-11
another ldquocostrdquo of congestion when packet dropped any ldquoupstream
transmission capacity used for that packet was wasted
Causescosts of congestion scenario 3
C2
C2
λ out
λinrsquo
Transport Layer 3-12
Chapter 3 outline
31 transport-layer services
32 multiplexing and demultiplexing
33 connectionless transport UDP
34 principles of reliable data transfer
35 connection-oriented transport TCPbull segment structurebull reliable data transferbull flow controlbull connection management
36 principles of congestion control
37 TCP congestion control
Transport Layer 3-13
TCP congestion control additive increase multiplicative decrease
approach sender increases transmission rate (window size) probing for usable bandwidth until loss occursbull additive increase increase cwnd by 1 MSS every
RTT until loss detectedbull multiplicative decrease cut cwnd in half after loss cwnd
TCP
send
er
cong
estio
n w
indo
w s
ize
AIMD saw toothbehavior probing
for bandwidth
additively increase window size helliphellip until loss occurs (then cut window in half)
time
Transport Layer 3-14
TCP Congestion Control details
sender limits transmission
cwnd is dynamic function of perceived network congestion
TCP sending rate roughly send cwnd
bytes wait RTT for ACKS then send more bytes
last byteACKed sent not-
yet ACKed(ldquoin-flightrdquo)
last byte sent
cwnd
LastByteSent-LastByteAcked
lt cwnd
sender sequence number space
rate ~~cwndRTT
bytessec
Transport Layer 3-15
TCP Slow Start
when connection begins increase rate exponentially until first loss event
bull initially cwnd = 1 MSSbull double cwnd every RTTbull done by incrementing cwnd for every ACK received
summary initial rate is slow but ramps up exponentially fast
Host A
RTT
Host B
time
Transport Layer 3-16
TCP detecting reacting to loss
loss indicated by timeoutbull cwnd set to 1 MSS bull window then grows exponentially (as in slow start)
to threshold then grows linearly loss indicated by 3 duplicate ACKs TCP RENO
bull dup ACKs indicate network capable of delivering some segments
bull cwnd is cut in half window then grows linearly TCP Tahoe always sets cwnd to 1 (timeout or 3
duplicate acks)
Transport Layer 3-17
Q when should the exponential increase switch to linear
A when cwnd gets to 12 of its value before timeout
Implementation variable ssthresh on loss event ssthresh
is set to 12 of cwnd just before loss event
TCP switching from slow start to CA
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Transport Layer 3-18
Summary TCP Congestion Control
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
Λcwnd gt ssthresh
congestionavoidance
cwnd = cwnd + MSS (MSScwnd)dupACKcount = 0
transmit new segment(s) as allowed
new ACK
dupACKcount++duplicate ACK
fastrecovery
cwnd = cwnd + MSStransmit new segment(s) as allowed
duplicate ACK
ssthresh= cwnd2cwnd = ssthresh + 3
retransmit missing segment
dupACKcount == 3
timeoutssthresh = cwnd2cwnd = 1 dupACKcount = 0retransmit missing segment
ssthresh= cwnd2cwnd = ssthresh + 3retransmit missing segment
dupACKcount == 3cwnd = ssthreshdupACKcount = 0
New ACK
slow start
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
cwnd = cwnd+MSSdupACKcount = 0transmit new segment(s) as allowed
new ACKdupACKcount++duplicate ACK
Λcwnd = 1 MSS
ssthresh = 64 KBdupACKcount = 0
NewACK
NewACK
NewACK
Transport Layer 3-19
TCP throughput avg TCP thruput as function of window size RTT
bull ignore slow start assume always data to send W window size (measured in bytes) where loss occurs
bull avg window size ( in-flight bytes) is frac34 Wbull avg thruput is 34W per RTT
W
W2
avg TCP thruput = 34
WRTT bytessec
Transport Layer 3-20
TCP Futures TCP over ldquolong fat pipesrdquo
example 1500 byte segments 100ms RTT want 10 Gbps throughput requires W = 83333 in-flight segments throughput in terms of segment loss probability L
[Mathis 1997]
to achieve 10 Gbps throughput need a loss rate of L = 210-10 ndash a very small loss rate
new versions of TCP for high-speed
TCP throughput = 122 MSSRTT L
Transport Layer 3-21
fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK
TCP connection 1
bottleneckrouter
capacity R
TCP Fairness
TCP connection 2
Transport Layer 3-22
Why is TCP fairtwo competing sessions additive increase gives slope of 1 as throughout increases multiplicative decrease decreases throughput proportionally
R
R
equal bandwidth share
Connection 1 throughput
congestion avoidance additive increaseloss decrease window by factor of 2
congestion avoidance additive increaseloss decrease window by factor of 2
Transport Layer 3-23
Fairness (more)Fairness and UDP multimedia apps often
do not use TCPbull do not want rate
throttled by congestion control
instead use UDPbull send audiovideo at
constant rate tolerate packet loss
Fairness parallel TCP connections application can open
multiple parallel connections between two hosts web browsers do this eg link of rate R with 9
existing connectionsbull new app asks for 1 TCP gets
rate R10bull new app asks for 11 TCPs
gets R2
Transport Layer 3-24
network-assisted congestion control two bits in IP header (ToS field) marked by network router
to indicate congestion congestion indication carried to receiving host receiver (seeing congestion indication in IP datagram) )
sets ECE bit on receiver-to-sender ACK segment to notify sender of congestion
Explicit Congestion Notification (ECN)
sourceapplicationtransportnetwork
linkphysical
destinationapplicationtransportnetwork
linkphysical
ECN=00 ECN=11
ECE=1
IP datagram
TCP ACK segment
Transport Layer 3-25
Chapter 3 summary principles behind transport
layer servicesbull multiplexing
demultiplexingbull reliable data transferbull flow controlbull congestion control
instantiation implementation in the Internet
bull UDPbull TCP
next leaving the network
ldquoedgerdquo (application transport layers) into the network
ldquocorerdquo
two network layer chapters
bull data planebull control plane
Transport Layer 3-4
one router finite buffers sender retransmission of timed-out packet
bull application-layer input = application-layer output λin = λout
bull transport-layer input includes retransmissions λin λin
finite shared output link buffers
Host A
λin original data
Host B
λoutλin original data plusretransmitted data
lsquo
Causescosts of congestion scenario 2
Transport Layer 3-5
idealization perfect knowledge
sender sends only when router buffers available
finite shared output link buffers
λin original dataλoutλin original data plus
retransmitted data
copy
free buffer space
R2
R2
λ out
λin
Causescosts of congestion scenario 2
Host B
A
Transport Layer 3-6
λin original dataλoutλin original data plus
retransmitted data
copy
no buffer space
Idealization known losspackets can be lost dropped at router due to full buffers
sender only resends if packet known to be lost
Causescosts of congestion scenario 2
A
Host B
Transport Layer 3-7
λin original dataλoutλin original data plus
retransmitted data
free buffer space
Causescosts of congestion scenario 2Idealization known loss
packets can be lost dropped at router due to full buffers
sender only resends if packet known to be lost
R2
R2λin
λ out
when sending at R2 some packets are retransmissions but asymptotic goodput is still R2 (why)
A
Host B
Transport Layer 3-8
A
λin λoutλincopy
free buffer space
timeout
R2
R2λin
λ out
when sending at R2 some packets are retransmissions including duplicated that are delivered
Host B
Realistic duplicates packets can be lost dropped at
router due to full buffers sender times out prematurely
sending two copies both of which are delivered
Causescosts of congestion scenario 2
Transport Layer 3-9
R2
λ out
when sending at R2 some packets are retransmissions including duplicated that are delivered
ldquocostsrdquo of congestion more work (retrans) for given ldquogoodputrdquo unneeded retransmissions link carries multiple copies of pkt
bull decreasing goodput
R2λin
Causescosts of congestion scenario 2Realistic duplicates packets can be lost dropped at
router due to full buffers sender times out prematurely
sending two copies both of which are delivered
Transport Layer 3-10
four senders multihop paths timeoutretransmit
Q what happens as λin and λinrsquo
increase
finite shared output link buffers
Host A λout
Causescosts of congestion scenario 3
Host B
Host CHost D
λin original dataλin original data plus
retransmitted data
A as red λinrsquo increases all arriving
blue pkts at upper queue are dropped blue throughput 0
Transport Layer 3-11
another ldquocostrdquo of congestion when packet dropped any ldquoupstream
transmission capacity used for that packet was wasted
Causescosts of congestion scenario 3
C2
C2
λ out
λinrsquo
Transport Layer 3-12
Chapter 3 outline
31 transport-layer services
32 multiplexing and demultiplexing
33 connectionless transport UDP
34 principles of reliable data transfer
35 connection-oriented transport TCPbull segment structurebull reliable data transferbull flow controlbull connection management
36 principles of congestion control
37 TCP congestion control
Transport Layer 3-13
TCP congestion control additive increase multiplicative decrease
approach sender increases transmission rate (window size) probing for usable bandwidth until loss occursbull additive increase increase cwnd by 1 MSS every
RTT until loss detectedbull multiplicative decrease cut cwnd in half after loss cwnd
TCP
send
er
cong
estio
n w
indo
w s
ize
AIMD saw toothbehavior probing
for bandwidth
additively increase window size helliphellip until loss occurs (then cut window in half)
time
Transport Layer 3-14
TCP Congestion Control details
sender limits transmission
cwnd is dynamic function of perceived network congestion
TCP sending rate roughly send cwnd
bytes wait RTT for ACKS then send more bytes
last byteACKed sent not-
yet ACKed(ldquoin-flightrdquo)
last byte sent
cwnd
LastByteSent-LastByteAcked
lt cwnd
sender sequence number space
rate ~~cwndRTT
bytessec
Transport Layer 3-15
TCP Slow Start
when connection begins increase rate exponentially until first loss event
bull initially cwnd = 1 MSSbull double cwnd every RTTbull done by incrementing cwnd for every ACK received
summary initial rate is slow but ramps up exponentially fast
Host A
RTT
Host B
time
Transport Layer 3-16
TCP detecting reacting to loss
loss indicated by timeoutbull cwnd set to 1 MSS bull window then grows exponentially (as in slow start)
to threshold then grows linearly loss indicated by 3 duplicate ACKs TCP RENO
bull dup ACKs indicate network capable of delivering some segments
bull cwnd is cut in half window then grows linearly TCP Tahoe always sets cwnd to 1 (timeout or 3
duplicate acks)
Transport Layer 3-17
Q when should the exponential increase switch to linear
A when cwnd gets to 12 of its value before timeout
Implementation variable ssthresh on loss event ssthresh
is set to 12 of cwnd just before loss event
TCP switching from slow start to CA
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Transport Layer 3-18
Summary TCP Congestion Control
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
Λcwnd gt ssthresh
congestionavoidance
cwnd = cwnd + MSS (MSScwnd)dupACKcount = 0
transmit new segment(s) as allowed
new ACK
dupACKcount++duplicate ACK
fastrecovery
cwnd = cwnd + MSStransmit new segment(s) as allowed
duplicate ACK
ssthresh= cwnd2cwnd = ssthresh + 3
retransmit missing segment
dupACKcount == 3
timeoutssthresh = cwnd2cwnd = 1 dupACKcount = 0retransmit missing segment
ssthresh= cwnd2cwnd = ssthresh + 3retransmit missing segment
dupACKcount == 3cwnd = ssthreshdupACKcount = 0
New ACK
slow start
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
cwnd = cwnd+MSSdupACKcount = 0transmit new segment(s) as allowed
new ACKdupACKcount++duplicate ACK
Λcwnd = 1 MSS
ssthresh = 64 KBdupACKcount = 0
NewACK
NewACK
NewACK
Transport Layer 3-19
TCP throughput avg TCP thruput as function of window size RTT
bull ignore slow start assume always data to send W window size (measured in bytes) where loss occurs
bull avg window size ( in-flight bytes) is frac34 Wbull avg thruput is 34W per RTT
W
W2
avg TCP thruput = 34
WRTT bytessec
Transport Layer 3-20
TCP Futures TCP over ldquolong fat pipesrdquo
example 1500 byte segments 100ms RTT want 10 Gbps throughput requires W = 83333 in-flight segments throughput in terms of segment loss probability L
[Mathis 1997]
to achieve 10 Gbps throughput need a loss rate of L = 210-10 ndash a very small loss rate
new versions of TCP for high-speed
TCP throughput = 122 MSSRTT L
Transport Layer 3-21
fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK
TCP connection 1
bottleneckrouter
capacity R
TCP Fairness
TCP connection 2
Transport Layer 3-22
Why is TCP fairtwo competing sessions additive increase gives slope of 1 as throughout increases multiplicative decrease decreases throughput proportionally
R
R
equal bandwidth share
Connection 1 throughput
congestion avoidance additive increaseloss decrease window by factor of 2
congestion avoidance additive increaseloss decrease window by factor of 2
Transport Layer 3-23
Fairness (more)Fairness and UDP multimedia apps often
do not use TCPbull do not want rate
throttled by congestion control
instead use UDPbull send audiovideo at
constant rate tolerate packet loss
Fairness parallel TCP connections application can open
multiple parallel connections between two hosts web browsers do this eg link of rate R with 9
existing connectionsbull new app asks for 1 TCP gets
rate R10bull new app asks for 11 TCPs
gets R2
Transport Layer 3-24
network-assisted congestion control two bits in IP header (ToS field) marked by network router
to indicate congestion congestion indication carried to receiving host receiver (seeing congestion indication in IP datagram) )
sets ECE bit on receiver-to-sender ACK segment to notify sender of congestion
Explicit Congestion Notification (ECN)
sourceapplicationtransportnetwork
linkphysical
destinationapplicationtransportnetwork
linkphysical
ECN=00 ECN=11
ECE=1
IP datagram
TCP ACK segment
Transport Layer 3-25
Chapter 3 summary principles behind transport
layer servicesbull multiplexing
demultiplexingbull reliable data transferbull flow controlbull congestion control
instantiation implementation in the Internet
bull UDPbull TCP
next leaving the network
ldquoedgerdquo (application transport layers) into the network
ldquocorerdquo
two network layer chapters
bull data planebull control plane
Transport Layer 3-5
idealization perfect knowledge
sender sends only when router buffers available
finite shared output link buffers
λin original dataλoutλin original data plus
retransmitted data
copy
free buffer space
R2
R2
λ out
λin
Causescosts of congestion scenario 2
Host B
A
Transport Layer 3-6
λin original dataλoutλin original data plus
retransmitted data
copy
no buffer space
Idealization known losspackets can be lost dropped at router due to full buffers
sender only resends if packet known to be lost
Causescosts of congestion scenario 2
A
Host B
Transport Layer 3-7
λin original dataλoutλin original data plus
retransmitted data
free buffer space
Causescosts of congestion scenario 2Idealization known loss
packets can be lost dropped at router due to full buffers
sender only resends if packet known to be lost
R2
R2λin
λ out
when sending at R2 some packets are retransmissions but asymptotic goodput is still R2 (why)
A
Host B
Transport Layer 3-8
A
λin λoutλincopy
free buffer space
timeout
R2
R2λin
λ out
when sending at R2 some packets are retransmissions including duplicated that are delivered
Host B
Realistic duplicates packets can be lost dropped at
router due to full buffers sender times out prematurely
sending two copies both of which are delivered
Causescosts of congestion scenario 2
Transport Layer 3-9
R2
λ out
when sending at R2 some packets are retransmissions including duplicated that are delivered
ldquocostsrdquo of congestion more work (retrans) for given ldquogoodputrdquo unneeded retransmissions link carries multiple copies of pkt
bull decreasing goodput
R2λin
Causescosts of congestion scenario 2Realistic duplicates packets can be lost dropped at
router due to full buffers sender times out prematurely
sending two copies both of which are delivered
Transport Layer 3-10
four senders multihop paths timeoutretransmit
Q what happens as λin and λinrsquo
increase
finite shared output link buffers
Host A λout
Causescosts of congestion scenario 3
Host B
Host CHost D
λin original dataλin original data plus
retransmitted data
A as red λinrsquo increases all arriving
blue pkts at upper queue are dropped blue throughput 0
Transport Layer 3-11
another ldquocostrdquo of congestion when packet dropped any ldquoupstream
transmission capacity used for that packet was wasted
Causescosts of congestion scenario 3
C2
C2
λ out
λinrsquo
Transport Layer 3-12
Chapter 3 outline
31 transport-layer services
32 multiplexing and demultiplexing
33 connectionless transport UDP
34 principles of reliable data transfer
35 connection-oriented transport TCPbull segment structurebull reliable data transferbull flow controlbull connection management
36 principles of congestion control
37 TCP congestion control
Transport Layer 3-13
TCP congestion control additive increase multiplicative decrease
approach sender increases transmission rate (window size) probing for usable bandwidth until loss occursbull additive increase increase cwnd by 1 MSS every
RTT until loss detectedbull multiplicative decrease cut cwnd in half after loss cwnd
TCP
send
er
cong
estio
n w
indo
w s
ize
AIMD saw toothbehavior probing
for bandwidth
additively increase window size helliphellip until loss occurs (then cut window in half)
time
Transport Layer 3-14
TCP Congestion Control details
sender limits transmission
cwnd is dynamic function of perceived network congestion
TCP sending rate roughly send cwnd
bytes wait RTT for ACKS then send more bytes
last byteACKed sent not-
yet ACKed(ldquoin-flightrdquo)
last byte sent
cwnd
LastByteSent-LastByteAcked
lt cwnd
sender sequence number space
rate ~~cwndRTT
bytessec
Transport Layer 3-15
TCP Slow Start
when connection begins increase rate exponentially until first loss event
bull initially cwnd = 1 MSSbull double cwnd every RTTbull done by incrementing cwnd for every ACK received
summary initial rate is slow but ramps up exponentially fast
Host A
RTT
Host B
time
Transport Layer 3-16
TCP detecting reacting to loss
loss indicated by timeoutbull cwnd set to 1 MSS bull window then grows exponentially (as in slow start)
to threshold then grows linearly loss indicated by 3 duplicate ACKs TCP RENO
bull dup ACKs indicate network capable of delivering some segments
bull cwnd is cut in half window then grows linearly TCP Tahoe always sets cwnd to 1 (timeout or 3
duplicate acks)
Transport Layer 3-17
Q when should the exponential increase switch to linear
A when cwnd gets to 12 of its value before timeout
Implementation variable ssthresh on loss event ssthresh
is set to 12 of cwnd just before loss event
TCP switching from slow start to CA
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Transport Layer 3-18
Summary TCP Congestion Control
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
Λcwnd gt ssthresh
congestionavoidance
cwnd = cwnd + MSS (MSScwnd)dupACKcount = 0
transmit new segment(s) as allowed
new ACK
dupACKcount++duplicate ACK
fastrecovery
cwnd = cwnd + MSStransmit new segment(s) as allowed
duplicate ACK
ssthresh= cwnd2cwnd = ssthresh + 3
retransmit missing segment
dupACKcount == 3
timeoutssthresh = cwnd2cwnd = 1 dupACKcount = 0retransmit missing segment
ssthresh= cwnd2cwnd = ssthresh + 3retransmit missing segment
dupACKcount == 3cwnd = ssthreshdupACKcount = 0
New ACK
slow start
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
cwnd = cwnd+MSSdupACKcount = 0transmit new segment(s) as allowed
new ACKdupACKcount++duplicate ACK
Λcwnd = 1 MSS
ssthresh = 64 KBdupACKcount = 0
NewACK
NewACK
NewACK
Transport Layer 3-19
TCP throughput avg TCP thruput as function of window size RTT
bull ignore slow start assume always data to send W window size (measured in bytes) where loss occurs
bull avg window size ( in-flight bytes) is frac34 Wbull avg thruput is 34W per RTT
W
W2
avg TCP thruput = 34
WRTT bytessec
Transport Layer 3-20
TCP Futures TCP over ldquolong fat pipesrdquo
example 1500 byte segments 100ms RTT want 10 Gbps throughput requires W = 83333 in-flight segments throughput in terms of segment loss probability L
[Mathis 1997]
to achieve 10 Gbps throughput need a loss rate of L = 210-10 ndash a very small loss rate
new versions of TCP for high-speed
TCP throughput = 122 MSSRTT L
Transport Layer 3-21
fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK
TCP connection 1
bottleneckrouter
capacity R
TCP Fairness
TCP connection 2
Transport Layer 3-22
Why is TCP fairtwo competing sessions additive increase gives slope of 1 as throughout increases multiplicative decrease decreases throughput proportionally
R
R
equal bandwidth share
Connection 1 throughput
congestion avoidance additive increaseloss decrease window by factor of 2
congestion avoidance additive increaseloss decrease window by factor of 2
Transport Layer 3-23
Fairness (more)Fairness and UDP multimedia apps often
do not use TCPbull do not want rate
throttled by congestion control
instead use UDPbull send audiovideo at
constant rate tolerate packet loss
Fairness parallel TCP connections application can open
multiple parallel connections between two hosts web browsers do this eg link of rate R with 9
existing connectionsbull new app asks for 1 TCP gets
rate R10bull new app asks for 11 TCPs
gets R2
Transport Layer 3-24
network-assisted congestion control two bits in IP header (ToS field) marked by network router
to indicate congestion congestion indication carried to receiving host receiver (seeing congestion indication in IP datagram) )
sets ECE bit on receiver-to-sender ACK segment to notify sender of congestion
Explicit Congestion Notification (ECN)
sourceapplicationtransportnetwork
linkphysical
destinationapplicationtransportnetwork
linkphysical
ECN=00 ECN=11
ECE=1
IP datagram
TCP ACK segment
Transport Layer 3-25
Chapter 3 summary principles behind transport
layer servicesbull multiplexing
demultiplexingbull reliable data transferbull flow controlbull congestion control
instantiation implementation in the Internet
bull UDPbull TCP
next leaving the network
ldquoedgerdquo (application transport layers) into the network
ldquocorerdquo
two network layer chapters
bull data planebull control plane
Transport Layer 3-6
λin original dataλoutλin original data plus
retransmitted data
copy
no buffer space
Idealization known losspackets can be lost dropped at router due to full buffers
sender only resends if packet known to be lost
Causescosts of congestion scenario 2
A
Host B
Transport Layer 3-7
λin original dataλoutλin original data plus
retransmitted data
free buffer space
Causescosts of congestion scenario 2Idealization known loss
packets can be lost dropped at router due to full buffers
sender only resends if packet known to be lost
R2
R2λin
λ out
when sending at R2 some packets are retransmissions but asymptotic goodput is still R2 (why)
A
Host B
Transport Layer 3-8
A
λin λoutλincopy
free buffer space
timeout
R2
R2λin
λ out
when sending at R2 some packets are retransmissions including duplicated that are delivered
Host B
Realistic duplicates packets can be lost dropped at
router due to full buffers sender times out prematurely
sending two copies both of which are delivered
Causescosts of congestion scenario 2
Transport Layer 3-9
R2
λ out
when sending at R2 some packets are retransmissions including duplicated that are delivered
ldquocostsrdquo of congestion more work (retrans) for given ldquogoodputrdquo unneeded retransmissions link carries multiple copies of pkt
bull decreasing goodput
R2λin
Causescosts of congestion scenario 2Realistic duplicates packets can be lost dropped at
router due to full buffers sender times out prematurely
sending two copies both of which are delivered
Transport Layer 3-10
four senders multihop paths timeoutretransmit
Q what happens as λin and λinrsquo
increase
finite shared output link buffers
Host A λout
Causescosts of congestion scenario 3
Host B
Host CHost D
λin original dataλin original data plus
retransmitted data
A as red λinrsquo increases all arriving
blue pkts at upper queue are dropped blue throughput 0
Transport Layer 3-11
another ldquocostrdquo of congestion when packet dropped any ldquoupstream
transmission capacity used for that packet was wasted
Causescosts of congestion scenario 3
C2
C2
λ out
λinrsquo
Transport Layer 3-12
Chapter 3 outline
31 transport-layer services
32 multiplexing and demultiplexing
33 connectionless transport UDP
34 principles of reliable data transfer
35 connection-oriented transport TCPbull segment structurebull reliable data transferbull flow controlbull connection management
36 principles of congestion control
37 TCP congestion control
Transport Layer 3-13
TCP congestion control additive increase multiplicative decrease
approach sender increases transmission rate (window size) probing for usable bandwidth until loss occursbull additive increase increase cwnd by 1 MSS every
RTT until loss detectedbull multiplicative decrease cut cwnd in half after loss cwnd
TCP
send
er
cong
estio
n w
indo
w s
ize
AIMD saw toothbehavior probing
for bandwidth
additively increase window size helliphellip until loss occurs (then cut window in half)
time
Transport Layer 3-14
TCP Congestion Control details
sender limits transmission
cwnd is dynamic function of perceived network congestion
TCP sending rate roughly send cwnd
bytes wait RTT for ACKS then send more bytes
last byteACKed sent not-
yet ACKed(ldquoin-flightrdquo)
last byte sent
cwnd
LastByteSent-LastByteAcked
lt cwnd
sender sequence number space
rate ~~cwndRTT
bytessec
Transport Layer 3-15
TCP Slow Start
when connection begins increase rate exponentially until first loss event
bull initially cwnd = 1 MSSbull double cwnd every RTTbull done by incrementing cwnd for every ACK received
summary initial rate is slow but ramps up exponentially fast
Host A
RTT
Host B
time
Transport Layer 3-16
TCP detecting reacting to loss
loss indicated by timeoutbull cwnd set to 1 MSS bull window then grows exponentially (as in slow start)
to threshold then grows linearly loss indicated by 3 duplicate ACKs TCP RENO
bull dup ACKs indicate network capable of delivering some segments
bull cwnd is cut in half window then grows linearly TCP Tahoe always sets cwnd to 1 (timeout or 3
duplicate acks)
Transport Layer 3-17
Q when should the exponential increase switch to linear
A when cwnd gets to 12 of its value before timeout
Implementation variable ssthresh on loss event ssthresh
is set to 12 of cwnd just before loss event
TCP switching from slow start to CA
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Transport Layer 3-18
Summary TCP Congestion Control
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
Λcwnd gt ssthresh
congestionavoidance
cwnd = cwnd + MSS (MSScwnd)dupACKcount = 0
transmit new segment(s) as allowed
new ACK
dupACKcount++duplicate ACK
fastrecovery
cwnd = cwnd + MSStransmit new segment(s) as allowed
duplicate ACK
ssthresh= cwnd2cwnd = ssthresh + 3
retransmit missing segment
dupACKcount == 3
timeoutssthresh = cwnd2cwnd = 1 dupACKcount = 0retransmit missing segment
ssthresh= cwnd2cwnd = ssthresh + 3retransmit missing segment
dupACKcount == 3cwnd = ssthreshdupACKcount = 0
New ACK
slow start
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
cwnd = cwnd+MSSdupACKcount = 0transmit new segment(s) as allowed
new ACKdupACKcount++duplicate ACK
Λcwnd = 1 MSS
ssthresh = 64 KBdupACKcount = 0
NewACK
NewACK
NewACK
Transport Layer 3-19
TCP throughput avg TCP thruput as function of window size RTT
bull ignore slow start assume always data to send W window size (measured in bytes) where loss occurs
bull avg window size ( in-flight bytes) is frac34 Wbull avg thruput is 34W per RTT
W
W2
avg TCP thruput = 34
WRTT bytessec
Transport Layer 3-20
TCP Futures TCP over ldquolong fat pipesrdquo
example 1500 byte segments 100ms RTT want 10 Gbps throughput requires W = 83333 in-flight segments throughput in terms of segment loss probability L
[Mathis 1997]
to achieve 10 Gbps throughput need a loss rate of L = 210-10 ndash a very small loss rate
new versions of TCP for high-speed
TCP throughput = 122 MSSRTT L
Transport Layer 3-21
fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK
TCP connection 1
bottleneckrouter
capacity R
TCP Fairness
TCP connection 2
Transport Layer 3-22
Why is TCP fairtwo competing sessions additive increase gives slope of 1 as throughout increases multiplicative decrease decreases throughput proportionally
R
R
equal bandwidth share
Connection 1 throughput
congestion avoidance additive increaseloss decrease window by factor of 2
congestion avoidance additive increaseloss decrease window by factor of 2
Transport Layer 3-23
Fairness (more)Fairness and UDP multimedia apps often
do not use TCPbull do not want rate
throttled by congestion control
instead use UDPbull send audiovideo at
constant rate tolerate packet loss
Fairness parallel TCP connections application can open
multiple parallel connections between two hosts web browsers do this eg link of rate R with 9
existing connectionsbull new app asks for 1 TCP gets
rate R10bull new app asks for 11 TCPs
gets R2
Transport Layer 3-24
network-assisted congestion control two bits in IP header (ToS field) marked by network router
to indicate congestion congestion indication carried to receiving host receiver (seeing congestion indication in IP datagram) )
sets ECE bit on receiver-to-sender ACK segment to notify sender of congestion
Explicit Congestion Notification (ECN)
sourceapplicationtransportnetwork
linkphysical
destinationapplicationtransportnetwork
linkphysical
ECN=00 ECN=11
ECE=1
IP datagram
TCP ACK segment
Transport Layer 3-25
Chapter 3 summary principles behind transport
layer servicesbull multiplexing
demultiplexingbull reliable data transferbull flow controlbull congestion control
instantiation implementation in the Internet
bull UDPbull TCP
next leaving the network
ldquoedgerdquo (application transport layers) into the network
ldquocorerdquo
two network layer chapters
bull data planebull control plane
Transport Layer 3-7
λin original dataλoutλin original data plus
retransmitted data
free buffer space
Causescosts of congestion scenario 2Idealization known loss
packets can be lost dropped at router due to full buffers
sender only resends if packet known to be lost
R2
R2λin
λ out
when sending at R2 some packets are retransmissions but asymptotic goodput is still R2 (why)
A
Host B
Transport Layer 3-8
A
λin λoutλincopy
free buffer space
timeout
R2
R2λin
λ out
when sending at R2 some packets are retransmissions including duplicated that are delivered
Host B
Realistic duplicates packets can be lost dropped at
router due to full buffers sender times out prematurely
sending two copies both of which are delivered
Causescosts of congestion scenario 2
Transport Layer 3-9
R2
λ out
when sending at R2 some packets are retransmissions including duplicated that are delivered
ldquocostsrdquo of congestion more work (retrans) for given ldquogoodputrdquo unneeded retransmissions link carries multiple copies of pkt
bull decreasing goodput
R2λin
Causescosts of congestion scenario 2Realistic duplicates packets can be lost dropped at
router due to full buffers sender times out prematurely
sending two copies both of which are delivered
Transport Layer 3-10
four senders multihop paths timeoutretransmit
Q what happens as λin and λinrsquo
increase
finite shared output link buffers
Host A λout
Causescosts of congestion scenario 3
Host B
Host CHost D
λin original dataλin original data plus
retransmitted data
A as red λinrsquo increases all arriving
blue pkts at upper queue are dropped blue throughput 0
Transport Layer 3-11
another ldquocostrdquo of congestion when packet dropped any ldquoupstream
transmission capacity used for that packet was wasted
Causescosts of congestion scenario 3
C2
C2
λ out
λinrsquo
Transport Layer 3-12
Chapter 3 outline
31 transport-layer services
32 multiplexing and demultiplexing
33 connectionless transport UDP
34 principles of reliable data transfer
35 connection-oriented transport TCPbull segment structurebull reliable data transferbull flow controlbull connection management
36 principles of congestion control
37 TCP congestion control
Transport Layer 3-13
TCP congestion control additive increase multiplicative decrease
approach sender increases transmission rate (window size) probing for usable bandwidth until loss occursbull additive increase increase cwnd by 1 MSS every
RTT until loss detectedbull multiplicative decrease cut cwnd in half after loss cwnd
TCP
send
er
cong
estio
n w
indo
w s
ize
AIMD saw toothbehavior probing
for bandwidth
additively increase window size helliphellip until loss occurs (then cut window in half)
time
Transport Layer 3-14
TCP Congestion Control details
sender limits transmission
cwnd is dynamic function of perceived network congestion
TCP sending rate roughly send cwnd
bytes wait RTT for ACKS then send more bytes
last byteACKed sent not-
yet ACKed(ldquoin-flightrdquo)
last byte sent
cwnd
LastByteSent-LastByteAcked
lt cwnd
sender sequence number space
rate ~~cwndRTT
bytessec
Transport Layer 3-15
TCP Slow Start
when connection begins increase rate exponentially until first loss event
bull initially cwnd = 1 MSSbull double cwnd every RTTbull done by incrementing cwnd for every ACK received
summary initial rate is slow but ramps up exponentially fast
Host A
RTT
Host B
time
Transport Layer 3-16
TCP detecting reacting to loss
loss indicated by timeoutbull cwnd set to 1 MSS bull window then grows exponentially (as in slow start)
to threshold then grows linearly loss indicated by 3 duplicate ACKs TCP RENO
bull dup ACKs indicate network capable of delivering some segments
bull cwnd is cut in half window then grows linearly TCP Tahoe always sets cwnd to 1 (timeout or 3
duplicate acks)
Transport Layer 3-17
Q when should the exponential increase switch to linear
A when cwnd gets to 12 of its value before timeout
Implementation variable ssthresh on loss event ssthresh
is set to 12 of cwnd just before loss event
TCP switching from slow start to CA
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Transport Layer 3-18
Summary TCP Congestion Control
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
Λcwnd gt ssthresh
congestionavoidance
cwnd = cwnd + MSS (MSScwnd)dupACKcount = 0
transmit new segment(s) as allowed
new ACK
dupACKcount++duplicate ACK
fastrecovery
cwnd = cwnd + MSStransmit new segment(s) as allowed
duplicate ACK
ssthresh= cwnd2cwnd = ssthresh + 3
retransmit missing segment
dupACKcount == 3
timeoutssthresh = cwnd2cwnd = 1 dupACKcount = 0retransmit missing segment
ssthresh= cwnd2cwnd = ssthresh + 3retransmit missing segment
dupACKcount == 3cwnd = ssthreshdupACKcount = 0
New ACK
slow start
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
cwnd = cwnd+MSSdupACKcount = 0transmit new segment(s) as allowed
new ACKdupACKcount++duplicate ACK
Λcwnd = 1 MSS
ssthresh = 64 KBdupACKcount = 0
NewACK
NewACK
NewACK
Transport Layer 3-19
TCP throughput avg TCP thruput as function of window size RTT
bull ignore slow start assume always data to send W window size (measured in bytes) where loss occurs
bull avg window size ( in-flight bytes) is frac34 Wbull avg thruput is 34W per RTT
W
W2
avg TCP thruput = 34
WRTT bytessec
Transport Layer 3-20
TCP Futures TCP over ldquolong fat pipesrdquo
example 1500 byte segments 100ms RTT want 10 Gbps throughput requires W = 83333 in-flight segments throughput in terms of segment loss probability L
[Mathis 1997]
to achieve 10 Gbps throughput need a loss rate of L = 210-10 ndash a very small loss rate
new versions of TCP for high-speed
TCP throughput = 122 MSSRTT L
Transport Layer 3-21
fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK
TCP connection 1
bottleneckrouter
capacity R
TCP Fairness
TCP connection 2
Transport Layer 3-22
Why is TCP fairtwo competing sessions additive increase gives slope of 1 as throughout increases multiplicative decrease decreases throughput proportionally
R
R
equal bandwidth share
Connection 1 throughput
congestion avoidance additive increaseloss decrease window by factor of 2
congestion avoidance additive increaseloss decrease window by factor of 2
Transport Layer 3-23
Fairness (more)Fairness and UDP multimedia apps often
do not use TCPbull do not want rate
throttled by congestion control
instead use UDPbull send audiovideo at
constant rate tolerate packet loss
Fairness parallel TCP connections application can open
multiple parallel connections between two hosts web browsers do this eg link of rate R with 9
existing connectionsbull new app asks for 1 TCP gets
rate R10bull new app asks for 11 TCPs
gets R2
Transport Layer 3-24
network-assisted congestion control two bits in IP header (ToS field) marked by network router
to indicate congestion congestion indication carried to receiving host receiver (seeing congestion indication in IP datagram) )
sets ECE bit on receiver-to-sender ACK segment to notify sender of congestion
Explicit Congestion Notification (ECN)
sourceapplicationtransportnetwork
linkphysical
destinationapplicationtransportnetwork
linkphysical
ECN=00 ECN=11
ECE=1
IP datagram
TCP ACK segment
Transport Layer 3-25
Chapter 3 summary principles behind transport
layer servicesbull multiplexing
demultiplexingbull reliable data transferbull flow controlbull congestion control
instantiation implementation in the Internet
bull UDPbull TCP
next leaving the network
ldquoedgerdquo (application transport layers) into the network
ldquocorerdquo
two network layer chapters
bull data planebull control plane
Transport Layer 3-8
A
λin λoutλincopy
free buffer space
timeout
R2
R2λin
λ out
when sending at R2 some packets are retransmissions including duplicated that are delivered
Host B
Realistic duplicates packets can be lost dropped at
router due to full buffers sender times out prematurely
sending two copies both of which are delivered
Causescosts of congestion scenario 2
Transport Layer 3-9
R2
λ out
when sending at R2 some packets are retransmissions including duplicated that are delivered
ldquocostsrdquo of congestion more work (retrans) for given ldquogoodputrdquo unneeded retransmissions link carries multiple copies of pkt
bull decreasing goodput
R2λin
Causescosts of congestion scenario 2Realistic duplicates packets can be lost dropped at
router due to full buffers sender times out prematurely
sending two copies both of which are delivered
Transport Layer 3-10
four senders multihop paths timeoutretransmit
Q what happens as λin and λinrsquo
increase
finite shared output link buffers
Host A λout
Causescosts of congestion scenario 3
Host B
Host CHost D
λin original dataλin original data plus
retransmitted data
A as red λinrsquo increases all arriving
blue pkts at upper queue are dropped blue throughput 0
Transport Layer 3-11
another ldquocostrdquo of congestion when packet dropped any ldquoupstream
transmission capacity used for that packet was wasted
Causescosts of congestion scenario 3
C2
C2
λ out
λinrsquo
Transport Layer 3-12
Chapter 3 outline
31 transport-layer services
32 multiplexing and demultiplexing
33 connectionless transport UDP
34 principles of reliable data transfer
35 connection-oriented transport TCPbull segment structurebull reliable data transferbull flow controlbull connection management
36 principles of congestion control
37 TCP congestion control
Transport Layer 3-13
TCP congestion control additive increase multiplicative decrease
approach sender increases transmission rate (window size) probing for usable bandwidth until loss occursbull additive increase increase cwnd by 1 MSS every
RTT until loss detectedbull multiplicative decrease cut cwnd in half after loss cwnd
TCP
send
er
cong
estio
n w
indo
w s
ize
AIMD saw toothbehavior probing
for bandwidth
additively increase window size helliphellip until loss occurs (then cut window in half)
time
Transport Layer 3-14
TCP Congestion Control details
sender limits transmission
cwnd is dynamic function of perceived network congestion
TCP sending rate roughly send cwnd
bytes wait RTT for ACKS then send more bytes
last byteACKed sent not-
yet ACKed(ldquoin-flightrdquo)
last byte sent
cwnd
LastByteSent-LastByteAcked
lt cwnd
sender sequence number space
rate ~~cwndRTT
bytessec
Transport Layer 3-15
TCP Slow Start
when connection begins increase rate exponentially until first loss event
bull initially cwnd = 1 MSSbull double cwnd every RTTbull done by incrementing cwnd for every ACK received
summary initial rate is slow but ramps up exponentially fast
Host A
RTT
Host B
time
Transport Layer 3-16
TCP detecting reacting to loss
loss indicated by timeoutbull cwnd set to 1 MSS bull window then grows exponentially (as in slow start)
to threshold then grows linearly loss indicated by 3 duplicate ACKs TCP RENO
bull dup ACKs indicate network capable of delivering some segments
bull cwnd is cut in half window then grows linearly TCP Tahoe always sets cwnd to 1 (timeout or 3
duplicate acks)
Transport Layer 3-17
Q when should the exponential increase switch to linear
A when cwnd gets to 12 of its value before timeout
Implementation variable ssthresh on loss event ssthresh
is set to 12 of cwnd just before loss event
TCP switching from slow start to CA
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Transport Layer 3-18
Summary TCP Congestion Control
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
Λcwnd gt ssthresh
congestionavoidance
cwnd = cwnd + MSS (MSScwnd)dupACKcount = 0
transmit new segment(s) as allowed
new ACK
dupACKcount++duplicate ACK
fastrecovery
cwnd = cwnd + MSStransmit new segment(s) as allowed
duplicate ACK
ssthresh= cwnd2cwnd = ssthresh + 3
retransmit missing segment
dupACKcount == 3
timeoutssthresh = cwnd2cwnd = 1 dupACKcount = 0retransmit missing segment
ssthresh= cwnd2cwnd = ssthresh + 3retransmit missing segment
dupACKcount == 3cwnd = ssthreshdupACKcount = 0
New ACK
slow start
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
cwnd = cwnd+MSSdupACKcount = 0transmit new segment(s) as allowed
new ACKdupACKcount++duplicate ACK
Λcwnd = 1 MSS
ssthresh = 64 KBdupACKcount = 0
NewACK
NewACK
NewACK
Transport Layer 3-19
TCP throughput avg TCP thruput as function of window size RTT
bull ignore slow start assume always data to send W window size (measured in bytes) where loss occurs
bull avg window size ( in-flight bytes) is frac34 Wbull avg thruput is 34W per RTT
W
W2
avg TCP thruput = 34
WRTT bytessec
Transport Layer 3-20
TCP Futures TCP over ldquolong fat pipesrdquo
example 1500 byte segments 100ms RTT want 10 Gbps throughput requires W = 83333 in-flight segments throughput in terms of segment loss probability L
[Mathis 1997]
to achieve 10 Gbps throughput need a loss rate of L = 210-10 ndash a very small loss rate
new versions of TCP for high-speed
TCP throughput = 122 MSSRTT L
Transport Layer 3-21
fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK
TCP connection 1
bottleneckrouter
capacity R
TCP Fairness
TCP connection 2
Transport Layer 3-22
Why is TCP fairtwo competing sessions additive increase gives slope of 1 as throughout increases multiplicative decrease decreases throughput proportionally
R
R
equal bandwidth share
Connection 1 throughput
congestion avoidance additive increaseloss decrease window by factor of 2
congestion avoidance additive increaseloss decrease window by factor of 2
Transport Layer 3-23
Fairness (more)Fairness and UDP multimedia apps often
do not use TCPbull do not want rate
throttled by congestion control
instead use UDPbull send audiovideo at
constant rate tolerate packet loss
Fairness parallel TCP connections application can open
multiple parallel connections between two hosts web browsers do this eg link of rate R with 9
existing connectionsbull new app asks for 1 TCP gets
rate R10bull new app asks for 11 TCPs
gets R2
Transport Layer 3-24
network-assisted congestion control two bits in IP header (ToS field) marked by network router
to indicate congestion congestion indication carried to receiving host receiver (seeing congestion indication in IP datagram) )
sets ECE bit on receiver-to-sender ACK segment to notify sender of congestion
Explicit Congestion Notification (ECN)
sourceapplicationtransportnetwork
linkphysical
destinationapplicationtransportnetwork
linkphysical
ECN=00 ECN=11
ECE=1
IP datagram
TCP ACK segment
Transport Layer 3-25
Chapter 3 summary principles behind transport
layer servicesbull multiplexing
demultiplexingbull reliable data transferbull flow controlbull congestion control
instantiation implementation in the Internet
bull UDPbull TCP
next leaving the network
ldquoedgerdquo (application transport layers) into the network
ldquocorerdquo
two network layer chapters
bull data planebull control plane
Transport Layer 3-9
R2
λ out
when sending at R2 some packets are retransmissions including duplicated that are delivered
ldquocostsrdquo of congestion more work (retrans) for given ldquogoodputrdquo unneeded retransmissions link carries multiple copies of pkt
bull decreasing goodput
R2λin
Causescosts of congestion scenario 2Realistic duplicates packets can be lost dropped at
router due to full buffers sender times out prematurely
sending two copies both of which are delivered
Transport Layer 3-10
four senders multihop paths timeoutretransmit
Q what happens as λin and λinrsquo
increase
finite shared output link buffers
Host A λout
Causescosts of congestion scenario 3
Host B
Host CHost D
λin original dataλin original data plus
retransmitted data
A as red λinrsquo increases all arriving
blue pkts at upper queue are dropped blue throughput 0
Transport Layer 3-11
another ldquocostrdquo of congestion when packet dropped any ldquoupstream
transmission capacity used for that packet was wasted
Causescosts of congestion scenario 3
C2
C2
λ out
λinrsquo
Transport Layer 3-12
Chapter 3 outline
31 transport-layer services
32 multiplexing and demultiplexing
33 connectionless transport UDP
34 principles of reliable data transfer
35 connection-oriented transport TCPbull segment structurebull reliable data transferbull flow controlbull connection management
36 principles of congestion control
37 TCP congestion control
Transport Layer 3-13
TCP congestion control additive increase multiplicative decrease
approach sender increases transmission rate (window size) probing for usable bandwidth until loss occursbull additive increase increase cwnd by 1 MSS every
RTT until loss detectedbull multiplicative decrease cut cwnd in half after loss cwnd
TCP
send
er
cong
estio
n w
indo
w s
ize
AIMD saw toothbehavior probing
for bandwidth
additively increase window size helliphellip until loss occurs (then cut window in half)
time
Transport Layer 3-14
TCP Congestion Control details
sender limits transmission
cwnd is dynamic function of perceived network congestion
TCP sending rate roughly send cwnd
bytes wait RTT for ACKS then send more bytes
last byteACKed sent not-
yet ACKed(ldquoin-flightrdquo)
last byte sent
cwnd
LastByteSent-LastByteAcked
lt cwnd
sender sequence number space
rate ~~cwndRTT
bytessec
Transport Layer 3-15
TCP Slow Start
when connection begins increase rate exponentially until first loss event
bull initially cwnd = 1 MSSbull double cwnd every RTTbull done by incrementing cwnd for every ACK received
summary initial rate is slow but ramps up exponentially fast
Host A
RTT
Host B
time
Transport Layer 3-16
TCP detecting reacting to loss
loss indicated by timeoutbull cwnd set to 1 MSS bull window then grows exponentially (as in slow start)
to threshold then grows linearly loss indicated by 3 duplicate ACKs TCP RENO
bull dup ACKs indicate network capable of delivering some segments
bull cwnd is cut in half window then grows linearly TCP Tahoe always sets cwnd to 1 (timeout or 3
duplicate acks)
Transport Layer 3-17
Q when should the exponential increase switch to linear
A when cwnd gets to 12 of its value before timeout
Implementation variable ssthresh on loss event ssthresh
is set to 12 of cwnd just before loss event
TCP switching from slow start to CA
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Transport Layer 3-18
Summary TCP Congestion Control
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
Λcwnd gt ssthresh
congestionavoidance
cwnd = cwnd + MSS (MSScwnd)dupACKcount = 0
transmit new segment(s) as allowed
new ACK
dupACKcount++duplicate ACK
fastrecovery
cwnd = cwnd + MSStransmit new segment(s) as allowed
duplicate ACK
ssthresh= cwnd2cwnd = ssthresh + 3
retransmit missing segment
dupACKcount == 3
timeoutssthresh = cwnd2cwnd = 1 dupACKcount = 0retransmit missing segment
ssthresh= cwnd2cwnd = ssthresh + 3retransmit missing segment
dupACKcount == 3cwnd = ssthreshdupACKcount = 0
New ACK
slow start
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
cwnd = cwnd+MSSdupACKcount = 0transmit new segment(s) as allowed
new ACKdupACKcount++duplicate ACK
Λcwnd = 1 MSS
ssthresh = 64 KBdupACKcount = 0
NewACK
NewACK
NewACK
Transport Layer 3-19
TCP throughput avg TCP thruput as function of window size RTT
bull ignore slow start assume always data to send W window size (measured in bytes) where loss occurs
bull avg window size ( in-flight bytes) is frac34 Wbull avg thruput is 34W per RTT
W
W2
avg TCP thruput = 34
WRTT bytessec
Transport Layer 3-20
TCP Futures TCP over ldquolong fat pipesrdquo
example 1500 byte segments 100ms RTT want 10 Gbps throughput requires W = 83333 in-flight segments throughput in terms of segment loss probability L
[Mathis 1997]
to achieve 10 Gbps throughput need a loss rate of L = 210-10 ndash a very small loss rate
new versions of TCP for high-speed
TCP throughput = 122 MSSRTT L
Transport Layer 3-21
fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK
TCP connection 1
bottleneckrouter
capacity R
TCP Fairness
TCP connection 2
Transport Layer 3-22
Why is TCP fairtwo competing sessions additive increase gives slope of 1 as throughout increases multiplicative decrease decreases throughput proportionally
R
R
equal bandwidth share
Connection 1 throughput
congestion avoidance additive increaseloss decrease window by factor of 2
congestion avoidance additive increaseloss decrease window by factor of 2
Transport Layer 3-23
Fairness (more)Fairness and UDP multimedia apps often
do not use TCPbull do not want rate
throttled by congestion control
instead use UDPbull send audiovideo at
constant rate tolerate packet loss
Fairness parallel TCP connections application can open
multiple parallel connections between two hosts web browsers do this eg link of rate R with 9
existing connectionsbull new app asks for 1 TCP gets
rate R10bull new app asks for 11 TCPs
gets R2
Transport Layer 3-24
network-assisted congestion control two bits in IP header (ToS field) marked by network router
to indicate congestion congestion indication carried to receiving host receiver (seeing congestion indication in IP datagram) )
sets ECE bit on receiver-to-sender ACK segment to notify sender of congestion
Explicit Congestion Notification (ECN)
sourceapplicationtransportnetwork
linkphysical
destinationapplicationtransportnetwork
linkphysical
ECN=00 ECN=11
ECE=1
IP datagram
TCP ACK segment
Transport Layer 3-25
Chapter 3 summary principles behind transport
layer servicesbull multiplexing
demultiplexingbull reliable data transferbull flow controlbull congestion control
instantiation implementation in the Internet
bull UDPbull TCP
next leaving the network
ldquoedgerdquo (application transport layers) into the network
ldquocorerdquo
two network layer chapters
bull data planebull control plane
Transport Layer 3-10
four senders multihop paths timeoutretransmit
Q what happens as λin and λinrsquo
increase
finite shared output link buffers
Host A λout
Causescosts of congestion scenario 3
Host B
Host CHost D
λin original dataλin original data plus
retransmitted data
A as red λinrsquo increases all arriving
blue pkts at upper queue are dropped blue throughput 0
Transport Layer 3-11
another ldquocostrdquo of congestion when packet dropped any ldquoupstream
transmission capacity used for that packet was wasted
Causescosts of congestion scenario 3
C2
C2
λ out
λinrsquo
Transport Layer 3-12
Chapter 3 outline
31 transport-layer services
32 multiplexing and demultiplexing
33 connectionless transport UDP
34 principles of reliable data transfer
35 connection-oriented transport TCPbull segment structurebull reliable data transferbull flow controlbull connection management
36 principles of congestion control
37 TCP congestion control
Transport Layer 3-13
TCP congestion control additive increase multiplicative decrease
approach sender increases transmission rate (window size) probing for usable bandwidth until loss occursbull additive increase increase cwnd by 1 MSS every
RTT until loss detectedbull multiplicative decrease cut cwnd in half after loss cwnd
TCP
send
er
cong
estio
n w
indo
w s
ize
AIMD saw toothbehavior probing
for bandwidth
additively increase window size helliphellip until loss occurs (then cut window in half)
time
Transport Layer 3-14
TCP Congestion Control details
sender limits transmission
cwnd is dynamic function of perceived network congestion
TCP sending rate roughly send cwnd
bytes wait RTT for ACKS then send more bytes
last byteACKed sent not-
yet ACKed(ldquoin-flightrdquo)
last byte sent
cwnd
LastByteSent-LastByteAcked
lt cwnd
sender sequence number space
rate ~~cwndRTT
bytessec
Transport Layer 3-15
TCP Slow Start
when connection begins increase rate exponentially until first loss event
bull initially cwnd = 1 MSSbull double cwnd every RTTbull done by incrementing cwnd for every ACK received
summary initial rate is slow but ramps up exponentially fast
Host A
RTT
Host B
time
Transport Layer 3-16
TCP detecting reacting to loss
loss indicated by timeoutbull cwnd set to 1 MSS bull window then grows exponentially (as in slow start)
to threshold then grows linearly loss indicated by 3 duplicate ACKs TCP RENO
bull dup ACKs indicate network capable of delivering some segments
bull cwnd is cut in half window then grows linearly TCP Tahoe always sets cwnd to 1 (timeout or 3
duplicate acks)
Transport Layer 3-17
Q when should the exponential increase switch to linear
A when cwnd gets to 12 of its value before timeout
Implementation variable ssthresh on loss event ssthresh
is set to 12 of cwnd just before loss event
TCP switching from slow start to CA
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Transport Layer 3-18
Summary TCP Congestion Control
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
Λcwnd gt ssthresh
congestionavoidance
cwnd = cwnd + MSS (MSScwnd)dupACKcount = 0
transmit new segment(s) as allowed
new ACK
dupACKcount++duplicate ACK
fastrecovery
cwnd = cwnd + MSStransmit new segment(s) as allowed
duplicate ACK
ssthresh= cwnd2cwnd = ssthresh + 3
retransmit missing segment
dupACKcount == 3
timeoutssthresh = cwnd2cwnd = 1 dupACKcount = 0retransmit missing segment
ssthresh= cwnd2cwnd = ssthresh + 3retransmit missing segment
dupACKcount == 3cwnd = ssthreshdupACKcount = 0
New ACK
slow start
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
cwnd = cwnd+MSSdupACKcount = 0transmit new segment(s) as allowed
new ACKdupACKcount++duplicate ACK
Λcwnd = 1 MSS
ssthresh = 64 KBdupACKcount = 0
NewACK
NewACK
NewACK
Transport Layer 3-19
TCP throughput avg TCP thruput as function of window size RTT
bull ignore slow start assume always data to send W window size (measured in bytes) where loss occurs
bull avg window size ( in-flight bytes) is frac34 Wbull avg thruput is 34W per RTT
W
W2
avg TCP thruput = 34
WRTT bytessec
Transport Layer 3-20
TCP Futures TCP over ldquolong fat pipesrdquo
example 1500 byte segments 100ms RTT want 10 Gbps throughput requires W = 83333 in-flight segments throughput in terms of segment loss probability L
[Mathis 1997]
to achieve 10 Gbps throughput need a loss rate of L = 210-10 ndash a very small loss rate
new versions of TCP for high-speed
TCP throughput = 122 MSSRTT L
Transport Layer 3-21
fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK
TCP connection 1
bottleneckrouter
capacity R
TCP Fairness
TCP connection 2
Transport Layer 3-22
Why is TCP fairtwo competing sessions additive increase gives slope of 1 as throughout increases multiplicative decrease decreases throughput proportionally
R
R
equal bandwidth share
Connection 1 throughput
congestion avoidance additive increaseloss decrease window by factor of 2
congestion avoidance additive increaseloss decrease window by factor of 2
Transport Layer 3-23
Fairness (more)Fairness and UDP multimedia apps often
do not use TCPbull do not want rate
throttled by congestion control
instead use UDPbull send audiovideo at
constant rate tolerate packet loss
Fairness parallel TCP connections application can open
multiple parallel connections between two hosts web browsers do this eg link of rate R with 9
existing connectionsbull new app asks for 1 TCP gets
rate R10bull new app asks for 11 TCPs
gets R2
Transport Layer 3-24
network-assisted congestion control two bits in IP header (ToS field) marked by network router
to indicate congestion congestion indication carried to receiving host receiver (seeing congestion indication in IP datagram) )
sets ECE bit on receiver-to-sender ACK segment to notify sender of congestion
Explicit Congestion Notification (ECN)
sourceapplicationtransportnetwork
linkphysical
destinationapplicationtransportnetwork
linkphysical
ECN=00 ECN=11
ECE=1
IP datagram
TCP ACK segment
Transport Layer 3-25
Chapter 3 summary principles behind transport
layer servicesbull multiplexing
demultiplexingbull reliable data transferbull flow controlbull congestion control
instantiation implementation in the Internet
bull UDPbull TCP
next leaving the network
ldquoedgerdquo (application transport layers) into the network
ldquocorerdquo
two network layer chapters
bull data planebull control plane
Transport Layer 3-11
another ldquocostrdquo of congestion when packet dropped any ldquoupstream
transmission capacity used for that packet was wasted
Causescosts of congestion scenario 3
C2
C2
λ out
λinrsquo
Transport Layer 3-12
Chapter 3 outline
31 transport-layer services
32 multiplexing and demultiplexing
33 connectionless transport UDP
34 principles of reliable data transfer
35 connection-oriented transport TCPbull segment structurebull reliable data transferbull flow controlbull connection management
36 principles of congestion control
37 TCP congestion control
Transport Layer 3-13
TCP congestion control additive increase multiplicative decrease
approach sender increases transmission rate (window size) probing for usable bandwidth until loss occursbull additive increase increase cwnd by 1 MSS every
RTT until loss detectedbull multiplicative decrease cut cwnd in half after loss cwnd
TCP
send
er
cong
estio
n w
indo
w s
ize
AIMD saw toothbehavior probing
for bandwidth
additively increase window size helliphellip until loss occurs (then cut window in half)
time
Transport Layer 3-14
TCP Congestion Control details
sender limits transmission
cwnd is dynamic function of perceived network congestion
TCP sending rate roughly send cwnd
bytes wait RTT for ACKS then send more bytes
last byteACKed sent not-
yet ACKed(ldquoin-flightrdquo)
last byte sent
cwnd
LastByteSent-LastByteAcked
lt cwnd
sender sequence number space
rate ~~cwndRTT
bytessec
Transport Layer 3-15
TCP Slow Start
when connection begins increase rate exponentially until first loss event
bull initially cwnd = 1 MSSbull double cwnd every RTTbull done by incrementing cwnd for every ACK received
summary initial rate is slow but ramps up exponentially fast
Host A
RTT
Host B
time
Transport Layer 3-16
TCP detecting reacting to loss
loss indicated by timeoutbull cwnd set to 1 MSS bull window then grows exponentially (as in slow start)
to threshold then grows linearly loss indicated by 3 duplicate ACKs TCP RENO
bull dup ACKs indicate network capable of delivering some segments
bull cwnd is cut in half window then grows linearly TCP Tahoe always sets cwnd to 1 (timeout or 3
duplicate acks)
Transport Layer 3-17
Q when should the exponential increase switch to linear
A when cwnd gets to 12 of its value before timeout
Implementation variable ssthresh on loss event ssthresh
is set to 12 of cwnd just before loss event
TCP switching from slow start to CA
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Transport Layer 3-18
Summary TCP Congestion Control
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
Λcwnd gt ssthresh
congestionavoidance
cwnd = cwnd + MSS (MSScwnd)dupACKcount = 0
transmit new segment(s) as allowed
new ACK
dupACKcount++duplicate ACK
fastrecovery
cwnd = cwnd + MSStransmit new segment(s) as allowed
duplicate ACK
ssthresh= cwnd2cwnd = ssthresh + 3
retransmit missing segment
dupACKcount == 3
timeoutssthresh = cwnd2cwnd = 1 dupACKcount = 0retransmit missing segment
ssthresh= cwnd2cwnd = ssthresh + 3retransmit missing segment
dupACKcount == 3cwnd = ssthreshdupACKcount = 0
New ACK
slow start
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
cwnd = cwnd+MSSdupACKcount = 0transmit new segment(s) as allowed
new ACKdupACKcount++duplicate ACK
Λcwnd = 1 MSS
ssthresh = 64 KBdupACKcount = 0
NewACK
NewACK
NewACK
Transport Layer 3-19
TCP throughput avg TCP thruput as function of window size RTT
bull ignore slow start assume always data to send W window size (measured in bytes) where loss occurs
bull avg window size ( in-flight bytes) is frac34 Wbull avg thruput is 34W per RTT
W
W2
avg TCP thruput = 34
WRTT bytessec
Transport Layer 3-20
TCP Futures TCP over ldquolong fat pipesrdquo
example 1500 byte segments 100ms RTT want 10 Gbps throughput requires W = 83333 in-flight segments throughput in terms of segment loss probability L
[Mathis 1997]
to achieve 10 Gbps throughput need a loss rate of L = 210-10 ndash a very small loss rate
new versions of TCP for high-speed
TCP throughput = 122 MSSRTT L
Transport Layer 3-21
fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK
TCP connection 1
bottleneckrouter
capacity R
TCP Fairness
TCP connection 2
Transport Layer 3-22
Why is TCP fairtwo competing sessions additive increase gives slope of 1 as throughout increases multiplicative decrease decreases throughput proportionally
R
R
equal bandwidth share
Connection 1 throughput
congestion avoidance additive increaseloss decrease window by factor of 2
congestion avoidance additive increaseloss decrease window by factor of 2
Transport Layer 3-23
Fairness (more)Fairness and UDP multimedia apps often
do not use TCPbull do not want rate
throttled by congestion control
instead use UDPbull send audiovideo at
constant rate tolerate packet loss
Fairness parallel TCP connections application can open
multiple parallel connections between two hosts web browsers do this eg link of rate R with 9
existing connectionsbull new app asks for 1 TCP gets
rate R10bull new app asks for 11 TCPs
gets R2
Transport Layer 3-24
network-assisted congestion control two bits in IP header (ToS field) marked by network router
to indicate congestion congestion indication carried to receiving host receiver (seeing congestion indication in IP datagram) )
sets ECE bit on receiver-to-sender ACK segment to notify sender of congestion
Explicit Congestion Notification (ECN)
sourceapplicationtransportnetwork
linkphysical
destinationapplicationtransportnetwork
linkphysical
ECN=00 ECN=11
ECE=1
IP datagram
TCP ACK segment
Transport Layer 3-25
Chapter 3 summary principles behind transport
layer servicesbull multiplexing
demultiplexingbull reliable data transferbull flow controlbull congestion control
instantiation implementation in the Internet
bull UDPbull TCP
next leaving the network
ldquoedgerdquo (application transport layers) into the network
ldquocorerdquo
two network layer chapters
bull data planebull control plane
Transport Layer 3-12
Chapter 3 outline
31 transport-layer services
32 multiplexing and demultiplexing
33 connectionless transport UDP
34 principles of reliable data transfer
35 connection-oriented transport TCPbull segment structurebull reliable data transferbull flow controlbull connection management
36 principles of congestion control
37 TCP congestion control
Transport Layer 3-13
TCP congestion control additive increase multiplicative decrease
approach sender increases transmission rate (window size) probing for usable bandwidth until loss occursbull additive increase increase cwnd by 1 MSS every
RTT until loss detectedbull multiplicative decrease cut cwnd in half after loss cwnd
TCP
send
er
cong
estio
n w
indo
w s
ize
AIMD saw toothbehavior probing
for bandwidth
additively increase window size helliphellip until loss occurs (then cut window in half)
time
Transport Layer 3-14
TCP Congestion Control details
sender limits transmission
cwnd is dynamic function of perceived network congestion
TCP sending rate roughly send cwnd
bytes wait RTT for ACKS then send more bytes
last byteACKed sent not-
yet ACKed(ldquoin-flightrdquo)
last byte sent
cwnd
LastByteSent-LastByteAcked
lt cwnd
sender sequence number space
rate ~~cwndRTT
bytessec
Transport Layer 3-15
TCP Slow Start
when connection begins increase rate exponentially until first loss event
bull initially cwnd = 1 MSSbull double cwnd every RTTbull done by incrementing cwnd for every ACK received
summary initial rate is slow but ramps up exponentially fast
Host A
RTT
Host B
time
Transport Layer 3-16
TCP detecting reacting to loss
loss indicated by timeoutbull cwnd set to 1 MSS bull window then grows exponentially (as in slow start)
to threshold then grows linearly loss indicated by 3 duplicate ACKs TCP RENO
bull dup ACKs indicate network capable of delivering some segments
bull cwnd is cut in half window then grows linearly TCP Tahoe always sets cwnd to 1 (timeout or 3
duplicate acks)
Transport Layer 3-17
Q when should the exponential increase switch to linear
A when cwnd gets to 12 of its value before timeout
Implementation variable ssthresh on loss event ssthresh
is set to 12 of cwnd just before loss event
TCP switching from slow start to CA
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Transport Layer 3-18
Summary TCP Congestion Control
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
Λcwnd gt ssthresh
congestionavoidance
cwnd = cwnd + MSS (MSScwnd)dupACKcount = 0
transmit new segment(s) as allowed
new ACK
dupACKcount++duplicate ACK
fastrecovery
cwnd = cwnd + MSStransmit new segment(s) as allowed
duplicate ACK
ssthresh= cwnd2cwnd = ssthresh + 3
retransmit missing segment
dupACKcount == 3
timeoutssthresh = cwnd2cwnd = 1 dupACKcount = 0retransmit missing segment
ssthresh= cwnd2cwnd = ssthresh + 3retransmit missing segment
dupACKcount == 3cwnd = ssthreshdupACKcount = 0
New ACK
slow start
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
cwnd = cwnd+MSSdupACKcount = 0transmit new segment(s) as allowed
new ACKdupACKcount++duplicate ACK
Λcwnd = 1 MSS
ssthresh = 64 KBdupACKcount = 0
NewACK
NewACK
NewACK
Transport Layer 3-19
TCP throughput avg TCP thruput as function of window size RTT
bull ignore slow start assume always data to send W window size (measured in bytes) where loss occurs
bull avg window size ( in-flight bytes) is frac34 Wbull avg thruput is 34W per RTT
W
W2
avg TCP thruput = 34
WRTT bytessec
Transport Layer 3-20
TCP Futures TCP over ldquolong fat pipesrdquo
example 1500 byte segments 100ms RTT want 10 Gbps throughput requires W = 83333 in-flight segments throughput in terms of segment loss probability L
[Mathis 1997]
to achieve 10 Gbps throughput need a loss rate of L = 210-10 ndash a very small loss rate
new versions of TCP for high-speed
TCP throughput = 122 MSSRTT L
Transport Layer 3-21
fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK
TCP connection 1
bottleneckrouter
capacity R
TCP Fairness
TCP connection 2
Transport Layer 3-22
Why is TCP fairtwo competing sessions additive increase gives slope of 1 as throughout increases multiplicative decrease decreases throughput proportionally
R
R
equal bandwidth share
Connection 1 throughput
congestion avoidance additive increaseloss decrease window by factor of 2
congestion avoidance additive increaseloss decrease window by factor of 2
Transport Layer 3-23
Fairness (more)Fairness and UDP multimedia apps often
do not use TCPbull do not want rate
throttled by congestion control
instead use UDPbull send audiovideo at
constant rate tolerate packet loss
Fairness parallel TCP connections application can open
multiple parallel connections between two hosts web browsers do this eg link of rate R with 9
existing connectionsbull new app asks for 1 TCP gets
rate R10bull new app asks for 11 TCPs
gets R2
Transport Layer 3-24
network-assisted congestion control two bits in IP header (ToS field) marked by network router
to indicate congestion congestion indication carried to receiving host receiver (seeing congestion indication in IP datagram) )
sets ECE bit on receiver-to-sender ACK segment to notify sender of congestion
Explicit Congestion Notification (ECN)
sourceapplicationtransportnetwork
linkphysical
destinationapplicationtransportnetwork
linkphysical
ECN=00 ECN=11
ECE=1
IP datagram
TCP ACK segment
Transport Layer 3-25
Chapter 3 summary principles behind transport
layer servicesbull multiplexing
demultiplexingbull reliable data transferbull flow controlbull congestion control
instantiation implementation in the Internet
bull UDPbull TCP
next leaving the network
ldquoedgerdquo (application transport layers) into the network
ldquocorerdquo
two network layer chapters
bull data planebull control plane
Transport Layer 3-13
TCP congestion control additive increase multiplicative decrease
approach sender increases transmission rate (window size) probing for usable bandwidth until loss occursbull additive increase increase cwnd by 1 MSS every
RTT until loss detectedbull multiplicative decrease cut cwnd in half after loss cwnd
TCP
send
er
cong
estio
n w
indo
w s
ize
AIMD saw toothbehavior probing
for bandwidth
additively increase window size helliphellip until loss occurs (then cut window in half)
time
Transport Layer 3-14
TCP Congestion Control details
sender limits transmission
cwnd is dynamic function of perceived network congestion
TCP sending rate roughly send cwnd
bytes wait RTT for ACKS then send more bytes
last byteACKed sent not-
yet ACKed(ldquoin-flightrdquo)
last byte sent
cwnd
LastByteSent-LastByteAcked
lt cwnd
sender sequence number space
rate ~~cwndRTT
bytessec
Transport Layer 3-15
TCP Slow Start
when connection begins increase rate exponentially until first loss event
bull initially cwnd = 1 MSSbull double cwnd every RTTbull done by incrementing cwnd for every ACK received
summary initial rate is slow but ramps up exponentially fast
Host A
RTT
Host B
time
Transport Layer 3-16
TCP detecting reacting to loss
loss indicated by timeoutbull cwnd set to 1 MSS bull window then grows exponentially (as in slow start)
to threshold then grows linearly loss indicated by 3 duplicate ACKs TCP RENO
bull dup ACKs indicate network capable of delivering some segments
bull cwnd is cut in half window then grows linearly TCP Tahoe always sets cwnd to 1 (timeout or 3
duplicate acks)
Transport Layer 3-17
Q when should the exponential increase switch to linear
A when cwnd gets to 12 of its value before timeout
Implementation variable ssthresh on loss event ssthresh
is set to 12 of cwnd just before loss event
TCP switching from slow start to CA
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Transport Layer 3-18
Summary TCP Congestion Control
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
Λcwnd gt ssthresh
congestionavoidance
cwnd = cwnd + MSS (MSScwnd)dupACKcount = 0
transmit new segment(s) as allowed
new ACK
dupACKcount++duplicate ACK
fastrecovery
cwnd = cwnd + MSStransmit new segment(s) as allowed
duplicate ACK
ssthresh= cwnd2cwnd = ssthresh + 3
retransmit missing segment
dupACKcount == 3
timeoutssthresh = cwnd2cwnd = 1 dupACKcount = 0retransmit missing segment
ssthresh= cwnd2cwnd = ssthresh + 3retransmit missing segment
dupACKcount == 3cwnd = ssthreshdupACKcount = 0
New ACK
slow start
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
cwnd = cwnd+MSSdupACKcount = 0transmit new segment(s) as allowed
new ACKdupACKcount++duplicate ACK
Λcwnd = 1 MSS
ssthresh = 64 KBdupACKcount = 0
NewACK
NewACK
NewACK
Transport Layer 3-19
TCP throughput avg TCP thruput as function of window size RTT
bull ignore slow start assume always data to send W window size (measured in bytes) where loss occurs
bull avg window size ( in-flight bytes) is frac34 Wbull avg thruput is 34W per RTT
W
W2
avg TCP thruput = 34
WRTT bytessec
Transport Layer 3-20
TCP Futures TCP over ldquolong fat pipesrdquo
example 1500 byte segments 100ms RTT want 10 Gbps throughput requires W = 83333 in-flight segments throughput in terms of segment loss probability L
[Mathis 1997]
to achieve 10 Gbps throughput need a loss rate of L = 210-10 ndash a very small loss rate
new versions of TCP for high-speed
TCP throughput = 122 MSSRTT L
Transport Layer 3-21
fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK
TCP connection 1
bottleneckrouter
capacity R
TCP Fairness
TCP connection 2
Transport Layer 3-22
Why is TCP fairtwo competing sessions additive increase gives slope of 1 as throughout increases multiplicative decrease decreases throughput proportionally
R
R
equal bandwidth share
Connection 1 throughput
congestion avoidance additive increaseloss decrease window by factor of 2
congestion avoidance additive increaseloss decrease window by factor of 2
Transport Layer 3-23
Fairness (more)Fairness and UDP multimedia apps often
do not use TCPbull do not want rate
throttled by congestion control
instead use UDPbull send audiovideo at
constant rate tolerate packet loss
Fairness parallel TCP connections application can open
multiple parallel connections between two hosts web browsers do this eg link of rate R with 9
existing connectionsbull new app asks for 1 TCP gets
rate R10bull new app asks for 11 TCPs
gets R2
Transport Layer 3-24
network-assisted congestion control two bits in IP header (ToS field) marked by network router
to indicate congestion congestion indication carried to receiving host receiver (seeing congestion indication in IP datagram) )
sets ECE bit on receiver-to-sender ACK segment to notify sender of congestion
Explicit Congestion Notification (ECN)
sourceapplicationtransportnetwork
linkphysical
destinationapplicationtransportnetwork
linkphysical
ECN=00 ECN=11
ECE=1
IP datagram
TCP ACK segment
Transport Layer 3-25
Chapter 3 summary principles behind transport
layer servicesbull multiplexing
demultiplexingbull reliable data transferbull flow controlbull congestion control
instantiation implementation in the Internet
bull UDPbull TCP
next leaving the network
ldquoedgerdquo (application transport layers) into the network
ldquocorerdquo
two network layer chapters
bull data planebull control plane
Transport Layer 3-14
TCP Congestion Control details
sender limits transmission
cwnd is dynamic function of perceived network congestion
TCP sending rate roughly send cwnd
bytes wait RTT for ACKS then send more bytes
last byteACKed sent not-
yet ACKed(ldquoin-flightrdquo)
last byte sent
cwnd
LastByteSent-LastByteAcked
lt cwnd
sender sequence number space
rate ~~cwndRTT
bytessec
Transport Layer 3-15
TCP Slow Start
when connection begins increase rate exponentially until first loss event
bull initially cwnd = 1 MSSbull double cwnd every RTTbull done by incrementing cwnd for every ACK received
summary initial rate is slow but ramps up exponentially fast
Host A
RTT
Host B
time
Transport Layer 3-16
TCP detecting reacting to loss
loss indicated by timeoutbull cwnd set to 1 MSS bull window then grows exponentially (as in slow start)
to threshold then grows linearly loss indicated by 3 duplicate ACKs TCP RENO
bull dup ACKs indicate network capable of delivering some segments
bull cwnd is cut in half window then grows linearly TCP Tahoe always sets cwnd to 1 (timeout or 3
duplicate acks)
Transport Layer 3-17
Q when should the exponential increase switch to linear
A when cwnd gets to 12 of its value before timeout
Implementation variable ssthresh on loss event ssthresh
is set to 12 of cwnd just before loss event
TCP switching from slow start to CA
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Transport Layer 3-18
Summary TCP Congestion Control
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
Λcwnd gt ssthresh
congestionavoidance
cwnd = cwnd + MSS (MSScwnd)dupACKcount = 0
transmit new segment(s) as allowed
new ACK
dupACKcount++duplicate ACK
fastrecovery
cwnd = cwnd + MSStransmit new segment(s) as allowed
duplicate ACK
ssthresh= cwnd2cwnd = ssthresh + 3
retransmit missing segment
dupACKcount == 3
timeoutssthresh = cwnd2cwnd = 1 dupACKcount = 0retransmit missing segment
ssthresh= cwnd2cwnd = ssthresh + 3retransmit missing segment
dupACKcount == 3cwnd = ssthreshdupACKcount = 0
New ACK
slow start
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
cwnd = cwnd+MSSdupACKcount = 0transmit new segment(s) as allowed
new ACKdupACKcount++duplicate ACK
Λcwnd = 1 MSS
ssthresh = 64 KBdupACKcount = 0
NewACK
NewACK
NewACK
Transport Layer 3-19
TCP throughput avg TCP thruput as function of window size RTT
bull ignore slow start assume always data to send W window size (measured in bytes) where loss occurs
bull avg window size ( in-flight bytes) is frac34 Wbull avg thruput is 34W per RTT
W
W2
avg TCP thruput = 34
WRTT bytessec
Transport Layer 3-20
TCP Futures TCP over ldquolong fat pipesrdquo
example 1500 byte segments 100ms RTT want 10 Gbps throughput requires W = 83333 in-flight segments throughput in terms of segment loss probability L
[Mathis 1997]
to achieve 10 Gbps throughput need a loss rate of L = 210-10 ndash a very small loss rate
new versions of TCP for high-speed
TCP throughput = 122 MSSRTT L
Transport Layer 3-21
fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK
TCP connection 1
bottleneckrouter
capacity R
TCP Fairness
TCP connection 2
Transport Layer 3-22
Why is TCP fairtwo competing sessions additive increase gives slope of 1 as throughout increases multiplicative decrease decreases throughput proportionally
R
R
equal bandwidth share
Connection 1 throughput
congestion avoidance additive increaseloss decrease window by factor of 2
congestion avoidance additive increaseloss decrease window by factor of 2
Transport Layer 3-23
Fairness (more)Fairness and UDP multimedia apps often
do not use TCPbull do not want rate
throttled by congestion control
instead use UDPbull send audiovideo at
constant rate tolerate packet loss
Fairness parallel TCP connections application can open
multiple parallel connections between two hosts web browsers do this eg link of rate R with 9
existing connectionsbull new app asks for 1 TCP gets
rate R10bull new app asks for 11 TCPs
gets R2
Transport Layer 3-24
network-assisted congestion control two bits in IP header (ToS field) marked by network router
to indicate congestion congestion indication carried to receiving host receiver (seeing congestion indication in IP datagram) )
sets ECE bit on receiver-to-sender ACK segment to notify sender of congestion
Explicit Congestion Notification (ECN)
sourceapplicationtransportnetwork
linkphysical
destinationapplicationtransportnetwork
linkphysical
ECN=00 ECN=11
ECE=1
IP datagram
TCP ACK segment
Transport Layer 3-25
Chapter 3 summary principles behind transport
layer servicesbull multiplexing
demultiplexingbull reliable data transferbull flow controlbull congestion control
instantiation implementation in the Internet
bull UDPbull TCP
next leaving the network
ldquoedgerdquo (application transport layers) into the network
ldquocorerdquo
two network layer chapters
bull data planebull control plane
Transport Layer 3-15
TCP Slow Start
when connection begins increase rate exponentially until first loss event
bull initially cwnd = 1 MSSbull double cwnd every RTTbull done by incrementing cwnd for every ACK received
summary initial rate is slow but ramps up exponentially fast
Host A
RTT
Host B
time
Transport Layer 3-16
TCP detecting reacting to loss
loss indicated by timeoutbull cwnd set to 1 MSS bull window then grows exponentially (as in slow start)
to threshold then grows linearly loss indicated by 3 duplicate ACKs TCP RENO
bull dup ACKs indicate network capable of delivering some segments
bull cwnd is cut in half window then grows linearly TCP Tahoe always sets cwnd to 1 (timeout or 3
duplicate acks)
Transport Layer 3-17
Q when should the exponential increase switch to linear
A when cwnd gets to 12 of its value before timeout
Implementation variable ssthresh on loss event ssthresh
is set to 12 of cwnd just before loss event
TCP switching from slow start to CA
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Transport Layer 3-18
Summary TCP Congestion Control
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
Λcwnd gt ssthresh
congestionavoidance
cwnd = cwnd + MSS (MSScwnd)dupACKcount = 0
transmit new segment(s) as allowed
new ACK
dupACKcount++duplicate ACK
fastrecovery
cwnd = cwnd + MSStransmit new segment(s) as allowed
duplicate ACK
ssthresh= cwnd2cwnd = ssthresh + 3
retransmit missing segment
dupACKcount == 3
timeoutssthresh = cwnd2cwnd = 1 dupACKcount = 0retransmit missing segment
ssthresh= cwnd2cwnd = ssthresh + 3retransmit missing segment
dupACKcount == 3cwnd = ssthreshdupACKcount = 0
New ACK
slow start
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
cwnd = cwnd+MSSdupACKcount = 0transmit new segment(s) as allowed
new ACKdupACKcount++duplicate ACK
Λcwnd = 1 MSS
ssthresh = 64 KBdupACKcount = 0
NewACK
NewACK
NewACK
Transport Layer 3-19
TCP throughput avg TCP thruput as function of window size RTT
bull ignore slow start assume always data to send W window size (measured in bytes) where loss occurs
bull avg window size ( in-flight bytes) is frac34 Wbull avg thruput is 34W per RTT
W
W2
avg TCP thruput = 34
WRTT bytessec
Transport Layer 3-20
TCP Futures TCP over ldquolong fat pipesrdquo
example 1500 byte segments 100ms RTT want 10 Gbps throughput requires W = 83333 in-flight segments throughput in terms of segment loss probability L
[Mathis 1997]
to achieve 10 Gbps throughput need a loss rate of L = 210-10 ndash a very small loss rate
new versions of TCP for high-speed
TCP throughput = 122 MSSRTT L
Transport Layer 3-21
fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK
TCP connection 1
bottleneckrouter
capacity R
TCP Fairness
TCP connection 2
Transport Layer 3-22
Why is TCP fairtwo competing sessions additive increase gives slope of 1 as throughout increases multiplicative decrease decreases throughput proportionally
R
R
equal bandwidth share
Connection 1 throughput
congestion avoidance additive increaseloss decrease window by factor of 2
congestion avoidance additive increaseloss decrease window by factor of 2
Transport Layer 3-23
Fairness (more)Fairness and UDP multimedia apps often
do not use TCPbull do not want rate
throttled by congestion control
instead use UDPbull send audiovideo at
constant rate tolerate packet loss
Fairness parallel TCP connections application can open
multiple parallel connections between two hosts web browsers do this eg link of rate R with 9
existing connectionsbull new app asks for 1 TCP gets
rate R10bull new app asks for 11 TCPs
gets R2
Transport Layer 3-24
network-assisted congestion control two bits in IP header (ToS field) marked by network router
to indicate congestion congestion indication carried to receiving host receiver (seeing congestion indication in IP datagram) )
sets ECE bit on receiver-to-sender ACK segment to notify sender of congestion
Explicit Congestion Notification (ECN)
sourceapplicationtransportnetwork
linkphysical
destinationapplicationtransportnetwork
linkphysical
ECN=00 ECN=11
ECE=1
IP datagram
TCP ACK segment
Transport Layer 3-25
Chapter 3 summary principles behind transport
layer servicesbull multiplexing
demultiplexingbull reliable data transferbull flow controlbull congestion control
instantiation implementation in the Internet
bull UDPbull TCP
next leaving the network
ldquoedgerdquo (application transport layers) into the network
ldquocorerdquo
two network layer chapters
bull data planebull control plane
Transport Layer 3-16
TCP detecting reacting to loss
loss indicated by timeoutbull cwnd set to 1 MSS bull window then grows exponentially (as in slow start)
to threshold then grows linearly loss indicated by 3 duplicate ACKs TCP RENO
bull dup ACKs indicate network capable of delivering some segments
bull cwnd is cut in half window then grows linearly TCP Tahoe always sets cwnd to 1 (timeout or 3
duplicate acks)
Transport Layer 3-17
Q when should the exponential increase switch to linear
A when cwnd gets to 12 of its value before timeout
Implementation variable ssthresh on loss event ssthresh
is set to 12 of cwnd just before loss event
TCP switching from slow start to CA
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Transport Layer 3-18
Summary TCP Congestion Control
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
Λcwnd gt ssthresh
congestionavoidance
cwnd = cwnd + MSS (MSScwnd)dupACKcount = 0
transmit new segment(s) as allowed
new ACK
dupACKcount++duplicate ACK
fastrecovery
cwnd = cwnd + MSStransmit new segment(s) as allowed
duplicate ACK
ssthresh= cwnd2cwnd = ssthresh + 3
retransmit missing segment
dupACKcount == 3
timeoutssthresh = cwnd2cwnd = 1 dupACKcount = 0retransmit missing segment
ssthresh= cwnd2cwnd = ssthresh + 3retransmit missing segment
dupACKcount == 3cwnd = ssthreshdupACKcount = 0
New ACK
slow start
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
cwnd = cwnd+MSSdupACKcount = 0transmit new segment(s) as allowed
new ACKdupACKcount++duplicate ACK
Λcwnd = 1 MSS
ssthresh = 64 KBdupACKcount = 0
NewACK
NewACK
NewACK
Transport Layer 3-19
TCP throughput avg TCP thruput as function of window size RTT
bull ignore slow start assume always data to send W window size (measured in bytes) where loss occurs
bull avg window size ( in-flight bytes) is frac34 Wbull avg thruput is 34W per RTT
W
W2
avg TCP thruput = 34
WRTT bytessec
Transport Layer 3-20
TCP Futures TCP over ldquolong fat pipesrdquo
example 1500 byte segments 100ms RTT want 10 Gbps throughput requires W = 83333 in-flight segments throughput in terms of segment loss probability L
[Mathis 1997]
to achieve 10 Gbps throughput need a loss rate of L = 210-10 ndash a very small loss rate
new versions of TCP for high-speed
TCP throughput = 122 MSSRTT L
Transport Layer 3-21
fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK
TCP connection 1
bottleneckrouter
capacity R
TCP Fairness
TCP connection 2
Transport Layer 3-22
Why is TCP fairtwo competing sessions additive increase gives slope of 1 as throughout increases multiplicative decrease decreases throughput proportionally
R
R
equal bandwidth share
Connection 1 throughput
congestion avoidance additive increaseloss decrease window by factor of 2
congestion avoidance additive increaseloss decrease window by factor of 2
Transport Layer 3-23
Fairness (more)Fairness and UDP multimedia apps often
do not use TCPbull do not want rate
throttled by congestion control
instead use UDPbull send audiovideo at
constant rate tolerate packet loss
Fairness parallel TCP connections application can open
multiple parallel connections between two hosts web browsers do this eg link of rate R with 9
existing connectionsbull new app asks for 1 TCP gets
rate R10bull new app asks for 11 TCPs
gets R2
Transport Layer 3-24
network-assisted congestion control two bits in IP header (ToS field) marked by network router
to indicate congestion congestion indication carried to receiving host receiver (seeing congestion indication in IP datagram) )
sets ECE bit on receiver-to-sender ACK segment to notify sender of congestion
Explicit Congestion Notification (ECN)
sourceapplicationtransportnetwork
linkphysical
destinationapplicationtransportnetwork
linkphysical
ECN=00 ECN=11
ECE=1
IP datagram
TCP ACK segment
Transport Layer 3-25
Chapter 3 summary principles behind transport
layer servicesbull multiplexing
demultiplexingbull reliable data transferbull flow controlbull congestion control
instantiation implementation in the Internet
bull UDPbull TCP
next leaving the network
ldquoedgerdquo (application transport layers) into the network
ldquocorerdquo
two network layer chapters
bull data planebull control plane
Transport Layer 3-17
Q when should the exponential increase switch to linear
A when cwnd gets to 12 of its value before timeout
Implementation variable ssthresh on loss event ssthresh
is set to 12 of cwnd just before loss event
TCP switching from slow start to CA
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Transport Layer 3-18
Summary TCP Congestion Control
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
Λcwnd gt ssthresh
congestionavoidance
cwnd = cwnd + MSS (MSScwnd)dupACKcount = 0
transmit new segment(s) as allowed
new ACK
dupACKcount++duplicate ACK
fastrecovery
cwnd = cwnd + MSStransmit new segment(s) as allowed
duplicate ACK
ssthresh= cwnd2cwnd = ssthresh + 3
retransmit missing segment
dupACKcount == 3
timeoutssthresh = cwnd2cwnd = 1 dupACKcount = 0retransmit missing segment
ssthresh= cwnd2cwnd = ssthresh + 3retransmit missing segment
dupACKcount == 3cwnd = ssthreshdupACKcount = 0
New ACK
slow start
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
cwnd = cwnd+MSSdupACKcount = 0transmit new segment(s) as allowed
new ACKdupACKcount++duplicate ACK
Λcwnd = 1 MSS
ssthresh = 64 KBdupACKcount = 0
NewACK
NewACK
NewACK
Transport Layer 3-19
TCP throughput avg TCP thruput as function of window size RTT
bull ignore slow start assume always data to send W window size (measured in bytes) where loss occurs
bull avg window size ( in-flight bytes) is frac34 Wbull avg thruput is 34W per RTT
W
W2
avg TCP thruput = 34
WRTT bytessec
Transport Layer 3-20
TCP Futures TCP over ldquolong fat pipesrdquo
example 1500 byte segments 100ms RTT want 10 Gbps throughput requires W = 83333 in-flight segments throughput in terms of segment loss probability L
[Mathis 1997]
to achieve 10 Gbps throughput need a loss rate of L = 210-10 ndash a very small loss rate
new versions of TCP for high-speed
TCP throughput = 122 MSSRTT L
Transport Layer 3-21
fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK
TCP connection 1
bottleneckrouter
capacity R
TCP Fairness
TCP connection 2
Transport Layer 3-22
Why is TCP fairtwo competing sessions additive increase gives slope of 1 as throughout increases multiplicative decrease decreases throughput proportionally
R
R
equal bandwidth share
Connection 1 throughput
congestion avoidance additive increaseloss decrease window by factor of 2
congestion avoidance additive increaseloss decrease window by factor of 2
Transport Layer 3-23
Fairness (more)Fairness and UDP multimedia apps often
do not use TCPbull do not want rate
throttled by congestion control
instead use UDPbull send audiovideo at
constant rate tolerate packet loss
Fairness parallel TCP connections application can open
multiple parallel connections between two hosts web browsers do this eg link of rate R with 9
existing connectionsbull new app asks for 1 TCP gets
rate R10bull new app asks for 11 TCPs
gets R2
Transport Layer 3-24
network-assisted congestion control two bits in IP header (ToS field) marked by network router
to indicate congestion congestion indication carried to receiving host receiver (seeing congestion indication in IP datagram) )
sets ECE bit on receiver-to-sender ACK segment to notify sender of congestion
Explicit Congestion Notification (ECN)
sourceapplicationtransportnetwork
linkphysical
destinationapplicationtransportnetwork
linkphysical
ECN=00 ECN=11
ECE=1
IP datagram
TCP ACK segment
Transport Layer 3-25
Chapter 3 summary principles behind transport
layer servicesbull multiplexing
demultiplexingbull reliable data transferbull flow controlbull congestion control
instantiation implementation in the Internet
bull UDPbull TCP
next leaving the network
ldquoedgerdquo (application transport layers) into the network
ldquocorerdquo
two network layer chapters
bull data planebull control plane
Transport Layer 3-18
Summary TCP Congestion Control
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
Λcwnd gt ssthresh
congestionavoidance
cwnd = cwnd + MSS (MSScwnd)dupACKcount = 0
transmit new segment(s) as allowed
new ACK
dupACKcount++duplicate ACK
fastrecovery
cwnd = cwnd + MSStransmit new segment(s) as allowed
duplicate ACK
ssthresh= cwnd2cwnd = ssthresh + 3
retransmit missing segment
dupACKcount == 3
timeoutssthresh = cwnd2cwnd = 1 dupACKcount = 0retransmit missing segment
ssthresh= cwnd2cwnd = ssthresh + 3retransmit missing segment
dupACKcount == 3cwnd = ssthreshdupACKcount = 0
New ACK
slow start
timeoutssthresh = cwnd2
cwnd = 1 MSSdupACKcount = 0
retransmit missing segment
cwnd = cwnd+MSSdupACKcount = 0transmit new segment(s) as allowed
new ACKdupACKcount++duplicate ACK
Λcwnd = 1 MSS
ssthresh = 64 KBdupACKcount = 0
NewACK
NewACK
NewACK
Transport Layer 3-19
TCP throughput avg TCP thruput as function of window size RTT
bull ignore slow start assume always data to send W window size (measured in bytes) where loss occurs
bull avg window size ( in-flight bytes) is frac34 Wbull avg thruput is 34W per RTT
W
W2
avg TCP thruput = 34
WRTT bytessec
Transport Layer 3-20
TCP Futures TCP over ldquolong fat pipesrdquo
example 1500 byte segments 100ms RTT want 10 Gbps throughput requires W = 83333 in-flight segments throughput in terms of segment loss probability L
[Mathis 1997]
to achieve 10 Gbps throughput need a loss rate of L = 210-10 ndash a very small loss rate
new versions of TCP for high-speed
TCP throughput = 122 MSSRTT L
Transport Layer 3-21
fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK
TCP connection 1
bottleneckrouter
capacity R
TCP Fairness
TCP connection 2
Transport Layer 3-22
Why is TCP fairtwo competing sessions additive increase gives slope of 1 as throughout increases multiplicative decrease decreases throughput proportionally
R
R
equal bandwidth share
Connection 1 throughput
congestion avoidance additive increaseloss decrease window by factor of 2
congestion avoidance additive increaseloss decrease window by factor of 2
Transport Layer 3-23
Fairness (more)Fairness and UDP multimedia apps often
do not use TCPbull do not want rate
throttled by congestion control
instead use UDPbull send audiovideo at
constant rate tolerate packet loss
Fairness parallel TCP connections application can open
multiple parallel connections between two hosts web browsers do this eg link of rate R with 9
existing connectionsbull new app asks for 1 TCP gets
rate R10bull new app asks for 11 TCPs
gets R2
Transport Layer 3-24
network-assisted congestion control two bits in IP header (ToS field) marked by network router
to indicate congestion congestion indication carried to receiving host receiver (seeing congestion indication in IP datagram) )
sets ECE bit on receiver-to-sender ACK segment to notify sender of congestion
Explicit Congestion Notification (ECN)
sourceapplicationtransportnetwork
linkphysical
destinationapplicationtransportnetwork
linkphysical
ECN=00 ECN=11
ECE=1
IP datagram
TCP ACK segment
Transport Layer 3-25
Chapter 3 summary principles behind transport
layer servicesbull multiplexing
demultiplexingbull reliable data transferbull flow controlbull congestion control
instantiation implementation in the Internet
bull UDPbull TCP
next leaving the network
ldquoedgerdquo (application transport layers) into the network
ldquocorerdquo
two network layer chapters
bull data planebull control plane
Transport Layer 3-19
TCP throughput avg TCP thruput as function of window size RTT
bull ignore slow start assume always data to send W window size (measured in bytes) where loss occurs
bull avg window size ( in-flight bytes) is frac34 Wbull avg thruput is 34W per RTT
W
W2
avg TCP thruput = 34
WRTT bytessec
Transport Layer 3-20
TCP Futures TCP over ldquolong fat pipesrdquo
example 1500 byte segments 100ms RTT want 10 Gbps throughput requires W = 83333 in-flight segments throughput in terms of segment loss probability L
[Mathis 1997]
to achieve 10 Gbps throughput need a loss rate of L = 210-10 ndash a very small loss rate
new versions of TCP for high-speed
TCP throughput = 122 MSSRTT L
Transport Layer 3-21
fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK
TCP connection 1
bottleneckrouter
capacity R
TCP Fairness
TCP connection 2
Transport Layer 3-22
Why is TCP fairtwo competing sessions additive increase gives slope of 1 as throughout increases multiplicative decrease decreases throughput proportionally
R
R
equal bandwidth share
Connection 1 throughput
congestion avoidance additive increaseloss decrease window by factor of 2
congestion avoidance additive increaseloss decrease window by factor of 2
Transport Layer 3-23
Fairness (more)Fairness and UDP multimedia apps often
do not use TCPbull do not want rate
throttled by congestion control
instead use UDPbull send audiovideo at
constant rate tolerate packet loss
Fairness parallel TCP connections application can open
multiple parallel connections between two hosts web browsers do this eg link of rate R with 9
existing connectionsbull new app asks for 1 TCP gets
rate R10bull new app asks for 11 TCPs
gets R2
Transport Layer 3-24
network-assisted congestion control two bits in IP header (ToS field) marked by network router
to indicate congestion congestion indication carried to receiving host receiver (seeing congestion indication in IP datagram) )
sets ECE bit on receiver-to-sender ACK segment to notify sender of congestion
Explicit Congestion Notification (ECN)
sourceapplicationtransportnetwork
linkphysical
destinationapplicationtransportnetwork
linkphysical
ECN=00 ECN=11
ECE=1
IP datagram
TCP ACK segment
Transport Layer 3-25
Chapter 3 summary principles behind transport
layer servicesbull multiplexing
demultiplexingbull reliable data transferbull flow controlbull congestion control
instantiation implementation in the Internet
bull UDPbull TCP
next leaving the network
ldquoedgerdquo (application transport layers) into the network
ldquocorerdquo
two network layer chapters
bull data planebull control plane
Transport Layer 3-20
TCP Futures TCP over ldquolong fat pipesrdquo
example 1500 byte segments 100ms RTT want 10 Gbps throughput requires W = 83333 in-flight segments throughput in terms of segment loss probability L
[Mathis 1997]
to achieve 10 Gbps throughput need a loss rate of L = 210-10 ndash a very small loss rate
new versions of TCP for high-speed
TCP throughput = 122 MSSRTT L
Transport Layer 3-21
fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK
TCP connection 1
bottleneckrouter
capacity R
TCP Fairness
TCP connection 2
Transport Layer 3-22
Why is TCP fairtwo competing sessions additive increase gives slope of 1 as throughout increases multiplicative decrease decreases throughput proportionally
R
R
equal bandwidth share
Connection 1 throughput
congestion avoidance additive increaseloss decrease window by factor of 2
congestion avoidance additive increaseloss decrease window by factor of 2
Transport Layer 3-23
Fairness (more)Fairness and UDP multimedia apps often
do not use TCPbull do not want rate
throttled by congestion control
instead use UDPbull send audiovideo at
constant rate tolerate packet loss
Fairness parallel TCP connections application can open
multiple parallel connections between two hosts web browsers do this eg link of rate R with 9
existing connectionsbull new app asks for 1 TCP gets
rate R10bull new app asks for 11 TCPs
gets R2
Transport Layer 3-24
network-assisted congestion control two bits in IP header (ToS field) marked by network router
to indicate congestion congestion indication carried to receiving host receiver (seeing congestion indication in IP datagram) )
sets ECE bit on receiver-to-sender ACK segment to notify sender of congestion
Explicit Congestion Notification (ECN)
sourceapplicationtransportnetwork
linkphysical
destinationapplicationtransportnetwork
linkphysical
ECN=00 ECN=11
ECE=1
IP datagram
TCP ACK segment
Transport Layer 3-25
Chapter 3 summary principles behind transport
layer servicesbull multiplexing
demultiplexingbull reliable data transferbull flow controlbull congestion control
instantiation implementation in the Internet
bull UDPbull TCP
next leaving the network
ldquoedgerdquo (application transport layers) into the network
ldquocorerdquo
two network layer chapters
bull data planebull control plane
Transport Layer 3-21
fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK
TCP connection 1
bottleneckrouter
capacity R
TCP Fairness
TCP connection 2
Transport Layer 3-22
Why is TCP fairtwo competing sessions additive increase gives slope of 1 as throughout increases multiplicative decrease decreases throughput proportionally
R
R
equal bandwidth share
Connection 1 throughput
congestion avoidance additive increaseloss decrease window by factor of 2
congestion avoidance additive increaseloss decrease window by factor of 2
Transport Layer 3-23
Fairness (more)Fairness and UDP multimedia apps often
do not use TCPbull do not want rate
throttled by congestion control
instead use UDPbull send audiovideo at
constant rate tolerate packet loss
Fairness parallel TCP connections application can open
multiple parallel connections between two hosts web browsers do this eg link of rate R with 9
existing connectionsbull new app asks for 1 TCP gets
rate R10bull new app asks for 11 TCPs
gets R2
Transport Layer 3-24
network-assisted congestion control two bits in IP header (ToS field) marked by network router
to indicate congestion congestion indication carried to receiving host receiver (seeing congestion indication in IP datagram) )
sets ECE bit on receiver-to-sender ACK segment to notify sender of congestion
Explicit Congestion Notification (ECN)
sourceapplicationtransportnetwork
linkphysical
destinationapplicationtransportnetwork
linkphysical
ECN=00 ECN=11
ECE=1
IP datagram
TCP ACK segment
Transport Layer 3-25
Chapter 3 summary principles behind transport
layer servicesbull multiplexing
demultiplexingbull reliable data transferbull flow controlbull congestion control
instantiation implementation in the Internet
bull UDPbull TCP
next leaving the network
ldquoedgerdquo (application transport layers) into the network
ldquocorerdquo
two network layer chapters
bull data planebull control plane
Transport Layer 3-22
Why is TCP fairtwo competing sessions additive increase gives slope of 1 as throughout increases multiplicative decrease decreases throughput proportionally
R
R
equal bandwidth share
Connection 1 throughput
congestion avoidance additive increaseloss decrease window by factor of 2
congestion avoidance additive increaseloss decrease window by factor of 2
Transport Layer 3-23
Fairness (more)Fairness and UDP multimedia apps often
do not use TCPbull do not want rate
throttled by congestion control
instead use UDPbull send audiovideo at
constant rate tolerate packet loss
Fairness parallel TCP connections application can open
multiple parallel connections between two hosts web browsers do this eg link of rate R with 9
existing connectionsbull new app asks for 1 TCP gets
rate R10bull new app asks for 11 TCPs
gets R2
Transport Layer 3-24
network-assisted congestion control two bits in IP header (ToS field) marked by network router
to indicate congestion congestion indication carried to receiving host receiver (seeing congestion indication in IP datagram) )
sets ECE bit on receiver-to-sender ACK segment to notify sender of congestion
Explicit Congestion Notification (ECN)
sourceapplicationtransportnetwork
linkphysical
destinationapplicationtransportnetwork
linkphysical
ECN=00 ECN=11
ECE=1
IP datagram
TCP ACK segment
Transport Layer 3-25
Chapter 3 summary principles behind transport
layer servicesbull multiplexing
demultiplexingbull reliable data transferbull flow controlbull congestion control
instantiation implementation in the Internet
bull UDPbull TCP
next leaving the network
ldquoedgerdquo (application transport layers) into the network
ldquocorerdquo
two network layer chapters
bull data planebull control plane
Transport Layer 3-23
Fairness (more)Fairness and UDP multimedia apps often
do not use TCPbull do not want rate
throttled by congestion control
instead use UDPbull send audiovideo at
constant rate tolerate packet loss
Fairness parallel TCP connections application can open
multiple parallel connections between two hosts web browsers do this eg link of rate R with 9
existing connectionsbull new app asks for 1 TCP gets
rate R10bull new app asks for 11 TCPs
gets R2
Transport Layer 3-24
network-assisted congestion control two bits in IP header (ToS field) marked by network router
to indicate congestion congestion indication carried to receiving host receiver (seeing congestion indication in IP datagram) )
sets ECE bit on receiver-to-sender ACK segment to notify sender of congestion
Explicit Congestion Notification (ECN)
sourceapplicationtransportnetwork
linkphysical
destinationapplicationtransportnetwork
linkphysical
ECN=00 ECN=11
ECE=1
IP datagram
TCP ACK segment
Transport Layer 3-25
Chapter 3 summary principles behind transport
layer servicesbull multiplexing
demultiplexingbull reliable data transferbull flow controlbull congestion control
instantiation implementation in the Internet
bull UDPbull TCP
next leaving the network
ldquoedgerdquo (application transport layers) into the network
ldquocorerdquo
two network layer chapters
bull data planebull control plane
Transport Layer 3-24
network-assisted congestion control two bits in IP header (ToS field) marked by network router
to indicate congestion congestion indication carried to receiving host receiver (seeing congestion indication in IP datagram) )
sets ECE bit on receiver-to-sender ACK segment to notify sender of congestion
Explicit Congestion Notification (ECN)
sourceapplicationtransportnetwork
linkphysical
destinationapplicationtransportnetwork
linkphysical
ECN=00 ECN=11
ECE=1
IP datagram
TCP ACK segment
Transport Layer 3-25
Chapter 3 summary principles behind transport
layer servicesbull multiplexing
demultiplexingbull reliable data transferbull flow controlbull congestion control
instantiation implementation in the Internet
bull UDPbull TCP
next leaving the network
ldquoedgerdquo (application transport layers) into the network
ldquocorerdquo
two network layer chapters
bull data planebull control plane
Transport Layer 3-25
Chapter 3 summary principles behind transport
layer servicesbull multiplexing
demultiplexingbull reliable data transferbull flow controlbull congestion control
instantiation implementation in the Internet
bull UDPbull TCP
next leaving the network
ldquoedgerdquo (application transport layers) into the network
ldquocorerdquo
two network layer chapters
bull data planebull control plane