OSI Model

Geeky much!
Networks & Security
3 min readJun 5, 2021

--

The OSI model attempts to deliver a flow of how data gets transported through one point of origin to the destination through various protocols and the network medium.

Let’s now look at how data is transferred from each protocol as the client requests and the server replies →

Client Request

  • Data is generated at the client side and travels downward the stack of layers to reach the physical layer.
  • Then to get transferred to the server side, it goes through the channel/medium to reach the physical layer of the server.
  • The same process goes in upward direction at the client side to reach the application layer and then finally the server itself.

Server Reply

  • The server reply data goes from the application layer to the physical layer downwards.
  • Transferred through the channel/medium to reach the physical layer of the client.
  • Travels upwards to finally hit the client.

Logical Layer-to-Layer Communication

The Client’s application layer generates the data while the application layer at the server side gets the data.

The Client’s presentation layer encrypts and compresses the data, while the server’s presentation layer decrypts and retrieves the data.

The session layer provides the mechanism for opening, closing and managing a session between end-user application processes, i.e., a semi-permanent dialogue.

The client’s transport layer chops down the data, while the receiver’s transport layers puts it back together.

The client’s network layer creates the data packets, while the receiver’s network layer opens up the data packets.

The client’s data link layer creates the frames of data, while the receiver’s data link layer opens up these frames.

Located at the lowest layer of the Open Systems Interconnection (OSI) communications model, the physical layer’s function is to transport data using electrical, mechanical or procedural interfaces.

Application Layer (7)

The application layer is the user’s application like safari or chrome. Application layer consists of those protocols that establish a communication channel among your OS and your application. Example — HTTP, SMTP.

Application data is generated here.

Presentation Layer (6)

The presentation layer provides the conversion/translation of application data. This step is crucial as it ensures that the client’s application data will be understood by the server’s application layer.

Session Layer (5)

The purpose of the session layer is to simply start, manage, terminate the connection between the sender and the receiver.

Transport Layer (4)

The transport layer receives the data from the session layer and breaks it into packets and adds to them information headers like, the port number, the destination IP, and a sequence info so that the receiver can put the data back in order. Example protocols — TCP(transmission control protocol), UDP (user datagram protocol).

Network Layer (3)

The network layer, dominated by the IP (Internet Protocol) is all about IP routing and IP addressing. Here the IP addresses of the sender and receiver is added to the packets.

Data Link Layer (2)

Data Link Layer adds the information like source and destination MAC (media access control) address to each packet corresponding to the NIC (network interface card). A trailer FCS (frame check sequence) is added to each packet and is converted into a frame. The NIC has a job of creating and destroying frames at sender and receiver end respectively.

Physical Layer (1)

The physical layer receives the frames from the Data Link Layer and generates information on bits of electrical impulses or light depending on the medium being optical or electrical.

The OSI Model is not a law but a guideline and is a great method to learn how different network hosts communicate with each other.

--

--