CN Chapter 3
CN Chapter 3
Transport Layer
▪ provide logical
transport
network
data link
communication between app physical
processes running on
lo
different hosts
g
ica
▪ transport protocols run in
le
nd
-e
end systems
n d
tra
• send side: breaks app
ns
po
messages into segments,
rt
passes to network layer
application
• rcv side: reassembles transport
network
segments into messages, data link
physical
passes to app layer
▪ more than one transport
protocol available to apps
• Internet: TCP and UDP
Transport Layer 3-4
Transport vs. network layer
▪ network layer: household
logical
communication 12 kidsanalogy:
in Ann’s house sending
letters to 12 kids in Bill’s
between hosts house:
▪ transport layer: ▪ hosts = houses
logical ▪ processes = kids
communication ▪ app messages = letters in
envelopes
between processes ▪ transport protocol = Ann
• relies on, enhances, and Bill who demux to
network layer in-house siblings
services ▪ network-layer protocol =
postal service
lo
data link physical
gica
physical
• flow control network
le
data link
nd
• connection setup physical
-e
n
▪ unreliable, unordered
d
network
tra
data link
ns
physical
delivery: UDP
po
network
rt
data link
physical
• no-frills extension of network
data link application
“best-effort” IP physical
network transport
network
• delay guarantees
• bandwidth guarantees
application
application P4 P5 P6 application
P3 P2 P3
transport
transport transport
network
network link network
link physical link
physical physical
server: IP
address B
length checksum
why is there a UDP?
▪ no connection
application establishment (which can
data add delay)
(payload) ▪ simple: no connection
state at sender, receiver
▪ small header size
UDP segment format ▪ no congestion control:
UDP can blast away as fast
as desired
wraparound 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1
sum 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0
checksum 1 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1
User
types
‘C’ Seq=42, ACK=79, data = ‘C’
host ACKs
receipt of
‘C’, echoes
Seq=79, ACK=43, data = ‘C’ back ‘C’
host ACKs
receipt
of echoed
‘C’ Seq=43, ACK=80
sampleRTT
EstimatedRTT
SendBase=92
Seq=92, 8 bytes of data Seq=92, 8 bytes of data
timeo
ACK=100
ut
ut
X
ACK=100
ACK=120
SendBase=120
X
ut
ACK=120
cumulative ACK
Transport Layer 3-32
TCP ACK generation [RFC 1122, RFC 2581]
ACK=100
timeo
ACK=100
ut
ACK=100
ACK=100
Seq=100, 20 bytes of data
IP
flow code
receiver controls sender, so
control
sender won’t overflow receiver’s
buffer by transmitting too much, from sender
too fast
receiver protocol stack
time
Transport Layer 3-39