Chapter 4
Chapter 4
COMPUTER NETWORKS
(ECE-4308)
Overview of Transport Layer protocols
Firew Tadele
Transport layer (4th OSI layer)
The transport layer ensures that the whole message arrives intact and in
order, overseeing both error control and flow control at the source-to-
destination level.
2
Responsibilities of the transport layer:
3. Flow control:- Like the data link layer, the transport layer is responsible for flow
control.
However, flow control at this layer is performed end to end rather than across a single link.
4. Error control:- Like the data link layer, the transport layer is responsible for error
control.
However, error control at this layer is performed process-to-process rather than across a
single link.
The sending transport layer makes sure that the entire message arrives at the receiving
transport layer without error (damage, loss, or duplication).
connection-oriented.
B. Connection-oriented transport layer makes a connection with the transport layer at the
5
Process-to-Process Delivery
To complete the delivery, we need a mechanism to deliver data from one
of these processes running on the source host to the corresponding
process running on the destination host.
At the data link layer, we need a MAC address to choose one node among
several nodes if the connection is not point-to-point.
A frame in the data link layer needs a destination MAC address for delivery and a source
address for the next node's reply.
At the network layer, we need an IP address to choose one host among millions.
A datagram in the network layer needs a destination IP address for delivery and a source IP
address for the destination's reply.
7
Cont.
At the transport layer, we need a transport layer address, called a port
number, to choose among multiple processes running on the destination
host.
The destination port number is needed for delivery; the source port number
is needed for the reply.
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
8
Cont.
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.
Of course, one solution would be to send a special packet and request the port number of a
specific server, but this requires more overhead.
The Internet has decided to use universal port numbers for servers; these are called well-
known port numbers.
Example of well known port numbers: 21 for FTP, 23 telnet, 25 SMTP, 80 HTTP, etc
9
Internet Assigned Number Authority (IANA) Ranges
There are some exceptions to this rule; for example, there are clients that are assigned well-
known port numbers. Every client process knows the well-known port number of the
corresponding server process.
Well-known ports. The ports ranging from 0 to 1023 are assigned and controlled by IANA.
These are the well-known ports.
Registered ports. The ports ranging from 1024 to 49,151 are not assigned or controlled by
IANA. They can only be registered with IANA to prevent duplication.
Dynamic ports. The ports ranging from 49,152 to 65,535 are neither controlled nor registered.
They can be used by any process. These are the ephemeral ports (temporary ports).
10
Socket Addresses
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: the client socket address
and the server socket address.
These four pieces of information are part of the IP header and the transport layer
protocol header. The IP header contains the IP addresses; the User Datagram
Protocol (UDP) or TCP header contains the port numbers.
11
Connectionless Versus Connection-Oriented Service
A transport layer protocol can either be connectionless or connection-oriented.
1. Connectionless 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 either.
UDP is connectionless.
2. Connection-Oriented Service
a. In a connection-oriented service, a connection is first established between the sender and the receiver.
12
Reliable Versus 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.
In the Internet, there are two common different transport layer protocols, as we have
already mentioned. UDP is connectionless and unreliable; TCP and SCTP (Stream
Control Transmission Protocol) are connection-oriented and reliable protocols. These three
can respond to the demands of the application layer programs. 13
Why flow control and error control at the transport layer as
we have it at the data link layer???
14
THANK YOU!
QUESTIONS?