Sie sind auf Seite 1von 4

Chapter 3 Chapter 3 outline

Transport Layer 3.1 Transport-layer 3.5 Connection-oriented


services transport: TCP
3.2 Multiplexing and segment structure
demultiplexing reliable data transfer
flow control
A note on the use of these ppt slides:
3.3 Connectionless
connection management
Were making these slides freely available to all (faculty, students, readers).
Computer Networking:
transport: UDP
Theyre in powerpoint form so you can add, modify, and delete slides
(including this one) and slide content to suit your needs. They obviously A Top Down Approach 3.4 Principles of 3.6 Principles of
represent a lot of work on our part. In return for use, we only ask the
following: Featuring the Internet,
reliable data transfer congestion control
If you use these slides (e.g., in a class) in substantially unaltered form, 2nd edition.
that you mention their source (after all, wed like people to use our book!)
Jim Kurose, Keith Ross
3.7 TCP congestion
If you post any slides in substantially unaltered form on a www site, that
you note that they are adapted from (or perhaps identical to) our slides, and Addison-Wesley, July control
note our copyright of this material.
2002.
Thanks and enjoy! JFK/KWR

All material copyright 1996-2002


J.F Kurose and K.W. Ross, All Rights Reserved
Transport Layer 3-1 Transport Layer 3-2

Principles of Congestion Control Approaches towards congestion control


Two broad approaches towards congestion control:
Congestion:
informally: too many sources sending too much End-end congestion Network-assisted
data too fast for network to handle control: congestion control:
different from flow control! no explicit feedback from routers provide feedback
network to end systems
manifestations:
congestion inferred from single bit indicating
lost packets (buffer overflow at routers) end-system observed loss, congestion (SNA,
long delays (queueing in router buffers) delay DECbit, TCP/IP ECN,
approach taken by TCP ATM)
a top-10 problem!
explicit rate sender
should send at

Transport Layer 3-3 Transport Layer 3-4

Case study: ATM ABR congestion control Case study: ATM ABR congestion control

ABR: available bit rate: RM (resource management)


elastic service cells:
if senders path sent by sender, interspersed
underloaded: with data cells
sender should use bits in RM cell set by switches
available bandwidth (network-assisted)
if senders path NI bit: no increase in rate
congested: (mild congestion) two-byte ER (explicit rate) field in RM cell
sender throttled to CI bit: congestion congested switch may lower ER value in cell
minimum guaranteed indication sender send rate thus minimum supportable rate on path
rate RM cells returned to sender by EFCI bit in data cells: set to 1 in congested switch
receiver, with bits intact if data cell preceding RM cell has EFCI set, sender sets CI
bit in returned RM cell

Transport Layer 3-5 Transport Layer 3-6

1
TCP Congestion Control TCP AIMD
multiplicative decrease: additive increase:
cut CongWin in half increase CongWin by
end-end control (no network How does sender
after loss event 1 MSS every RTT in
assistance) perceive congestion?
the absence of loss
sender limits transmission: loss event = timeout or congestion
events: probing
3 duplicate acks
window
LastByteSent-LastByteAcked
24 Kbytes
CongWin TCP sender reduces
Roughly, rate (CongWin) after
loss event
16 Kbytes

CongWin
rate = Bytes/sec
RTT three mechanisms:
8 Kbytes
AIMD
CongWin is dynamic, function
slow start
of perceived network
conservative after
time
congestion
timeout events Long-lived TCP connection
Transport Layer 3-7 Transport Layer 3-8

TCP Slow Start TCP Slow Start (more)


When connection begins,
When connection begins, When connection Host A Host B
increase rate
CongWin = 1 MSS begins, increase rate
exponentially fast until exponentially until
one segm
Example: MSS = 500 en t
first loss event

RTT
bytes & RTT = 200 msec first loss event:
initial rate = 20 kbps double CongWin every two segm
ents

available bandwidth may RTT


be >> MSS/RTT done by incrementing
CongWin for every ACK four segm
desirable to quickly ramp en ts
received
up to respectable rate
Summary: initial rate
is slow but ramps up
exponentially fast time

Transport Layer 3-9 Transport Layer 3-10

Refinement Refinement (more)


Philosophy: Q: When should the
After 3 dup ACKs: exponential
3 dup ACKs indicates increase switch to
CongWin is cut in half
14

network capable of linear?


congestion window size

12 threshold

window then grows delivering some segments A: When CongWin 10


(segments)

linearly timeout before 3 dup gets to 1/2 of its 8

value before
6
But after timeout event: ACKs is more alarming 4
timeout.
CongWin instead set to 2 TCP
Tahoe
TCP
Reno
Implementation:
0
1 MSS; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

window then grows Variable Threshold Transmission round

exponentially At loss event, Threshold is


set to 1/2 of CongWin just
to a threshold, then before loss event
grows linearly

