0% found this document useful (0 votes)
2 views25 pages

5.3 (2) Transport Layer Process-to-Process Delivery UDP, TCP, and SCTP

The document discusses the transport layer's role in process-to-process delivery using protocols such as UDP, TCP, and SCTP. It explains the importance of port numbers and socket addresses in facilitating communication between client and server processes, as well as the differences between connectionless and connection-oriented services. Additionally, it outlines the characteristics and applications of UDP, emphasizing its suitability for real-time applications and scenarios where reliability is not a primary concern.

Uploaded by

aurachive
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)
2 views25 pages

5.3 (2) Transport Layer Process-to-Process Delivery UDP, TCP, and SCTP

The document discusses the transport layer's role in process-to-process delivery using protocols such as UDP, TCP, and SCTP. It explains the importance of port numbers and socket addresses in facilitating communication between client and server processes, as well as the differences between connectionless and connection-oriented services. Additionally, it outlines the characteristics and applications of UDP, emphasizing its suitability for real-time applications and scenarios where reliability is not a primary concern.

Uploaded by

aurachive
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/ 25

Unit -4 Process-to-

Process Delivery
UDP, TCP, and SCTP
INTRODUCTION
oThe transport layer is responsible for the delivery of a message from
one process to another

oThe transport layer header must include a service – point –address


in the OSI model or port number in the TCP/IP (internet model)
oThe Internet model has three protocols at the transport layer:
UDP, TCP, and SCTP.
 UDP: Is the simplest of the three.
 TCP: A complex transport layer protocol.
 SCTP: The new transport layer protocol that is designed for specific
applications such as multimedia. a new reliable, message-oriented
transport layer protocol that combines the best features of UDP and
TCP
PROCESS-TO-PROCESS
DELIVERY
oThe Data link layer is responsible for delivery of frames between nodes over a
link node to node delivery using a MAC address to choose one node among
several.

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.

o Real communication takes place between two processes (application


programs). We need process-to-process delivery.

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.

oThe Transport layer is responsible for process-to-process . We need a port


number, to choose among multiple processes running on the destination host.
TYPES OF DATA
DELIVERIES
CLIENT/SERVER PARADIGM
o process-to-process communication can be achieved through
client/server

oA process on the local host, called a client, needs services from a


process usually on the remote host, called a server.
oBoth processes (client and server) have the same name.
oFor example, to get the day and time from a remote machine, we need a Daytime
client process running on the local host and a Daytime server process running on
a remote machine.

oA remote computer can run several server programs at the same


time, just as local computers can run one or more client programs at
the same time.
PORT NUMBER

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

UDP as the intermediary


between the application
programs and the
network operations.
Figure 14.1 Position of UDP in the TCP/IP protocol suite

TCP/IP PROTOCOL SUITE 16


1. USER DATAGRAM PROTOCOL (UDP )
oUDP is a connectionless, unreliable transport protocol.

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

Source Port - 16 bit port number


Destination Port - 16 bit port number
Length (of UDP header + data) - 16 bit count of octets
UDP checksum - 16 bit field. if 0, then there is no checksum, else it is a checksum
over a pseudo header + UDP data area
CHECKSUM AND PSEUDO HEADER
UDP uses a pseudo-header to verify that the UDP message
has arrived at both the correct machine and the correct port.

• Proto : IP protocol type code.


• Length : Length of the UDP datagram.
ENCAPSULATION AND LAYERING

UDP message is encapsulated into an IP datagram.


IP datagram in turn is encapsulated into a physical frame for
actually delivery.
Example 14.1
The following is a dump of a UDP header in hexadecimal
format.

a. What is the source port number?


b. What is the destination port number?
c. What is the total length of the user datagram?
d. What is the length of the data?
e. Is the packet directed from a client to a server or vice versa?
f. What is the client process?
Applications of UDP:
•Used for simple request response communication when size of data is less and
hence there is lesser concern about flow and error control.
•It is suitable protocol for multicasting as UDP supports packet switching.
•UDP is used for some routing update protocols like RIP(Routing Information
Protocol).
•Normally used for real time applications which can not tolerate uneven delays
between sections of a received message.
•Following implementations uses UDP as a transport layer protocol:
• NTP (Network Time Protocol)
• DNS (Domain Name Service)
• BOOTP, DHCP.
• NNP (Network News Protocol)
• Quote of the day protocol
• TFTP, RTSP, RIP, OSPF.
•Application layer can do some of the tasks through UDP-
• Trace Route
• Record Route
• Time stamp
•UDP takes datagram from Network Layer, attach its header and send it to the
user. So, it works fast.
•Actually UDP is null protocol if you remove checksum field.

You might also like