Computer Science VIII Transport Layer: Ing. Etson Guerrero
Computer Science VIII Transport Layer: Ing. Etson Guerrero
Computer Science VIII Transport Layer: Ing. Etson Guerrero
Chapter 3
Transport Layer
Ing. Etson Guerrero
3.6 Principles of
3.4 Principles of
reliable data transfer congestion control
3.7 TCP congestion
control
3.6 Principles of
3.4 Principles of
reliable data transfer congestion control
3.7 TCP congestion
control
P3 P1
P1 P2 P4 application
application application
host 2 host 3
host 1
Transport Layer 3-8
How demultiplexing works
host receives IP datagrams
each datagram has source 32 bits
IP address, destination IP
address source port # dest port #
P2 P1
P1
P3
P1 P4 P5 P6 P2 P1P3
SP: 5775
DP: 80
S-IP: B
D-IP:C
P1 P4 P2 P1P3
SP: 5775
DP: 80
S-IP: B
D-IP:C
3.6 Principles of
3.4 Principles of
reliable data transfer congestion control
3.7 TCP congestion
control
Application
data
(message)
3.6 Principles of
3.4 Principles of
reliable data transfer congestion control
3.7 TCP congestion
control
send receive
side side
Increase utilization
by a factor of 3!
U 3*L/R .024
sender
= = = 0.0008
RTT + L / R 30.008 microsecon
ds
Transport Layer 3-34
Pipelining Protocols
Go-back-N: big picture: Selective Repeat: big pic
Sender can have up to Sender can have up to
N unacked packets in N unacked packets in
pipeline pipeline
Rcvr only sends Rcvr acks individual
cumulative acks packets
Doesn’t ack packet if Sender maintains
there’s a gap timer for each
Sender has timer for unacked packet
oldest unacked packet When timer expires,
If timer expires, retransmit only unack
retransmit all unacked packet
packets
3.6 Principles of
3.4 Principles of
reliable data transfer congestion control
3.7 TCP congestion
control
overwhelm receiver
door door
TCP TCP
send buffer receive buffer
segment
3.6 Principles of
3.4 Principles of
reliable data transfer congestion control
3.7 TCP congestion
control
TCP
TCP Connection Management (cont.)
TCP
TCP seq. #’s and ACKs
Seq. #’s:
byte stream “number” of first byte in segment’s data
ACKs:
seq # of next byte expected from other side
cumulative ACK
3.6 Principles of
3.4 Principles of
reliable data transfer congestion control
3.7 TCP congestion
control
3.6 Principles of
3.4 Principles of
reliable data transfer congestion control
3.7 TCP congestion
control
speed-matching
service: matching the
send rate to the
receiving app’s drain
rate
app process may be
slow at reading from
buffer
Transport Layer 3-60
TCP Flow control: how it works
Rcvr advertises spare
room by including value
of RcvWindow in
segments
Sender limits unACKed
(Suppose TCP receiver data to RcvWindow
discards out-of-order guarantees receive
segments) buffer doesn’t overflow
spare room in buffer
= RcvWindow
= RcvBuffer-[LastByteRcvd -
LastByteRead]
3.6 Principles of
3.4 Principles of
reliable data transfer congestion control
3.7 TCP congestion
control
Congestion:
informally: “too many sources sending too much
data too fast for network to handle”
different from flow control!
manifestations:
lost packets (buffer overflow at routers)
long delays (queueing in router buffers)
a top-10 problem!
receivers
one router,
Host B unlimited shared
output link buffers
infinite buffers
no retransmission
large delays
when congested
maximum
achievable
throughput
Transport Layer 3-64
Causes/costs of congestion: scenario 2
Host B
H
o
s
t
B
3.6 Principles of
3.4 Principles of
reliable data transfer congestion control
3.7 TCP congestion
control
24 Kbytes
Saw tooth
behavior: probing
16 Kbytes
for bandwidth
8 Kbytes
time
time
three mechanisms:
AIMD
slow start
conservative after timeout events
TCP connection 1
bottleneck
TCP
router
connection 2
capacity R
Connection 1 throughput R