We’ll first try to understand what is the OSI model and then discuss the 7 layers of the model
The main idea with computer networks is communication between different systems. The purpose of communication can be Information sharing.
Suppose we have two systems A and B which want to communicate with each other.
Let us say these two systems are connected to each other through a computer network.
The distance between A and B may only be a few meters or they might be across different continents. If A wants to send some data to B, then the data has to travel through the network to reach B.
During this transfer, the data will have to navigate through many intermediate nodes. To ensure that the data reaches from source. machine A to destination machine B Securely and correctly
we need to have some rules which guide the communication between A and B.
These rules are called Protocols.
Thus for every communication, we need to have some protocols which guide theĀ communication
These protocols are grouped together and called a Communication Model.
The OSI Reference model is one such Communication Model
OSI stands for “Open Systems Interconnection” which means that every system participating in this model is open for communication with other systems.
This model was first defined by an organization called as ISO
The ISO is a standards organization which works on standardization of protocols
The OSI reference model defines the functionality of network communication
The OSI model divides the communication into “7 layers”
Let us now look at each of these layers in detail
- This is how the OSI model looks like At first glance, you might feel this is complicated and hard to remember But hold on to that thought. The OSI model is very easy to remember. All you have to do is remember these 7 layers.
- In our previous example, we said that system A wants to communicate with B over the network This OSI model depicts the same process
- These are the end systems A and B connected by a network The intermediate nodes implement only the bottom 3 layers of communication since their task is to just pass on the data along the navigation path
- The top 4 layers are implemented only by the end systems, but bottom three are implemented by all nodes in the path.
- Every layer has some protocols using which it communicates with the corresponding layer in the other system
- So these lines indicate “Protocols” We call these Application layer protocols, presentation layer protocols, session layer protocols and so on
- Every layer also communicates with the layer above and below it
We say that every layer provides some “Service” to the layer above it
So Protocols work between same layers of different machines, whereas Services work with different layers within the same machine
Now let us see what each of these layers do
OSI Model layer
- At the top is the Application Layer: This is the layer at which users communicate with the systems, This layer provides some protocols using which applications can communicate with each other and example of Application layer protocols is the FTP protocol
Next is the presentation layer
- This layer is concerned with the format of data exchanged between the end systems example if the integer format in system A is 32 bits long and in a system, B is 64 bits long then appropriate conversions have to be done This is done by the presentation layer
- Session layer allows users on different machines to create sessions between an application creates different transport streams. session layer can bind all these different
streams belonging to the same application For example, if you are doing a video chat then session layer combines the audio stream with the video stream - Transport layer receives the data from a session layer and divides it into smaller units called as “Messages” These messages are passed on to network layer On the receiving end, it makes sure these messages are accepted and arranged in correct order The messages merged and passed on upper layers
- Network layer breaks a message into “Packets” and transmits them across the network It is a responsibility of the network layer to make sure the packets reach the correct destination. This feature is called as Routing This is implemented on every node in the network. A Node here can be computers, switches, routers etc
- The data link layer is concerned with the transmission of error-free data It breaks the packets into smaller units called as Frames. These frames are passed on to a physical layer for transmission On receiving end it collects raw bytes from the physical layer and aggregates it into frames. Data Encoding, Framing, Error Detection and Correction techniques are all applied here
- The bottom layer is the physical layer.which is concerned with the transmission of raw bits over the communication link
- So this how the OSI Reference Model works
So now let’s do a quick recap
- Application Layer is where the users interact with applications to provide data
- Presentation Layer is concerned with the format of data exchanged between the end systems
- Session Layer allows users on different machines to create sessions between them
- Transport Layer is concerned with end to end communication of messages
- Network Layer is concerned with a routing of packets to the correct destination
- Data Link Layer is concerned with the transmission of error-free data in the form of Frames
- Physical Layer is concerned about transmission of raw bits over the communication link