What is the 7 layers of OSI model?
How is it possible to make so many machines communicate? How not to get lost in this maze of information? At this step, we will see this first trying to understand how the Internet was created and what standards were implemented to orchestrate this news ball. Here, you will learn what is the 7 layers of OSI model.
How to communicate?
Imagine being able to communicate anytime, whenever you want, with anyone in the world! This is what the Internet offers us. It is not easy to express yourself when we are a small group of 10 people, difficult when we are 100, and almost impossible when we are 1000. Therefore, the Internet offers to take up the challenge of communicating all together at the same time. Time, whenever we want. Of course, to achieve this feat, it was necessary to create a complex communication system allowing the machines to talk to each other.
But how did this model of communication come to be?
Well, the easiest way is to start with what we already know about communication. And that anyone can do it!
Let's do a little inventory of the means of communication:
- the speech ;
- the phone ;
- the mail ;
- the carrier pigeon;
Let us now try to understand, among these means of communication, what we need to communicate.
For speech, we need:
- an issuer;
- a receiver;
- a transmission medium (air).
It's a bit the same for the telephone except that we need a complementary element, which is the intermediary between speech and electronics. Speech is transformed into electrical signals. They arrive on the receiver side, and then they are again transformed into speech. We know that there is an encapsulation of information.
We find this encapsulation system in the mail, for which we need:
- an issuer;
- a receiver;
- a transmission medium (the letter);
- a container (the envelope);
- An intermediary (the post office).
Thus, we begin to understand what it takes to communicate. Now, will this be applicable to computers? How are we going to all talk at the same time? Will we be able to communicate with the other side of the world instantly?
Later, we will see how the researchers managed to move from the principles of human communication to the principles of communication for computers. They have thus grouped all of their research and results in a standard that people connecting to the Internet will have to meet.
What is OSI MODEL?
The OSI (Open System Interconnection) model was created by the International Organization for Standardization (ISO) as a reference model for open communication through various technical systems. This program makes perfect sense if we take into account the beginnings of the Internet. Indeed, at the end of the 1970s, the main players in new technologies were confronted with the multitude of existing models of machines. Few manufacturers then thought about their networking and hardly cared about their adaptability to each other. The Internet has led to the establishment of compliance standards between computers in order to allow common communication.
The OSI model is the result of an attempt at standardization. It draws a conceptual framework for the design basis of communication standards between different computers.
The OSI model divides the complex process of communication into seven layers. That’s why it is called a layered model. Communication between two systems requires that each layer respect a task. We can cite, for example, the control of communications, the addressing of the target system, or the translation of data packets into physical signals. Yet this model only works if all the systems participating in the communication stick to the rules. We see that the latter are found in protocols that are configured for specific layers or that intervene between layers. However, the ISO reference model is not a concrete network standard. Instead, it describes what processes must be regulated for communication to work over a network in abstract form.
Layers of an OSI model
Communication between the two computers may be trivial. Indeed, when transferring data via a network, it is normal that many actions are controlled and that they meet certain requirements in terms of the trust, security, or even integrity. This practice of dividing communication into layers has since proven its worth. Thus, each layer leads to a domain of well-defined functions. A standard usually covers only part of the layered model. It is built hierarchically. Bypassing through an interface, each layer uses another located below and is, in turn, available to the other layers of the higher level. This principle has two decisive advantages:
- The functions and requirements that must be mastered fulfilled within a layer are clearly defined. The standards for each layer can be developed independently of each other.
- Since the individual layers are clearly separated, changes to one standard have no influence on the processes that work on other layers.
With regard to their tasks, these seven layers of the OSI model are divided into two groups: that oriented application and those oriented communication. These processes that occur at each layer can be understood by the example such as the transfer of an email from a computer to the email server:
The upper layers of the OSI reference model are described as application-oriented layers. They have three names: "application," "presentation," and "session."
- Layer 7 called application: this area of the OSI model has direct contact with applications such as e-mail programs or the browser. This is where the data inputs and outputs take place. The application layer creates the link with the other hardware (or lower) layers of the OSI model and initiates the application functionalities. To prove this point, let's take the example of email forwarding: a user writes a message in his computer's email program. This email is transferred as a data packet in the application layer. At the same time, other information is added to the email data in the form of an application header. We then speak of encapsulation. This header contains, among other things, the information that it is data from an e-mail program. In addition, the protocol defines that the transfer of the email is used on the application layer (in the case of a normally SMTP email).
- Layer 6 is known as presentation: one of the common tasks of network communication is to ensure that data is transmitted in a standard format. The presentation layer presents local programs converted to standard formats. If we take the above example, it is layer six that defines the transferred message's presentation. In addition, the data packet is supplemented with a presentation header. This contains information on the email code, the format of the attachments, and how it is compressed or even encrypted (e.g., SSL / TLS). This is how we see that the target system interprets the format of an email and that it is transmitted accordingly.
- Layer 5 called session: The session layer's central task is the management of the link between the two systems. We then speak of communication-oriented layers. This is where these specific control mechanisms take effect. They are the ones that regulate binding, maintaining connection, and disconnection. Regarding this communication command, other information is added to the email data transmitted via a session header. Most common application protocols such as SMTP or FTP take care of the sessions themselves or are like HTTP independent. The TCP / IP model, which competes with the OSI model, sums up OSI 5, 6, 7 into an application layer. Other standards that act on Layer 5 are NetBIOS, Socks, and RPC.
Four communication-oriented layers follow on from the three application-oriented layers of the OSI model. These four layers are: “transport,” “network,” “link,” and “physical.”
- Layer 4 called transport: the transport layer serves as a link between the application and communication-oriented layers. At this level, the OSI model creates the logical connection or the transmission channel between the communicating systems. In addition, certain information must be added to the data of the email. The data packet that has already been added to the Application Oriented Layer header is supplemented by a Layer 4 transport header. This is where standardized network protocols such as TCP come in. Additionally, ports are defined on the transport layer, where applications are managed on the target system. It is on layer four that the data packet is assigned to a particular application.
- Layer 3 is known as a network: Layer 3 allows data transmission over the Internet and, more particularly, the logical addressing of terminals. A unique IP address is assigned on Layer 3. A network header is added to the data packet that contains information about routing and flow control. Computer systems use Internet standards such as IP, ICMP, X.25, RIP, or even OSPF. As far as email exchanges are concerned, TCP generally intervenes before IP.
- Layer 2 is known as the link: the link layer performs functions such as fault detection, troubleshooting, and flow control and aims to avoid transfer errors. In addition, the data packet, which includes the application, presentation, session, transport, and network headers, is surrounded by a header and a link path. Finally, it is on layer two that the physical addressing takes place.
- Physical layer 1: This is where the bits of a data packet is converted into an appropriate physical signal to a transmission medium. This signal can be transmitted via copper wire, an optical fiber, or in the open air. The transmission medium interface is defined by protocols and standards such as DSL, ISDN, Bluetooth, USB, or Ethernet (both physical layers).
Encapsulation and decapsulation
The data packets pass through each layer of the OSI model, on the sending system, and finally, the target system. All the terminals encountered are configured for layers 1 to 3. The email (above-mentioned example) passes as a physical signal first through the router, before continuing its route on the Web. It is located on layer 3 of the OSI model and, therefore, only processes information from the first three layers. Layers from 4 to 7 are not taken into account. In order to receive access to the necessary information, the router must first decompress the encapsulated data packet. This is called decapsulation. In this case, the layers of the OSI model are executed in reverse order.
First, you need to decode the signal on the physical layer. Next, the Layer 2 MAC addresses and the Layer 3 IP address and routing protocol should be read. With this information, the router is able to make the decision to forward the email. The data packet can then be encapsulated and transmitted based on the information obtained at the next station on the way to the target system. Typically, multiple routers are involved in a data transfer. The described process of decapsulation and encapsulation times out until the data packet arrives as a physical signal to the actual target (e.g., a mail server). The data packet is again decapsulated here by traversing the OSI model layers from layers 1 to 7. The email sent via the messaging client arrives at the server where another client is ready to retrieve it.
Author: Vicki Lezama