OSI Model Layers and Protocols in Computer Network

As we know the 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 have 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 as a reference model that describes these layers and protocols, associated in sending and receiving the packets of data. It starts from the question How an application of one computer send and receive a packet through the layers to the physical medium to the application of another computer.

OSI model is 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 of a reference model in network that are

  1. Easy to learn and understand each layer functions
  2. Easy to maintain and troubleshoot of 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 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 the changes in another layer.

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

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

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

layers

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

History of OSI Model

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

The need for higher level protocols was identified in 1973 in an experiment in 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 function in the data transfer. Let us examine the OSI layers and its functions in detail that 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

Physical Layer

This is the lowest layer in the OSI model that is related to the physical medium of data transfer. 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 physical medium and system for data transfer. Physical layer is responsible for defining the electrical and mechanical specification needed for transfer.

Responsibilities of Physical layer

  1. It helps us to connect one or more devices physically.
  2. It define 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.

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.

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 the functions of 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 help us to do the flow control and error detection
  2. This layer is involved in packet transfer to the receiver.
  3. It check the header of the packet to find the address of 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 header, trailer and data part.
  2. Physical Addressing: Data link layer adds the address to the header part of the packet which is 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, else, the data will get corrupted. Data link layer is responsible for maintaining the flow of data and checking the rate of transfer.
  4. Error Control: Data link layer is responsible for error check by CRC, which is 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 acknowledgement as a trailer for resending.
  5. Access Control: It helps us to control the access that has the control that time, if more than one device is connected to the same channel.

Network Layer

Network layer is the third layer of the OSI model that is above the data link layer. Network layer is responsible for proper routing and forwarding 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 the protocols such as IP, IPV4 and IPV6 for proper routing of packets that are called network protocols.

Functions of Network Layer

Addressing: 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.

Transport layer

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

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

Transport layer is the layer, which makes an end-to-end connection with the sender, and receiver to assure the data is send reliably.

Transport layer divides the data packets into smaller parts which can be called as 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 as 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 reorder them to get 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 much used as TCP.

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

Functions of Transport Layer

Port Addressing: In a system, multiple process needs 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.

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 divide the data into different segments with a sequence number before it is send to the receiver. The receiver will reassemble these segments using the sequence number before sending to the upper layers.

Connection Control: Transport layer can make 2 connections

  1. Connection oriented: In this connection there will be a solid connection between the transport layers of sender and receiver and packets travel through single route.
  2. Connectionless: here each packet is considered as a single free packet and it can take any route to reach the receiver.

Flow Control: It maintain the flow of data packets from end to end connection

Error Control: It performs he error check using the end to end connection. Transport layer make sure that all the data packets reach the receiver without any error.

Session Layer

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

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

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

Responsibilities of Session Layer

Synchronization: Session layer is responsible for adding some checkpoints in the data while transfer the data. The usage of such checkpoints is to resend the data from that checkpoint if any error or loss of data is happened during the transfer.

Communication control: Session layer is responsible for allowing communication between two process of sender and receiver systems.

Session make and maintain and close the sessions.

Presentation Layer

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.

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 that is called as encryption.

Functions of Presentation Layer

Translation: The sender and the receiver system may not be using the same type of encoding. Presentation layer convert the data from the source-encoded format to a general format and this general format is translated back to the receiver format by receiver presentation layer.

Encryption: Encryption is processing of converting the data from one form another form for maintain the privacy and security of data. Presentation layer is behind the data encryption while transmitting the data.

Compression: Compression is process of making the sending of data little simple (reduce the bits in data) mainly used in multimedia transfer. Presentation layer is responsible for data compression.

Application Layer

This is the top most 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 are file transfer, email, remote login, etc.

Functions of Application layer

File transfer, Access and management: Application layer is responsible to allow the user to access the file in a remote system. Also manage and interact with another process in another system.

Mail: Application layer is behind the email services to happen in network

It allows remote login and use that system and also offers a large amount of database sources on the internet.