What is the OSI model?
OSI stands for Open Systems interconnection. It is a conceptual framework that standardizes how data moves through a network. Think of it as a set of guidelines that all networking devices follow to ensure they can communicate properly, regardless of who manufactured the device or what type of network it’s on.
The OSI model breaks down data communication into seven layers, each resposible for a specific function. These layers work together lika a relay race, passing the data from one layer to the next, until it reaches it’s final destination. Each layer focuses solely on its own task, which makes communication more organized, standardized, and reliable.
Why do we need this model?
If we tried to build a computer network from scratch with every device using its own language and communication methods, the result would be complete chaos. The OSI model standardizes communication so that every device “speaks” the same language at every layer. This is why our smartphones can seamlessly access a website hosted on a server in a completely different country.
The Seven Layers:

Layer 1:
This is the physical layer, and it deals with the actual, tangible components. For example: cables, connectors, wireless signals etc. It is basically the layer that connects raw data into electrical signals or radio waves that can be transmitted over a network.
Here you’ll find things like Ethernet cables, fiber-optic lines, and Wi-Fi signals. The physical layer is focused solely on moving bits (1s and 0s) from one device to another. This layer doesn’t care about what the data means, it solely makes sure to get the data from point A to point B.
Example: A practical example is choosing the correct cable for a network. Some cables may not support the required speed or bandwidth, which can affect performance. At this layer, it’s all about the hardware and the signal quality needed for reliable transmission.
Layer 2:
Layer two is called the Data Link Layer. This layer is all about creating a direct link between two devices on the same network. Think of it as a layer that makes sure that your messages aren’t corrupted in transmit. It is responsible for error detection and correction, ensuring the data being sent is exactly whats received. The Data Link layer is divided into two sub-layers; Media access control (MAC) and Logical link control (LLC). The MAC sublayer, maneges how devices on the same network segment access the network, while the LLC ensures the data is sent and received correctly.
Example: Imagine you want to send a message to a friend across the room. The Data Link Layer makes sure your message doesn’t get mixed up with anyone else’s. It’s like having a dedicated line to your friend so only they hear what you’re saying, even though many conversations are happening around you at the same time.
Layer 3:
This layer is called the Network layer, and it handles routing, deciding where your data needs to go, and figuring out the best path to get it there. It’s like the GPS of the network, ensuring your data takes the fastest and most efficient route to its destination. The most known protocol at this layer is “IP”, as in “IP Address”. Every devise on a network needs an IP Address to send an receive data. The network layer breaks data into packets, adresses said packets and routes them to their destination. If necessary it fragments and reassemble them along the way.
Example: When you upload or send a very large file online, it’s often split into smaller chunks that travel separately across the network. Layer three is responsible for guiding all those pieces to the correct destination and ensuring they can be put back together in the proper order once they arrive.
Layer 4:
Layer four is called the Transport layer, and revolves around reliability. This layer is responsible for breaking data into segments, ensuring those segments are sent in the right order, and reassembling them at the destination. This is where protocols like TCP and UDP take effect.
TCP (Transmission Control Protocol) ensures that every segment reaches its destination correctly. If something goes missing or arrives damaged, TCP will request it again until the full message is complete. Think of it like mailing a package and getting a confirmation that it was delivered safely.
UDP (User Datagram Protocol) is quicker because it skips the confirmation process. It sends data without checking whether each piece arrives, making it ideal for situations like video or audio streaming, where smooth, fast delivery is more important than perfect accuracy.
Layer 5:
Layer five is called the Session Layer, and its role is to manage the communication sessions between devices. When two devices want to exchange data, this layer sets up the connection, keeps it active during the exchange, and then closes it once the communication is finished.
Example: Imagine you’re on a video call and it suddenly drops in the middle of a conversation. That interruption is related to the session layer, which is responsible for keeping the connection stable so data can flow smoothly. If the session is disrupted, this layer either restores it or properly ends the connection.
Layer 6:
This layer is called the Presentation layer. This is where data gets translated, compressed or encrypted. You can think of it as the “translator” of the OSI model. It makes sure that the data sent from one device is in a format that the receiving device can understand. This includes handling data formatting, converting file types, or applying encryption for secure communication. Whether this is converting a JPEG image into a format that your web-browser can display, or encrypting data for secure communication. it ensures that no matter what format the data starts in, its properly presented at the other end.
Example: Have you ever downloaded a file, only to find it opens in the wrong program? That’s an issue at the presentation layer, because the data wasn’t converted into a format your system could properly understand.
Layer 7:
Layer seven is called the Application Layer. This is the layer closest to the user and is what you interact with directly. It includes web browsers, email clients, and file transfer programs. The Application Layer doesn’t refer to the programs themselves, but to the protocols that enable these applications to communicate over a network (for example, HTTP, FTP, and SMTP). Its role is to make sure that the data generated by an application on your device successfully reaches the corresponding application on the receiving device.
