MetaTutorials

MetaTutorials

The Tutor is Yours!

Session Layer of OSI Model

In this networking article, you will learn about the session layer of the OSI reference model in detail with its diagram and functions. We will also discuss the protocols used by the session layer. 

What is the Session layer of OSI model?

The Session layer of the OSI model is the fifth layer from the bottom which is responsible for establishing, controlling, and terminating the dialogs (connections) between the end-user local and remote applications.
It controls one or more than one connection for each application and directly interacts with the presentation layer as well as the transport layer. This layer uses all the services provided by the transport layer for maintaining and synchronizing sessions. 
It implements the sessions on web browsers using AppleTalk Protocol, Session Control Protocol, and Zone Information Protocol. The session layer also synchronizes the information from the different sources. 
The various protocols of this layer manage the session restoration through checkpoint and recovery. 
Now, we will discuss the functions of the session layer.

Functions of Session layer 

Following are the important functions of the session layer which help in establishing, maintaining, and terminating the connection between two remote and local applications:

1. Dialog (Connection) control: This layer acts as the dialog controller in the OSI model which lets the systems interact either in half-duplex or full-duplex mode for the data transmission.  

2. Synchronization: The session layer lets the processes add the checkpoints into the stream of data. The checkpoints are referred to as the synchronization points in the communication of data over the network. 
This feature is beneficial when the data is lost due to crash and damage. If the checkpoints have been added to the stream of data, then there will be no need to transmit the data again from the beginning. 

3. Token Management: Token Management is also another responsibility of the session layer, through which this layer prevents two end-users from accessing the same critical operation at one time.

Protocols of Session layer 

Following are some protocols used in the session layer for safe and secure communication between two end-user local and remote applications:
1. ADSP
2. ASP
3. PAP
4. PPTP
5. RPCP
6. RTCP
7. SCP

ADSP (AppleTalk Data Stream Protocol)

ADSP was developed by Apple Inc in 1985. It is a connection-oriented protocol which transfers the stream of data in the full-duplex mode through the AppleTalk internet. 
In the session layer, it establishes the connection for data transmission between multiple networking devices. 

ASP (AppleTalk Session Protocol)

AppleTalk Session Protocol in the session layer allows more than one ASP workstation to set up a connection with the same server simultaneously. 

PAP (Password Authentication Protocol)

Password Authentication Protocol is used by the PPP (Point-to-Point Protocol) links for validation. This protocol is compatible with almost all network operating systems and remote servers. 

PPTP (Point-to-Point Tunneling Protocol)

PPTP is also another protocol which was created in the 1990s for establishing the connection with virtual private networks. This protocol enhances the own VPN over the public network through tunnels. 
It is fast and easy to establish because it does not require any special software to use.

RPCP (Remote Procedure Call Protocol)

RPCP is basically a type of client-server communication. In this protocol, one computer requests a service from another computer on the network without having the network's information.

RTCP (Real-Time Transport Control Protocol)

RTCP is a protocol of session layer which performs its functionality with the real-time protocol for monitoring the data transmission for large multi-cast networks. 

SCP (Session Control Protocol)

Session Control Protocol is a simple protocol which establishes the multiple light-duty connections over a single TCP (Transmission Control Protocol) connection. 

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. 

Network Layer of OSI Model

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

What is the Network Layer of the OSI model?

The Network Layer is the third layer from the bottom in the OSI model which controls the delivery of data packets from source to destination across the different networks. 
It also finds the best routing paths for better communication in the network. It places the IP addresses of the sender and receiver in the header of each packet. 
It performs its functions on the sender as well as the receiver side. This layer divides the outgoing messages into packets for the lower level and assembles the incoming packets into messages for the higher level.  

It provides the mechanism of congestion control which occurs when a number of datagrams overload the sub-networks. In this layer, IP and IPv6 are the two main internet protocols which are used for routing and encryption techniques. 

Functions of Network Layer

The network layer performs the following various functions which are important for better communication over the different networks:

1. Internetworking: It is considered as the main function of the network layer in the OSI model which establishes the logical connection between two or more networks or network devices. 

