Unfortunately, I couldn’t understand the OSI Layers at University. I read our books and also our teachers said what the OSI is, but no one show me where the OSI using in real life. After I started my profession, I realize that how important is the understanding OSI model and get information about which layer is using where with hands on experiences.
We can say that OSI is explain us how data transfer one point to another and which stations pass during this transfer period. The transfer function can be easily understand with separating the transfer path at the 7 main layers.
Let’s we look at the layers:
The first four layers are generally named as a data transfer layers and a network engineer has to know these layers. The layers between 5 and 7 are known as Application Layers and used by Applications.
Data Transfer Layers
1. Physical Layer: At this layer, as we mentioned before, data is converted to BIT as 0s and 1s and ready to transfer through physical line.
When someone say Layer 1, we understand the physical line that the data transfer through it. For example UTP Cable, fiber optic cable, air (radio link, Wi-Fi) etc.
2. Data Link Layer: At this layer, we determine which protocol will we use to transfer data over physical line.
I mean, which language will I speak when transferring data. If I speak Ethernet language, the system on the other hand has to be understand Ethernet protocol according to negotiate with same language. If two systems are speaking different languages, they will not be able to understand each other.
We can give 802.3 Ethernet, PPP, HDLC, Frame Relay, ATM etc. as example of Layer 2 protocols. At this layer data is at the Frame format.
When someone say Layer 2, we understand MAC address, VLAN and Switches at real life.
3. Network Layer: If there is a lot of path from source to destination, we determine which path will be used on this layer. Layer 3 also known as routing layer.
I started to speak a specific language at Layer 2. There is no problem if my neighbor is next to me. But what can I do, if my destination is not next to me and there is a lot of hops to reach my destination. I have to tell message to my closest neighbor and my neighbor has to transfer this message to his next neighbor and vice versa. I may be able to pass a lot of hops until my message reach to the destination. If there is a lot of path to reach my destination, which path is best for me? How can I decide which path do I use to transfer my message? Network layer is the responsible this all routing decisions.
When someone say Layer 3, we understand IP address, Routers and Layer 3 switches.
4. Transport Layer: At this level, data is entering application layers so, this layer is a door to entering application world.
Every application that gives service over server has to be open an application socket. Applications can be able to communicate with outer world with these sockets.
When someone say Layer 4, we understand TCP, UDP, Firewall and Load Balancers.
We mentioned before Layer 5-7 are used by applications. Old networkers usually didn’t have to understand applications, we usually transfer data to the applications and then we believe that our job is finished. But nowadays, all modern networks are designed at application centric, around the application. So, we can say network guys has to be aware frequently used application characteristics today.
Application Layers
5. Session Layer: At this layer, making the control of starting and finishing sessions. We can give RPC, SQL, NFS as examples.
6. Presentation Layer: At this layer, the data encoding, encryption mechanism is determined. For example, our data is an image file, this file is compressed as JPEG file. If this data is a video file, it is compressed as MPEG format.
Which packet format is using for encoding, at the other side, the same algorithm has to be use for decoding. So, if I compress file with JPEG image format, you can’t decode this format as like WORD file.
Sometimes you try to open file that unfamiliar file format with text editor, you see strange characters on file screen.
When someone say Layer 6, we understand file encoding algorithms, encryption and decryption.
7. Application Layer: Our main purpose for networking is transfer our application or data from one point to another. The application we used in real life is different from each other. For example, HTTP, FTP, Database Applications, Telnet, SSH etc. We decided which application format we will use at application layer.
Both server and client side have to speak same language. If we serve our application with HTTP, the client can’t understand our application with using FTP application. Each application has its own fingerprint and structure.
As we mentioned before, the network engineers have to understand about applications. The level of understanding is at least defining which application is running on our network. There is some hardware and software tools that help us to identify applications. For example, we can use Wireshark application to understand which application is running on our network and deeply analyze its characteristics.
When someone say Layer 7, we understand Layer 7 Firewalls, Web Application Firewalls (WAF=, Layer 7 Load balancers and Applications (HTTP, FTP, Telnet, SSH etc).
Packet Structure
Understanding OSI layers help us to recognize packet structures and which path does data follow when traveling from source to destination. Let’s look on figure below;
After data created, every layer adds its own header and footer information to the received data and transfers it to the lower layer respectively.
When this data arrived destination, each layer is extract its own layer header and footer information and transfers it to upper layer. At layer 7, the system has only had data which we want to transfer.
The header and footer informations that added by layers help us to transfer data to the right destination and guaranteed to transfer exact data without corruption.
Example
Let’s make an real life example about layers;
I want to go www.cisco.com and download a picture with my browser. What is happening on layers:
I know that, the topic may be little boring but the good network engineer has to be correctly understand and explain the OSI Layered model.
Please look the green lines again and try to recognize this sort paragraphs.