Home Networking Network Fundamentals Part 3: Understanding OSI Model

Network Fundamentals Part 3: Understanding OSI Model

by Behrad

A while ago I started a series called Network Fundamentals, exploring the essentials concepts that form the backbone of networking. It has been some time since the last post, but the wait is finally over!

In this edition, we dive deeper into the subject, building upon the knowledge gained from our previous discussions in part 1 where the discussed what a network is and part 2 we covered how a network is build.

I still remember when I started as a System Engineer, I found myself surrounded in a world filled with technical jargon and acronyms. People where talking about L2 or L3 devices, troubleshooting L2 connectivity issues or mentioning L3 routing protocols. It make my head spin! 😉

But in the end, I found that there is a structured framework behind these mysterious terms which form the foundation of modern networking: the OSI (Open Systems Interconnection) model. Understanding this model is essential for any network engineer as it provides a standardized approach to network communication and problem-solving.

OSI Model

The OSI model, developed by the International Organization for Standardization (ISO), breaks down network communication into distinct layers, each with its own specific function. This hierarchical approach allows us to understand the flow of data from the physical transmission of bits to the high-level interactions of applications. Think of it as the invisible architecture that shapes the way data travels across networks, connecting our digital world.

At its core, the OSI model consists of seven layers, each responsible for a specific aspect of network communication. By understanding the 7 layers and how they work, you get a valuable insights into how data is processed, encapsulated, and transmitted across networks.

Layer 1: Physical layer

This is the lowest layer of the OSI model and deals with the physical transmission of data. This layer also defines the material characteristics and the components to use to achieve the correct transmission of the messages, including cables, connectors, and signaling.

Consider the router that is used at your home, your smart phone connect to the router using WiFi that travel across the air. This router connects to your Internet Service Provider (ISP) network which is using Fiber Optic Cables. Thus, the router converts data into optical signals.

Layer 2: Data Link Layer

In a polite human conversation, only one person talks at a time. While Bob talks, Alice politely listens. She detects when Bob stops talking and knows that it’s her turn to speak. The same happens on your network.

If you take a crowed room, Bob may call out: “Hey Alice, can I buy you an ice cream?”. While everyone in the room hears this, only Alice will reply. Again, the same happens on your network. The only difference is that the devices don’t use names but here they user their MAC (Media Access Control) addresses as an unique identifiers! Each device has an individual MAC which is “burned” into the device.

So what data link layer is doing: It makes sure that there is a reliable point-to-point communication between connected devices. It ensures error-free transmission over the physical layer and handles tasks such as framing, error detection, and flow control from hop to hop in the same network.

Layer 3: Network Layer

The main goal of the network layer is to establish the end-to-end communications across multiple LANs or WANs using the best available path. The path can be either a:

  • Logical one: This is based on unique source and destination identifiers are maintained across the path.
  • Path discovery and selection: The path will be chosen based on algorithms and protocols to find the possible paths.

So where on Layer 2 the communication goes from hop to hop in the same network using MAC addresses, Layer 3 is using an IP addresses and makes sure that the data goes end to end! This is a very critical thing to understand! 😉

Layer 4: Transport Layer

The transport layer ensures reliable and transparent transfer of data between end systems. It provides mechanisms for segmentation, reassembly, error recovery, and flow control, allowing for efficient and error-free data transfer.

Imagine you want to send a picture to your friend through the internet. Layer 4 of the OSI model steps in and makes sure that the picture reaches your friend without any issues. It simply makes sure that the picture into smaller pieces, called segments and ensuring they arrive in the right order using the lower layers 3,2,1. Layer 3, 2 over layer 1. Layer 4 accomplishes this by using an addressing scheme known as Port numbers.

In networking, two methods for distinguishing network streams exist: the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP). Each protocol has 65,536 port numbers, and a unique application stream is identified by a combination of Source and Destination port numbers along with their respective IP addresses.

TCP and UDP employ different strategies for transferring data streams, and their inner workings are both fascinating and significant. However, discussing them in detail goes beyond the scope of this article series. They will be covered in a future article or series.

In summary, while Layer 2 handles hop-to-hop delivery and Layer 3 handles end-to-end delivery, it can be said that Layer 4 is responsible for service-to-service delivery.

Layer 5: Session Layer

The session layer establishes, manages, and terminates communication sessions between applications. It enables synchronization and checkpointing of data exchange, ensuring that data is delivered in a structured and orderly manner.

Imagine that you and your friend want to play a game online. The session layer is like a special helper who makes sure you both can plan the game smoothly. It sets up a special connection (session) between your devices and keeps it going while you play. So it basically send messages and commands back and forth during the game. At the same time it also make sure that the connection stays alive while you take a break.

Layer 6: Presentation Layer

The presentation layer is responsible for data representation, ensuring that information from the application layer is properly formatted and encoded for transmission. It handles tasks such as data encryption, compression, and protocol conversion.

Think of it as an artist who adds the finishing touches to the house you have drawn, fills it with colors, makes sure the lines are smooth, and arranges the elements in a way that makes sense. The presentation layer prepares the house to be shown to others and makes it visually appealing.

Layer 7: Application Layer

The application layer is the closest layer to the end users, which means that both the OSI Application Layer and the user interact directly with the software application itself. This includes also various protocols and services that enable user-friendly and application-specific network functionalities.

For example, when you open a web browser to visit a website, the Application layer helps you display the web pages, click on links, and interact with the content. It’s like the game screen that allows you to explore different levels, complete quests, and interact with other players.

The Application layer also takes care of the communication between your device and the servers that host the websites or provide the services you’re using. It’s like a messenger that delivers your requests for information or actions and brings back the responses.

Layers 5, 6, and 7: Network vs. Software Engineering Perspectives

I must say that from a purely Network Engineering point of view, the different between Layer 5, 6 and 7 is not particularly significant. In fact those layers are grouped into one single encompassing layer called TCP/IP Model.

However. the Layers 5, 6 and 7 are from a big value for a Software Engineer. Usually they don’t care how things are arranged. 😉


By understanding the functions of each layer and how they interact, you’ll get a great view of network communication. The advantages of understanding the OSI model is that it help users and System Engineers determine the required hardware and software to build their network, understand and communicate the process followed by components communicating across the network. Last but not least it helps performing troubleshooting since you can identify which network layer is causing an issues and focusing efforts on that layer!

The next post in this series will be about the Encapsulation and Decapsulation process, so make sure to subscribe so you don’t miss it! 😉

You may also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Discover more from ITB4X.com

Subscribe now to keep reading and get access to the full archive.

Continue reading