At Which Osi Layer Does Class Of Service (Cos) Occur
In this article, you volition acquire most the core concepts of the Open up Systems Interconnections (OSI) model in a simple and easy way.
As a programmer, it'south a skilful thought to learn how things work "under the hood". That fashion you sympathise what your code and the tools you use are actually doing.
Just it might seem easier to rely on black box abstraction and ignore the inner workings.
A popular blackness box brainchild is the internet.
Sure, many of us probably know the nuts of what the internet is and how it works. In that location is a client and a server and they merely "communicate" with each other using something chosen HTTP or HTTPS?
But that'southward the extent of most people'due south noesis.
I'thousand not saying we shouldn't employ abstractions – I'm simply saying that we should have some basic idea nearly how things work.
This is why I'm writing this commodity: to demystify this blackness box to help you lot learn how computers communicate with each other over a network.
What is the OSI Model?
The Open Systems Interconnection or OSI model is substantially a reference system that lays out how computers communicate with each other over a network.
Information technology was created in 1983 by representatives of telecom companies and officially standardized in 1984 by the International Organization for Standardization (ISO).
Information technology is divided into seven layers. Each layer has its own domain and receives information from the previous layer, while passing data to the side by side layer.
The seven layers are:
- Awarding Layer
- Presentation Layer
- Session Layer
- Transport Layer
- Network Layer
- Information Link Layer
- Physical Layer
If nosotros think of it in coding terms, each layer is a form with some core functionality, and each class communicates with only the form above or below it.
Keep in mind that this is a reference model, meaning that we don't actually use it in existent life. There is another model which is very similar to the OSI model but information technology encapsulates the first three layers and the last two.
This "real life" model is called the TCP/IP Model which is what the net runs on.
Merely before we bound in and deal with each layer one by one, permit's get over why should you lot learn the OSI model if it's not fifty-fifty used in real life.
Why Learn the OSI Model
During the past 20 years or so, the world has dramatically changed.
The cyberspace came, the "web" came, and within the web ecosystem lots of things have changed. We started with simple HTML pages, then came JavaScript, and now nosotros have all these frameworks and it sometimes feels so overwhelming.
But, y'all gotta retrieve this:
Learn the fundamentals, larn from commencement principles.
Permit's take the web, for example, bated from all these changes we take seen during the past twenty years.
How the web works hasn't actually change much.
We still use the HTTP protocol.
It's true that the HTTP protocol has been updated, merely not and then much.
Even if we break downwardly HTTP, it's fabricated from TCP which also hasn't changed much.
My point is that you lot should stop looking at the shiny new things and focus on the fundamentals that these shiny new things are built upon.
For example, I remember when web sockets was a popular thing.
But if nosotros interruption information technology down, they're based on the TCP protocol.
If yous know TCP, you can easily understand how web sockets work and don't have to rely on blackness box abstractions.
I hope I've convinced on why yous should learn from first principles. This not merely applies to software applied science only to many other fields, too.
With that done, let's go over the seven layers of the OSI model.
The Vii Layers of the OSI Model
Awarding Layer
The application layer is where most software engineers work. And this is where your browsers lives.
But I'g not talking about concrete applications such as Chrome, Skype, or Outlook.
I'm talking more key things, such as protocols.
For case:
- Your browser makes a request to a web server using the HTTP protocol.
- Your email app uses the SMTP protocol to send and receive emails.
- Without the DNS protocol, you would have to type 142.250.150.138 instead of google.com.
In a nutshell, the awarding layer handles the foundation that about all end user applications utilize.
Presentation Layer
Once the client makes the HTTP asking, the request itself get's passed down to the presentation layer (likewise chosen syntax layer).
This layer handles three main functionalities:
Encryption and Decryption
You don't desire your information out in public, which is why smart people created the Transport Layer Security (TLS). It substantially encrypts your information.
It's also responsible for decrypting requests coming from other servers to be consumed past the application layer.
Serialization and Deserialization
These are some big words, only what they essentially mean is "translation".
We want to "translate" our data to forms that our awarding understands.
For example, elementary information structures may exist translated into "objects" that our JavaScript application understands.
On the other hand, if we want our data to laissez passer down the layer, we would interpret our object into simple information structures that could be understood in the lower layers.
Pinch
This is a no-brainer: the fewer $.25 there are to transport, the faster the request will be.
This is also 1 of the main functions of the presentation layer. Keep in heed this is a lossless pinch meaning no information volition be lost in the procedure.
Well to be off-white, in the real world almost of these things are done in the application layer.
This is why in the TCP/IP model the presentation layer is office of the application layer.
Session Layer
This one is a bit disruptive. And in fact, I couldn't find many use cases for it.
The chief part of the session layer is to manage connections between client and server.
Simply what does that really mean?
And so let's say you want to go to google.com
To do that you first take to establish a connection with google.com, so y'all say "Hey server, what'southward up, I want to connect to google.com".
The server responds dorsum: "Yeah, sure."
Congratulations, y'all take just established a connection with google.com'south server and can freely send a GET request to fetch the page.
Long story short, this layer is used for:
- Opening connections
- Keeping connections alive
- Closing connections.
Now comes the reality bank check: in existent life this pretty much does not exist and is part of the Ship Layer – which we'll talk over next.
Transport Layer
This is where the interesting stuff happens.
The transport layer is usually defined based on the protocol that'southward being used.
The 2 most popular ones are:
- Manual Control Protocol (TCP)
- User Datagram Protocol (UDP)
TCP is i of the master protocols in the internet suite. Information technology is used on top of the IP (internet protocol) to ensure reliable transmission of packets.
TCP fixes many issues that arise when you use IP such every bit lost packets, out of order packets, duplicate packets, and corrupted packets.
You lot would utilize TCP in applications that require all packets to be error-complimentary such as text messaging.
On the other mitt UDP is stateless, pregnant it doesn't save any state between the client and server It is also very low-cal making information technology fast. But the downside is that it's non reliable, packets can get missing, get corrupted, and and then on.
UDP is mostly used when you don't actually care if you lose a few packets here and there, such as video streaming.
Also continue in heed that the information in this layer are called segments.
Long story short, TCP is reliable but slow, while UDP is unreliable but fast.
Network Layer
I don't really know why this is called the network layer.
It should be called the internet layer – because the near important protocol hither is the Internet Protocol (IP)
What the IP basically does is it takes the segments from the transport protocol, and adds meta-data that helps identify where your client is in a local network.
Another function of the network layer is bulletin forwarding, meaning that it sends your packets from network to network.
Data in this layer are called packets.
Data-Link Layer
This layer defines how data is transmitted betwixt ii systems.
It takes care of things such as how long two systems talk to each other, how much data can exist sent, and what happens if there are any errors. All this is handled in the Data Link layer.
The data link layer is cleaved upwards to two sub-layers:
- Logical Link Layer (LLC) – This layer provides flow control, acquittance, and error handling in instance things go wrong.
- Media Access Command (MAC) – This layer is responsible for assigning a unique id number based on your network card called a MAC address. Meaning no two devices have the same MAC addresses.
Packets are taken from the network layer, and are encapsulated with the addition of new headers for the MAC address of the client and server.
There is likewise another subset of information added at the end of the bundle which is used for error detection. This is called the tail.
In one case these meta-data are added, the information is now called a frame.
Concrete Layer
Finally this is the physical layer.
Don't go dislocated with the word physical – nosotros are not only talking about wires.
Data can go transferred in many unlike means such equally radio waves or fifty-fifty calorie-free.
Unfortunately these ways of transportation do not know "frames", they only know bits.
The function of this layer is to merely transform frames into bytes (8 bits) and send them over some transport method (electricity, waves, light, and so on).
Finally our request will get transmitted to the server, and the server volition get through the same procedure but in reverse.
Conclusion
In this commodity, you learned:
- That the OSI Model is a reference model on how ii systems talk to each other over a network.
- Nosotros don't use this model in real life. Instead, we utilize another similar model called the TCP/IP model.
- The OSI manner is fabricated upwards of seven parts, each with a specific function.
I hope you learned something today, and would like to thank you for reaching the end.
I plan to mail snippets of content similar to this on Twitter, and then if yous're interested follow me @tamerlan_dev.
Learn to code for free. freeCodeCamp'due south open source curriculum has helped more than twoscore,000 people get jobs as developers. Get started
Source: https://www.freecodecamp.org/news/osi-model-computer-networking-for-beginners/
Posted by: hickstung1962.blogspot.com

0 Response to "At Which Osi Layer Does Class Of Service (Cos) Occur"
Post a Comment