2. Routing: The main aim of network layer is Routing. It helps the network layer by selecting the best routing path between source and destination for data communication. The process of finding an optimal path is called routing. The router is a special network device which forwards the packets to their destinations.
Following are some routing protocols which help in identifying the network paths:
a. Internet Protocol (IP)
b. Border Gateway Protocol (BGP)
c. Open Shortest Path First Protocol (OSPF)
d. Routing Information Protocol (RIP)

3. Logical Addressing: Logical Addressing is also another important function of the network layer which uniquely identifies each device on a network. This layer adds the header to each data packet which consists of the logical address of both source node and destination node. 

4. Fragmentation: This mechanism is done at the receiver side by the network layer. This technique divides the large size of the datagram into fragments so that the flow of data is not disrupted. 

Protocols of Network Layer

Following are the various protocols which help in performing the different functions of the network layer:
1. ARP
2. ICMP
3. IPV4
4. IPV6

ARP (Address Resolution Protocol)

ARP protocol is used in the network layer to link the IP address (logical address) with the MAC address (physical address). The MAC address is presented on the Network Interface Card which helps in identifying the device/node on the network. 

The main function of ARP is to convert the 32-bit IP (Internet Protocol) address into the 48-bit MAC (Media Access Control) address. The MAC (Media Access Control) address is used for communication between the two nodes on the local network. 
You can also view the ARP table in your Windows system using the following command in the command prompt:
arp-a
The above command shows the table as shown in the following screenshot:
cmd

ICMP (Internet Control Message Protocol)

ICMP protocol is a network layer protocol which is used for handling errors. It is used by the network devices such as routers which helps to diagnose network communication issues. 
This protocol sends the error messages while communicating. 

IPV4 (Internet Protocol Version 4)

IPV4 is the fourth version of Internet Protocol. The first version of IPV4 was introduced for the production of SATNET in 1982 and ARPANET in 1983. IPV4 uses a 32-bit numeric address which is expressed in dotted-decimal notation. The addresses of IPV4 are divided into the following five classes:
  • Class A,
  • Class B, 
  • Class C, 
  • Class D, and 
  • Class E. 
It is used widely in data communication over the different types of networks. In the network layer, this protocol establishes the logical connection between the network devices by providing the logical address for each device.  

IPV6 (Internet Protocol Version 4)

IPV6 is an upgraded version of IPV4. This version was introduced by the IETF in December 1998. It is used in the network layer for transmitting packets over the network. It sends and receives data in the form of packets between the two nodes. 

This is an internet layer protocol which provides end-to-end datagram communication over the multiple IP networks. Following are the three types of IPV6 addresses:
1. Unicast Addresses
2. Multicast Addresses
3. Anycast Addresses

Data Link Layer of OSI Model

Here, we will learn about the Data Link Layer of the OSI reference model in detail with its diagram and functions. We will also discuss the protocols used in the Data Link Layer of the OSI model.  

What is the Data Link Layer of the OSI model?

The Data Link Layer is the second layer from the bottom which provides complex functionalities and liabilities in the OSI reference model of computer networking. 
It delivers the message from one node to another node across the physical layer. It receives the packets from the network layer and divides them into frames according to the frame size of the NIC.

It also detects and corrects the errors which may occur in the lowest layer, i.e., the physical layer. The detection and correction of errors are done by the error detection bits. It also deals with the local transportation of frames between two nodes of the same level of the network. 
 
Data Link Layer consists of two sub-layers:
1. Logical Link Control: This layer is the upper sublayer of the data link layer in the OSI model which relates to flow control and error control. It also multiplexes the protocols over the MAC layer when the data is transmitted. 

2. Media Access Control: This layer acts as the interface between the data link layer and logical link control. It uses the MAC protocols which allocate the MAC address to the NIC (Network Interface Card) of the device. 

Following are the protocols used in the data link layer:
1. Ethernet
2. Token Ring
3. FDDI
4. PPP (Point-to-Point Protocol)
5. HDLC

Functions of Data Link Layer

