JcHub
Back to the blog
Networking & Telecom2026-11-0112 min

Understanding the OSI Model: The Role and Functioning of the 7 Layers

The OSI model is a reference framework that explains how devices communicate across a computer network. It breaks this communication down into seven layers, each with a specific role, from transmitting raw bits to providing services for applications. Understanding these layers helps you master networking concepts and troubleshoot network issues more easily.

By Emilia Victoire
... views|Share

When you send a WhatsApp message, visit a website, or share a file with a colleague, everything feels instantaneous. One click, and it's sent. Yet behind this apparent simplicity lies a well-oiled machine: your data is broken down, labeled, addressed, converted into signals, transported across dozens of devices, and then reassembled on arrival.

How does all of this happen without chaos when billions of devices from different vendors and operating systems communicate constantly? The answer largely comes down to a simple idea: break the problem down into steps. That's exactly what the OSI model provides—an essential concept for anyone who wants to understand networking.

1. What Is the OSI Model?

The OSI model (Open Systems Interconnection) is a reference model that describes how two computer systems communicate with each other. It divides network communication into seven layers, each with a well-defined responsibility.

Each layer:

  • provides a service to the layer directly above it;
  • uses the services of the layer directly below it;
  • communicates "virtually" with the corresponding layer on the remote machine using protocols.

You can compare this process to sending mail within a company: you write the letter (Application), your assistant formats and translates it if necessary (Presentation), the mailroom puts it in an envelope with an address (Network), and the courier physically delivers it (Physical). Everyone does their job without needing to know the details of how the others work.

2. A Bit of History: Why Was This Model Created?

In the 1970s, every computer manufacturer (IBM, Digital Equipment, Honeywell, etc.) developed its own proprietary networking solutions, which were mutually incompatible. A company buying IBM hardware was practically locked into IBM if it wanted its machines to communicate.

To break free from this situation, the ISO (International Organization for Standardization) launched a standardization project that led to the publication of the OSI model in 1984 (ISO 7498 standard). The goal was clear: define a common framework so that "open" systems from any manufacturer could communicate.

In practice, the OSI protocols themselves never really took off; instead, the TCP/IP suite, developed in parallel for ARPANET (the precursor to the Internet), became the dominant standard. However, the OSI model stuck around: it became the universal reference for teaching, describing, and analyzing networks. When an engineer mentions a "Layer 2 switch" or a "Layer 7 firewall," they are directly referencing the OSI layers.

3. Why Divide Communication into Layers?

This layered architecture isn't just an educational tool—it offers tangible benefits:

  • Modularization: You can modify or replace one layer without affecting the others. For example, you can switch from an Ethernet cable to Wi-Fi (Layers 1 and 2) without your web browser (Layer 7) ever noticing.
  • Interoperability: Equipment from different vendors can communicate as long as they follow the same protocols at each layer.
  • Simplification: Each layer handles only a portion of the overall problem, making network design, development, and learning much more manageable.
  • Troubleshooting: When an outage occurs, you can isolate issues layer by layer instead of guessing blindly.

4. The Seven Layers in Detail

Layers are typically grouped into two main categories:

  • Upper layers (5, 6, 7): Focused on applications and the user;
  • Lower layers (1, 2, 3, 4): Focused on data transport.

Layer 7 – Application

This is the layer closest to the end user. Watch out for a common misconception: it doesn't refer to the software application itself (Chrome, Outlook, WhatsApp), but rather the protocols those programs use to access the network.

Example protocols:

  • HTTP / HTTPS: Web browsing;
  • SMTP, IMAP, POP3: Email sending and receiving;
  • DNS: Domain name (google.com) resolution to IP address;
  • FTP / SFTP: File transfer;
  • SSH: Remote server management.

Layer 6 – Presentation

Two machines don't necessarily represent data in the same way. The Presentation layer acts as a translator: it ensures that data sent by an application is formatted in a readable way for the receiving application.

Its primary roles include:

  • Data encoding and formatting: Text (ASCII, UTF-8), images (JPEG, PNG), audio and video (MP3, MP4);
  • Compression: Reducing data volume for transmission;
  • Encryption: Protecting data confidentiality. In practice, the TLS encryption used by HTTPS is often associated with this layer, although experts still debate its precise placement.

Layer 5 – Session

The Session layer manages the dialogue between two applications. It handles:

  • Establishing a communication session;
  • Maintaining it throughout the exchange;
  • Synchronizing it by placing checkpoints: if a long transfer gets interrupted, it can resume from the last checkpoint rather than starting over from scratch;
  • Terminating it cleanly once the exchange concludes.

Examples: RPC (Remote Procedure Call) sessions, NetBIOS, or managing a video conference connection that stays active for the duration of a meeting.

Layer 4 – Transport

