In this short article we will discuss the OSI mode and answer: In the osi model what is the primary function of the network layer?
What is the OSI model?
So what is the OSI model? Well it is a theoretical stack of seven layers that could be used as a reference to help understand how networks operate. The model was introduced to standardise networks in a way that allowed multi vendor systems. Prior to this, you would only be able to have a one vendor network because the devices from one vendor couldn’t communicate with others.
We don’t actually use the OSI model. We use something called the TCP IP model. The concepts are exactly the same. The layers are slightly different. So if we don’t use the OSI model, why would we bother learning it? Well that’s because it’s still referenced a lot when troubleshooting or describing network operations.
In the OSI model what is the primary function of the network layer
Let’s take a look at the layers. Starting from the bottom up layer. One is the physical layer.
The physical layer
The physical layer is the lowest layer of the OSI model. Its key responsibility is to carry the data across physical hardware, such as internet at cables. There too is the data link layer at this layer, the physical addresses are added to the data. This is the source and destination Mac addresses. Switches are located at this layer. The network layer handles IP addressing and routing at this stage of the OSI model, the source and destination IP address are added. Routers operate on this layer.
The transport layer
The transport layer of the OSI model adds the transport protocols such as TCP and UDP TCP, for example, is used for error handling and sequencing to ensure no data is lost. This layer also adds the source and destination port numbers
The Session Layer
Next we have layer 5, the session layer. This layer is responsible for establishing and terminating connections between devices. Layer 6 formats the data in a way the receiving application can understand it. This layer is also able to encrypt and decrypt data. If needed.
The application Layer
Next up we have layer 7. This layer is where the application and user communicates. Application specific protocols are used here such as SMTP, f you’re sending an email, for example. A good way to remember these layers is: All People Seem To Need Data Processing: Every letter in APSTNDP stand for the first letter of a different later.
Example of the OSI model and network layer
So to fully understand how this model works, you need to understand a real world example. Let’s say you send an email, the data travels through the OSI model, adding and processing data on each layer. This process is called encapsulation.
Step 1, the application layer: outlook creates the data. The email you wrote, the email addresses, get us ready to send it using SMTP, which is the simple mail transfer protocol.
Step 2, presentation there. The data is formatted in a way the receiving device will understand. In this example, this layer could also encrypt the data if needed.
Step 3, session layer, the receiving mail server is started.
Step 4, transport. This is where it decides to use TCP or UDP. In this case, we’ll use TCP to make sure every packet gets delivered. Also the source and destination port is added to the data.
Step 5, network. The IP address of the mouse server is added as the destination and the source IP address is also added to the data.
Step 6 is the data link, the Mac address of the router and the source Mac address of the host is added to the data.
Step 7, physical the data is sent out on the network using ethernet. So when the data reaches the other side, the receiving device will process the data in the same way, but in reverse, starting from the bottom up.
Trouble shooting with the OSI model
Okay. So that’s the OSI model, but how can we use this to troubleshoot? Maybe you have heared, oh, that’s a layer two problem. When you hear that, that’s people referring to this model! Let’s say there’s a problem with the network, If we go through this model, checking every layer, we can diagnose the problem.
For example, layer one: are all the cables plugged in? Is the network card functioning?
Could it be a fault with cable?
Layer 2: maybe the switch has gone bad?
Layer 3, Do I have the right IP address?
This maked the OSI model a useful tool for communication about the status and diagnoses.