# OSI Protocol

## Introduction

*   Computer Network : 2 or more connected devices that can communicate with each other and share resources.
    

![](https://cdn.hashnode.com/uploads/covers/6a18691160295e5547df968a/27fffe49-da26-464b-a4fb-9e551fd7f664.png align="center")

*   Internet is a network of networks, linking multiple computers together for communication and data sharing.
    

![](https://cdn.hashnode.com/uploads/covers/6a18691160295e5547df968a/4ddd0859-15c4-408e-a5b3-4324f1d4e0da.png align="center")

## OSI Model

*   OSI Model is a reference framework that explains the process of transmitting data between computers.
    
*   OSI stands for Open Systems Interconnection.
    
*   Developed by ISO - International Organization for Standardization.
    
*   It is a 7-layer architecture with each layer having protocols and specific Functionality to perform.
    

![](https://cdn.hashnode.com/uploads/covers/6a18691160295e5547df968a/3f7377bb-efa5-4275-8446-10d7a85231d9.png align="center")

### 1 - Application Layer

*   It used in network application (like google , edge , teams ...).
    
*   At this stage, the data is presented in a visual form that the user can understand.
    
*   Provides interface between user and application and is used for remote login, file transfer, mail services and resource sharing.
    
*   The application layer provides several protocols which allow any software to easily send and receive data.
    
    ![](https://cdn.hashnode.com/uploads/covers/6a18691160295e5547df968a/9dfb3957-a05e-46b6-b144-04c15e65ba74.png align="center")
    
    ### 2 - Presentation Layer
    
    ![](https://cdn.hashnode.com/uploads/covers/6a18691160295e5547df968a/1e09fbfc-f21b-441a-a172-b3bc7c72a080.png align="center")
    
*   The presentation layer is also called the Translation layer.
    
*   The data from the application layer is extracted here and manipulated as per the required format to transmit over the network.
    
*   Translation, Compression and Encryption/Decryption.
    

### 3 - Session Layer

![](https://cdn.hashnode.com/uploads/covers/6a18691160295e5547df968a/262f9d55-43e9-452a-ae22-5732d8147fcc.png align="center")

*   This is the layer responsible for opening and closing communication between the two devices.
    
*   The time between when the communication is opened and closed is a know as the session.
    
*   The session layer allows two systems to start communication with each other in half-dublex(one devices able to send the data) or full-dublex(two devices able to send the data).
    
*   Authentication and Authorization.
    

### 4 - Transport Layer

![](https://cdn.hashnode.com/uploads/covers/6a18691160295e5547df968a/b43ce11c-e66b-4a23-b74f-410b4d3a108e.png align="center")

*   The Transport layer manages network traffic between hosts and end systems. it ensures that data packets are delivered accurately and reliably.
    
*   Features : Segmentation, Flow control and Error control.
    

### 5 - Network Layer

*   The network layer works for the transmission of data from one device to the other located in different networks.
    
*   Functions of the network Layer : Logical Addressing and Routing.
    
*   Logical Addressing : The sender & receiver's IP addresses are placed in the header of the packet by the network layer.
    
    ![](https://cdn.hashnode.com/uploads/covers/6a18691160295e5547df968a/760af21e-65ef-44e0-885f-12f141e1440f.png align="center")
    
*   Routing : The network layer protocols determine which route is suitable from source to destination.
    

![](https://cdn.hashnode.com/uploads/covers/6a18691160295e5547df968a/d7f0f9d6-4d03-4928-8031-712db937de72.png align="center")

### 6 - DataLink Layer

*   Responsible for reliable transmission of data across a physical network.
    
*   Sub-layers of the Data Link Layer: Logical Link Control and media Access Control.
    

![](https://cdn.hashnode.com/uploads/covers/6a18691160295e5547df968a/7933ddea-da71-4f57-ad14-dee4955bffbf.png align="center")

*   A MAC address is a uniqure 12-digit hexadecimal number that identifies a device connected to a network.
    
*   MAC stands for "Media Access Control" and helps in framing(Physical addressing) and collision avoidance/detection.
    

### 7 - Physical Layer

*   This layer includes the physical equipment involved in the data transfer, such as the cables and switches.
    
*   It specifies how bits are represented on the medium - whether through electrical signals, light pulses, or radio waves.
    

![](https://cdn.hashnode.com/uploads/covers/6a18691160295e5547df968a/33161c00-2e1a-4e4f-94ef-52fa974b424d.png align="center")

## TCP/IP Model

![](https://cdn.hashnode.com/uploads/covers/6a18691160295e5547df968a/49f513d7-62ab-424e-916e-4dadc873a70d.png align="center")
