The OSI Model
The OSI (Open System Interconnection) model is like a recipe for how computers communicate. It’s divided into 7 layers, each with its own job, from sending data to making sure it’s delivered correctly. Imagine it as a delicious cake with layers, where each layer has a specific role in making the cake perfect. The OSI model helps computers work together, just like the layers of a cake work together to make it tasty and complete.
From bottom to top:
- Physical Layer (Layer 1): This is like the foundation of a building. It deals with the actual wires, cables, and hardware, and how bits of data are turned into electrical signals for sending over the network.
- Data Link Layer (Layer 2): Think of this as the structure of a building. It manages how data is organized into frames and sent between devices on the same network, like your home’s Wi-Fi. MAC address is here very important
- Network Layer (Layer 3): This is like the road system that connects different buildings. It deals with routing data between different networks and uses IP addresses to make sure data gets to the right place. This layer ensure that each segment will reach the correct IP. Thanks to routers (and IP) that choose the best path 😉
- Transport Layer (Layer 4): Imagine this as the mailroom in a big office building. It ensures that data is sent reliably and in the right order. It also handles error-checking. TCP and UDP will ensure this. Segmentation (data is segmented/splitted into little segments, each segment has the port number to identify the correct application to send to this data, and it has also the sequence number in order to rebuild the data correctly). Flow control to control to amount of data to transfer.
- Session Layer (Layer 5): Think of this as a friendly conversation between two people. It establishes, maintains, synchronises, and ends connections between devices. In this case between the client and the server: session management, authentication and authorization
- Presentation Layer (Layer 6): This layer is like a translator. It makes sure that the data sent by one device can be understood by another by handling data encryption/decryption and compression. Basically ASCII data is translated into binary format, and then compressed in order to have faster communication, and then encrypted (https).
- Application Layer (Layer 7): This is the (network) software you use, like web browsers or email clients, or Skype, or FTP software, … It provides the interface for you to interact with the network. These applications are “network application”, basically all applications that use network.
Each layer has its own specific job, and they work together like a team to ensure data is sent, received, and understood correctly across a network.