5.3 (2) Transport Layer Process-to-Process Delivery UDP, TCP, and SCTP
5.3 (2) Transport Layer Process-to-Process Delivery UDP, TCP, and SCTP
Process Delivery
UDP, TCP, and SCTP
INTRODUCTION
oThe transport layer is responsible for the delivery of a message from
one process to another
o The Network layer is responsible for delivery of datagrams between two hosts
host to host delivery using an IP address to choose one host among millions.
oWe need a mechanism to deliver data from one of process running on the
source host to the corresponding process running on the destination host.
oIn the Internet model, the port numbers are 16-bit integers between 0 and
65,535.
oThe client program defines itself with a port number, chosen
randomly by the transport layer software running on the client host
oThe server process must also define itself with a port number This port
number, however, cannot be chosen randomly
oThe Internet uses port numbers for servers called well- known port
numbers.
oEvery client process knows the well-known port number of the
corresponding server process
o For example, while the Daytime client process, can use an ephemeral
(temporary) port number 52,000 to identify itself, the Daytime server process must
use the well-known (permanent) port number 13.
IP ADDRESSES VERSUS PORT
NUMBERS
IP addresses and port numbers play different roles in selecting the final
destination of data.
The destination IP address defines the host among the different hosts
After the host has been selected, the port number defines one of the processes on
this particular host
SOCKET ADDRESSES
o Process-to-process delivery needs two identifiers, IP address and the port
number, at each end to make a connection.
oThe combination of an IP address and a port number is called a socket address.
oA transport layer protocol needs a pair of socket addresses: the client socket
address and the server socket address.
oThese four pieces of information are part of the IP header and the transport
layer protocol header.
• The IP header contains the IP addresses; the UDP or TCP header contains
the port numbers.
MULTIPLEXING
Upward Multiplexing
One IP address shared by multiple Transport Layer
processes (ports)
Downward Multiplexing
Use multiple virtual circuits to get more bandwidth
(e.g. join multiple ISDN lines to get a higher
bandwidth)
MULTIPLEXING AND DEMULTIPLEXING
Sender: multiplexing of
UDP datagrams.
UDP datagrams are
received from multiple
application programs.
A single sequence of
UDP datagrams is
passed to IP layer.
Receiver: demultiplexing
of UDP datagrams.
Single sequence of
UDP datagrams
received from IP layer.
UDP datagram
received is passed to
appropriate
application.
CONNECTIONLESS VERSUS
CONNECTION-ORIENTED SERVICE
oA transport layer protocol can either be connectionless or connection-
oriented.
oConnectionless Service
➢ In a connectionless service, the packets are sent from one party to another
with no need for connection establishment or connection release.
➢The packets are not numbered; they may be delayed or lost or may arrive out
of sequence.
➢There is no acknowledgment .
oConnection Oriented Service
➢In a connection-oriented service, a connection is first established between
the sender and the receiver.
➢Data are transferred.
➢At the end, the connection is released. ( virtual connection , not a physical
connection)
RELIABLE VERSUS UNRELIABLE
oThe transport layer service can be reliable or unreliable.
oIf the application layer program needs reliability, we use a reliable
transport layer protocol by implementing flow and error control at
the transport layer. This means a slower and more complex service.
oOn the other hand, if the application program does not need
reliability then an unreliable protocol can be used.
Note
oUDP is connectionless and unreliable;
oTCP and SCTP are connection oriented and reliable.
These three protocols can respond to the demands of the
application layer programs.
ERROR CONTROL
If the data link layer is reliable and has flow and error control, do we need this
at the transport layer, too? Yes
TRANSPORT LAYER PROTOCOLS
UDP is located between
the application layer and
the IP layer, and serves
oIt does not add anything to the services of IP (very simple) except to
provide process-to process communication instead of host-to-host
communication.
o(when to use it?) If a process wants to send a small message and does
not care much about reliability, it can use UDP.
UDP packets,
called user
datagrams, have
a fixed-size
header of 8
bytes.
https://www.youtube.com/watch?v=blV7WUZpkCE
UDP packets, called user datagrams, have a fixed size header of 8 bytes.
UDP CHARACTERISTICS
End-to-End: an application sends/receives data to/from another
application.
Connectionless: Application does not need to preestablish communication
before sending data; application does not need to terminate
communication when finished.
Message-oriented: application sends/receives individual messages (UDP
datagram), not packets.
Best-effort: same best-effort delivery semantics as IP. I.e. message can be
lost, duplicated, and corrupted.
Arbitrary interaction: application communicates with many or one other
applications.
Operating system independent: identifying application does not depend
on O/S.
UDP HEADER
UDP HEADER
The UDP header consists of four fields each of 2 bytes in length:
Source Port (UDP packets from a client use this as a service access
point (SAP) to indicate the session on the local client that originated
the packet. UDP packets from a server carry the server SAP in this
field)
Destination Port (UDP packets from a client use this as a service
access point (SAP) to indicate the service required from the remote
server. UDP packets from a server carry the client SAP in this field)
UDP length (The number of bytes comprising the combined UDP
header information and payload data)
UDP Checksum (A checksum to verify that the end to end data has
not been corrupted by routers or bridges in the network or by the
processing in an end system.
UDP DATAGRAM FORMAT