OSI Model Demystified


ODI Layer Diagram

Usually, software engineers skip this part, it is not because of difficulty, but we don’t give much value. I was also in the same club a few months back.


OSI is a logical model for communication between systems. It was modelled first then protocols were implemented. Therefore, there are some instances where we won’t be able to classify some protocol in any definite layer. The better version of OSI is the TCP/IP model, which we will be covering in my next blog.


In this blog, I will try to help everyone visualize how this OSI stack fits in our software.


Communication between different layers

In the OSI layer, each layer is dependent on the layer above and the layer below. I will try to explain this communication as in layers are human.


communication between different layers of OSI model

Sam wants to watch some Netflix.

On the weekend, Sam planned to watch his favourite show on Netflix. Let’s try to visualize what happens when Sam is trying to browse Netflix.


How does request routes from Sam's PC to Netflix server




How does request routes from Netflix server to Sam's PC



Some involved protocols

In our mundane routine, some protocols and rules are imposed, which every person follows. Similarly, there are some rules and regulation, when machine talks or communicate with each other.

  • HTTP (HyperText Transfer Protocol): This protocol used to access data from the internet. It comes under the Application Layer.

  • DNS ( Domain Name System): This protocol used to convert Domain (e.g., https://www.google.com ) to IP address. This protocol is used with HTTP, to figure out the IP of HTTP endpoint (like https://google.com ). It comes under the Application Layer.

  • FTP (File Transfer Protocol): This protocol is used transfer files or folder between machines connected through the internet. It comes under the Application Layer.

  • SMTP ( Simple Mail Transfer Protocol ): This protocol used in emailing service. It comes under the Application Layer.

  • POP3 (Post Office Protocol): This protocol used along with SMTP. Using this protocol allows a machine to store mails in remote folders when a user is offline, and as soon as a user connects with the mail server, then those mail in a remote folder are downloaded in the user machine. It comes under the Application Layer.

  • SSL (Secure Socket Layer) /TLS ( Transport Layer Security ): It secures the traffic between machines that are communicating over the internet. It will be a debatable conclusion if I am going to classify it into Presentation Layer ( However, Wikipedia categorizes it into a presentation layer). In my opinion, we can only put it in Presentation Layer if we talk about at-rest encryption. Otherwise, it starts from the session layer and finally implemented in Transport Layer. To summarize the discussion, we can say that it applies between the Application Layer and Transport Layer.

  • RPC ( Remote Procedure Call ): It initiates the communication with destination from Source, by calling a function or method present in destination machine. We can visualize this by considering two classes of Java, and one class of Java is calling the method from another class ( This is Simple Procedure Call). The only difference in RPC is that another class is sitting in some different remote machines. It comes under the session layer.

  • TCP ( Transmission Control Protocol ): It establishes a connection between Source & destination. Then the source machine starts sending data in small packets to a destination machine until the destination machine stops acknowledging. It also performs error-checking and resends erroneous packet back to destination. It is a connection-oriented protocol, i.e., connections need to be there between Source & destination, for packet transfer. It comes under Transport Layer.

  • UDP ( User Datagram Protocol ): It is very much similar to TCP, but with some differences like it doesn’t resend erroneous packets, but discards. It is a connectionless protocol. It comes under Transport Layer.

  • IP ( Internet Protocol ): It locates the destination machine. It is a connectionless protocol. It comes under Network Layer.

There are many more protocols, which I haven’t talked about yet. I will be publishing a separate blog for some of the protocols, which have more importance in software engineering.


Comments and feedback are most welcomed.


Please follow me on Linkedin, Github, and join our newsletter to keep yourself updated.


Thanks for reading. Happy Learning 😊

15 views