Transport Layer (3.1 - 3.6) : Computer Networking: A Top Down Approach
Transport Layer (3.1 - 3.6) : Computer Networking: A Top Down Approach
Transport Layer (3.1 - 3.6) : Computer Networking: A Top Down Approach
(3.1 - 3.6)
Instructor: Mohammad Mamun Elahi
Office: 5th Floor
Email: [email protected]
Class Location: Room # 111 Computer
Lectures: M W 11:20 pm (Sec B), 12-45 pm (Sec D) Networking: A
Notes derived from “Computer Networking: A Top Top Down
Down Approach”, Jim Kurose, Keith Ross, Approach
Addison-Wesley. 6th edition
Jim Kurose, Keith Ross
Slides are adapted from the companion web site of Addison-Wesley
March 2012
the book, as modified by Mohammad Mamun
Elahi.
Application 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
l
en
d
end systems
-e
nd
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
lo
data link physical
gi
physical
flow control
ca
network
le
data link
nd
connection setup physical
-en
network
d
unreliable, unordered
tra
data link
physical
ns
delivery: UDP
po
network
rt
data link
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
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
no congestion control:
UDP segment format
UDP can blast away as fast
as desired
characteristics of unreliable channel will determine complexity of reliable data transfer protocol (rdt)
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
SendBase=92
Seq=92, 8 bytes of data Seq=92, 8 bytes of data
timeout
ACK=100
X
ACK=100
ACK=120
SendBase=120
X
ACK=120
cumulative ACK
Transport Layer 3-24
TCP fast retransmit
time-out period often
relatively long: TCP fast retransmit
long delay before if sender receives 3
resending lost packet ACKs for same data
detect lost segments (“triple
(“ triple duplicate
duplicate ACKs” ),
via duplicate ACKs. ACKs”
resend),unacked
sender often sends segment with smallest
many segments back- seq #
to-back likely that unacked
if segment is lost, there segment lost, so don’t
will likely be many wait for timeout
duplicate ACKs.
ACK=100
timeout
ACK=100
ACK=100
ACK=100
Seq=100, 20 bytes of data
IP
flow control code
receiver controls sender, so
sender won’t overflow receiver’s
buffer by transmitting too much, from sender
too fast
receiver protocol stack
LAST_ACK
FINbit=1, seq=y
TIMED_WAIT can no longer
send data
ACKbit=1; ACKnum=y+1
timed wait
for 2*max CLOSED
segment lifetime
CLOSED
time
Transport Layer 3-34
TCP Congestion Control: details
sender sequence number space
cwnd TCP sending rate:
roughly: send cwnd
bytes, wait RTT for
last byte last byte ACKS, then send
sent, not-
ACKed
yet ACKed
sent more bytes
(“in-flight”)
cwnd
sender limits transmission: rate ~
~ bytes/sec
RTT
LastByteSent- < cwnd
LastByteAcked
cwnd is dynamic, function of
perceived network congestion
RTT
loss event:
initially cwnd = 1 MSS two segm
ents
double cwnd every RTT
done by incrementing
cwnd for every ACK four segm
ents
received
summary: initial rate is
slow but ramps up
exponentially fast time
Implementation:
variable ssthresh
on loss event, ssthresh
is set to 1/2 of cwnd just
before loss event
W/2