The Data Link layer of the OSI model consists of various functions which play important roles in data transmission. Following are the various functions of the physical layer:
1. Framing: Framing is a point-to-point connection between two nodes in which data is moving in the stream of bits. 
It is a main function in which the data link layer accepts the data from the network layer and encapsulates that data into the frames. Then, this layer transfers each frame on hardware. And, on the receiver side, it accepts the signals from the hardware and assembles them into the frames.

2. Physical Addressing: The data link layer provides the unique (MAC) address to the sender and receiver in the header part of each frame after the creation of frame. 

3. Flow Control: This layer observes the proper flow of data between both the sender and receiver node. 
Suppose, the sender is a powerful and fast device as compared to the receiver, then the receiver gets overloaded by the frames and data may be lost. So, flow control mechanism is important in the data link layer. Flow control in the data link layer allows the sender node to wait until it receives the acknowledgement from the receiver node.    
Following are the three methods or protocols to control the flow of data in the data link layer:
1. Stop and Wait Protocol
2. Selective Repeat
3. Go-Back-N

4. Error Control: This mechanism is also important in data link layer. It checks and corrects one or more errors that occurred in the data during transmission. CRC, Checksum, and Parity bits are the methods used for finding and correcting errors. 

5. Access Control: When multiple networking devices share the same communication channel, then the chances of data collision are increased due to the simultaneous transmission of data. That's why this mechanism is used in data link layer to reduce the collision effect. ALOHA, CSMA, CSMA/CD are the three protocols of access control. 

Protocols of Data Link Layer

Following are the various protocols used in the data link layer:

SDLC (Synchronous Data Link Control Protocol)

The synchronous data link control protocol is a protocol introduced in the 1970s by IBM. It ensures that the data is moved from one network node to another network properly. 
This protocol is used in the data link layer for transmitting error-free data. It is also used to establish the connection between the remote device and mainframe computers. 

HDLC (High-Level Data Link Control Protocol)

High-Level Data Link Control Protocol is a bit-oriented protocol which is used in the data link layer for communication over point-to-point as well as multi-point connections. 
It offers reliable as well as unreliable services. It provides a high level of flexibility, reliability, and efficiency. 

SLIP (Serial Line Interface Protocol)

Serial Line Interface Protocol provides the facility in the data link layer for transmitting the IP packets from Internet Service provider to the home user through the dial-up link. 
The main disadvantage of this protocol is that it does not provide error detection and error correction techniques. 

PPP (Point - to - Point Protocol)

The Point-to-Point Protocol is a byte-oriented protocol in the data link layer which transmits multiprotocol data from one point to another point. The functionality of this protocol is similar to the Serial Line Interface Protocol. 
In the data link layer, it provides a framing technique to define the format of a frame. It is widely used for heavier and faster broadband communications. 

NCP (Network Control Protocol)

Network Control Protocol uses computers and various devices for communication at remote locations. 
This protocol is always applicable to each higher layer protocol which is supported by the Point-to-Point protocol. TCP/IP replaced the Network Control Protocol in the 1980s. 


Physical Layer of OSI model

Here, we will learn about the physical layer of the OSI reference model in detail with its diagram and functions. In this article, we will also discuss the components or devices used in the physical layer. 

What is the Physical Layer of OSI Model?

The Physical Layer of the OSI model is the bottom-most layer that activates, maintains, and deactivates the physical connection between the networking devices. 
This layer is responsible for transmitting individual data bits from one networking node to another networking node. The transmission media in this layer used for data transmission can be either wired or wireless. 
Hub, repeater, Multiplexer, transmitter, and modem are the devices of the physical layer. 


Functions of Physical Layer

The physical layer of the OSI model consists of various functions which play important roles in data transmission. Following are the various functions of physical layer:

1. Representation of Bits: This layer encodes the sequence of 0's and 1's bits into signals before the data transmission from one device to another.

2. Bit Synchronization: This function relates to the synchronization of all bits which are delivered between sender and receiver at a bit level.  

3. Line Configuration: This function specifies the medium which shows how two devices are connected with each other in a network. It specifies the Point-to-Point and multipoint configuration. 

4. Data Rate: This function of the physical layer defines the number of bits transferred each second. In simple words, we can say that it specifies the timing of transferred bits. 

