Nowadays people around the globe uses the Internet as part of the routine life. From texting, playing games, watching movies to using Internet Banking or even Hacking. But little do they know how the Internet works. Today I introduce you readers about the fundamental model which runs the Internet.
I) OSI Model:
To write out the definition of OSI (Open Systems Interconnection) model is somewhat nuisance. Instead, I will present an example in details about how we login onto Facebook using the OSI Model.
The OSI model consists of 7 layers.
7) Application Layer:
We use our Browser like Google Chrome or Firefox, or Safari (or whatever) to fill in the box: username and password and press enter. Since we are using an Application (Browser and Facebook), this step is actually in the Application Layer. After the user press enter, Layer 7 will pass the information we provided to Layer 6 (Presentation).
6) Presentation Layer:
Different Website generates different format to the Presentation Layer. For e.g: when you login to something, Layer 6 will receive username and password; but when you press a Like button on Facebook or when you chat with somebody, Layer 6 receives another information. The Presentation Layer will translate the format from the Layer 7 to the Network Format, and after that, it pass down the Network Format Information to Layer 5 (Session).
5) Session Layer:
When the User wants to “talk” with the Server (like “I want to login to Facebook, here is my username and password”). Session will start connecting between the User and the Server while handling different configurations like: how long should the server wait for a response, and after the “talk” ends, terminates the Session.
4) Transport Layer:
This layer will determine what protocol to use, and the best known protocols are TCP and UDP.
- TCP (Transmission Control Protocol): is used in transferring files, chatting, logging in, etc… things which involved in having the “best performance as possible”. You do not want your file when exchanging over Internet to be corrupted, right?
- UDP (User Datagram Protocol): on the other hand, UDP does not need to have the best reliability. We often seen using UDP in scenarios where we need real-time application. Like when you are on a Video Call, you do not need your video to be perfect but you need it as real-time as possible.
The Transport Layer also deals with :
- Deriving the Packet which was received from the Session Layer to multiple small Packets (it is hard to deliver the whole packets over the Internet because it may got corrupted along the way)
- What is the Maximum number of Bytes per packet.
3) Network Layer:
This layer handles everything involving the IP Address: the best route to go for your “login Facebook” packets to go, or receive packets from the right person (the Server should receive the packet from you).
2) Data Link Layer:
After receiving the route from the Network Layer, like: A -> B -> C -> D -> E -> F (Facebook). The Data Link layer responsible for transmitting Datagram from adjacent nodes, plus handling and fixing error when transmitting between the Nodes.
Furthermore, this layer also provides utilities with MAC Address (will cover later).
1) Physical Layer:
This layer is the hardware part, like electrical stuff and wires, or wifi.
The Server starts receiving the data, and the data will go from the 1st layer to the 7th layer.
- Received using hardware stuffs (electrical signals, wires and stuffs).
- Data Link Layer fixes some error.
- Network Layer verifies the correctness of the IP Address of the receiver and sender.
- Transport Layer receives a bunch of small packets and responsible for arranging them with the right order (because it knows the connection is TCP or UDP).
- Session Layer takes notes about the “talk” and will terminate the “talk” if it receives some ending signal.
- Translate from the format of the Internet to the format of the Application.
- The Application Facebook receives your username and password and check if it matches in the database and will send packets to User again for the User to login or to decline the User.
The OSI model is somewhat complicated but thanks to hard efforts of the scientists, we now achieve logging into Facebook with less than 1 second, very amazing.