OSI Model Layers and Protocols in Computer Network


January 14, 2022, Learn eTutorial
1240

As we know computers are connected through each other and it forms a network of computers. The communication and data transfer in the network is by using packets. A packet has a header and a data part where the header contains the sender and receiver information and the data part contains data. There are many protocols and layers included in sending and receiving these packets.

OSI or the Open System Interconnection model, which can be called a reference model that describes these layers and protocols, associated in sending and receiving the packets of data. It starts from the question of How an application of one computer sends and receives a packet through the layers to the physical medium to the application of another computer.

OSI model was developed in 1984 by the ISO organization, which consists of seven layers, and each layer is independent and has its own function in sending and receiving a packet of data.

Why OSI Model is needed?

It has many different points describing the need for a reference model in the network which are

  1. Easy to learn and understand each layer functions
  2. Easy to maintain and troubleshoot functions
  3. Easy to add the new technologies that are developed
  4. Can able to check a comparison of functions of layers.

Characteristics of OSI model

OSI model is an international model in the network so it must be made as per international guidelines.

Each layer must be independent in functionality so that changes in one layer may not make changes in another layer.

Make different functions in different layers and there should not be different functions in the same layer. Also, do not make too many layers to make the architecture complex.

Total layers in an OSI model are divided into two which are application layers, which are the upper layers, and other network layers, which are the lower layers.

Application layers are close to a user or an application, which is doing all the application-related issues. Mostly application layers deal with or communicate with the applications that are running in the systems in the network.

layers

The lower layers of the OSI model are designed with the network and physical medium of data transfer. The physical layer is the lower end of the OSI model, which deals with all physical medium issues.

History of OSI Model

It was started in 1970 when the ISO conducted a seminar for making some international standard rules for networking

The need for higher-level protocols was identified in 1973 in an experiment in a packet switch system.

In 1983 the first model of OSI was initially developed but in 1984 the ISO accepted the OSI model architecture.

Responsibilities of OSI Model Layers

As we said, different layers are independent and assigned different functions in the data transfer. Let us examine the OSI layers and their functions in detail which is essential to know about network and cyber security.

OSI Model Layers

OSI layers
  1. Physical Layer
  2. Data-link Layer
  3. Network Layer
  4. Transport Layer
  5. Session Layer
  6. Presentation Layer
  7. Application Layer

1. Physical Layer

This is the lowest layer in the OSI model that is related to the physical medium of data transfer. The physical layer is not dependent on any of the protocols like the higher layer in the OSI model. This layer is responsible for establishing and maintaining the connection between the physical medium and the system for data transfer. The physical layer is responsible for defining the electrical and mechanical specifications needed for transfer.

Responsibilities of the Physical layer

  1. It helps us to connect one or more devices physically.
  2. It defines how the data is transferred from one device to the other in the network, it can be Simplex, Half Duplex, Full duplex
  3. It helps us to know the topology of the network, which means how the devices are arranged in a network.
  4. It defines the signal type that is used in data transfer.

2. Data Link Layer

This is the next layer above the physical layer so the data from a physical layer enters the data link layer where the error-free transfer of data frames happens.

The data link layer makes a format for data and establishes a protocol for the data transfer and communication of devices in the network.

From this layer, we have the IP address of a device to identify each unique device (logical addressing) in the network.

For easy understanding of the functions of the data link layer, it is divided into two sub-layers that are

  1. Logical link control layer
  2. Media Access control layer

Logical Link Control Layer

  1. It helps us to do the flow control and error detection
  2. This layer is involved in packet transfer to the receiver.
  3. It checks the header of the packet to find the address of the network layer protocol

Media Access Control

  1. It is the duty of this layer to transfer data over networks
  2. It helps us to control how the devices that gaining to the physical medium and transfer data.

Functions of Data Link Layer

  1. Framing: this layer is responsible for making the packets for data transfer that have a header, trailer, and data part.
  2. Physical Addressing: The data link layer adds the address to the header part of the packet which is the receiver address
  3. Flow Control: Data send and receive must be at the same rate, maybe the data send rate must match with receiver processing power, or else, the data will get corrupted. The data link layer is responsible for maintaining the flow of data and checking the rate of transfer.
  4. Error Control: The data link layer is responsible for error checks by CRC, which is a cyclic redundancy check. The trailer that is added by this layer is for doing the error check. If the data is not perfect, the receiver sends the acknowledgment as a trailer for resending.
  5. Access Control: It helps us to control the access that has control at that time if more than one device is connected to the same channel.

3. Network Layer

The network layer is the third layer of the OSI model that is above the data link layer. The network layer is responsible for proper routing and forwarding of the data.

This layer can able to find and locate the devices in a network and able to send the data using the best routes to reach the receiver after analyzing the network conditions.

