In the OSI model what is the primary function of the network layer?

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.

OSI-Model-laywers-explained-primary-function
The 7 layers in the OSI model.

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.

Types of USB cables, connectors and more

Lets discuss USB port cables and connectors. Everybody needs them and there are quite a few on the market. In this article I discuss the different types of USB cables and functionality.

Types of USB cables basics

Now USB stands for a universal serial bus. The USB is the standard that is used to connect peripherals to a computer. This is by far the most commonly used port. And the reason why it’s so commonly used is because just like its name suggests, it’s universal.

A USB port is used to connect many different kinds of devices, such as keyboards, mice cameras, printers, scanners, external hard drives flash drives, and they can even do networking and so much more. And it’s also used to charge devices such as cell phones and desktops on laptops.

How and why USB ports came to be

There are several USB ports. Now the goal of the development of the USB was to make connecting devices to a computer much easier. And this is done by first making one standard connector, therefore eliminating all the other different kinds of connectors.

And second, by making connected devices, easier to configure and lastely to provide fast transfer rates. The USB port is also hot swappable. So devices can be connected or disconnected without turning off the computer or the device. The self configures, which eliminates the need for any extensive configuration or no configuration at all. And in addition to connecting to a computer, certain smaller devices can be powered by the USB port without the need for additional power cables.

The first USB version was released in 1996, starting with USB 1.0 and had later versions released throughout the years. USB 1.0, had a transfer speed of 1.5 megabits per second.

A closeup shot of a person holding a USB cable

Two years later in 1998, the USB 1.1 was released and this had a transfer speed of 12 megabits per second. Then in a 2000, USB 2.0, which is also known as the high speed USB was released. And this had a significant speed upgrade from USB 1.1 with speeds of 480 megabits per second. In 2008 USB 3.0 was released, and this was known as super speed. USB USB 3.0 boosts speeds of five gigabits per second. The high speed increase was meant for transferring large amounts of data such as backing up to external hard drives.

Now subsequent releases of USB 3.0 was later released the USB 3.1 was released in 2013. And this is also known as super speed. Also USB 3.1 had a transfer rate of 10 gigabits per second, which is double of USB 3.0 then soon after USB 3.2 was released, which had a transfer rate of 20 gigabits per second. In 2019 USB before was announced. And this has a transfer rate of 40 gigabits per second.

Different types of USB ports

In addition to the different speeds of USB, there are also different types of USB cables, connectors, and ports. USB cables will typically have two different connectors on each end of a cable. They will have either a type, a type B or type C with the type a connector on one end and BNC type connectors. On the other end the type a connector is the host connector. This is a standard rectangular plug that you would plug into a computer and computers will have several type a USB ports. And even though this is the oldest connect or type, it is still being used today.

Type B connectors

You might find different types of connectors such as the type B connector. The type B connector is a square design with beveled corners on top. This is also an older connector, but it’s still being used today. This type of connector is what you would plug into most printers today, but it’s also used on other devices such as external hard drives and USB microphones.

There is also the mini B. And just like its name says it’s smaller than the regular B connector. The mini B is used on smaller devices, such as older smartphones and digital cameras, but it’s being phased out in favor of even smaller connectors. And that brings us to the micro B USB connector. The micro B is approximately the same width as the mini B, but it’s about half the thickness, which enables it to plug into even smaller and thinner devices it’s made to connect to modern smartphones, modern digital cameras, MP3 players. The microbiome came out in 2007.

USB type 3.0

The USB 3.0 type B connector, has nine pins compared to four pins in the previous versions. And this allows for a higher transfer speeds and to supply power to a peripheral, not to make room for the pins, the type B3 0.0 is larger and has a different shape than the 2.0 versions. So the type B3 0.0 connector will not fit into devices that are made for USB one and 2.0 because of its larger size.

USB 3.0 micro

Next we have the USB 3.0 Micro B. And this connector is just as thin as the 2.0 version, but it’s wider. It’s basically a USB 2.0 micro B connector, but with five additional pins that are stacked on the side of the connector, which doubles the width of a 2.0 micro B. This connector is used to carry data and supply power to devices such as modern, external hard drives.

USB C

The USB-C was developed in 2014. Now this is a thin connector with rounded edges and it has 24 pins and it easily plugs into a port because it doesn’t have an up and down orientation today. The USB C can be found on modern smartphones, external hard drives tablets and modern desktop and laptop computers. In fact, it’s even used to charge larger devices such as modern laptops.

Now, as I stated earlier, typically USB cables will have different connectors on each end with the type A at one end and a different type on the other. However, a standard USB type C cable will have the same connector on each end because a type C can be connected to a host, meaning a computer at one end and connected to another device on the other end. So this makes a type C cable convenient because you don’t have to figure out which end goes where, they are the same.

This counts for a typical USB C cable but, you will still find USB cables with type A at one end and type C on the other end.

Now USB ports are color coded, which determines what version they are. NAs I mentioned earlier, a computer will have several USB ports and we’ll typically have different versions. And that is determined by the computer’s motherboard.

Colors of usb ports

A rear input of a dektop motherboard can have several USB ports with different a color. USB 1.0, at 1.1, ports will have a white color. These ports are old, slow and outdated, and you won’t find them on modern motherboards anymore.

USB 2.0, ports will have a black color. And even though they came out in a year, 2000, you will still find them on motherboards today.

USB 3.0, ports will have a blue color USB 3.1 have a teal color. And USB 3.2 ports are red.

There are also ports that are called sleep and charge ports. And this means that they will still supply power. Even if the computer goes into sleep mode, which means you can continually charge a device such as a cell phone, even if the computer goes to sleep, which is convenient, and these ports will either have a red orange or yellow color.