0% found this document useful (0 votes)
16 views19 pages

Chapter 3 Lecture 1

The document discusses the transport layer in computer networking. It covers transport layer services like multiplexing and demultiplexing. It also describes common transport layer protocols including UDP for connectionless delivery and TCP for reliable connected delivery. The document outlines the chapter which discusses these topics in further detail.

Uploaded by

Moosa Adnan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views19 pages

Chapter 3 Lecture 1

The document discusses the transport layer in computer networking. It covers transport layer services like multiplexing and demultiplexing. It also describes common transport layer protocols including UDP for connectionless delivery and TCP for reliable connected delivery. The document outlines the chapter which discusses these topics in further detail.

Uploaded by

Moosa Adnan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Chapter 3

Transport Layer
Computer
Networking: A
Top Down
Approach
6th edition
Jim Kurose, Keith Ross
Addison-Wesley
March 2012

Transport Layer 3-1


Chapter 3: Transport Layer
our goals:
 understand  learn about Internet
principles behind transport layer
transport layer protocols:
services:  UDP: connectionless
 multiplexing, transport
demultiplexing  TCP: connection-
 reliable data oriented reliable
transfer transport
 flow control  TCP congestion control
 congestion control
Transport Layer 3-2
Chapter 3 outline
3.1 transport-layer 3.5 connection-oriented
services transport: TCP
3.2 multiplexing and  segment structure
demultiplexing  reliable data transfer
3.3 connectionless  flow control
transport: UDP  connection
management
3.4 principles of
reliable data 3.6 principles of
transfer congestion control
3.7 TCP congestion
control Transport Layer 3-3
Transport services and
protocols application
 provide logical transport
network

communication between data link


physical

app processes running on


different hosts
 transport protocols run in
end systems
 send side: breaks app
messages into application
transport
segments, passes to network
data link
network layer physical

 rcv side: reassembles


segments into
messages, passes to Transport Layer 3-4
Transport vs. network layer
 network layer: household analogy:
logical 12 kids in Ann’s house
communication sending letters to 12
between hosts kids in Bill’s house:
 hosts = houses
 transport layer:
 processes = kids
logical  app messages = letters
communication in envelopes
between  transport protocol = Ann
processes and Bill who demux to
 relies on, in-house siblings
 network-layer protocol =
enhances, postal service
network layer Transport Layer 3-5
Internet transport-layer
protocols application
 reliable, in-order transport
network

delivery (TCP) data link


physical
network
network
data link
 congestion control data link
physical
physical
network
 flow control data link
physical

 connection setup network


data link
physical
 unreliable, unordered network
data link
network physical
delivery: UDP data link
physical network
application
transport

 no-frills extension of data link


physical
network
data link

“best-effort” IP
physical

 services not
available:
Transport Layer 3-6
Chapter 3 outline
3.1 transport-layer 3.5 connection-oriented
services transport: TCP
3.2 multiplexing and  segment structure
demultiplexing  reliable data transfer
3.3 connectionless  flow control
transport: UDP  connection
management
3.4 principles of
reliable data 3.6 principles of
transfer congestion control
3.7 TCP congestion
control Transport Layer 3-7
Multiplexing/demultiplexing
multiplexing at sender:
handle data from multiple demultiplexing at receiver:
use header info to deliver
sockets, add transport received segments to correct
header (later used for socket
demultiplexing)
application
application P1 P2 application socket
P3 transport P4
process
transport network transport
network link network
link physical link
physical physical

Transport Layer 3-8


How demultiplexing works
 host receives IP 32 bits
datagrams source port # dest port #
 each datagram has
source IP address, other header fields
destination IP address
 each datagram carries application
one transport-layer data
segment (payload)
 each segment has source,
destination port number TCP/UDP segment format
 host uses IP addresses
& port numbers to Transport Layer 3-9
Connectionless
demultiplexing
 recall: created socket has  recall: when creating
host-local port #: datagram to send into
DatagramSocket mySocket1
= new DatagramSocket(12534); UDP socket, must
specify
 destination IP address
 when host receives IPdestination
