- SlideBoom

Chapter 23
Process-to-Process Delivery:
UDP (Part 1)
23-1 PROCESS-TO-PROCESS DELIVERY
•The transport layer is responsible for process-toprocess delivery—the delivery of a packet, part of a
message, from one process to another. Two processes
communicate in a client/server relationship.
• The internet model has three protocols at transport
layer : UDP, TCP and SCTP.
Types of data deliveries
Client/Server Paradigm





There are several ways to achieve process to
process communication.
The common one is “Client/ Server Paradigm”.
A process on the local host, called client,
needs services from a process usually on the
remote host, called a server.
Both processes have same name.
For e.g. To get Day and time from a remote
machine, We need a Daytime client process
running on local host and a daytime sever
process running on a remote machine.
Addressing




Whenever we need to deliver something to
one specific destination , we need address.
At transport layer , we need a transport
address called PORT NUMBER, to choose
among multiple processes running on the
destination host.
Destination port number is needed for delivery
and source port number is needed for reply.
Port numbers are 16-bit integers between 0
and 65536.


The client program defines itself with a port
number, chosen randomly by the transport
layer software running on the client host called
EPHERMERAL(temporary) PORT Number.
Server must also define itself with a port
number,( not chosen randomly). Internet uses
universal port number for servers called WELLKNOWN (permanent) PORT Number.
Port numbers
23.7
Port number Ranges

The IANA (Internet Assigned Number Authority) has divided the port
numbers into three ranges:

Well known
 Assigned and controlled by IANA. Range varies from 0 to 1023
 Registered
 Not assigned or controlled by IANA, can only be registered with
IANA to prevent duplication. Range varies from 1024 to 49,151
 Dynamic
 Neither controlled nor registered. Can be used by any process.
They are ephemeral ports. Range varies from 49,152 to 65,535
IP addresses versus port numbers
•Destination IP
address defines the
host among the
different hosts in the
world.
• After the host has
been selected, port
number defines one
of the processes on
the particular host.
Socket address
• Process to process delivery needs two identifiers, IP address
and the port number at each end to make a connection.
• The combination of an IP address and a port number is
called a SOCKET ADDRESS.
•Transport layer protocol needs a pair of socket addresses:
Client socket address and Server socket Address.
• Four pieces of information are part of IP header and
transport layer protocol header.
•IP header contains IP addresses; UDP or TCP header
contains Port number
Multiplexing and demultiplexing
Multiplexing
• At sender, several processes need to
send the packets, but there is only one
transport layer , so for this many-to-one
relationship we require multiplexing.
•Protocol accepts the message from
different processes, differentiated by the
assigned port number.
• After adding header, transport layer
passes the packet to network layer.
Demultiplexing
• At receiver, the relationship is one-tomany and for this we require
demultiplexing.
•After error checking and dropping the
header, transport layer delivers each
message to appropriate process based on
the port number
Connection-less Vs ConnectionOriented

Transport layer protocols are of two kinds:


Connection-less
Connection-oriented
Connection-less Protocol Connection-Oriented
Protocol
 Packets are sent without  First connection is
establishing a connection.
established between
 Packets are not numbered. sender and receiver.
 Packets may be delayed,  After data transfer
lost or may arrive out of
completes, connection is
sequence.
terminated.
 No acknowledgement
 Example protocol: TCP and
 Example protocol: UDP
SCTP
23.13
Reliable Vs Un-reliable




Transport layer services can be reliable or
un-reliable.
Reliable services are achieved by flow
control and error control.
Reliable services are slow and complex.
TCP and SCTP are connection- oriented
and reliable.
Unreliable services are speedy and simple.
UDP is unreliable and connectionless.
Error control
23.15
Position of UDP, TCP, and SCTP in TCP/IP suite
23.16
23-2 USER DATAGRAM PROTOCOL (UDP)
The User Datagram Protocol (UDP) is called a
connectionless, unreliable transport protocol. It does
not add anything to the services of IP except to provide
process-to-process communication instead of host-tohost communication. Provides very limited error
checking.
Table 23.1 Well-known ports used with UDP
User datagram format
1. Source Port Number- Port Number used by
process running on source host. It is 16 bit long
(0 to 65535). If source host is client, port
number is temporary port number requested by
the process and if source host is server, port
number is well known port number.
2. Destination Port Number- Port number use
by the process running on destination host. It is
also 16 bit long.
3. Length – this field defines the total length of
the user datagram (header plus data).
UDP length = IP length – IP header’s length
4. Checksum: This field is used to detect the
errors over the entire user datagram. UDP
checksum includes three sections pseudoheader,
UPD header and data coming from application
layer.
Pseudoheader for checksum calculation
23.20
UDP Operation



UDP provides connectionless service. Each user
datagram sent is an independent datagram. Data grams
are not numbered. No connection establishment and
termination which means each datagram can travel on a
different path.
It is simple and unreliable. No flow control so no
window mechanism. Receiver may overflow with incoming
messages. No error control except for checksum which
means sender does not know if a message has been lost
or duplicated. When Receiver detects the error through
checksum, user datagram is discarded.
To send a message from one process to another ,UDP
protocol encapsulates and decapsulates messages in IP
datagram.
Uses of UDP





Suitable for a process that requires simple requestresponse communication with little concern for flow
and error control. Not used for a process such as
FTP(file transfer protocol).
Suitable for a process with internal flow and error
control mechanisms such as TFTP(trivial file transfer
protocol).
Suitable for transport protocol for multicasting
Useful for management processes such as SNMP.
Suitable for some route updating protocols such as
RIP(routing information protocol.)