Explaining the OSI Model: Layers and Their Significance – IQCode.

Overview of the OSI Model

The OSI model is a conceptual model that provides a standard for communication between systems on a network. It stands for Open Systems Interconnection and was developed by the International Organization for Standardization (ISO) in the 1980s.

The OSI model consists of seven layers, each with a specific function. These seven layers are the Application layer, Presentation layer, Session layer, Transport layer, Network layer, Data Link layer, and Physical layer.

In this article, we will discuss the characteristics of the OSI model and provide an overview of each of its seven layers.

Introduction

The OSI (Open Systems Interconnection) model is a network model developed in 1984 by ISO that serves as a reference guide for networking. It provides a high-level overview of how to transfer data from one host to another host. In this model, anything that is part of the network and wants to communicate is referred to as a host.

One type of host is the server, a special type of computer that receives data from clients. The OSI model has seven different layers, each of which has protocols that must be followed to implement a network in the real world. The protocols are a set of rules that everyone must agree upon. The TCP/IP model is the exact model that is implemented in the real world based on the OSI model.

A network is a collection of interconnected computers (hosts) that communicate with each other to share data. Networking involves creating a network using protocols, hardware, software, mediums, etc., and routing data flow between devices in the network.

Understanding the OSI Model

The OSI Model is a layered system architecture. It was developed by researchers and based on the Philosophical Translator Secretary Architecture. This architecture involves two philosophers in different locations trying to transmit a message despite language barriers. To successfully send the message, each philosopher follows a specific set of steps, such as having a secretary convert the message into a common language. This concept is similar to the OSI Model, where each layer specifies different protocols for successful communication.Characteristics of the OSI Model

The OSI model groups layers into two categories: those under Host responsibility and those under Network responsibility.

Host-responsible layers include:

– Application Layer
– Presentation Layer
– Session Layer
– Transport Layer

Network-responsible layers include:

– Network Layer
– Data Link Layer
– Physical Layer

Host responsibilities include encryption, session management, segmentation, flow control, etc.

Network responsibilities include packet routing, congestion control, network identification, etc.

Understanding OSI Model Layers

The OSI Model comprises seven layers, each with its specific
functionality. Here’s a brief overview of these layers –

Code:
“`
Layer 7: Application Layer
Layer 6: Presentation Layer
Layer 5: Session Layer
Layer 4: Transport Layer
Layer 3: Network Layer
Layer 2: Data Link Layer
Layer 1: Physical Layer
“`

By following the OSI model, different hardware and software products
can communicate seamlessly with each other, creating an “API-like”
environment.

Application Layer

The Application Layer consists of protocols used by applications that require communication with a network for data transmission. These include popular software like Browsers, Outlook, Skype, and Remote Desktop. Each application is based on a set of protocols specific to their functionality, such as HTTP/HTTPS and FTP for browsers, Skype Protocol for Skype, and Telnet/RDP for Remote Desktop.

HTTP is used to transmit web pages, images, and text over the internet, while HTTPS securely transmits sensitive data. FTP transfers files between computers, while SMTP sends and receives emails.

The Application Layer comprises both open and proprietary protocols, with Skype Protocol being proprietary to Skype and RDP being proprietary to Microsoft. The appropriate protocol is selected based on the application used.

In the figure above, the client communicates with the server, and the mail server operates on the application layer to handle email requests from the host.

Presentation Layer

The presentation layer has three main tasks:

// Translation - converts data from the app layer to ASCII codes or binary format

// Example: "Hello" in ASCII is 72 101 108 108 111, and in binary is 01001000 01100101 01101100 01101100 01101111

// Data compression - reduces data size for faster transmission without significant loss of data

// Example: 1MB image can be compressed to less than 1MB

// Encryption - secures data to prevent unauthorized access

// Example: confidential information is encrypted before transmission

Session Layer – OSI Model

The Session Layer manages network connections and handles connection establishment, management, and termination. It also handles authorization and authentication.

In connection establishment, both client and server should agree to transfer the data, while managing connection means getting knowledge of established connections for effective data transfer. After completing data transfer, terminating the connection is a must.

Authorization checks the validity of a user’s ID and password, while authentication verifies if the user has permission to access a particular file.

For example, a person who wants to enter an office must authenticate himself by providing his User ID and password. The security personnel will then verify if the person has the authority to go inside or not.

Modern browsers, such as Chrome and Firefox, take care of the Application, Presentation, and Session layers.

Transport Layer

The Transport Layer manages data from the layer above and performs segmentation, flow control, and error control. Segmentation is necessary because different protocols in the Transport Layer have different segment sizes. Each segment is given a number for easy identification and management. Flow control manages data flow between hosts with different transfer rates. Error control helps to correct errors in the data, such as through Automatic Repeat Request. The Transport Layer also merges data packets and sends them to the corresponding application through port numbers.

Network Layer

The network layer identifies the network to which data must be transmitted through packets. These packets comprise data from the previous layer, encapsulated with headers containing the source and destination IP addresses. This layer assigns an IP address to each host and determines the routing of packets.

Routing involves setting a path for the packet to reach from the sender to the receiver. The router gets the destination IP address and applies masking—a simple bitwise operation—to obtain the network IP address, which helps it to decide the next router for the packet it has to send.

The network layer encapsulates the packet with the IP address through the Domain Name System (DNS), providing the IP address corresponding to the requested domain name.

Multiple paths can be used to send one packet to the destination, so path determination is necessary to determine the best path. Routers use algorithms based on minimum spanning tree, shortest path, etc., to determine the most efficient path.

In addition, the network layer checks the data received from the data-link layer while receiving the data. It extracts the data from the header and sends it to the transport layer.

Data-Link Layer

The Data-Link Layer adds headers along with the MAC Address of Source and Destination to the packet sent from the Network Layer. The MAC Address is a unique 48-bit code assigned to every network device and contains the address of the physical network device from which data is transmitted. This layer helps to access media such as Copper Wire, Fiber Optical Cable, Wireless, etc. to control the medium and detect congestion, error, collision, etc. The mechanism of error detection checks whether the data is correctly received or not. Some algorithms that help this process are CRC, Checksum, Bit Parity, etc. If the MAC address belongs to the same device, the Data-Link Layer extracts the data part from the frame and sends it to the Network Layer.

Physical Layer

The Physical Layer converts data into appropriate signals for transmission through different media. It also encodes the stream of bits into signals like electrical pulses or laser beams.

The type of signal depends on the medium of transmission – for example, radiofrequency for wireless and laser beams for optical fiber cable.

There are various encoding schemes like Manchester Encoding and Differential Manchester Encoding.

On the receiving end, the physical layer decodes the signal and sends the bits to the Data Link Layer.

//example of Manchester Encoding:

0101001101010100 (Data) => 0 1 0 1 0 0 1 1 0 1 0 1 0 0 1 0 (Encoded)

Importance of OSI Model in Network Design

The OSI Model serves as a fundamental reference model for creating or implementing networks. The TCP/IP model is based on the OSI Model and is used in real-world network design. It follows the same layered approach as OSI and uses various algorithms to facilitate data transmission between hosts.

Top 10 Productivity Tools for Programmers

The IQCode and the Traveling Salesman Problem (TSP)

Python Developer Salaries in India for Freshers and Experienced Professionals in 2023 – IQCode

Unraveling Azure Architecture: An In-Depth Guide by IQCode