datagramsport
with#
UDP segment: same dest. port #, but
 checks destination port different source IP
# in segment addresses and/or
source port numbers
 directs UDP segment to will be directed to
socket with that port # same socket at dest
Transport Layer 3-10
Connectionless demux:
example DatagramSocket
DatagramSocket serverSocket = new DatagramSocket
mySocket2 = new DatagramSocket mySocket1 = new
DatagramSocket (6428); DatagramSocket
(9157); application (5775);
application P1 application
P3 P4
transport
transport network transport
network link network
link physical link
physical physical

source port: 6428 source port: ?


dest port: 9157 dest port: ?

source port: 9157 source port: ?


dest port: 6428 dest port: ?
Transport Layer 3-11
Connection-oriented demux
 TCP socket identified  server host may
by 4-tuple: support many
 source IP address simultaneous TCP
 source port number sockets:
 dest IP address  each socket identified
 dest port number by its own 4-tuple
 demux: receiver uses
 web servers have
all four values to different sockets for
direct segment to each connecting
appropriate socket client
 non-persistent HTTP
Transport Layer 3-12
Connection-oriented demux:
example
application
application P4 P5 P6 application
P3 P2 P3
transport
transport network transport
network link network
link physical link
physical server: IP physical
address
B
host: IP source IP,port: B,80 host: IP
address dest IP,port: A,9157 source IP,port: C,5775 address
dest IP,port: B,80 C
A source IP,port: A,9157
dest IP, port: B,80 source IP,port: C,9157
dest IP,port: B,80
three segments, all destined to IP address: B,
dest port: 80 are demultiplexed to different sockets Transport Layer 3-13
Connection-oriented demux:
example threaded server
application
application P4 application
P3 P2 P3
transport
transport network transport
network link network
link physical link
physical server: IP physical
address
B
host: IP source IP,port: B,80 host: IP
address dest IP,port: A,9157 source IP,port: C,5775 address
dest IP,port: B,80 C
A source IP,port: A,9157
dest IP, port: B,80 source IP,port: C,9157
dest IP,port: B,80

Transport Layer 3-14


Chapter 3 outline
3.1 transport-layer 3.5 connection-oriented
services transport: TCP
3.2 multiplexing and  segment structure
demultiplexing  reliable data transfer
3.3 connectionless  flow control
transport: UDP  connection
management
3.4 principles of
reliable data 3.6 principles of
transfer congestion control
3.7 TCP congestion
control Transport Layer 3-15
UDP: User Datagram Protocol [RFC
768]
 “no frills,” “bare bones”  UDP use:
Internet transport  streaming multimedia
protocol apps (loss tolerant,
 “best effort” service, rate sensitive)
UDP segments may be:  DNS
 lost  SNMP
 delivered out-of-
order to app
 reliable transfer over
UDP:
 connectionless:  add reliability at
 no handshaking
application layer
between UDP sender,  application-specific
receiver
 each UDP segment error recovery!
Transport Layer 3-16
UDP: segment header
length, in bytes of UDP
32 bits segment, including
source port # dest port # header
length checksum
why is there a UDP?
 no connection
application establishment (which
data can add delay)
(payload)  simple: no connection
state at sender,
receiver
UDP segment format
 small header size
 no congestion control:
UDP can blast away as3-17
Transport Layer
UDP checksum
Goal: detect “errors” (e.g., flipped bits) in
transmitted segment
sender: receiver:
 treat segment  compute checksum of
contents, including received segment
header fields, as  check if computed
sequence of 16-bit
integers checksum equals
checksum field value:
 checksum: addition
(one’s complement  NO - error detected
sum) of segment  YES - no error
contents detected. But maybe
 sender puts checksum errors nonetheless?
Transport Layer 3-18
Internet checksum: example
example: add two 16-bit integers
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
checksum 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0
1 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1
Note: when adding numbers, a carryout from the
most significant bit needs to be added to the result

Transport Layer 3-19

You might also like