In this layer, we are using protocols such as IP, IPV4, and IPV6 for proper routing of packets which are called network protocols.

Functions of Network Layer

  • Addressing: The network layer adds the sender and receiver address in the header of the data frame.
  • Routing: As we said, routing is a process to find the perfect path to send data to the receiver. There are different routing protocols used in this layer
  • Internetworking: It makes a network by giving a logical connection to all the objects in a network
  • Packetizing: By using the IP protocols, the network layer makes the packets that it receives from the upper layers called packetizing.

4. Transport layer

The transport layer is the 4th layer of the OSI model and is also called the heart of the OSI model. The transport layer is responsible for sending the data completely without any loss.

This layer makes sure that the data is transmitted in the perfect order as that sent without any duplicate content.

The transport layer is the layer, which makes an end-to-end connection with the sender, and receiver to ensure the data is sent reliably.

The transport layer divides the data packets into smaller parts which can be called data segments.

As we said this transport layer is responsible for end-to-end connection and data transfer without any loss or duplication. There are two different protocols used in this layer.

  1. TCP
  2. UDP

Transmission Control Protocol TCP:

TCP is a protocol that helps the data to be sent over the networks and it allows the devices in a network to communicate. It makes a connection and maintains the connection between the sender and receiver.

How is the data sent using TCP protocols?

In TCP protocols, the data is divided into different small parts that we call segments; these segments are sent to the receiver using the best route. Different segments take different routes and reach the receiver in different order. The TCP reorders them to get the correct data.

User Datagram Protocols UDP

UDP is another protocol used in transport layers but it is not a reliable protocol so it is not as much used as TCP.

The problem with the UDP protocol is that the receiver will not have the acknowledgment mechanism to inform the sender that the data is reached correctly. This lack of acknowledgment makes this UDP less reliable.

Functions of Transport Layer

  • Port Addressing: In a system, multiple processes need to send data to another system like browsers, FTP, etc which are using different ports or service points. It is the responsibility of the transport layer to transmit data from one process to another process.
  • The transport layer adds a port address to reach the packet that contains the address of the sender and receiver process so that it can reach the process of different computers correctly.
  • Segmentation and reassembly: As we already discussed, the transport layer divides the data into different segments with a sequence number before it is sent to the receiver. The receiver will reassemble these segments using the sequence number before sending to the upper layers.
  • Connection Control: The transport layer can make 2 connections
    • Connection-oriented: In this connection there will be a solid connection between the transport layers of sender and receiver and packets travel through a single route.
    • Connectionless: here each packet is considered as a single free packet and it can take any route to reach the receiver.
  • Flow Control: It maintains the flow of data packets from end-to-end connection
  • Error Control: It performs the error check using the end-to-end connection. The transport layer make sure that all the data packets reach the receiver without any error.

5. Session Layer

The session layer is above the transport layer and this layer is more closely related to applications and processes running on the system.

The session layer is important to make and maintain the connections and communications between the sender and receiver applications.

The session layer is responsible for handling all the login and its credentials.

Responsibilities of Session Layer

  • Synchronization: The session layer is responsible for adding some checkpoints in the data while transferring the data. The usage of such checkpoints is to resend the data from that checkpoint if any error or loss of data occurs during the transfer.
  • Communication control: The session layer is responsible for allowing communication between two processes of sender and receiver systems.

Session make maintain and close the sessions.

6. Presentation Layer

The presentation layer is above the session layer, which is also called the syntax layer because it mainly concerns the syntax and semantics of the data that is transferred.

The presentation layer is a part of the Operating system that will convert the data from one format to another format before sending it to the receiver which is called encryption.

Functions of Presentation Layer

  • Translation: The sender and the receiver system may not be using the same type of encoding. The presentation layer converts the data from the source-encoded format to a general format and this general format is translated back to the receiver format by the receiver presentation layer.
  • Encryption: Encryption is the processing of converting the data from one form to another form to maintain the privacy and security of data. The presentation layer is behind the data encryption while transmitting the data.
  • Compression: Compression is the process of making the sending of data a little simpler (reducing the bits in data) mainly used in multimedia transfer. The presentation layer is responsible for data compression.

7. Application Layer

This is the top layer in the OSI model which will act as an interface to the user and the process to use the network. This layer’s responsibility includes transparency and resource allocation. This layer offers services to end users for using the network for example file transfer, email, remote login, etc.

Functions of Application layer

  • File transfer, Access, and management: The application layer is responsible for allowing the user to access the file in a remote system. Also, manage and interact with another process in another system.
  • Mail: The application layer is behind the email services in the network.It allows remote login and use of that system and also offers a large amount of database sources on the internet.