Escolar Documentos
Profissional Documentos
Cultura Documentos
Transport Layer
Part 4/5
Computer
They obviously represent a lot of work on our part. In return for use, we only
ask the following:
If you use these slides (e.g., in a class) that you mention their source
(after all, we’d like people to use our book!)
Networking: A Top
If you post any slides on a www site, that you note that they are adapted
from (or perhaps identical to) our slides, and note our copyright of this
Down Approach
material.
7th edition
Thanks and enjoy! JFK/KWR
Jim Kurose, Keith Ross
All material copyright 1996-2016 Pearson/Addison Wesley
J.F Kurose and K.W. Ross, All Rights Reserved April 2016
Transport Layer 2-1
Chapter 3 outline
3.1 transport-layer 3.5 connection-oriented
services transport: TCP
3.2 multiplexing and • segment structure
demultiplexing • reliable data transfer
3.3 connectionless • flow control
transport: UDP • connection management
3.4 principles of reliable 3.6 principles of congestion
data transfer control
3.7 TCP congestion control
data
checksum urg pointer
window size
acknowledgements: N
• ignore retransmissions
All the samples are averaged using exponential weighted moving average
(EWMA)
350
300
250
RTT (milliseconds)
200
sampleRTT
150
EstimatedRTT
100
1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 106
time (seconnds)
time (seconds)
SampleRTT Estimated RTT
SampleDevRTT(recent) = |SampleRTT-EstimatedRTT|
DevRTT(current) = (1-)*DevRTT(Previous) + * SampleDevRTT(recent)
Suppose that TCP's current estimatedRTT and DevRTT are 340 msec and 18
msec, respectively. Suppose that the next three SampleRTTs are 400, 270, and
390 respectively. Compute TCP's new value of estimatedRTT, DevRTT, and the
TCP timeout value after each of these three measured RTT values is
obtained.Use the values of α = 0.125 and β = 0.25.
Solution:
1) SampleRTT0 = 400ms, EstimatedRTT=340ms, DevRTT=18ms
estimatedRTT = ?
DevRTT = ?
TimeoutInterval = ?
Transport Layer 3-16
TCP round trip time and timeout (class exercises)
Suppose that TCP's current estimatedRTT and DevRTT are 340 msec and 18
msec, respectively. Suppose that the next three SampleRTTs are 400, 270, and
390 respectively. Compute TCP's new value of estimatedRTT, DevRTT, and the
TCP timeout value after each of these three measured RTT values is
obtained.Use the values of α = 0.125 and β = 0.25.
Solution:
1) SampleRTT0 = 400ms, EstimatedRTT=340ms, DevRTT=18ms
estimatedRTT = ?
DevRTT = ?
TimeoutInterval = ?
DevRTT = ??
TimeoutInterval = ??
DevRTT = ??
TimeoutInterval = ??
SendBase=92
Seq=92, 8 bytes of data Seq=92, 8 bytes of data
timeout
ACK=100
X
ACK=100
ACK=120
SendBase=120
ACK=100
X
ACK=120
cumulative ACK
Transport Layer 3-26
TCP ACK generation recommendation [RFC
1122, RFC 2581]
ACK=100
timeout
ACK=100
ACK=100
ACK=100
Seq=100, 20 bytes of data
application application
network network
2-way handshake:
Q: will 2-way handshake
always work in
network?
Let’s talk
ESTAB variable delays
OK
ESTAB retransmitted messages (e.g.
req_conn(x)) due to
message loss
message reordering
choose x
req_conn(x)
can’t “see” other side
ESTAB
acc_conn(x)
ESTAB
choose x choose x
req_conn(x) req_conn(x)
ESTAB ESTAB
retransmit acc_conn(x) retransmit acc_conn(x)
req_conn(x) req_conn(x)
ESTAB ESTAB
data(x+1) accept
req_conn(x)
retransmit data(x+1)
data(x+1)
connection connection
client x completes server x completes server
client
terminates forgets x terminates forgets x
req_conn(x)
ESTAB ESTAB
data(x+1) accept
half open connection! data(x+1)
(no client!)
Transport Layer 3-42
TCP 3-way handshake
SYN SYN
rcvd sent
SYNACK(seq=y,ACKnum=x+1)
ESTAB ACK(ACKnum=y+1)
ACK(ACKnum=y+1)
L
LAST_ACK
FINbit=1, seq=y
TIMED_WAIT can no longer
send data
ACKbit=1; ACKnum=y+1
timed wait
for 2*max CLOSED
segment lifetime
CLOSED