OSI Reference Model

A user from one country sends request and Google web search engine opens it for you, if net is connected to the PC. Have you ever wondered how all this is happening? NO? Mostly people don’t bother how things are happening around us. But Network Engineers do care about how communication is happening between two devices. And the best answer is “Understand OSI Reference Model”.
Let’s suppose we have small network and PC wants to communicate with Server.
11PC wants to send request to server and server in return will send a reply to PC and as a result web browser or requested page will be opened on PC. How all this is happening, within seconds? Aren’t you surprised??
So, now let’s try to understand how request is send and how server replies back to PC.

Open System Interconnection reference Model abbreviated as OSI Reference Model, is the most important and basic concept for understanding networking. Ok, first random question, why is it called OPEN? What is meant by Open? It is called as Open because it is not fixed or specified for a single community, enterprise, country or group of people. It is publicly used as a standard for whole world and every person, community, country uses this model for communication with others. It is a standard for all brands, devices and vendors.

OSI model is a layered approach used for understanding the network. This model is so similar to Human body as human body is also layered approach. Now, can you tell me why layered approach is used? What are the benefits of using layered approach instead of single layer approach? I want you to figure this out and comment your answers!

OSI Reference Model has seven layers: fig002
7- Application Layer
6- Presentation Layer
5- Session Layer
4- Transport Layer
3- Network Layer
2- Data Link Layer
1- Physical Layer

Application Layer:

Also known as Layer 7 of OSI reference model. There are two kinds of applications: Computer Applications and Network applications. Computer applications don’t require any Internet connections because they don’t have to communicate with other device. But Network Applications are those who want Internet and which have to communicate with other devices in order to perform their task. So, running an application, its software and front-end, all these tasks are done on Application Layer. In order to start communication, you are required to open a network application like, Skype, web browser, Viber, MSN Messenger etc.

Presentation Layer:

Layer 6 of OSI Reference Model. After starting an application, application will perform its tasks only when your device will be able to read it. In other words, your device will complete the tasks of applications only if application is readable to it. So, we can say that presentation layer act as a translator i.e. it converts application data to machine language.

Computer Applications only require these two layers in order to complete their task. But if there is Network application then it will go to next layers in order to complete its tasks.

Session Layer:

This is called as the Layer 5 of OSI Reference Model. This is the most conceptual layer of OSI Model. The most important task of this layer is to create virtual sessions to check whether the destination device is ready or available for connection or not.

There are two types of sessions: Physical Session and Virtual Session. For physical session, resources like cables, money, body are required. Whereas for virtual session, no such resource is required. For example, you wan to visit your brother in another city. First you make a call and confirm that he is available and then you arrange your visit. This technique of making a call and confirming the availability of your brother is called as virtual session. Whereas moving from your city to your brother’s place is called as physical session.

Session layer’s task is same as asking your brother on call. This layer checks the availability of other host and creates a session in order to transfer the data. Talking about our body, our eye act as session layer. Eye checks the availability and presence of things without any physical movement.

Transport Layer:

After creating a virtual session, Host device now knows that destination device is active and is ready to receive the package. After session layer, transport layer become active and transports the data to the machine. What if virtual session is not created? What if other device is  not active? If other device is not available then package stops at session layer and host is notified that destination device is not available.

Now, the point is how data is transferred to the other device by transport layer or how transport layer works? The main important task of this layer is to divide the data into smaller segments. Now, what is the purpose of dividing the data? There are two important reasons why segmentation is important:

1- If some data is lost in between transportation then, segmentation makes troubleshooting easy.

2- Lets suppose our data is of 10 GB but the medium is capable of transferring only 10 MB then data could not pass through that medium. Here, segmentation is very important, dividing the data into segments of size <10 MB so that data can easily pass through that medium.

After segmentation, data is transfered to the other device and here, the task of transport layer is completed.

Considering our body as layered structure and similar to OSI Model, our Mouth acts as transport layer. Chewing food is segmentation and then transferring it. Chewing is done in order to divide the food into small pieces so that it can pass through esophagus( food pipe in throat).

Network Layer:

Network layer, as the name shows, is considered as the most important layer in OSI Reference Model. This layer is also called as Layer 3 of OSI Reference Model. Starting it by giving you an example from our layered body structure, all the organs inside our body that are not visible to us are called as parts of network layer. Similarly, After leaving the host and before reaching the destination, everything is hidden and considered as part of Network Layer.

There are many network devices as discussed in Previous Post. Router is considered as the Layer 3 device. I hope so, you all know that Post Office is the place where all the Letters are sorted and then further distributed in specified regions. Similarly, Layer 3 (Network Layer) acts as a Post office and consider data as a single letter. Every segment from every device connected to the router are sent to router for further process. Then it comes the router’s duty to sort the data according to regions and distribute them to specific regions.

