The OSI Model
The Open Systems Interconnection model, or OSI model, breaks down how information and requests are sent from one computer to another, starting at the user making a request and ending at that information traveling over some transmission medium. Each layer’s duty is to make sure that information is being passed correctly between the layers above and below it, and if all the layers are doing their jobs, you computer will be able to communicate with others.
Application Layer
When looking over the model, it’s best to start with the Application layer, as this is where requests will start, and where response will end. This is the layer that user will be interacting with directly, maybe by way of an internet browser, streaming a video on your TV, or playing a video game online. The user will be making requests at this point, and the Application layer’s job is to take the user’s requests and pass them on to the Presentation layer.
Presentation Layer
The Presentation layer is where the user’s request is first turned into a more network friendly form, and on the receiving end, where network data is turned into something your application will be using. This is also the layer where most encryption and decryption will occur. It’s not fancy layer, but it’s needed for preparing information between the Application layer and the Session layer.
Session Layer
This layer may sound a bit more familiar if you’ve ever heard of an application creating a “session” with another computer, maybe in terms of a video call, a chat relay, or anything where two users are establishing a more direct connection to each other. The Session layer will be handling things like authorization and authentication, as well as determining how long to wait for responses and making sure connection between two users is kept open long enough information to be sent through, and then properly closed when they are done.
Transport Layer
The Transport layer is concerned with how the data being sent from the Session layer is being handled. This layer is also where Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) are in play. The goal is to break up data into packets of appropriate size, send them at an appropriate rate, and if you’re using TCP, waiting for verification that the packets are being received and in the right order.
Network Layer
The Network layer works with routing the packets from the Transport layer to the their correct destination. It’s at this layer where Internet Protocol (IP) addresses will be used, and as we get closer to the Physical layer, this layer is likely taking place outside of your computer and inside of your router. Network layer will first be looking for its destination, and then hopefully, looking for the best path to the that destination as well.
Data Link Layer
The Data Link layer is going to taking packets and breaking them down into frames for the Physical layer to use. It also handles error corrections on the Physical layer, and will also accommodate whatever transmission medium the Physical layer is using.
Physical Layer
The Physical layer is the actual, physical components that the information will be traveling over to reach its destination. This can range from cabled connections like Ethernet and fiber cables, to wireless connections like WiFi. At this point, the information is broken into bits as it is sent from one physical port to another.
Now Do It All Again In Reverse!
Once the user’s information is sent out over the Physical layer, it will be received by the Physical layer of the other user, and set back down the layers until it gets back to the Application layer. Each layer has basically two jobs: putting data together for a layer, and then taking that data part from that same layer. So, on the receiving end, bits will be received, turned into frames, then into packets, decrypted, and then given to the Application layer.
References:
https://www.cloudflare.com/learning/ddos/glossary/open-systems-interconnection-model-osi/
Thumbnail from here: