Transport Layer: Reference To Chapter 3 in Book "Computer Networking: A Top-Down Approach"
Transport Layer: Reference To Chapter 3 in Book "Computer Networking: A Top-Down Approach"
Transport Layer: Reference To Chapter 3 in Book "Computer Networking: A Top-Down Approach"
Part I
different hosts
lo
transport protocols run in end systems
gi
ca
le
sender side: breaks app
nd
-e
nd
messages into segments,
tra
ns
passes to network layer
po
rt
receiver side: reassembles application
lo
data link physical
gi
physical
– connection setup
ca
network
l
en
data link
d-
en
network
d
UDP
tra
data link
physical
ns
• services not available:
p
network
or
data link
t
physical
network
A socket is defined by an IP
application
address and a port
application P1 P2 application socket
P3 transport P4
process
transport network transport
network link network
link physical link
physical physical
segment to appropriate
socket Transport Layer 3-6
Connectionless demultiplex: example
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
• connectionless:
– no handshaking between UDP sender and receiver
– each UDP segment is handled independently of others
UDP use:
streaming multimedia apps (loss tolerant, rate sensitive)
DNS
length checksum
why is there a UDP?
no connection establishment
application (which can add delay)
data
(payload) simple: no connection state
at sender, receiver
small header size
no congestion control: UDP
UDP segment format can blast away as fast as
desired
sender: receiver:
• treat segment contents, • compute checksum of received
including header fields,
as sequence of 16-bit segment
integers • check if computed checksum
• checksum: addition equals checksum field value:
(one’s complement sum) – NO - error detected
of segment contents – YES - no error detected. But
• sender puts checksum maybe errors nonetheless? More
value into UDP checksum later ….
field
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
15
An Analogy: Talking on a Cell Phone
• Alice and Bob on their cell phones
– Both Alice and Bob are talking
16
Some Take-Aways from the Example
• Acknowledgments from receiver
– Positive: “okay” or “ACK”
– Negative: “please repeat that” or “NACK”
17
Challenges of Reliable Data Transfer
• Over a perfectly reliable channel
– Simple: sender sends data, and receiver receives data
18