The Transport layer handles end-to-end data delivery between the sending and receiving applications. It breaks data into segments and uses port numbers to direct data to the correct application (e.g., port 443 for HTTPS, port 53 for DNS).

Two protocols dominate:

  • TCP:
    • Connection: Established prior to sending (three-way handshake);
    • Reliability: Acknowledgments, retransmission of lost packets;
    • Ordering: Segments are delivered in order;
    • Speed: Slower due to extra overhead;
    • Use cases: Web, email, file transfers.
  • UDP:
    • Connection: Connectionless (no prior handshake);
    • Reliability: No delivery guarantees;
    • Ordering: No reordering of segments;
    • Speed: Faster and lightweight;
    • Use cases: Streaming, online gaming, video calls, DNS.

It also manages flow control (preventing a sender from overwhelming a slower recipient) and, in TCP's case, congestion control (adjusting transmission speed based on network conditions).

Layer 3 – Network

The Network layer allows data to travel across different networks. It uses logical addressing via IP addresses (such as IPv4 192.168.1.10 or IPv6) and encapsulates data into packets.

Its core job is routing: determining the best path to reach the destination across networks. This is the primary function of a router, the signature hardware device at this layer.

Associated protocols: IP, ICMP (used by the ping command), and routing protocols like OSPF or BGP (the latter literally powers routing between major Internet service providers).

Layer 2 – Data Link

The Data Link layer manages communication within the same local network. It organizes data into frames and uses MAC addresses, which are unique physical identifiers burned into each network interface card (e.g., 00:1A:2B:3C:4D:5E).

Its roles include:

  • Identifying the sender and recipient on the local network;
  • Detecting transmission errors (using error-checking codes like CRC);
  • Controlling access to the shared physical medium.

Typical hardware: The switch, which reads MAC addresses to forward frames strictly to the intended port. Associated protocols and technologies: Ethernet, Wi-Fi (802.11), ARP (which maps IP addresses to MAC addresses), and VLANs.

Layer 1 – Physical

This is the most concrete layer. It transmits data as raw bits (0s and 1s) converted into signals:

  • Electrical signals over copper cabling (twisted-pair RJ45);
  • Light pulses over fiber optics;
  • Radio waves for Wi-Fi, 4G/5G, or Bluetooth.

It defines hardware specifications such as cable types, connectors, voltages, frequencies, and data rates. Associated hardware: Cables, repeaters, hubs (now virtually obsolete), network cards, and antennas.

Summary Table

  • Layer 7 – Application: Data unit = Data; Protocols = HTTP, DNS, SMTP, FTP; Devices = Proxy, Application Firewall.
  • Layer 6 – Presentation: Data unit = Data; Protocols = UTF-8, JPEG, TLS.
  • Layer 5 – Session: Data unit = Data; Protocols = RPC, NetBIOS.
  • Layer 4 – Transport: Data unit = Segment / Datagram; Protocols = TCP, UDP; Devices = Firewall (port filtering).
  • Layer 3 – Network: Data unit = Packet; Protocols = IP, ICMP, OSPF; Devices = Router.
  • Layer 2 – Data Link: Data unit = Frame; Protocols = Ethernet, Wi-Fi, ARP; Devices = Switch, Access Point.
  • Layer 1 – Physical: Data unit = Bits; Media = Cable, Fiber, Radio; Devices = Cable, Hub, Repeater.

💡 Mnemonic Tip (Layers 1 to 7): “Please Do Not Throw Sausage Pizza Away” — Physical, Data Link, Network, Transport, Session, Presentation, Application.

5. Encapsulation and Decapsulation

When you send data, it travels down the layers, from Layer 7 to Layer 1. At each step, the layer prepends its own control information—known as a header (and sometimes a trailer at Layer 2)—to the data. This process is called encapsulation.

You can picture it like nesting Russian dolls or envelopes placed inside one another:

  1. The Application layer generates the data (e.g., an HTTP web request).
  2. The Transport layer adds a TCP header containing the source and destination ports → creating a segment.
  3. The Network layer adds an IP header with source and destination IP addresses → creating a packet.
  4. The Data Link layer adds a header with MAC addresses and an error-checking trailer → creating a frame.
  5. The Physical layer converts the frame into bits and transmits them across the physical medium.

Upon arrival, the process is reversed as data moves back up the stack. Each layer reads its corresponding header, performs its processing, strips the header off, and passes the payload to the layer above it. This is decapsulation, which continues until the original data reaches the destination application.

6. A Concrete Example: What Happens When You Open a Website?

