Chapter 3 v8.0
Chapter 3 v8.0
Transport
Layer
A note on the use of these PowerPoint slides:
We’re making these slides freely available to all (faculty, students,
readers). They’re in PowerPoint form so you see the animations; and
can add, modify, and delete slides (including this one) and slide content
to suit your needs. 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!)
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 material.
Computer Networking: A
For a revision history, see the slide note for this page.
Top-Down Approach
Thanks and enjoy! JFK/KWR 8th edition
Jim Kurose, Keith Ross
All material copyright 1996-2020
J.F Kurose and K.W. Ross, All Rights Reserved Pearson, 2020
Transport Layer: 3-1
Transport layer: overview
Our goal:
understand principles learn about Internet transport
behind transport layer layer protocols:
services: • UDP: connectionless transport
• multiplexing, • TCP: connection-oriented reliable
demultiplexing transport
• reliable data transfer • TCP congestion control
• flow control
• congestion control
log
ica
transport protocols actions in end
le
n d-
systems:
e nd
local or
tra
• sender: breaks application messages regional ISP
nsp
into segments, passes to network layer
ort
home network content
• receiver: reassembles segments into provider
network
messages, passes to application layer application
transport
datacenter
network
network
two transport protocols available to data link
physical
household analogy:
12 kids in Ann’s house sending
letters to 12 kids in Bill’s house:
hosts = houses
processes = kids
app messages = letters in
envelopes
transport protocol = Ann and Bill
who demux to in-house siblings
network-layer protocol = postal
service
Transport Layer: 3-5
Transport vs. network layer services and protocols
Sender:
application
is passed an application- app. msg
application
layer message
determines segment TThtransport
app. msg
transport h
Receiver:
application receives segment from IP application
checks header values
app. msg
transport extracts application-layer transport
message
network (IP) demultiplexes message up network
to application via socket (IP)
link
link
physical physical
Th app. msg
log
• congestion control
ica
le
• flow control
n d-
e nd
• connection setup local or
tra
regional ISP
UDP: User Datagram Protocol
nsp
ort
home network
• unreliable, unordered delivery content
provider
network
• no-frills extension of “best-effort” IP application
transport
datacenter
network
network
services not available: data link
physical
transport
Hn Ht HTTP msg
transport
application
application application
transport transport
(UDP) (UDP)
physical physical
data to/from
UDP segment format application layer
options (variable
C, E: congestion notification length)
TCP options
application data sent by
RST, SYN, FIN: connection data application into
management (variable length) TCP socket
window size
Acknowledgements: N
User types‘C’
Seq=42, ACK=79, data = ‘C’
host ACKs receipt of‘C’,
echoes back ‘C’
Seq=79, ACK=43, data = ‘C’
host ACKs receipt
of echoed ‘C’
Seq=43, ACK=80
SendBase=92
Seq=92, 8 bytes of data Seq=92, 8 bytes of data
timeout
timeout
Seq=100, 20 bytes of data
ACK=100
X
ACK=100
ACK=120
SendBase=120
cumulative ACK
covers for earlier
lost ACK
Transport Layer: 3-40
TCP: retransmission scenarios
Host A Host B
timeout
=100
ACK
CK =100
A
= 10 0
Receipt of three duplicate ACKs ACK
TCP
code
Network layer
delivering IP datagram
payload into TCP
IP
socket buffers code
from sender
TCP
code
Network layer
delivering IP datagram
payload into TCP
IP
socket buffers code
from sender
TCP
code
receive window
flow control: # bytes
receiver willing to accept IP
code
from sender
TCP
flow control code
application application
Host B
R/2
Q: What happens as
lout
delay
arrival rate lin
throughput:
approaches R/2?
lin R/2 lin R/2
maximum per-connection large delays as arrival rate
throughput: R/2 lin approaches capacity
Transport Layer: 3-55
Causes/costs of congestion: scenario 2
one router, finite buffers
sender retransmits lost, timed-out packet
• application-layer input = application-layer output: lin = lout
• transport-layer input includes retransmissions : l’in lin
R R
lout
throughput:
Host A lin : original data lin
copy l'in: original data, plus lout R/2
retransmitted data
R R
no buffer space!
R R
lout
to retransmissions
full buffers
throughput:
when sending at
sender knows when packet has been dropped: R/2, some packets
only resends if packet known to be lost are needed
retransmissions
R R
lout
“wasted” capacity due
full buffers – requiring retransmissions to un-needed
retransmissions
but sender times can time out prematurely,
throughput:
sending two copies, both of which are delivered when sending at
R/2, some packets
are retransmissions,
including needed
and un-needed
Host A lin : original data lin
copy R/2 duplicates, that are
timeo
ut l'in: original data, plus delivered!
retransmitted data
R R
lout
“wasted” capacity due
full buffers – requiring retransmissions to un-needed
retransmissions
but sender times can time out prematurely,
throughput:
sending two copies, both of which are delivered when sending at
R/2, some packets
are retransmissions,
including needed
and un-needed
lin R/2 duplicates, that are
delivered!
“costs” of congestion:
more work (retransmission) for given receiver throughput
unneeded retransmissions: link carries multiple copies of a packet
• decreasing maximum achievable throughput
Network-assisted congestion
control: explicit congestion info
routers provide direct feedback
to sending/receiving hosts with data data
ACKs
flows passing through congested ACKs
router
may indicate congestion level or
explicitly set sending rate
TCP ECN, ATM, DECbit protocols
Transport Layer: 3-64