5. Interface: The physical layer also defines the transmission interface between the two or more connecting network devices. 

6. Topologies: This layer uses the physical topologies which determine how the multiple devices are connected to each other. This function shows the physical structure of the network.
Following are the four different types of topology in the physical layer:
1. Mesh Topology
2. Star Topology
3. Bus Topology
4. Ring Topology

7. Transmission Modes: This layer of OSI model also specifies the simplex, half-duplex, and full-duplex transmission modes which show the flow of information and data in the network. 
 

Components of Physical Layer

The physical layer of OSI model consists of the following various components:
1. Hub
2. Repeater
3. Modem
4. Multiplexer
5. Receiver
6. Cables and Connectors
7. Network Interface Card (NIC)
 

Hub

Hub is used in the physical layer for connecting the segments of the LAN network. This device has more than one input/output port. 

Repeater

A Repeater is another hardware device which is basically used for regenerating digital and analog signals. 

Modem

Modem means Modulator or Demodulator which converts digital signals into analog signals over the telephone line. 

Multiplexer

This hardware device is used in the physical layer for combining the multiple communication signals together. 

Receiver 

A receiver is a hardware component which receives analog electromagnetic signals, waves, or digital signals. 

Cables and Connectors

Cables and connectors are used to connect the multiple network devices which are associated with the physical layer of the OSI model. Copper cables, co-axial cables, and fiber-optic cables  are some cables and RJ-45 and BNC are the two connectors. 

Network Interface Card (NIC)

NIC is a hardware component that allows you to connect your computer system with the network system. It is either a circuit board or chip which is already installed on your computer system. 

TCP/IP Model of Computer Network

Here, we will learn about the TCP/IP model of a Computer Network in detail with its characteristics, layers, protocols, advantages, and disadvantages. 

What is the TCP/IP Model?

TCP/IP model is a Transmission Control Protocol/Internet Protocol model which is a concise version of the OSI (Open System Interconnection) model. 

This model was designed in 1960 by the Department of Defense (DoD). This model has a set of rules which helps in interconnecting the computers or network devices to the Internet. 
It also specifies how the data should be transferred over long distances. Unlike seven layers of the OSI model, this model only has 4 layers. 

Characteristics of TCP/IP Model

Following are the characteristics of the Transmission Control Protocol/Internet Protocol (TCP/IP) Model:
1. TCP/IP model is connection-oriented, i.e., the network devices should establish a connection before they transfer data to each other. 
2. Reliability is the most important characteristic of the TCP/IP model. 
3. This model ensures that the data reaches the destination in the same sequence it was sent. 
4. It allows you to implement the flow control, error checking, and recovery mechanism.
5. This model provides the full-duplex facility, i.e., the data can be transferred in both directions.

Layers of TCP/IP Model

The functionality of the TCP/IP model is divided into four tasks. And, each task is performed by the different layers. Each layer has a defined set of methods and protocols for performing that task.
The four different layers of the TCP/IP model are mentioned below:
1. Network Layer
2. Internet Layer
3. Transport Layer
4. Application Layer

Network Layer

Network Layer of TCP/IP model is the lowest layer and the combination of physical and data link layer of OSI reference model. Sometimes, this layer is also referred to as the host-to-network layer. 

This TCP/IP layer helps you to define how the data should be transferred physically using the network. It encapsulates the IP datagram into frames and maps the Internet Protocol (IP) addresses into the physical addresses. 
This layer does not define any protocol but supports all the standard protocols. 

Internet Layer

The Internet Layer of the TCP/IP model is the second layer and sends the data packets to the destination over the network. 
This layer routes each data packet from the sender to the receiver using the optimal route and handles the errors in the transmission. 
This layer uses the following three protocols:
1. IP protocol
2. ARP protocol
3. ICMP protocol

Transport Layer

The Transport Layer of the TCP/IP model is the third layer and provides the reliability, flow control, and correction of the data which is being sent by the source over the network. 

This layer of the TCP/IP model is similar to the transport layer of the OSI reference model. The main function of this layer is that it makes the delivery of data error-free. 
It also does functions like segmenting, multiplexing, and splitting of the data to be transferred over the network.  
This layer uses the following two protocols:
1. TCP (Transmission Control Protocol)
2. UDP (User Datagram Protocol)

