Professional Documents
Culture Documents
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
le
transport protocols actions in end
nd
-e
systems:
nd
local or
tra
• sender: breaks application messages regional ISP
n sp
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
Sender:
application is passed an application- app. msg
application
layer message
transport
determines segment TTh htransport
app. msg
header fields values
network (IP)
creates segment network (IP)
link
passes segment to IP link
physical physical
Receiver:
application receives segment from IP application
checks header values
app. msg
transport extracts application-layer transport
message
network (IP) demultiplexes message up network (IP)
physical physical
Th app. msg
log
• congestion control
ica
le
• flow control
nd
-e
• connection setup
nd
local or
tra
regional ISP
UDP: User Datagram Protocol
n sp
ort
• unreliable, unordered delivery home network content
provider
• no-frills extension of “best-effort” IP network
application
transport
datacenter
network
transport
Hn Ht HTTP msg
transport
application
application application
transport transport
(UDP) (UDP)
link link
physical physical
network (IP)
creates UDP segment network (IP)
link
passes segment to IP link
physical physical
h SNMP(IP)
network
UDP msg message network (IP)
demultiplexes message up
link to application via socket link
physical physical
data to/from
UDP segment format application layer
Transmitted: 5 6 11
Received: 4 6 11
receiver-computed
checksum
= sender-computed
checksum (as received)
sum 1011101110111100
checksum 0100010001000011
Note: when adding numbers, a carryout from the most significant bit needs to be
added to the result
* Check out the online interactive exercises for more examples: h ttp://gaia.cs.umass.edu/kurose_ross/interactive/
Transport Layer: 3-33
Internet checksum: weak protection!
example: add two 16-bit integers
01
1110011001100110 10
1101010101010101
wraparound 11011101110111011 Even though
numbers have
sum 1011101110111100 changed (bit
flips), no change
checksum 0100010001000011 in checksum!
sending receiving
process process
application data data
transport
reliable channel
transport
network
unreliable channel
sending receiving
process process
application data data
transport
sender-side of receiver-side
Complexity of reliable data reliable data
transfer protocol
of reliable data
transfer protocol
transfer protocol will depend
(strongly) on characteristics of transport
network
unreliable channel (lose, unreliable channel
corrupt, reorder data?)
reliable service implementation
sending receiving
process process
application data data
transport
sender-side of receiver-side
reliable data of reliable data
Sender, receiver do not know transfer protocol transfer protocol
the “state” of each other, e.g.,
was a message received? transport
network
unless communicated via a unreliable channel
message
reliable service implementation
unreliable channel
udt_send(): called by rdt rdt_rcv(): called when packet
to transfer packet over Bi-directional communication over arrives on receiver side of
unreliable channel to receiver unreliable channel channel
Transport Layer: 3-45
The End of Session
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
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
ACK=100
X
ACK=100
ACK=120
SendBase=120
=100
timeout
ACK
CK =100
A
=100
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
network network
router
may indicate congestion level or
explicitly set sending rate
TCP ECN, ATM, DECbit protocols
Transport Layer: 3-80
Chapter 3: roadmap
Transport-layer services
Multiplexing and demultiplexing
Connectionless transport: UDP
Principles of reliable data transfer
Connection-oriented transport: TCP
Principles of congestion control
TCP congestion control
Evolution of transport-layer
functionality
Transport Layer: 3-81
TCP congestion control: AIMD
approach: senders can increase sending rate until packet loss
(congestion) occurs, then decrease sending rate on loss event
Additive Increase Multiplicative Decrease
increase sending rate by 1 cut sending rate in half at
maximum segment size every each loss event
RTT until loss detected
TCP sender Sending rate
AIMD sawtooth
behavior: probing
for bandwidth
Why AIMD?
AIMD – a distributed, asynchronous algorithm – has been
shown to:
• optimize congested flow rates network wide!
• have desirable stability properties
RTT
• initially cwnd = 1 MSS two segm
ents
• double cwnd every RTT
• done by incrementing cwnd
for every ACK received four segm
ents
ECN=10 ECN=11
IP datagram
Transport Layer: 3-85
Transport layer: roadmap
Transport-layer services
Multiplexing and demultiplexing
Connectionless transport: UDP
Principles of reliable data transfer
Connection-oriented transport: TCP
Principles of congestion control
TCP congestion control
Evolution of transport-layer
functionality
Transport Layer: 3-86
Chapter 3: summary
principles behind transport Up next:
layer services: leaving the network
• multiplexing, demultiplexing “edge” (application,
• reliable data transfer transport layers)
• flow control into the network “core”
• congestion control
two network-layer
instantiation, implementation chapters:
in the Internet • data plane
• UDP • control plane
• TCP