Day 7 CN-OSI Model #100DaysofHacking

Ayush Verma
InfoSec Write-ups
Published in
4 min readJan 9, 2022

--

Day1 : Installing Kali Linux

Day 2: Navigating Linux

Day3: Computer Networking

Day4: Network Topologies

Day5: Subnetting

Day6: ARP and DHCP

Github: 100DaysofHacking

Hello Everyone, This is Ayush if you haven’t read the previous blog then please read it by clicking on above link in which we have discussed important concepts which is necessary for further blogs.

Till now we have seen many concepts about networking now today we are gonna talk about OSI Model which is very important topic in networking, so let’s start.

OSI Model:

OSI stands for Open System Interconnection, which was published in 1984 by ISO (International Organization for Standardization).

Now question is why this model came in role, the reason behind this was at the time when internet was came in picture then many vendors/companies were creating their own rules for devices for communicating on network so no single rule was followed by each device, that’s why OSI Model came in role and then every devices started working on this model.

All the devices follow this model to send and receive data between each other.

This model has 7 layers and at every layer some processing and some pieces of information is added, so let’s begin with first layer.

7 Layers of OSI:

Application Layer:

This layer is seventh layer in the OSI model in which it provides the interface for the end user or you can say whoever use the application, suppose you want to open a webpage like example.com/index.html then for this we use a browser to open it, so here we are using graphical user interface to interact with particular webpage.

At this layer some data is generated and then it is sent to the below layer.

Presentation Layer:

This is the second last layer means 6th layer of OSI model in this layer it receives the data from the application layer and then that data is encrypted, formatted and compressed and send further in lower layers.

Also in other words , presentation layer works as a translator. When receiving data from the Application layer, it converts that data in such a format that can be sent over the network or that can be understood by the lower layers.

Session Layer:

This is the fifth layer of OSI model , it is responsible for maintaining the session between source and destination. In this layer integrity of data is maintained.

Transport Layer:

This is the fourth layer of OSI model, this layer is responsible for delivery and transportation of data from source device to destination device.

At the layer source port address and destination port address is maintained and the generated data is called segment.

Port is nothing but a service in our computer which is used to distinguish different services/application running on pc , for example in your pc at the same time you have opened different application like chrome, skype, youtube etc so how your router or any device through which you are connected is going to distinguish which data is for which service/application, that’s why port numbers are important to distinguish between different applications. It is 65535 ports are there.

Learn more about ports here.

Network Layer:

This is the third layer of OSI model , it receives the segment from transport layer and then source IP and Destination IP address is added and then generated data is called packet.

Adding source and destination IP address is also called IP addressing.

Data Link Layer:

This is the second layer of OSI model, it receives the packet from network layer and then at this layer source mac address and destination mac address(Here MAC address of immediate router is added means closest router.) is added and then generated data is called frames and also at this layer frames are converted into 0s and 1s.

Add source and destination mac address is called MAC addressing.

Physical Layer:

This is the last layer of OSI model which is responsible for transmitting bits over a medium(Wired or Wireless).

This was all about OSI model , in the above image you can see what different protocols are used in different layer.

Now after OSI Model , there is also on other model which is TCP/IP, in this all layers are same except Application layer and Data Link and Physical layer.

In the above image you can see Data Link and Physical are merged in one and above three is merged in one.

To read more about TCP/IP click here.

Now I hope both OSI and TCP/IP is clear to you.

Thank you for your time for reading this, if you have any doubt then please respond on this blog , will meet in next one !

Thank You and Happy Hacking !

--

--

Hello eveyone , this is Ayush from India and I'm pursuing engineering in computer science and working towards my cybersecurity journey .