OSI 7 Layers Model

Introduction

When we started this tutorial, the intention was to talk about wireless physical and logical channels. In the course of the explanations, we realized it was necessary to first make an introduction for beginners, or even a brief review for those who already know: The Layers of the OSI Reference Model.

image

The Reference OSI layers Model (from now weโ€™ll just call OSI Model for short) is a very common term in Computer Networks and Wireless Systems, and its understanding can be considered as a requirement for those wishing to understand well the subject. Or saying it another way, if you fully understand the concepts of OSI Layers, the concepts of interoperability and integration between systems will be easier to be understood - youโ€™ll be able to view how a network works through the layers.

Anyway, this is a key issue for all Telecom and IT professionals is highly recommended to understand the concepts involved with the greatest possible clarity.

So come on and talk easily about the OSI layer?

OSI Layers Model

We begin by defining the model. The terms of OSI/ISO Layers are often used.

No! It was not a guy that set up the OSI model.

ISO - International Organization for Standardization. This is also reinforced what we always say here: the advantages that standardization bring to us.

Note: ISO is an organization that aims to standardize also other procedures such as ISO 9000, implemented in processes of enterprises to obtain quality certification.

And the ISO created the OSI model. This model means Open System Interconnection - Open System Interconnection. This model is designed to interconnect computers, but is now applied in several other areas, like wireless. It is set in seven layers, which can be divided or grouped into upper and lower layers.

The goal is clear: to standardize. By standardizing, processes are well defined, and this organization allows for greater productivity and agility - what we always try!

PDU and Protocols

But before we talk specifically about the layers, we must understand why we need them.

And for that, letโ€™s talk a little bit of the packet switched networks, ie networks where small units of data (packets) are sent to a destination address.

In these networks, these units are called PDU - Packet Data Unit, and each of them carries an address.

And whatโ€™s the point? Well, there are several. One is that we have no more need for dedicated connections - per circuit. The connection using packets is more flexible, and this type of packet traffic allowed for example the advent of the Internet!

And how networks communicate?

In cases of people communication to take place, we must both speak the same language. You must also know when to talk and time to listen. Of course it is also possible a communication using different languages (eg between an American - English and Portuguese), but in this case, there must be a translation.

For networks of computers the idea is the same. And the language of networks are called communication or information protocols - set of rules to follow to correct sending and receiving information. An example of protocol that you might be used is the IP protocol!

Communication in packet networks have different protocols used in sequence and in different stages of communication. We will see it soon.

Note: In another opportunity to talk more about Protocols and also about connections and Circuit Packages.

Layering

Okay, so here we go: layers. Why this division?

Stages of communication occur in layers. The division - standardization - was made thinking about it, mainly to facilitate the developments. A person can develop technologies to any layer, without having to worry about the others. Interesting, no?

To begin to familiarize ourselves with them, following its listing: Physical (1), Link (2), Network (3), Transportation (4), Session (5), Presentation (6) and Application (7).

But to explain further, it is easier to first make an analogy.

Imagine the following situation, where William, NY - United States sends a letter to Manuel, in Lisbon, Portugalโ€™s capital.

Letโ€™s start from the transmitter point: William. The first thing that William needs to do is write the letter, along with the Manuel address [7-Application].

William is with his injured hand, and can not write. Then he dictates the contents of the letter to his wife Rose, who writes a letter to Manuel [6-Presentation].

Williamโ€™s wife then put the letter in an envelope, goes to the post, put the letter [Session 5].

Then the postal worker in the United States decides to outsource the service. He asks a third party logistics - Fedex - to carry the envelope, which in turn puts everything in an secure envelope of his Company. [4-Transportation]

The dispatch of the envelope is now on the Logistics company, who decides that the quickest route is to Lisbon Airport - using air. So put the letter in another envelope with your address information, and they take the airline. [3-Network]

Officials of the airline put the envelope in itโ€™s companyโ€™s box on the plane, adding a label with the destination address. [2-Link]

The box with the envelope follows our trip on the plane to Portugal [1-Physics].

Arriving in Portugal, we start the reverse process, ie the reception.

The box is then unloaded from the plane, the envelope is removed from within the same and delivered to an officer who is in charge of directing the envelope to its destination, which is the company Fedex in Lisbon [2-Link].

The delivery of the envelope as we know is with the company Fedex, which verifies that the same should follow for the post office in Lisbon. [3-Network]

An official of the Post Office in Portugal receives the companyโ€™s FedEx envelope, the envelope of removing it, then deliver to the address of Manuel in Lisbon [4-Transportation].

Mary, the wife of Manuel checks the local post office, and receives the original envelope with the letter. [5-Session].

