The OSI model is the universal framework for understanding how data travels across a network — from the application on your screen to the physical cable carrying the signal. Every networking protocol, security tool, and cyberattack maps to one or more of its seven layers.
Whether you are troubleshooting a network issue, studying for a cybersecurity certification, or designing a security architecture, the OSI model is the vocabulary you need. It stands for Open Systems Interconnection model — a conceptual framework developed by the International Organization for Standardization (ISO) in 1984 that divides network communication into seven distinct, stackable layers.
Each layer has a specific responsibility in the process of getting data from one device to another. Layers communicate with the layer directly above and below them, and each adds its own header information — a process called encapsulation — as data travels down the stack to be transmitted, and strips that information — decapsulation — as it travels back up on the receiving end.
The 7 layers of the OSI model
| 7 | Application User-facing services | The layer closest to the end user. Provides network services directly to applications — email, web browsing, file transfer, DNS resolution. Protocols: HTTP, HTTPS, FTP, SMTP, DNS, SSH |
| 6 | Presentation Translation & encryption | Translates data between the application layer and the network. Handles encryption, decryption, compression, and data format conversion. Formats: SSL/TLS, JPEG, MPEG, ASCII, UTF-8 |
| 5 | Session Connection management | Establishes, maintains, and terminates communication sessions between applications. Manages authentication and reconnection after interruptions. Protocols: NetBIOS, RPC, PPTP, SIP |
| 4 | Transport Reliable delivery | Ensures complete data transfer between hosts. Handles segmentation, flow control, error detection, and port-based multiplexing. TCP vs UDP lives here. Protocols: TCP, UDP. Unit: Segment |
| 3 | Network Logical addressing & routing | Determines the best path for data to travel across multiple networks. Assigns and uses IP addresses for logical addressing and routing between subnets. Protocols: IP, ICMP, OSPF, BGP. Unit: Packet |
| 2 | Data Link MAC addressing & framing | Handles node-to-node data transfer within the same network segment. Uses MAC addresses for physical device identification and detects transmission errors. Protocols: Ethernet, Wi-Fi (802.11), ARP. Unit: Frame |
| 1 | Physical Bits & signals | The hardware layer — converts data into electrical signals, light pulses, or radio waves for transmission over the physical medium: cables, fiber, or wireless. Media: Ethernet cable, fiber optic, radio waves. Unit: Bit |

Data flows down the OSI stack on the sender’s side (encapsulation — adding headers at each layer) and up the stack on the receiver’s side (decapsulation — stripping headers at each layer). Each layer only communicates with its peer layer on the other device — Layer 4 on your machine talks to Layer 4 on the server, not to Layer 3.

Real-world example: what happens when you visit a website
Every time you type https://www.bank.com into your browser and press Enter, your data makes a complete journey down all 7 OSI layers on your device, across the network, and back up all 7 layers on the web server. Here is exactly what happens at each layer:
Real-world example: loading https://www.bank.com
| 7 | Application | Your browser generates an HTTP GET request for bank.com. DNS resolves the domain name to an IP address. The application data is handed to Layer 6. |
| 6 | Presentation | TLS encryption is applied here — your request is encrypted using the session key negotiated during the TLS handshake. Data is also formatted for transmission (UTF-8, compression if applicable). |
| 5 | Session | A session is established and managed between your browser and the web server — including the TLS handshake that authenticates the server and negotiates encryption keys. Session tokens track your login state. |
| 4 | Transport | TCP segments the data and adds source/destination port numbers (port 443 for HTTPS). TCP guarantees reliable delivery — it tracks segments, requests retransmission of lost packets, and controls flow rate. |
| 3 | Network | Your router adds source and destination IP addresses to each packet. Routers across the internet use BGP and OSPF routing protocols to determine the optimal path to bank.com’s server IP address. |
| 2 | Data Link | Each packet is wrapped in an Ethernet frame with your device’s MAC address and your router’s MAC address. ARP resolves IP addresses to MAC addresses at this layer for local delivery. |
| 1 | Physical | The frame is converted into electrical signals (ethernet cable), light pulses (fiber optic), or radio waves (Wi-Fi) and transmitted across the physical medium to your router — and onward across the internet. |
On the bank’s server, the entire process reverses — the Physical layer receives the signal, the Data Link layer reads the MAC frame, the Network layer routes using the IP, Transport layer reassembles TCP segments, Session manages the connection, Presentation decrypts the TLS payload, and the Application layer processes your HTTP request and sends a response.
Why the OSI model matters for cybersecurity
Every cyberattack targets one or more OSI layers. Understanding which layer an attack operates at determines which defensive controls are effective against it. This is why security professionals, penetration testers, and network architects must know the OSI model fluently — it is the map that tells you where attacks happen and where defenses should be deployed.
Layer 7 — Application: SQL injection, XSS, DDoS
Web Application Firewalls (WAF) and input validation defend the application layer against injection and scripting attacks.
Layer 6 — Presentation: SSL stripping, weak ciphers
Enforcing TLS 1.3 and strong cipher suites at the presentation layer protects against downgrade attacks and eavesdropping.
Layer 4 — Transport: Port scanning, TCP SYN flood
Firewalls with stateful packet inspection and SYN flood protection defend the transport layer against port-based attacks.
Layer 3 — Network: IP spoofing, routing attacks
Network-layer firewalls, ACLs, and BGP security controls defend against IP-based attacks and route hijacking.
Layer 2 — Data Link: ARP spoofing, MAC flooding
Dynamic ARP Inspection (DAI) and port security on managed switches defend the data link layer from local network attacks.
Layer 1 — Physical: Cable tapping, signal jamming
Physical access controls, locked server rooms, and tamper-evident hardware protect the physical layer from hardware-level attacks.
In penetration testing, identifying which OSI layer a vulnerability exists at immediately narrows the remediation strategy. A SQL injection fix lives at Layer 7. A misconfigured firewall rule is a Layer 3 or 4 fix. ARP spoofing is a Layer 2 problem. The OSI model is the triage map of network security.
The OSI model is not just an academic concept — it is the mental framework every network engineer, security analyst, and penetration tester uses daily to understand, troubleshoot, and defend complex systems. From the physical cable carrying raw bits to the application processing your login request, each of the seven layers plays a precise, indispensable role. Master the OSI model, and you have mastered the map of every network you will ever work on.

