Chapter 3.1-3.4
Chapter 3.1-3.4
Chapter 3.1-3.4
Transport Layer
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, Global Edition
Thanks and enjoy! JFK/KWR
Jim Kurose, Keith Ross
All material copyright 1996-2016 Pearson
J.F Kurose and K.W. Ross, All Rights Reserved April 2016
Transport Layer 2-1
Chapter 3: Transport Layer
our goals:
understand principles learn about Internet
behind transport transport layer protocols:
layer services: • UDP: connectionless
• multiplexing, transport
demultiplexing • TCP: connection-oriented
• reliable data transfer reliable transport
• flow control • TCP congestion control
• congestion control
processes running on
different hosts
lo
gi
ca
transport protocols run in end
enl
d-
systems
en
d
• send side: breaks app
tra
ns
messages into segments,
po
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 analogy:
logical
communication 12 kids in Ann’s house
sending letters to 12 kids in
between hosts Bill’s 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 in-
network layer house siblings
services network-layer protocol =
postal service
lo
data link physical
gi
physical
• flow control
ca
network
l
data link
en
• connection setup physical
d-
en
network
d
unreliable, unordered
tra
data link
physical
ns
delivery: UDP
po
network
data link
rt
physical
• no-frills extension of network
data link application
“ best-effort” IP physical
network
data link
transport
network
data link
services not available: physical
physical
• delay guarantees
• bandwidth guarantees
application
application
application P1 application
P3 P4
transport
transport transport
network
network link network
link physical link
physical physical
application
application P4 P5 P6 application
P3 P2 P3
transport
transport transport
network
network link network
link physical link
physical server: IP physical
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
Transport Layer 3-17
UDP checksum
Goal: detect “ errors” (e.g., flipped bits) in
transmitted segment
sender: receiver:
treat segment contents, compute checksum of received
including header fields, segment
as sequence of 16-bit check if computed checksum
integers equals checksum field value:
checksum: addition • NO - error detected
(one’s complement sum) • YES - no error detected.
of segment contents But maybe errors
sender puts checksum nonetheless? More later ….
value into UDP
checksum field
wraparound 1 1 0 1 1 1 koordinatörü
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
characteristics of unreliable channel will determine complexity of reliable data transfer protocol
(rdt)
characteristics of unreliable channel will determine complexity of reliable data transfer protocol
(rdt)
characteristics of unreliable channel will determine complexity of reliable data transfer protocol
(rdt)
send receive
side side
sender receiver
sender
rdt_rcv(rcvpkt) &&
notcorrupt(rcvpkt)
extract(rcvpkt,data)
deliver_data(data)
udt_send(ACK)
rdt_rcv(rcvpkt) &&
isNAK(rcvpkt)
Wait for call Wait for rdt_rcv(rcvpkt) &&
corrupt(rcvpkt)
from above ACK or NAK
udt_send(sndpkt)
udt_send(NAK)
rdt_rcv(rcvpkt) &&
notcorrupt(rcvpkt)
extract(rcvpkt,data)
deliver_data(data)
udt_send(ACK)
rdt_rcv(rcvpkt) &&
isNAK(rcvpkt)
Wait for call Wait for rdt_rcv(rcvpkt) &&
corrupt(rcvpkt)
from above ACK or NAK
udt_send(sndpkt)
udt_send(NAK)
rdt_rcv(rcvpkt) &&
notcorrupt(rcvpkt)
extract(rcvpkt,data)
deliver_data(data)
udt_send(ACK)
Wait for ACK Wait for
or NAK 1 call 1 from
rdt_rcv(rcvpkt) && above
( corrupt(rcvpkt) ||
isNAK(rcvpkt) )
rdt_send(data)
sndpkt = make_pkt(1, data, checksum)
udt_send(sndpkt) udt_send(sndpkt)
extract(rcvpkt,data)
deliver_data(data)
sndpkt = make_pkt(ACK, chksum)
udt_send(sndpkt)
if RTT=30 msec, 1KB pkt every 30 msec: 33kB/sec thruput over 1 Gbps link
network protocol limits use of physical resources!
U L/R .008
sender = = = 0.00027
RTT + L / R 30.008
U 3L / R .0024
sender = = = 0.00081
RTT + L / R 30.008