Application Layer

The Application Layer of the TCP/IP model is the uppermost layer and allows you to interact with the application. 

This layer makes the node-to-node communication and controls the user-application interface. File transfer, e-mail services, and remote login are the best examples of the Application layer. 
This layer uses the following multiple protocols:
1. Simple Mail Transfer Protocol (SMTP)
2. Domain Name System (DNS)
3. File Transfer Protocol (FTP) 
4. TELNET
5. HyperText Transfer Protocol (HTTP)
6. Simple Network Management Protocol (SNMP)

Protocols of TCP/IP Model

Following are the most common TCP/IP protocols:
1. TCP
2. IP
3. HTTP
4. FTP
5. SMTP
6. SNMP
7. DNS

TCP

TCP is an abbreviation of Transmission Control Protocol. This protocol of the TCP/IP model divides the message into the small units called TCP segments and resembles all the segments based on the sequence number at the destination side. 
This protocol also ensures that the data is successfully transmitted from one device to another over the network. This protocol retransmits those frames which are damaged in the previous transmission.  
 

IP

IP is an abbreviation of Internet Protocol. This protocol of the TCP/IP model is the most essential protocol which decides the route for transmitting the data. 
It is also responsible for implementing the logical host address.  

HTTP

HTTP is an abbreviation of HyperText Transfer Protocol. This protocol of the TCP/IP model transfers the web pages and other web resources from the HTTP server to the HTTP client. 
It allows users to access the data over the World Wide Web and also transfers the plain text, audio, and videos over WWW. 

FTP

FTP is an abbreviation of File Transfer Protocol. This protocol of the TCP/IP model allows you to transfer the files from one device to another device over the network via the physical medium.
 
FTP also allows you to download the files to your computers from the other servers. It is mainly used for sharing files. 

SMTP

SMTP is an abbreviation of Simple Mail Transfer Protocol. This protocol of the TCP/IP model allows you to transfer the mail messages to other email addresses over the Internet. 

It exchanges the mail between the different email users on the same device or different device. You can easily send text messages, images, videos, audio, files, and graphics to one or more recipients.  

SNMP

SNMP is an abbreviation of Simple Network Management Protocol. This protocol of the TCP/IP model manages the network devices on the Internet. Sometimes, it also provides a set of methods to monitor the network and detects the faults that occurred on the network. 

DNS

DNS is an abbreviation of Domain Name System. This protocol of the TCP/IP model maps the names of the computers, devices, and services connected to the Internet. 
As we know, IP addresses are used to identify the connection of a computer or device to the Internet. But, some people use names instead of IP addresses. That's why DNS maps the names to the address.  

Advantages of TCP/IP Model

Following are the advantages or benefits of the Transmission Control Protocol/Internet Protocol (TCP/IP) model:
1. The main advantage of this model is that it is used to make a connection between the two different computers. 
2. This model supports multiple networking routing protocols. 
3. Scalability is a big advantage of this model because it allows networks to be added or removed without disrupting the current network service.  
4. This model uses control mechanisms such as flow control and error control. 
5. TCP/IP model is an open protocol suite. So, any user or any organization can easily use this model, because it does not belong to the particular institute or company. 
6. When this model is used on modem or LAN then it provides better performance. 
7. The last and final advantage is that it offers internetworking among different organizations. 

Disadvantages of TCP/IP Model

Following are the disadvantages or limitations of the Transmission Control Protocol/Internet Protocol (TCP/IP) model:
1. The TCP/IP model is complex. So, it is difficult to implement and manage.
2. In this TCP/IP model, the transport layer is not responsible for the delivery of packets. 
3. This model is not the best choice for LAN and PAN networks. It was only implemented for the WAN networks. 
4. The TCP/IP model does not replace the TCP/IP protocols easily.
5. This model is not suitable for describing the new technologies, because it has not clearly separated the concepts of interfaces, services, and protocols.  

OSI Model of Computer Network

Here, we will learn about the OSI model of Computer Network in detail with its characteristics, functions, advantages and disadvantages. 

