Transport Layer Notes
Transport Layer Notes
Transport Layer Notes
Transport Layer
lo
physical
r transport protocols run in end
gi
data link
ca
physical
systems
le
network
nd
data link
m send side: breaks app data
-e
physical network
n
data link
d
into segments, passes to physical
tr
an
network layer network
sp
data link
or
physical
m rcv side: reassembles
t
segments into data, passes application
transport
to app layer network
data link
r more than one transport physical
r network layer:
m logical communication between hosts
r transport layer:
m logical communication between processes
m relies on and enhances network layer services
lo
physical
gi
data link
flow control
ca
m physical
le
network
connection setup
nd
m data link
-e
physical network
n
data link
r unreliable, unordered
d
physical
tr
an
delivery: UDP network
sp
data link
or
physical
t
m no-frills extension of
“best-effort” IP application
transport
application P3 P1
P1 application P2 P4 application
host 2 host 3
host 1
Transport Layer 3-6
How demultiplexing works
r host receives IP datagrams
32 bits
m each datagram has source IP
address, destination IP source port # dest port #
address
P1 P4 P5 P6 P2 P1P3
SP:
5775
DP: 80
S-IP: B
D-IP:C
SP: SP:
9157 9157
client DP: 80 DP: 80 Client
server
IP: A S-IP: A S-IP: B IP:B
IP: C
D-IP:C D-IP:C
Sender: Receiver:
r treat segment contents as r compute checksum of
sequence of 16-bit received segment
integers r check if computed checksum
r checksum: addition (1’s equals checksum field value:
complement sum) of m NO - error detected
segment contents m YES - no error detected.
r sender puts checksum But maybe errors
value into UDP checksum nonetheless? More later
field ….
1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0
1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
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
Transport Layer 3-14
Principles of Reliable data transfer
r important in app., transport, link layers
r top-10 list of important networking topics!
sender receiver
r sender window
m N consecutive seq #’s
m again limits seq #s of sent, unACKed pkts
r speed-matching
service: matching the
send rate to the
receiving app’s drain
rate
r app process may be
slow at reading from
buffer
Transport Layer 3-31
TCP Flow control: how it works
r Rcvr advertises spare
room by including value
of RcvWindow in
segments
m seq. #s m no data
timed wait
ACK
Note: with small
modification, can handle closed
simultaneous FINs.
closed