0% found this document useful (0 votes)
27 views

Transport Layer Introduction

The transport layer is responsible for process-to-process delivery, flow control, error control, and connection control. The main transport layer protocols are UDP, TCP, and SCTP. UDP provides connectionless and unreliable delivery, while TCP and SCTP provide connection-oriented and reliable delivery. Reliability is needed at the transport layer because the network layer is unreliable.

Uploaded by

Dhruv Sharma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Transport Layer Introduction

The transport layer is responsible for process-to-process delivery, flow control, error control, and connection control. The main transport layer protocols are UDP, TCP, and SCTP. UDP provides connectionless and unreliable delivery, while TCP and SCTP provide connection-oriented and reliable delivery. Reliability is needed at the transport layer because the network layer is unreliable.

Uploaded by

Dhruv Sharma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Transport Layer

Process an application program running on a host

• Transport Layer Duties

– Process-to-Process Delivery
– Flow control end to end
– Error control end to end
– Connection control (connection less or oriented)
– Service point addressing (port addressing)
Transport Layer Protocols

• The Internet model has three protocols at transport


layer:

– UDP (User datagram protocol)


– TCP (Transmission control protocol)
– SCTP (Stream control Transmission Protocol)
Process-to-Process Data Delivery

Also called End to End Delivery


Client / server architecture
• A process on the local host, called a client, needs
services from a process usually on the remote host,
called a server.

• Both processes (client and server) have the same


name.
• E.g.: 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.
Addressing

• Node to node : MAC Address……at……..data-link layer


• Host to Host : IP Address………..at…….Network layer
• Process To Process : Port Address…..at….Transport layer
•In the Internet model, the port numbers are 16-bit integers
between 0 and 65,535.
•The client program defines itself with a port number, chosen
randomly by the transport layer software running on the client
host. This is the ephemeral port number.
•The server process must also define itself with a port
number. This port number, however, cannot be chosen
randomly. If the computer at the server site runs a server
process and assigns a random number as the port number, the
process at the client site that wants to access that server and
use its services will not know the port number.
•The Internet has decided to use universal port numbers for
servers; these are called well-known port numbers.
IP addresses versus port numbers
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 IP address and the port number
is called a socket address
Multiplexing and demultiplexing

• At the sender site, there may be several processes that need to


send packets. However, there is only one transport layer protocol
at any time. This is a many-to-one relationship and requires
multiplexing.
• The protocol accepts messages from different processes,
differentiated by their assigned port numbers. After adding the
header, the transport layer passes the packet to the network layer
Connection control
• Connectionless services
– no connection establishment /Connection release
– packets may be delayed, lost or arrive out of order
– No Acknowledgement
– E.g: UDP

• Connection-oriented services
– connection established prior to data transmission, data
transferred & then connection is released
– E.g TCP & STCP
Follow the link for more info
http://www.linktionary.com/c/connections.html
Reliable versus unreliable services
• The transport layer services can be reliable or
unreliable.
• If 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.
• On the other hand, if the application program does
not need reliability because it uses its own flow and
error control mechanism or it needs fast service or
the nature of the service does not demand flow and
error control (real-time applications), then an
unreliable protocol can be used.
Reliable versus unreliable services contd..
• In the Internet, there are three common different
transport layer protocols.

1. UDP is connectionless and unreliable


2. TCP and SCTP are connection-oriented and
reliable.

These three can respond to the demands of the


application layer programs.
Question

If the data link layer is reliable and has flow


and error control, do we need this at the transport
layer, too

?
The answer is yes.
•Data link layer ensures reliability between two nodes; we
need reliability between two ends.

•Because the network layer in the Internet is unreliable


(best-effort delivery), we need to implement reliability at the
transport layer.
–transport code runs only on the user’s machine and not in
the routers
–user does not have control over the Network layer codes
•Error control at the data link layer does not guarantee error
control at the transport layer,
Transport layer protocols

The original TCP/IP protocol suite specifies two


protocols for the transport layer:

1. UDP
2. TCP.

A new transport layer protocol, SCTP, has been


designed.
1.User Datagram Protocol
• UDP – unreliable connectionless transport protocol

• Why would anybody use UDP

– Simple protocol with small overhead

– Suitable for short message transport where reliability is


not a concern.

– Small message size do not require much sender-receiver


interaction
Well known Port addresses in UDP
User datagram in UDP
• UDP packets, called user datagrams, have a
fixed-size header of 8 bytes.
1. Source port number. This is the port number used by the
process running on the source host. It is 16 bits long, which
means that the port number can range from 0 to 65,535.
2. Destination port number. This is the port number used by
the process running on the destination host. It is also 16 bits
long. If the destination host is the server the port number, in
most cases, is a well-known port number( otherwise
ephemeral port address)
3. Length. This is a 16-bit field that defines the total length of
the user datagram, header plus data. However, the total
length needs to be much less because a UDP user datagram is
encapsulated in an IP datagram
UDP length = IP length - IP header's length
4.Check sum This field is used to detect errors over the entire
user datagram (header plus data).
UDP operation

• Connectionless services
• No flow and error control
1. UDP is a very simple, unreliable transport protocol.
2. There is no flow control and hence no window
mechanism.
• Encapsulation and De-capsulation
• To send a message from one process to another, the
UDP protocol encapsulates and de-capsulates
messages in an IP datagram.
• Queuing
1. At the client site, when a process starts, it requests a port number
from the operating system.
2. Even if a process wants to communicate with multiple processes,
it obtains only one port number and eventually one outgoing and
one incoming queue.
3. The queues opened by the client are, in most cases, identified by
ephemeral port numbers. The queues function as long as the
process is running. When the process terminates, the queues are
destroyed.
4. The client process can send messages to the outgoing queue by
using the source port number specified in the request. UDP
removes the messages one by one and, after adding the UDP
header, delivers them to IP. An outgoing queue can overflow. If
this happens, the operating system can ask the client process to
•Queuing
5. When a message arrives for a client, UDP checks to see if an
incoming queue has been created for the port number specified
in the destination port number field of the user datagram. If
there is such a queue, UDP sends the received user datagram
to the end of the queue. If there is no such queue, UDP discards
the user datagram and asks the ICMP (Internet Control
Message Protocol) to send a port unreachable message to the
server.
6. At server there is incoming & outgoing queue for each of the
port, All the incoming messages for one particular server,
whether coming from the same or a different client, are sent to
the same queue. An incoming queue can overflow. If this
happens, UDP drops the user datagram and asks for a port
unreachable message to be sent to the client.
7. When a server wants to respond to a client, it sends messages to
the outgoing queue, using the source port number specified in
the request. UDP removes the messages one by one and, after
adding the UDP header, delivers them to IP.
Application:
1. Simple request-response communication with little
concern about flow & error control. Not used for
processes such as FTP that need to send bulk data.
2. UDP is suitable for a process with internal flow and
error control mechanisms. E.g.: the Trivial File
Transfer Protocol (TFTP) process includes flow and
error control.
3. UDP is a suitable transport protocol for multicasting.
Multicasting capability is embedded in the UDP
software but not in the TCP software.
4. UDP is used for some route updating protocols such as
Routing Information Protocol (RIP)
5. In conjunction with Real Time Transport Protocol
(RTP) for real-time data can be used for real time data

You might also like