Transport Layer 3-11 Transport Layer 3-12

2
TCP Fairness
Summary: TCP Congestion Control
Fairness goal: if K TCP sessions share same
When CongWin is below Threshold, sender in bottleneck link of bandwidth R, each should have
slow-start phase, window grows exponentially. average rate of R/K
When CongWin is above Threshold, sender is in
TCP connection 1
congestion-avoidance phase, window grows linearly.

When a triple duplicate ACK occurs, Threshold


set to CongWin/2 and CongWin set to
Threshold. bottleneck
TCP
router
connection 2
capacity R
When timeout occurs, Threshold set to
CongWin/2 and CongWin is set to 1 MSS.

Transport Layer 3-13 Transport Layer 3-14

Why is TCP fair? Fairness (more)


Fairness and UDP Fairness and parallel TCP
Two competing sessions: connections
Additive increase gives slope of 1, as throughout increases Multimedia apps often
do not use TCP nothing prevents app from
multiplicative decrease decreases throughput proportionally
do not want rate opening parallel cnctions
R equal bandwidth share throttled by congestion between 2 hosts.
control Web browsers do this
Connection 2 throughput

Instead use UDP: Example: link of rate R


loss: decrease window by factor of 2 pump audio/video at supporting 9 cnctions;
congestion avoidance: additive increase constant rate, tolerate
loss: decrease window by factor of 2 packet loss new app asks for 1 TCP, gets
congestion avoidance: additive increase rate R/10
Research area: TCP new app asks for 11 TCPs,
friendly gets R/2 !

Connection 1 throughput R

Transport Layer 3-15 Transport Layer 3-16

Delay modeling Fixed congestion window (1)


Notation, assumptions:
Q: How long does it take to Assume one link between
receive an object from a client and server of rate R
Web server after sending S: MSS (bits)
First case:
a request? O: object size (bits) WS/R > RTT + S/R: ACK for
first segment in window
Ignoring congestion, delay is no retransmissions (no loss, returns before windows
influenced by: no corruption) worth of data sent
TCP connection establishment Window size:
data transmission delay First assume: fixed
slow start congestion window, W delay = 2RTT + O/R
segments
Then dynamic window,
modeling slow start

Transport Layer 3-17 Transport Layer 3-18

3
TCP Delay Modeling: Slow Start (1)
Fixed congestion window (2)
Now suppose window grows according to slow start

Will show that the delay for one object is:


Second case:
WS/R < RTT + S/R: wait O S S
Latency = 2 RTT + + P RTT + (2 P 1)
for ACK after sending R R R
windows worth of data
sent where P is the number of times TCP idles at server:

P = min{Q, K 1}
delay = 2RTT + O/R
+ (K-1)[S/R + RTT - WS/R]
- where Q is the number of times the server idles
if the object were of infinite size.

- and K is the number of windows that cover the object.

Transport Layer 3-19 Transport Layer 3-20

TCP Delay Modeling: Slow Start (2) TCP Delay Modeling (3)
Delay components: initiate TCP
S
connection + RTT = time from when server starts to send segment
2 RTT for connection R
estab and request request until server receives acknowledgement
O/R to transmit
object
first window initiate TCP

object
= S/R connection
S
time server idles due RTT
second window
2k 1 = time to transmit the kth window request
R
to slow start = 2S/R object
first window
= S/R
+
Server idles: third window S k 1 S
RTT

R + RTT 2 R = idle time after the kth window


second window
= 4S/R = 2S/R
P = min{K-1,Q} times
third window
= 4S/R

Example: fourth window


= 8S/R
O/S = 15 segments O P
delay = + 2 RTT + idleTime p fourth window
K = 4 windows R p =1
= 8S/R

Q=2 P
O S S
P = min{K-1,Q} = 2 object
complete
transmission
= + 2 RTT + [ + RTT 2 k 1 ]
delivered R k =1 R R object
complete
transmission
Server idles P=2 times
delivered
time at O S S
time at server = + 2 RTT + P[ RTT + ] (2 P 1) time at
client R R R time at
client
server

Transport Layer 3-21 Transport Layer 3-22

TCP Delay Modeling (4) Chapter 3: Summary


Recall K = number of windows that cover object
principles behind transport
How do we calculate K ? layer services:
K = min{k : 2 0 S + 21 S + + 2 k 1 S O} multiplexing,
= min{k : 2 0 + 21 + + 2 k 1 O / S } demultiplexing
O reliable data transfer
= min{k : 2 k 1 }
S flow control Next:
O
= min{k : k log 2 ( + 1)} congestion control leaving the network
S instantiation and edge (application,
O implementation in the transport layers)
= log 2 ( + 1)
S Internet into the network
Calculation of Q, number of idles for infinite-size object, UDP core
is similar (see HW).
TCP
Transport Layer 3-23 Transport Layer 3-24

Das könnte Ihnen auch gefallen