What is the OSI Model?

OSI is an abbreviation of Open Systems Interconnection. It is a conceptual framework that describes how the data is transferred from the software application of one machine to the software application of another machine through the physical medium. 

This model uses the seven different layers for describing the network connections, so, sometimes this model is also known as the OSI seven-layer model. In 1984, the International Standard Organization introduced the OSI model for inter-computer communications.

In this model, the network architecture is divided into seven small different layers or sub-components. Each layer performs a specific task independently and interacts with the above and lower layer  automatically.

Characteristics of OSI Model

Following are the characteristics of the OSI Model:
1. This model helps to understand the relationship between the network devices easily over both small and wide area networks.  
2. This model helps the network administrators by dividing the large data chunks into smaller sub-components. 
3. As the data moves layer to layer, the function of each layer varies and the data complexity reduces. 
4. It also shows how the functions of software and hardware perform together.
5. The OSI model easily detects or finds errors at different layers.
6. The OSI model is categorized into the following two groups of OSI layers. 
a) Upper Layers:
Those layers which are closest to the end-user and deal with the issues related to the software applications.
b) Lower Layers: Those layers which are closest to the physical medium and which deal with the problems of data transmission. These OSI layers placed the data on the physical medium that needs to be transmitted. 

Function of OSI Model

OSI Model breaks down the network process into several layers. Each OSI layer performs a different function serially.  
Following are the seven OSI layers that play an important role in data communication:
1. Physical Layer
2. Data Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer.

Let's discuss each layer in short one by one.

Physical Layer

The Physical Layer is the lowest and closest layer to the physical medium of the OSI model. This layer transmits the unstructured bits from one device to another over the network.

It establishes and maintains the physical connection between two or more network devices. It also specifies how the data is flowing between the two devices.

Data Link Layer

The Data Link Layer makes the data error-free which is transferred from one device to another. It divides the received data packets into frames and assigns the MAC address of sender and receiver to each data packet. 

Network Layer

The Network Layer finds the best path for sending the packet to the destination and places the IP addresses of sender and receiver in the frame header. 
This layer is responsible for breaking the segments into packets. It also resembles these packets received from the data link layer on the receiver device.  

Transport Layer

The Transport Layer receives the data from the higher layer and converts the data into segments. This layer makes the point-to-point connection between the sender and receiver device. 
It uses Transmission Control Protocol (TCP) and User Datagram Protocol (UDP).  
This OSI layer controls the flow of data and performs the error control technique.

Session Layer

The Session Layer manages and synchronizes the interactions between the connected devices over the network. 
This layer also provides those services which include the functions of authentication and authorization. 

Presentation Layer

The Presentation Layer converts the data with the help of syntax and semantics for the application layer. Sometimes, it is also called the syntax layer. 
It uses encryption and decryption techniques for data security and privacy. 

This layer also performs the process of data compression. Data Compression minimizes the number of bits which are transmitted between the devices over the network. This mechanism transfers the bits at a fast speed over the network.

Application Layer

The Application Layer is the closest to the end-user and the uppermost layer of the OSI model. This layer directly interacts with the users and provides the network service to them with the help of software applications. 
HTTP and SMTP are the two protocols of the application layer.

Advantages of OSI Model

Following are the advantages of the OSI Model:
1. If the changes are done in one layer of the OSI model then those changes do not affect the other OSI layers.
2. It is a standard model and provides modular engineering in computer networking. 
3. This model supports both connectionless and connection-oriented services. 
4. Communication between the different types of software and hardware is easy.
5. As we know that, the model breaks the process into small subcomponents or segments. So, the design, development, and maintenance of the network are very easy in this model.
6. The security of this model is high.

Disadvantages of OSI Model

Following are the disadvantages of the OSI Model:
1. As we know, the layers do not work in parallel. So, each layer has to wait to take the data from its previous layer.
2. The initial implementation of this model is costly and time-consuming. 
3. Some services are common in more than one layer. Error Control and Flow control services are provided by multiple OSI layers.
4. The standards of this model are generic or theoretical. That's why practical implementation is not possible in this model.