OSI Model: Your Guide to How Computers Talk

The OSI (Open Systems Interconnection) model is a conceptual framework that standardizes the functions of a telecommunication or computing system into seven abstraction layers. Each layer serves a specific purpose and interacts with both the layers above and below it. The model was developed by the International Organization for Standardization (ISO) to facilitate communication and interoperability between different systems and networks.

Section 1: OSI Model Overview

The OSI model, with its seven distinct layers, provides a systematic approach to grasping the nuances of network protocols. Each layer builds upon the other, creating a cohesive structure for understanding the flow of data across networks.

  • Before delving into the OSI model, several essential networking processes, including TCP handshake and DNS resolution, take place-

  • DNS resolution - when we hit some domain- router/browser try to verify if this domain is mapped to any particular ip address. first searches in the local cache and searched in ISP.

  • The TCP handshake, also known as the TCP three-way handshake, is a process used by the Transmission Control Protocol (TCP) to establish a connection between two devices over a network. This handshake is a fundamental part of the TCP protocol and is essential for reliable and ordered communication between devices.

  • Three steps in tcp handshake is - SYN (Synchronize), Acknowledge and Synchronize-Acknowledge

Layer 7 - The Application Layer

At the top of the OSI model is the Application Layer. Here, applications such as web browsers initiate requests, like fetching a webpage using HTTP or a secure connection with HTTPS. The user interacts with these applications to trigger communication with the network.

Layer 6 - The Presentation Layer

Moving down to the Presentation Layer, data undergoes transformations. This layer is responsible for encryption and formatting. For example, data may be encrypted to ensure secure communication, and its format might be adjusted for compatibility between different systems.

Layer 5 - The Session Layer

Descending to the Session Layer, the concept of a "session" is managed. For instance, when you log into a banking website, a session is created. This session persists until you log out, ensuring that subsequent interactions, like multiple transactions, don't require repeated authorization.

Layer 4 - The Transport Layer

The fourth layer, the Transport Layer, handles data segmentation and reassembly. Protocols like TCP and UDP define how data is broken into segments for efficient transmission. When dealing with various applications, such as HTTP or DNS, the appropriate transport protocol is selected—TCP for reliable communication, UDP for speed.

Layer 3 - The Network Layer

Proceeding down to the Network Layer, logical addressing, routing, and forwarding occur. Data, now in the form of packets, is received by routers. The Network Layer determines the best path for these packets to reach their destination across different networks.

Entering the Data Link Layer, data is framed, and devices on the local network are addressed. Frames are created, providing a link between the network and the Physical Layer. This ensures seamless communication within the local network.

Layer 1 - The Physical Layer

Finally, at the bottom of the OSI model is the Physical Layer. Here, the tangible aspects of network communication come into play. Electronic signals, carrying the data, travel at high speeds through physical mediums like optical cables.