The OSI model defines 7 layers of network communication. The TCP/IP model condenses them into 4 layers. Both describe how data travels from one device to another across the internet.
TL;DR The OSI model (Open Systems Interconnection) is a 7-layer framework that describes how data moves between devices on a network, from physical signals at Layer 1 to user-facing applications at Layer 7. The TCP/IP model is a 4-layer implementation that powers the actual internet. OSI is used as a reference for understanding network concepts; TCP/IP is what real networks run. HTTP operates at Layer 7 (Application). TLS operates at Layer 6 (Presentation). TCP and UDP operate at Layer 4 (Transport). IP routing happens at Layer 3 (Network).
What is the OSI model?
The OSI model (Open Systems Interconnection) is a conceptual framework that divides network communication into 7 distinct layers. Each layer handles a specific function and communicates only with the layers directly above and below it.
The OSI model was developed by ISO in 1984. It is not a protocol — it is a reference model used to design, troubleshoot, and teach network communication.
The 7 layers of the OSI model:
| Layer | Name | What it does | Key protocols / examples |
|---|---|---|---|
| 7 | Application | User-facing services and APIs | HTTP, HTTPS, DNS, FTP, SMTP |
| 6 | Presentation | Data encoding, encryption, compression | TLS/SSL, JPEG, ASCII |
| 5 | Session | Establishes, manages, and terminates sessions | NetBIOS, RPC |
| 4 | Transport | End-to-end communication, flow control, error correction | TCP, UDP |
| 3 | Network | Logical addressing, routing, packet forwarding | IP, ICMP, BGP, OSPF |
| 2 | Data Link | Node-to-node data transfer, MAC addressing, error detection | Ethernet, Wi-Fi (802.11), ARP |
| 1 | Physical | Transmission of raw bits over physical medium | Cables, fiber optic, radio waves |
What is the TCP/IP model?
The TCP/IP model is the practical implementation of network communication that runs the internet. It was developed by DARPA in the 1970s and condenses the OSI model into 4 layers.
| TCP/IP layer | Corresponds to OSI layers | Key protocols |
|---|---|---|
| Application | Layers 5, 6, 7 | HTTP, HTTPS, DNS, SMTP, FTP |
| Transport | Layer 4 | TCP, UDP |
| Internet | Layer 3 | IP (IPv4, IPv6), ICMP |
| Network Access | Layers 1, 2 | Ethernet, Wi-Fi, ARP |
OSI vs TCP/IP: key differences
| Aspect | OSI model | TCP/IP model |
|---|---|---|
| Number of layers | 7 | 4 |
| Purpose | Reference / conceptual model | Practical implementation |
| Development | ISO, 1984 | DARPA, 1970s |
| Usage | Teaching, troubleshooting, security design | Actual internet communication |
| Session and Presentation layers | Explicit (Layers 5 and 6) | Merged into Application layer |
| Real-world implementation | Not directly implemented | Powers the internet |
The OSI model is what you use to think. The TCP/IP model is what the internet actually runs.
How a web request travels through the layers
When you load https://azion.com:
- Layer 7 (Application) — Browser generates an HTTP GET request.
- Layer 6 (Presentation) — TLS encrypts the request.
- Layer 5 (Session) — A TCP session is established.
- Layer 4 (Transport) — TCP breaks data into segments and adds port numbers (443 for HTTPS).
- Layer 3 (Network) — IP adds source and destination IP addresses; routing decisions are made.
- Layer 2 (Data Link) — Ethernet adds MAC addresses for the next network hop.
- Layer 1 (Physical) — Bits are transmitted as electrical signals, light pulses, or radio waves.
At the destination, the process reverses — each layer unwraps its envelope until the HTTP request reaches the web server.
Where security products operate in the OSI model
| Product | OSI layer |
|---|---|
| WAF (Web Application Firewall) | Layer 7 (Application) |
| TLS/SSL termination | Layer 6 (Presentation) |
| Load balancer (HTTP) | Layer 7 (Application) |
| Load balancer (TCP) | Layer 4 (Transport) |
| DDoS protection (volumetric) | Layer 3 (Network) |
| DDoS protection (application) | Layer 7 (Application) |
| Network firewall | Layers 3–4 |
Troubleshooting by OSI layer
| Problem | Likely OSI layer |
|---|---|
| No physical connection, cable unplugged | Layer 1 (Physical) |
| MAC address conflict, ARP issues | Layer 2 (Data Link) |
| Can’t ping an IP address, routing failure | Layer 3 (Network) |
| Port blocked, TCP connection refused | Layer 4 (Transport) |
| TLS certificate error, HTTPS handshake failure | Layer 6 (Presentation) |
| HTTP 404, API error, application bug | Layer 7 (Application) |
Frequently asked questions
What is the OSI model in simple terms? The OSI model is a 7-layer framework that describes how data moves across a network. Layer 1 is physical cables and signals. Layer 7 is the applications users interact with, like web browsers and email clients. Each layer handles one specific job and passes data to the next layer.
What is the difference between OSI and TCP/IP models? OSI is a theoretical reference model with 7 layers used to understand and design networks. TCP/IP is the actual 4-layer protocol suite that the internet runs on. OSI Layers 5, 6, and 7 are combined into the TCP/IP Application layer.
What layer does HTTP operate at? HTTP operates at Layer 7, the Application layer, in both the OSI and TCP/IP models.
What layer does IP operate at? IP (Internet Protocol) operates at Layer 3, the Network layer in OSI, and the Internet layer in TCP/IP. IP is responsible for logical addressing (IP addresses) and routing packets between networks.
What layer does TLS operate at? TLS (Transport Layer Security) operates primarily at Layer 6, the Presentation layer in the OSI model, where it handles encryption and decryption of data before it reaches the application.
What layer does TCP operate at? TCP (Transmission Control Protocol) operates at Layer 4, the Transport layer. It provides reliable, ordered, error-checked delivery of data between applications.
Why do we still teach the OSI model if TCP/IP is what’s used? The OSI model provides a systematic way to isolate and diagnose network problems. By identifying which layer a problem occurs at, engineers can narrow down the cause quickly. It remains the standard framework for network troubleshooting, design documentation, and security architecture.
What is the Network layer responsible for? The Network layer (Layer 3 in OSI) is responsible for logical addressing, routing, and forwarding packets between different networks. IP (Internet Protocol) is the primary protocol at this layer. Every router on the internet operates at Layer 3.