She then read the contents to him [6-Presentation].

Finally, Manuel learns the news of Willian [7-Application].

This was a very simplified example. We do not talk for example of the routers that may occur, eg if you plane scales, being necessary to add and remove new mailing labels. However, I believe it has served to demonstrate the idea.

Also, remember that all analogy is not always perfect, but helps us understand the idea.

Now that we have done our analogy, we will bring the side a bit more technical, and talk a little about each layer.

We will not follow the entire process - starting from seventh to first, and then the other way. Letโ€™s talk at once, taking the road of first layer to last - the seventh.

Note: This description is a long subject, as the description of devices, protocols and aplicatiovs used. Anyway, letโ€™s try to keep a simplified line to describe the layers.

Layer 1 - Physical

The physical layer does not understand anything but bits: The signal comes to it in the form of pulses and is transformed into 0โ€™s and 1โ€™s.

In the case of electrical signals for example, if the signal has a negative voltage, it is identified as 0. And if you have positive voltage, is identified as 1.

In this layer are then defined uses of cables and connectors, as well as the signal type (electrical pulses - coaxial; pulses of light - optical).

Function: receive the data and start the process (or the reverse, enter data and completing the process).

Devices: Cables, Connectors, Hubs, Transceiver (translating between optical and electrical signals - traveling in different cables).

PDU: bits.

Layer 2 - Link

Continuing the flow, the link layer receives data formatted by the physical layer, bits, and treats them, converting the data on your drive to be forwarded to the next layer.

An important concept, the physical address (MAC Address - Media Access Control) is on that layer. The next layer (3-Network) that will address the known IP address, but letโ€™s talk about when discussing it.

Function: link data from one host to another, making it through the protocols defined for each specific means by which data is sent.

Protocols: PPP, Ethernet, FDDI, ATM, Token Ring.

Devices: Switches, Network Card, Interfaces.

PDU: Frame.

Layer 3 - Network

The table then comes to the Network Layer, responsible for data traffic. For this, it has devices that identify the best possible path to follow, and which establish such routes.

This layer takes the physical MAC address (Layer 2-Link) and converts it to the logical address (IP address).

And how is IP address? Well, the IP protocol is a logical address. When the Network layer unit receives the data link layer (Frame remember?) it turns into its own PDU with that logical address, which is used by routers for example - in their routing tables and algorithms - to find the best data paths. This data unit is now called Packet.

Function: addressing, routing and defining the best possible routes.

Protocols: ICMP, IP, IPX, ARP, IPSEC.

Devices: Routers.

PDU: Packet.

Layer 4 - Transport

If all goes well, the packets arrive from layer 3 (Network) with its logical address.

And like any good carrier, the Transport Layer must ensure quality in delivery and receipt of data.

In turn, as in all transportation, it should be managed. For this we have a quality service (QoS - Quality of Service or Quality of Service). This is a very important concept, and is used for example in Erlang B tables, remember? In simple terms, rules and actions are aimed at ensuring quality of service desired, based on error recovery and control of data streams. But letโ€™s not lose focus here, just remember that QoS is in the transport layer.

Function: to deal with all matters of transportation, delivery and receipt of network data, using QoS.

Protocols: TCP, UDP, SPX.

Devices: Routers.

PDU: Now is called a Segment.

NOTE - Lower Layers (Transport) and Upper Layers (Application)

Before talking about the last three layers, it is important to make an observation: It is common to the layers of the OSI model layers are grouped into upper and lower layers, as said before.

The first four layers discussed earlier can be referred to as Transport layers.

And the three layers - weโ€™ll describe now - are known as Application Layer (not to be confused with the last layer - whose name is also Application).

There are some reasonable comments here, just to avoid to keep repeating the description of each of the same data.

This is particularly the case for the PDU of these layers, which are now simply called Data (unlike the Transportation Layers, where each one has its own PDU type: bit - frame - packet - segment).

Furthermore, several protocols are used in all three layers, such as Telnet, DNS, HTTP, FTP, SMTP. Only the layer that uses specific protocols will be indicated, but all others can be used.

Regarding the devices involved, it becomes more consistent call it applications involved, which are generally Client Programs such as Email, MSN, FTP, etc. โ€ฆ In a few exceptions we have devices.

Okay, letโ€™s go back to Layers.

Layer 5 - Session

Following the layers, we have the Session layer. As the name suggests, this layer (5-session) starts and ends the session responsible for communicating and exchanging data, for example by setting the beginning and end of a connection between hosts, and also managing the connection this connection.

An important point here is the need for synchronization between the hosts, otherwise the communication will be compromised, even stopping working.

This layer adds markings on the data transmitted. Thus, if the communication fails, it can be restarted last received valid markup.

