Transport Layer of OSI Model - MetaTutorials

MetaTutorials

The Tutor is Yours!

Transport Layer of OSI Model

Here, we will learn about the Transport Layer of the OSI reference model in detail with its diagram and functions. We will also discuss the protocols of the transport layer. 
transport-cover

What is the Transport Layer of OSI Model?

The transport layer of the OSI model accepts data from the session layer and divides it into smaller size segments and transfers them to the network layer on the same network. It ensures that all the data segments are reached correctly and safely, and also assembles all the received segments into one unit at the receiver side. 
This layer transfers the services between the similar application program running on source and destination node. It helps in creating a single logical peer-to-peer and end-to-end connection from sender node to the receiver node.
It also provides error-free end-to-end communication for connectionless as well as connection-oriented networks.

Let's discuss the functions of the transport layer.

Functions of Transport Layer

The Transport Layer performs multiple important functions in the data communication over the network. All functions of transport layer are described below:
transport-function
1. Process to Process Delivery: It is the main and important function of the transport layer of the OSI model. As we know, Network layer and Data link layer require MAC and IP address for routing of packets, as same as transport layer also requires the port address which helps in transferring each segment to the correct computer or node.
In the transport layer, the port address is a 16-bit address which is added in the header to identify the correct destination node.

2. Segmentation and Reassembling: Transport layer splits the data into the multiple small size segments for better communication. Each segment contains its own sequence number which helps in reassembling.
When the message reaches the destination part, then it reassembles all the segments correctly and replaces the lost packets. 

3. Multiplexing and Demultiplexing: The multiplexing technique in transport layer allows you to send multiple packets from different applications or sources simultaneously over the same network according to the port address. 
Demultiplexing is another technique used in the transport layer at the destination side to get the data coming from various applications or sources. 

4. Connection Control between hosts: 
In the transport layer, connection control is categorized into two following types:

a. Connectionless: It is a faster communication because in this transmission receiver does not send acknowledgement back to the sender about the receiving of a packet.  
The transport layer in connectionless communication sends each packet independently to the destination node. 

b. Connection-Oriented: In this transmission, following three steps are important:
i) Connection Established 
ii) Data Transfer
iii) Connection Termination
The transport layer in the connection-oriented communication establishes the connection with the transport layer at the receiver side and then transfers the packets.

5. Flow control: The transport layer controls the flow of data between the adjacent layers of the OSI model. 
This layer uses the sliding window method for more efficient communication. In this technique, the receiver sends the window back to the sender for informing the size of the data it received. 

6. Error Control: Like the data link layer, transport layer also performs the error control techniques end-to-end node.
It checks the errors in data or information coming from the above layer using various error detection techniques. This technique also ensures that the whole message arrived successfully at the receiver node without any error. 

Protocols of Transport Layer

Following are the two protocols used in the transport layer which improve the functionality:
1. TCP
2. UDP

TCP (Transmission Control Protocol)

Transmission Control Protocol operates in connection-oriented communication, i.e., it establishes the practical connection between the nodes before the data transmission and terminates the connection after data transmission.  

TCP provides all services of this layer to applications. This protocol sends the acknowledgement of received packets and resends those packets which are lost in transmission. So, it is reliable. It is used by HTTP, HTTPS, and FTP application protocols. 

UDP (User Datagram Protocol)

Just like Internet Protocol (IP), this protocol is also connectionless. 
UDP is a protocol which does not send acknowledgement to the sender about the sent packets. It does not send the lost, missed, or damaged packets. So, it is not reliable, but it is simple and scalable as compared to TCP. User Datagram Protocol is basically used in both audio and video streaming.