OSI ( Open System Interconnection Model)

OSI ( Open System Interconnection Model)

OSI Model

In old times, at the early stage of computers, "before any operating system", people transmitted data from one computer to another through cables, as we do when we connect external hard drives or pen drives. But over time, people have different operating systems on the server side and on the user side while connected through the internet. Hence an idea was generated by the International Organization for Standardization (ISO) to solve the issue in 1984, which is named Open System Interconnection ( OSI Model ).

This was a theoretically based idea divided into 7 layers to transmit the data from any system which could be read by another system running a different OS.

In the next paragraphs, we will see how this solves the problem 👍.

OSI is divided into 7 layers which are:

  1. Application
  2. Presentation
  3. Session
  4. Transport
  5. Network
  6. Data Link
  7. Physical

To understand the above model it usually occurs in reverse order i.e, from physical to application, but to remember this through mnemonics I wrote them here from application to physical.

The mnemonics are:

  1. All
  2. People
  3. Seems
  4. To
  5. Need
  6. Data
  7. Physically

To understand how an OSI model helps to transmit and receive data, let's see the following images:

transmitreceive-3.gif source image 1

Now you can see the map but it might be blurry and confusing.

Actually, each layer packs some header with the data or encodes the data into chunks and other machine-level data to transmit and receive.

transmitreceive-3.gif source image 2

The above images can be used as a reference, for now, to generalise a map to learn each layer/protocol functionalities:

  • Application

    • When an application wants to send or receive data through the network it uses a different protocol like HTTP, HTTPS, SMTP, FTP, SSH etc.

    • On sending the data to the server it follows the rule to attach the suggested header-defined rule from the application layer protocol.

    • Similarly, on receiving the data the application like the browser receives the user data with the Application Header, and it is divided within the browser (application) for using it meaningfully.

    • Headers for HTTP consist of cookies, send time, main data size, data length, receive the time, etc. are attached with main data files.

  • Presentation

    • Presentation layer does the following three functions:
      1. Translation: Here, the layer translates the human-readable code or text to machine-understandable code like binary.
      2. Data Compression: Here, the layer compresses the translated data to compressed to represent the original data. This process can be lossy or lossless.
      3. Encryption / Decryption: Before sending the data, it is encrypted through a key, to maintain the integrity of the data. While receiving, the encrypted data is decrypted by a unique key.
        • encryption protocols like SSL, WPA, Keybros, etc are used.
  • Session

    • The session layer checks the authentication of each request sent or received over the network. It tracks from authentication to a request to checking the data till sent from the server, i.e, whether the request got fulfilled or not.
    • It authorizes the user for some time to get access to or manipulate the data for a defined period of time.
    • It checkpoints each data requested by the user, as the data is sent in the form of packets.
  • Transport

    • Transport layer take care of Segmentation, flow control and error control.
    • In the segment sub-layer, the data is divided into small data segments, in which each data segment consists of the sequence number and port number.
      • The port number is used to send the data segment over a particular port of the user's system application.
      • Sequence Number, is used to define the sequential order of the data packet.
    • In flow control, tries to synchronize the time between sending and receiving the data.
    • In error control, it tries to give feedback to track down each data packet sent over the network.
      • The sub-transport layer protocols ex. are TCP and UDP.
  • Network

    • Network layer has the following functions:
      1. Logical Addressing: The network layer assigns the unique IP address of the user which is attached to the segment to form an IP packet.
      2. Path Determination: The network layer uses the following path determination algorithm to send and receive the data through the shortest path:
        • Open Shortest Path First ( OSPF )
        • Border Gateway Protocol ( BGP )
        • Intermediate System to Intermediate System ( IS-IS )
      3. Routing: Routing is based on a mask IP address to send over a particular network request by the user of a specified network region.
    • In this layer, it assigns the physical address apart from the logical one assigned before in the network layer.
    • The physical layer attaches the MAC address of the user's system from which the request is sent.
    • When the data link layer attaches the physical address to the packet after the network then it is said as Frame.
    • It is done in the Network Interface card of a network-connected device.
  • Physical

    • In this layer the frames are translated to the signal used by the following mediums:
      • Air: Signals sent through mobile towers are sent in different bandwidths through the air.
      • Copper wire: Signals are sent in analog way, by variating the voltage.
      • Fiber: Signals are sent over light waves in a fibre-optical wire which is much faster and more reliable to send or receive data physically.

Hence, this is a theoretical model to accomplish each network protocol on the basis of the OSI Model. Read further on the Internet there are no limits here.

Thank You