Let's look at a real-world scenario: you type www.exemple.com into your browser address bar and press Enter.

  1. Layer 7: Your browser needs to resolve the website's IP address. It sends a DNS request. Once it receives the IP address, it builds an HTTPS request for the page.
  2. Layer 6: The request is formatted and encrypted using TLS so no one can eavesdrop on it along the way.
  3. Layer 5: A communication session is established and maintained with the server throughout the transaction.
  4. Layer 4: TCP establishes a connection with the server via the three-way handshake (SYN, SYN-ACK, ACK), then breaks the request into segments targeted at port 443.
  5. Layer 3: Each segment is wrapped in a packet carrying your source IP address and the target server's IP address. Routers across the Internet forward the packet hop by hop until it reaches its destination.
  6. Layer 2: On your local network, the packet is placed inside a frame addressed to the MAC address of your router or modem (obtained via ARP). At each router along the path, a new frame is created for the next hop.
  7. Layer 1: The frame is converted into radio signals (Wi-Fi) or electrical/optical signals (Ethernet or fiber) to travel physically across the wire or airwaves.

On the server side, everything travels back up from Layer 1 to Layer 7, the webpage is generated, and the response traverses the same steps in reverse to reach your screen. The entire round trip typically takes just a few dozen milliseconds.

7. OSI Model vs. TCP/IP Model

The model actually implemented on the Internet is the pragmatic TCP/IP model. It consolidates several OSI layers:

  • Application (TCP/IP) combines OSI Layers 7 (Application), 6 (Presentation), and 5 (Session).
  • Transport (TCP/IP) corresponds to OSI Layer 4 (Transport).
  • Internet (TCP/IP) corresponds to OSI Layer 3 (Network).
  • Network Access / Link (TCP/IP) combines OSI Layers 2 (Data Link) and 1 (Physical).

The two models aren't competing paradigms when learning: TCP/IP describes what actually runs in production, while OSI provides a finer, more precise analytical framework. Network engineers and developers use OSI terminology daily, even when working exclusively on TCP/IP networks.

8. The OSI Model as a Troubleshooting Tool

One of the most practical applications of the OSI model is troubleshooting. When an incident occurs, you follow a structured method, usually bottom-up: there's no point in reconfiguring an application if the Ethernet cable is unplugged.

  • Layer 1 – Physical
    • Issues: Unplugged or damaged cable, faulty port, weak Wi-Fi signal.
    • Checks: NIC status LEDs, cable tester.
  • Layer 2 – Data Link
    • Issues: VLAN misconfiguration, network loop, switch error.
    • Checks: arp -a, switch management console.
  • Layer 3 – Network
    • Issues: Incorrect IP address, bad default gateway, IP conflict, missing route.
    • Checks: ipconfig / ip a, ping, tracert / traceroute.
  • Layer 4 – Transport
    • Issues: Port blocked by firewall, service not listening on the expected port.
    • Checks: netstat, telnet, Test-NetConnection.
  • Layers 5 & 6 – Session & Presentation
    • Issues: Session timeouts, invalid or expired TLS certificate.
    • Checks: Browser error messages, SSL logs.
  • Layer 7 – Application
    • Issues: Unreachable DNS server, web server crash, application software bug or misconfiguration.
    • Checks: nslookup, application logs.

Example: A user cannot access an internal company web application.

  • The network interface card (NIC) link light is lit → Layer 1 looks good.
  • ping to the default gateway succeeds → Layers 2 and 3 are working locally.
  • ping directly to the server's IP address works, but pinging its domain name fails → the issue lies with DNS (Layer 7).

In just a few minutes, a layer-by-layer troubleshooting approach pinpointed the root cause, whereas guessing at random could have wasted hours.

9. Limitations of the OSI Model

The OSI model isn't flawless, and understanding its limitations is helpful:

  • It is theoretical: No commercial network protocol suite implements it strictly.
  • Boundaries between layers can be blurry: For instance, TLS is hard to categorize neatly. Layers 5 and 6 are usually implemented directly inside applications.
  • Modern hardware often spans multiple layers: A Layer 3 switch handles routing, while next-generation firewalls inspect traffic all the way up to Layer 7.

These limitations don't lessen its value: the OSI model remains an exceptionally effective mental model for understanding network behavior and troubleshooting issues.

Conclusion

Every time you send a message or open a web page, your data embarks on a 7-step journey: it gets formatted, secured, segmented, addressed, framed, and turned into signals before being reassembled at its destination.

The OSI model helps you map out this journey, understand where each protocol and device fits in, and above all, troubleshoot network failures systematically. Even though the Internet practically runs on the TCP/IP model, OSI remains the lingua franca of network professionals.

Whether you're working in software development, system administration, cybersecurity, or telecommunications, mastering these seven layers gives you a solid foundation. It's often the first step in moving from a casual tech user to someone who truly understands what's happening "under the hood."

#Networking & Telecom#OSI model#7 OSI layers#network layers

Comments

 

    Leave a comment

    Your name and comment will be visible to everyone. Please be courteous: off-topic or abusive messages are removed.