Function: start, manage and terminate sessions for the presentation layer, eg TCP sessions.

Layer 6 - Presentation

The presentation layer has the function to format the data, making the representation of them. This formatting includes compression and data encryption.

It is easier to understand this layer as the one which translates the data into a format that can understand the protocol used. We see this for example when the transmitter uses a different standard other then ASCII, and these characters are converted.

When two different networks need to communicate, is the 6-Presentation layer that works. For example, when a TCP / IP needs to communicate with an IPX / SPX network, the Presentation layer translates data from each one, making the process possible.

Regarding compression, we can understand like a file archiver - ZIP, RAR - where the transmitter compresses the data in that layer, and the receiver decompresses. This makes the communication to become faster because we have less data to be transmitted (compressed).

And when there is need for increased security, this layer applies some scheme encryption. Remember that everything that is done on the transmission side (eg encryption) has its corresponding opposite the reception (in the case, the decryption).

Function: encryption, compression, formatting and presentation of data formats (eg JPEG, GIF, and MPEG) for applications.

Protocols: SSL, TLS.

Devices: Gateways (translating protocols between different networks).

Layer 7 - Application

In this layer we have the User Interfaces, which are created by the data itself (email, file transfer, etc). This is where the data is sent and received by users. Such requests are made by applications according to the protocols used.

Just as the physical layer, it stands on the edge of the model, so it also starts and stops the whole process.

This layer is probably that you are more used to. You interact directly with it for example when using a program to read or send email, or communicate through instant messaging.

Function: make the interface between end users and communication programs.

All Layers Together

Okay so far?

We must conclude, as we have already extended too by now with the - short - description of the layers of the OSI model.

As the final information, realize that each of them always prepare (or format) data to understand the next layer. This occurs at all stages of a communication in both directions.

In conclusion, we have a figure that gives us a good idea of this process.

Another figure that helps us to see with a little more in detail examples of PDUโ€™s and Protocols at each step.

Thatโ€™s it, the OSI Model! We hope you like its explanation!

Conclusion

Today we had a overview of the OSI Model Layers Reference. It is a very broad subject, because this model, as the name suggests, serves as a reference for various applications.

Our approach was only introductory, explaining the model in simplified form. However, this base is very important, and it works for those who just wanted to get an overview of how the model is applied to communications, as well as for those who want to delve into the subject.

3 Likes

Also a good picture summarizing it all:

3 Likes

If youโ€™re an IT professional, knowing the OSI Model is a must in 2023

Knowing the OSI Model is no longer only for networking folks. In todayโ€™s interconnected world, itโ€™s becoming essential knowledge for everyone in the tech industry.

๐—ง๐—ต๐—ฒ ๐—ข๐—ฝ๐—ฒ๐—ป ๐—ฆ๐˜†๐˜€๐˜๐—ฒ๐—บ๐˜€ ๐—œ๐—ป๐˜๐—ฒ๐—ฟ๐—ฐ๐—ผ๐—ป๐—ป๐—ฒ๐—ฐ๐˜๐—ถ๐—ผ๐—ป (๐—ข๐—ฆ๐—œ) model is a conceptual framework for understanding how computers communicate with each other.

letโ€™s think of the OSI model as a postal system for the internet.

In this system, we have seven steps (or layers) that information takes from one computer to another.

Each layer has a specific job and these jobs need to be done in a certain order, like when you send a letter through the post office.

  1. ๐—ฃ๐—ต๐˜†๐˜€๐—ถ๐—ฐ๐—ฎ๐—น ๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ (๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ ๐Ÿญ) :truck:: Like a mail truck, this layer is responsible for the actual delivery of data. In a computer, itโ€™s the physical parts like the cables and wires :electric_plug: that carry the data from one computer to another.

  2. ๐——๐—ฎ๐˜๐—ฎ ๐—Ÿ๐—ถ๐—ป๐—ธ ๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ (๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ ๐Ÿฎ) :label:: This layer is like the sorting process at the post office. It prepares the data for transport on the physical layer by packaging it up :package: and adding a delivery address :house:.

  3. ๐—ก๐—ฒ๐˜๐˜„๐—ผ๐—ฟ๐—ธ ๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ (๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ ๐Ÿฏ) :world_map:: This is like the system the post office uses to determine the best route for the letter. This layer finds the best path :railway_track: for the data to get to its destination.

  4. ๐—ง๐—ฟ๐—ฎ๐—ป๐˜€๐—ฝ๐—ผ๐—ฟ๐˜ ๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ (๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ ๐Ÿฐ) :shield:: Think of it as a security check. It ensures that the data arrives safely without any errors, like making sure that your letter isnโ€™t damaged when it arrives.

  5. ๐—ฆ๐—ฒ๐˜€๐˜€๐—ถ๐—ผ๐—ป ๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ (๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ ๐Ÿฑ) :handshake:: This layer is like making sure the mail is delivered to the correct mailbox :mailbox_with_mail:. It establishes, maintains, and ends communication with the receiving device.

  6. ๐—ฃ๐—ฟ๐—ฒ๐˜€๐—ฒ๐—ป๐˜๐—ฎ๐˜๐—ถ๐—ผ๐—ป ๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ (๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ ๐Ÿฒ) :technologist:: This layer is like the person who opens the letter and translates it into a language you understand. It changes the data into a format that the receiving computer can understand.

  7. ๐—”๐—ฝ๐—ฝ๐—น๐—ถ๐—ฐ๐—ฎ๐˜๐—ถ๐—ผ๐—ป ๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ (๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ ๐Ÿณ) :love_letter:: This is like the contents of the letter itself - the information you want to communicate. This is the data that the user interacts with, like your email :e-mail: or web browser :globe_with_meridians:.

