Understanding the OSI Model
The OSI model is a communication standard used in computer systems and is what the internet and all
communication devices use to communicate with one another. In this article, we will discuss the basics of the OSI
model and demystify it for software engineers by explaining it at a higher level.
The Network Configuration
We have a network configuration with a router and multiple machines connected to it. Each machine has an IP
address and a MAC address, which is a unique 48-bit identifier for the network card. We have a web application
running on server 3, and our mobile phone wants to consume the index.html page on this application.
The HTTP Protocol
As a client, we use the browser to type http://10003:80 and hit enter, which translates into a GET request to the
slash route. This request has headers, cookies, and content-type headers, but no body since it's a GET request. The
HTTP protocol prepares all this information and sends it over to the first layer of the OSI model, called the
application layer.
Layers of the OSI Model
Below the application layer is the presentation layer, which encrypts the data if necessary. Since we're using HTTP,
we don't need encryption, so this layer passes the data through. The session layer tags the data with a session ID so
that it knows which data belongs to which session. The transport layer then breaks down the large amount of data
into manageable segments and tags each segment with the port number.