Now, question arises, how data is sorted?  Before Answering this question, I will recommend please read this post about IP addressing. Every destination IP Address has two parts, network address and Host Address. Router sorts the data on the basis of Network addresses and then further transfer it to the destined network.

In short, sorting the data on the basis of Network addresses and then distributing them to the destined network is done by Network Layer. Consider an example of Human stomach. Mouth acts as a Transport layer by dividing the food into segments and then stomach sort the food and distribute it in different organs. So, stomach acts as a Network layer.

Data Link Layer:

The data link layer or layer 2 is the second layer of the seven-layer OSI Model of computer networking. This layer is the protocol layer that transfers data between adjacent network nodes in a WAN or between nodes on the same LAN. The data link layer provides the functional and procedural means to transfer data between network entities and might provide the means to detect and possibly correct errors that may occur in the physical layer.

The data link layer is concerned with local delivery of frames between devices on the same LAN. Data-link frames, as these protocol data units are called, do not cross the boundaries of a local network. Inter-network routing and global addressing are higher-layer functions, allowing data-link protocols to focus on local delivery, addressing, and media arbitration. This way, the data link layer is analogous to a neighborhood traffic cop; it endeavors to arbitrate between parties contending for access to a medium, without concern for their ultimate destination. When devices attempt to use a medium simultaneously, frame collisions occur. Data-link protocols specify how devices detect and recover from such collisions, and may provide mechanisms to reduce or prevent them.

Examples of data link protocols are ETHERNET for local area networks (multi-node), the Peer-to-Peer(PPP), HDLC and ADCCP for point-to-point (dual-node) connections. In the Internet Protocol Suit (TCP/IP), the data link layer functionality is contained within the link layer, the lowest layer of the descriptive model.

Physical Layer:

As the name tells, Physical layer is responsible for transferring bit by bit from one device to another through some physical means. This layer defines electrical and physical details represented as 0 or a 1. How many pins a network will contain, when the data can be transmitted or not and how the data would be synchronized.

The physical layer defines the means of transmitting raw bits rather than logical data packets over a physical link connecting network nodes. The bit stream may be grouped into code words or symbols and converted to a physical signal that is transmitted over a hardware transmission medium. The physical layer provides an electrical, mechanical, and procedural interface to the transmission medium. The shapes and properties of the electrical connectors, the frequencies to broadcast on, the modulation scheme to use and similar low-level parameters, are specified here.

Overview:

Following two images can be considered as a summary of the whole post. First image describes how data passes from one device to another. This images shows the how headers and in what sequence headers are attached and detached while moving from one device to another.

OSI-model.png

osi_model.png

All of this must have left you scratching your head probably. Don’t worry, you will learn everything soon! I hope, this will be helpful for you!

Please comment, if I missed anything or misstated anything.

Thanks!

 

28 thoughts on “OSI Reference Model

  1. Woah! I’m really digging the template/theme of this site. It’s simple, yet effective. A lot of times it’s very difficult to get that “perfect balance” between user friendliness and visual appeal. I must say you’ve done a very good job with this. In addition, the blog loads extremely fast for me on Safari. Exceptional Blog!|

    Liked by 1 person

  2. Hi there, just became aware of your blog through Google, and found that it is truly informative. I’m gonna watch out for brussels. I’ll be grateful if you continue this in future. Numerous people will be benefited from your writing. Cheers!|

    Liked by 1 person

  3. Great beat ! I would like to apprentice whilst you amend your website, how could i subscribe for a blog web site? The account helped me a acceptable deal. I have been a little bit acquainted of this your broadcast offered bright clear idea|

    Liked by 1 person

  4. Great post. I was checking constantly this blog and I’m impressed! Very helpful information specifically the last part 🙂 I care for such info a lot. I was seeking this particular info for a very long time. Thank you and best of luck.|

    Liked by 1 person

  5. Hi there very nice web site!! Guy .. Excellent .. Wonderful .. I’ll bookmark your site and take the feeds also? I’m happy to find numerous helpful information right here in the submit, we need work out extra strategies on this regard, thanks for sharing. . . . . .|

    Liked by 1 person

  6. Hi there! Someone in my Facebook group shared this website with us so I came to look it over. I’m definitely enjoying the information. I’m bookmarking and will be tweeting this to my followers! Terrific blog and excellent style and design.|

    Liked by 1 person

  7. Having read this I thought it was really enlightening. I appreciate you finding the time and effort to put this informative article together. I once again find myself personally spending a significant amount of time both reading and posting comments. But so what, it was still worthwhile!|

    Liked by 1 person

  8. I would like to thank you for the efforts you’ve put in penning this website. I’m hoping to see the same high-grade blog posts by you later on as well. In truth, your creative writing abilities has inspired me to get my own website now 😉

    Like

Leave a reply to Maple Cancel reply