Transcript class14

Summary: TCP Congestion Control
When CongWin is below Threshold, sender in
slow-start phase, window grows exponentially.
When CongWin is above Threshold, sender is in
congestion-avoidance phase, window grows linearly.
When a triple duplicate ACK occurs, Threshold
set to CongWin/2 and CongWin set to
Threshold.
When timeout occurs, Threshold set to
CongWin/2 and CongWin is set to 1 MSS.
Network Layer
4-1
TCP sender congestion control
State
Event
TCP Sender Action
CongWin = CongWin + MSS,
If (CongWin > Threshold)
set state to “Congestion
Avoidance”
Commentary
Slow Start
(SS)
ACK receipt
for previously
unacked data
Resulting in a doubling of
CongWin every RTT
Congestion
Avoidance
(CA)
ACK receipt
CongWin = CongWin+MSS *
for previously (MSS/CongWin)
unacked data
Additive increase, resulting
in increase of CongWin by
1 MSS every RTT
SS or CA
Loss event
detected by
triple
duplicate
ACK
Threshold = CongWin/2,
CongWin = Threshold,
Set state to “Congestion
Avoidance”
Fast recovery, implementing
multiplicative decrease.
CongWin will not drop below
1 MSS.
SS or CA
Timeout
Threshold = CongWin/2,
CongWin = 1 MSS,
Set state to “Slow Start”
Enter slow start
SS or CA
Duplicate
ACK
Increment duplicate ACK count
for segment being acked
CongWin and Threshold not
changed
Network Layer
4-2
TCP Throughput
What’s the average throughout of TCP as a
function of window size and RTT?
Ignore slow start
Let W be the window size when loss occurs.
When window is W, throughput is W/RTT
Just after loss, window drops to W/2, throughput
to W/2RTT.
Average throughout: .75 W/RTT
Network Layer
4-3
TCP Futures
Example: 1500 byte segments, 100ms RTT, want 10
Gbps throughput
Requires window size W = 83,333 in-flight
segments
Throughput in terms of loss rate:
➜ L = 2·10-10 Wow
New versions of TCP for high-speed needed!
Network Layer
4-4
TCP Fairness
Fairness goal: if K TCP sessions share same
bottleneck link of bandwidth R, each should have
average rate of R/K
TCP connection 1
TCP
connection 2
bottleneck
router
capacity R
Network Layer
4-5
Why is TCP fair?
Two competing sessions:
Additive increase gives slope of 1, as throughput increases
Multiplicative decrease decreases throughput proportionally
Connection 2 throughput
R
equal bandwidth share
loss: decrease window by factor of 2
congestion avoidance: additive increase
loss: decrease window by factor of 2
congestion avoidance: additive increase
Connection 1 throughput R
Network Layer
4-6
Fairness
Fairness and parallel TCP
connections
Nothing prevents app from
opening parallel connections
Do not want rate
between 2 hosts.
throttled by congestion
control
Web browsers do this
Instead use UDP:
Example: link of rate R
Pump audio/video at
supporting 9 connections;
Fairness and UDP
Multimedia apps often
do not use TCP
constant rate, tolerate
packet loss
Research area: TCP
friendly
New app asks for 1 TCP,
gets rate R/10
New app asks for 11 TCPs,
gets R/2 !
Network Layer
4-7
Chapter 4
Network Layer
Modified by Jelena Mirkovic
All material copyright 1996-2005
J.F Kurose and K.W. Ross, All Rights Reserved
Computer Networking:
A Top Down Approach
Featuring the Internet,
3rd edition.
Jim Kurose, Keith Ross
Addison-Wesley, July
2004.
Network Layer
4-8
Network layer
Transport segment from
sending to receiving host
Sending side
encapsulates segments
into datagrams
Receiving side delivers
segments to transport
layer
Network layer protocols
in every host, router
Router examines header
fields in all IP datagrams
passing through it
application
transport
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
application
transport
network
data link
physical
Network Layer
4-9
Key Network-Layer Functions
forwarding: move
packets from router’s
input to appropriate
router output
routing: determine
route taken by
packets from source
to dest.
analogy:
routing: process of
planning trip from
source to dest
forwarding: process
of getting through
single interchange
Routing algorithms
Network Layer 4-10
Interplay between routing and forwarding
routing algorithm
local forwarding table
header value output link
0100
0101
0111
1001
3
2
2
1
value in arriving
packet’s header
0111
1
3 2
Network Layer
4-11
Connection setup
3rd important function in some network
architectures:
ATM, frame relay, X.25
Before datagrams flow, two hosts and
intervening routers establish virtual
connection
Routers get involved
Network and transport layer service
Network: between two hosts
Transport: between two processes
Network Layer 4-12
Network service model
Q: What service model for “channel” transporting
datagrams from sender to rcvr?
Example services for
individual datagrams:
Guaranteed delivery
Guaranteed delivery
with less than 40 msec
delay
Example services for a
flow of datagrams:
In-order datagram
delivery
Guaranteed minimum
bandwidth to flow
Restrictions on
changes in interpacket spacing
Network Layer 4-13
Network layer service models:
Network
Architecture
Internet
Service
Model
Guarantees ?
Congestion
Bandwidth Loss Order Timing feedback
best effort none
ATM
CBR
ATM
VBR
ATM
ABR
ATM
UBR
constant
rate
guaranteed
rate
guaranteed
minimum
none
no
no
no
yes
yes
yes
yes
yes
yes
no
yes
no
no (inferred
via loss)
no
congestion
no
congestion
yes
no
yes
no
no
Network Layer 4-14
Network layer connection and
connection-less service
Datagram network provides network-layer
connectionless service
VC network provides network-layer
connection service
Analogous to the transport-layer services,
but:
Service: host-to-host
Host has no choice:
network provides one or the other
Implementation: in the core
Network Layer 4-15
Virtual circuits
“source-to-dest path behaves much like telephone
circuit”
performance-wise
network actions along source-to-dest path
Call setup, teardown for each call before data can flow
Each packet carries VC identifier (not destination host
address)
Every router on source-dest path maintains “state” for
each passing connection
Link, router resources (bandwidth, buffers) may be
allocated to VC
Network Layer 4-16
VC implementation
A VC consists of:
1.
2.
3.
Path from source to destination
VC numbers, one number for each link along
path
Entries in forwarding tables in routers along
path
Packet belonging to VC carries a VC
number.
VC number must be changed on each link.
New VC number comes from forwarding table
Network Layer 4-17
Forwarding table
VC number
22
12
1
Forwarding table in
northwest router:
Incoming interface
1
2
3
1
…
2
32
3
interface
number
Incoming VC #
12
63
7
97
…
Outgoing interface
3
1
2
3
…
Outgoing VC #
22
18
17
87
…
Routers maintain connection state information!
Network Layer 4-18
Virtual circuits: signaling protocols
Used to setup, maintain teardown VC
Used in ATM, frame-relay, X.25
Not used in today’s Internet
application
transport 5. Data flow begins
network 4. Call connected
data link 1. Initiate call
physical
6. Receive data application
3. Accept call
2. incoming call
transport
network
data link
physical
Network Layer 4-19
Datagram networks
No call setup at network layer
Routers: no state about end-to-end connections
No network-level concept of “connection”
Packets forwarded using destination host addres
Packets between same source-dest pair may take
different paths
application
transport
network
data link 1. Send data
physical
application
transport
network
2. Receive data
data link
physical
Network Layer 4-20
Forwarding table
Destination Address Range
4 billion
possible entries
Link Interface
11001000 00010111 00010000 00000000
through
11001000 00010111 00010111 11111111
0
11001000 00010111 00011000 00000000
through
11001000 00010111 00011000 11111111
1
11001000 00010111 00011001 00000000
through
11001000 00010111 00011111 11111111
2
otherwise
3
Network Layer 4-21
Longest prefix matching
Prefix Match
11001000 00010111 00010
11001000 00010111 00011000
11001000 00010111 00011
otherwise
Link Interface
0
1
2
3
Examples
DA: 11001000 00010111 00010110 10100001
Which interface?
DA: 11001000 00010111 00011000 10101010
Which interface?
Network Layer 4-22
Datagram or VC network
Internet
ATM
Data exchange among
Evolved from
computers
telephony
Human conversation:
No strict timing req.
strict timing,
“smart” end systems
reliability
(computers), simple core
requirements
many link types
“dumb” end systems,
different
complexity inside
characteristics
network
uniform service
difficult
Network Layer 4-23