The OSI Model Explained: A Layer-by-Layer Guide
The OSI model is one of the most tested topics on the CompTIA Network+ exam, and it recurs on Security+ too. It breaks networking into seven layers, each with a specific job. The trick is not just memorizing the names — it is knowing which devices, protocols, and data units belong at each layer so you can answer "where does X operate?" instantly. This guide walks through all seven layers from the bottom up, with a reference table, plain explanations, and a mnemonic.
The 7 OSI layers at a glance
| Layer | Name | PDU | Devices | Examples |
|---|---|---|---|---|
| 1 | Physical | Bits | Cables, hubs, repeaters | Ethernet cabling, RJ-45, fiber, radio |
| 2 | Data Link | Frames | Switches, bridges, NICs | MAC addressing, ARP, Ethernet framing |
| 3 | Network | Packets | Routers, Layer-3 switches | IP, ICMP (ping), routing |
| 4 | Transport | Segments / Datagrams | Firewalls (port-based), load balancers | TCP, UDP, port numbers |
| 5 | Session | Data | — | Session setup/maintenance, RPC, NetBIOS |
| 6 | Presentation | Data | — | Encryption, compression, formatting (JPEG, ASCII) |
| 7 | Application | Data | — | HTTP, FTP, DNS, SMTP — the user-facing protocols |
Layer by layer
Layer 1 — Physical
The Physical layer is the actual medium that carries signals: copper cable, fiber, or radio waves. Data here is just bits — 1s and 0s represented as voltage, light, or radio states. Hubs and repeaters operate here because they regenerate and repeat the raw signal without understanding it. Cabling standards like RJ-45 and Ethernet specifications live at Layer 1.
Layer 2 — Data Link
The Data Link layer moves data between directly connected nodes using framesand MAC addresses. Switches operate here, building MAC address tables and forwarding frames only to the intended port. ARP resolves an IP address to a MAC address so a frame can be addressed on the local segment. This layer also handles error detection.
Layer 3 — Network
The Network layer is where routing happens. Routers read the destination IP address in each packet and forward it toward its network. IP itself and ICMP (the protocol behind ping and traceroute) live here. If a question mentions IP addresses or a router making a forwarding decision, it is Layer 3.
Layer 4 — Transport
The Transport layer provides end-to-end delivery. TCP is reliable and connection-oriented (three-way handshake, acknowledgments, retransmissions); UDPis fast and connectionless. The data unit is a segment (TCP) or datagram (UDP), and port numbers identify the conversation. Firewalls that filter by port are operating at Layer 4.
Layer 5 — Session
The Session layer opens, manages, and tears down sessions between applications. It handles dialogue control and synchronization. Examples include RPC and NetBIOS. This layer is thin in modern networks, but CompTIA still tests that session establishment lives here.
Layer 6 — Presentation
The Presentation layer translates, compresses, and encrypts data so the application can use it. Character encoding (ASCII) and image formats (JPEG) are presentation concerns. TLS/SSL encryption is often mapped here because it transforms data before the application sees it.
Layer 7 — Application
The Application layer is the interface to the user's network applications — not the application itself, but the protocols applications use. HTTP, FTP, DNS, and SMTPall live at Layer 7. If a question names one of these protocols, the answer is almost always Layer 7.
Memory tip
Remember the layers top-down with "All People Seem To Need Data Processing"(Application, Presentation, Session, Transport, Network, Data Link, Physical) or bottom-up with "Please Do Not Throw Sausage Pizza Away." Pair each layer with one device and one PDU — for example, switch = Layer 2 = frame, router = Layer 3 = packet — and you can answer most OSI questions from those anchors.
Try 3 free sample questions
Questions are visible below. Pick an answer to reveal the correct one and the explanation.
Q1.At which OSI layer do switches operate?
Q2.Routers make forwarding decisions based on IP addresses. Which OSI layer is this?
Q3.Port numbers identify conversations between applications. Which OSI layer uses port numbers?
Practice this free on CertiTom
Create a free account to drill unlimited practice questions on this topic across A+, Network+, and Security+. Pro members also get the hands-on OSI Model Sort performance-based lab (Network+) — drag-and-drop practice that mirrors the real exam.
Frequently asked questions
What does the OSI model do?
The OSI (Open Systems Interconnection) model is a seven-layer conceptual framework that describes how data moves from an application on one computer down to the physical wire and back up to an application on another. It gives network engineers and CompTIA candidates a shared vocabulary for where each protocol and device operates.
What mnemonic helps remember the OSI layers?
Top-down (Layer 7 to 1): 'All People Seem To Need Data Processing' (Application, Presentation, Session, Transport, Network, Data Link, Physical). Bottom-up (Layer 1 to 7): 'Please Do Not Throw Sausage Pizza Away.'
Where do TCP and UDP fit in the OSI model?
Both TCP and UDP operate at Layer 4, the Transport layer. TCP provides reliable, connection-oriented delivery with sequencing and acknowledgments; UDP provides fast, connectionless delivery. Port numbers are also a Layer 4 concept.
What is a PDU and why does it matter for the OSI model?
A PDU (Protocol Data Unit) is the name for data at a given layer. Bits at Layer 1, frames at Layer 2, packets at Layer 3, and segments or datagrams at Layer 4. Above Layer 4 it is simply called data. Knowing the PDU for each layer is a common Network+ question.