๐—ง๐—–๐—ฃ/๐—œ๐—ฃ is another model used for networking and it stands for โ€œTransmission Control Protocol/Internet Protocol.โ€

  1. ๐—ก๐—ฒ๐˜๐˜„๐—ผ๐—ฟ๐—ธ ๐—œ๐—ป๐˜๐—ฒ๐—ฟ๐—ณ๐—ฎ๐—ฐ๐—ฒ (๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ ๐Ÿญ) :truck:: This is a combination of OSIโ€™s Physical and Data Link layers.

  2. ๐—œ๐—ป๐˜๐—ฒ๐—ฟ๐—ป๐—ฒ๐˜ (๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ ๐Ÿฎ) :world_map:: This is similar to OSIโ€™s Network layer.

  3. ๐—ง๐—ฟ๐—ฎ๐—ป๐˜€๐—ฝ๐—ผ๐—ฟ๐˜ (๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ ๐Ÿฏ) :shield:: This combines the functions of OSIโ€™s Transport and Session layers.

  4. ๐—”๐—ฝ๐—ฝ๐—น๐—ถ๐—ฐ๐—ฎ๐˜๐—ถ๐—ผ๐—ป (๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ ๐Ÿฐ) :love_letter:: This layer combines the OSIโ€™s Presentation and Application layers.

Credits: :point_down:

The OSI model is a model that describes all the functions and communications of a network

๐—ฃ๐—ต๐˜†๐˜€๐—ถ๐—ฐ๐—ฎ๐—น ๐—น๐—ฎ๐˜†๐—ฒ๐—ฟ
:black_small_square: Involves physical cabling
:black_small_square: Ethernet cord
:black_small_square: Bits and Binary 101010
:black_small_square: Fiber optic
:black_small_square: Copper

๐——๐—ฎ๐˜๐—ฎ ๐—น๐—ถ๐—ป๐—ธ ๐—น๐—ฎ๐˜†๐—ฒ๐—ฟ
:black_small_square: Switches
:black_small_square: Frames
:black_small_square: Logical Link Control

๐—ก๐—ฒ๐˜๐˜„๐—ผ๐—ฟ๐—ธ ๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ
:black_small_square: Routers
:black_small_square: IPV4
:black_small_square: IPV6
:black_small_square: ICMP
:black_small_square: Trace route
:black_small_square: Ping command

๐—ง๐—ฟ๐—ฎ๐—ป๐˜€๐—ฝ๐—ผ๐—ฟ๐˜ ๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ
:black_small_square: TCP/IP
:black_small_square: 3-way handshake (syn, syn ack, ack)
:black_small_square: Segments
:black_small_square: UDP

๐—ฆ๐—ฒ๐˜€๐˜€๐—ถ๐—ผ๐—ป ๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ
:black_small_square: Connection and transfer of info b/w server + client are consistent
:black_small_square: NETBIOS
:black_small_square: RTP

๐—ฃ๐—ฟ๐—ฒ๐˜€๐—ฒ๐—ป๐˜๐—ฎ๐˜๐—ถ๐—ผ๐—ป ๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ
:black_small_square: Encryption
:black_small_square: TLS
:black_small_square: Scripting languages (Html, Php, Xml, Javascript)
:black_small_square: Gifs
:black_small_square: ASCII

๐—”๐—ฝ๐—ฝ๐—น๐—ถ๐—ฐ๐—ฎ๐˜๐—ถ๐—ผ๐—ป ๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ
:black_small_square: Email APPS
:black_small_square: DNS
:black_small_square: WEB Browsing
:black_small_square: FTP

Credits: :point_down: