Академический Документы
Профессиональный Документы
Культура Документы
network
data link
physical
connection setup
network
data link
physical
Unreliable (best-effort),
unordered unicast or multicast
delivery: UDP
application
transport
network
data link
physical
TCP Features
network
data link
physical
Transport Layer
network
data link
physical
network
data link
physical
flow control
application
transport
network
data link
physical
congestion
Time-out
32 bits
ACK: ACK #
valid
PSH: push data now
(generally not used)
RST, SYN, FIN:
connection estab
(setup, teardown
commands)
Internet
checksum
(as in UDP)
source port #
dest port #
sequence number
acknowledgement number
head not
UA P R S F
len used
checksum
Receive window
Urg data pnter
counting
by bytes
of data
(not segments!)
# bytes
rcvr willing
to accept
application
data
(variable length)
Assumption:
When there is a packet loss, congestion occurs somewhere in
the network.
Duplicate acknowledgements
In practice, triple duplicate acks are considered
to be a signal of a packet loss.
11
10
12
ignore retransmissions, or
cumulatively ACKed segments
unnecessary
retransmissions
too long: slow reaction
to segment loss
Exponential Weighted
Moving Average (EWMA)
13
14
Two phases
Slow Start
slow start
congestion avoidance
Important variables:
Cwnd
ssthresh: defines threshold between slow start phase and
congestion control phase
15
16
Congestion Avoidance
Slowstart algorithm
Host B
RTT
14
Congestion Window size (segments)
initialize: Cwnd = 1
for (each segment ACKed)
Cwnd++
until (loss event OR
Cwnd > ssthresh)
Host A
time
Congestion
avoidance
12
10
8
6
4
2
Slow start
threshold
Slow
start
Example
assumes that
acks are not
delayed
0
0
17
18
Philosophy:
3 dup ACKs indicates
network capable of
delivering some segments
timeout indicates a
more alarming
congestion scenario
20
Refinement (more)
3 dupacks
21
22
Fast Recovery
AIMD
Decrease window by
factor of 2 on loss
event
AIMD:
additive increase,
multiplicative
decrease
Increase window by 1
per RTT
23
TCP congestion
avoidance:
TCP Fairness
24
TCP connection 1
TCP
connection 2
bottleneck
router
capacity R
TCP Fairness
R2
equal bandwidth
share (y=x)
25
(R/2, R/2)
Target
operating
point
R1
26
27
28
Summary (Contd)
Assumptions:
cwnd = ssthresh+3,
For each duplicate ack received, cwnd is increased by 1 (in every
RTT).
Note: When retransmitted packet is finally acked, cwnd is set to
ssthresh, and the algorithm enters Congestion Avoidance phase.
Constant RTT
29
30
Slope: 1/RTT
Window
size in pkts W
W/2
Slope = 1/ RTT
D
w/2
Time
31
T
t
D = W RTT/2
It takes too long to fill the pipe again after loss under-utilization !
Throughput R = (3MSS
Or, to fill the pipe, the packet drop rate must be even smaller than the
physical fiber error rate!
Loss rate L =
Solving for W
W2/8)
/D
1/(3W2/8)
32
5 billion packets!
Drop-tail
Flip a
coin
drop
accept
Packet drop
probability
0
ECE/CSC 570, Fall 2014
33
34
Rmin
Rmax
Buffer
occupancy
Effect:
Rmin
35
36
Disadvantage:
37
38