Explainer

The OSI Model Explained: All 7 Layers

The OSI (Open Systems Interconnection) model is a seven-layer conceptual framework that describes how data moves across a network, step by step, from the physical wire up to the application you're actually using. Each layer has one specific job and hands its work off to the layer above or below it, which lets something as complicated as "a web page loads" be broken into understandable, standardized pieces.

It's important to know up front that the OSI model isn't software you install or a protocol your computer runs — it's a mental map. Engineers, vendors, and CCNA students use it as a shared vocabulary to design networks and, just as often, to troubleshoot them layer by layer.

The 7 Layers at a Glance

Networking pros number the layers from 1 (bottom, closest to the wire) up to 7 (top, closest to you). Here is each layer with its one job and a familiar example:

Layer 1 – Physical: moves raw bits as electrical, light, or radio signals across a medium. Example: Ethernet copper cabling, fiber-optic strands, Wi-Fi radio.

Layer 2 – Data Link: packages bits into frames and addresses them on the local link using 48-bit MAC addresses; it also detects transmission errors. Example: an Ethernet switch, or 802.1Q VLAN tags on a trunk.

Layer 3 – Network: adds logical IP addresses and chooses a path between different networks. Example: a router forwarding IP packets; IPv4 and IPv6.

Layer 4 – Transport: delivers data end-to-end between applications, breaking it into segments and adding either reliability or speed. Example: TCP (connection-oriented and reliable) and UDP (connectionless, best-effort), identified by port numbers.

Layer 5 – Session: starts, maintains, and gracefully ends the conversation between two applications. Example: setting up and later tearing down a login or remote session.

Layer 6 – Presentation: translates data formats so both ends understand each other — encoding, compression, and encryption. Example: TLS encryption, character sets, JPEG.

Layer 7 – Application: the layer your software talks to when it needs the network. Example: HTTP for the web, DNS for name lookups, DHCP for addressing.

A common mnemonic for Layer 1 up to Layer 7 is "Please Do Not Throw Sausage Pizza Away."

Why the Model Exists (The Problem It Solves)

Before standardized models, every hardware vendor built networks its own way, and gear from different companies often couldn't talk to each other. The OSI model, published by the ISO in 1984, gave the industry a shared reference in which each layer's job is defined independently of the others.

That independence is the real payoff. Because the layers are decoupled, you can swap the physical medium — copper for fiber, or a cable for Wi-Fi — without rewriting the application, and you can change the application without touching how routers move packets. It also makes troubleshooting systematic: instead of guessing, you work layer by layer. No link light? That's Layer 1. Getting an IP address but can't reach another network? Think Layer 3. This "divide and conquer" approach is why the model is still taught decades later.

How Data Travels: Encapsulation and PDUs

When you send data, it travels down the stack on your device, and each layer wraps it in its own header (Layer 2 also adds a trailer). This wrapping is called encapsulation, and the named chunk of data at each layer is its Protocol Data Unit, or PDU.

The four PDUs a CCNA candidate needs cold: at the Transport layer the data is a segment, at the Network layer it becomes a packet, at the Data Link layer a frame, and on the physical wire it's simply bits. The receiving device reverses the whole process — stripping headers layer by layer — which is called de-encapsulation. Think of it like nesting envelopes: each layer seals the message inside another addressed envelope, and the far end opens them in reverse order.

OSI vs. the 4-Layer TCP/IP Model

Real-world networking actually runs on the TCP/IP model, which collapses the same ideas into four layers: Application, Transport, Internet, and Network Access (sometimes called Link). A useful way to think about it: OSI is the detailed teaching map, while TCP/IP is the practical model your network truly implements.

The mapping is straightforward. OSI's top three layers — Application, Presentation, and Session — are bundled into TCP/IP's single Application layer. Transport stays as Transport. OSI's Network layer becomes TCP/IP's Internet layer. And OSI's Data Link and Physical layers combine into Network Access. Same journey, fewer boxes.

Common Beginner Gotchas

The model isn't the reality. OSI is a reference model, not the protocol stack your computer runs — that's TCP/IP. The Session and Presentation layers in particular rarely exist as separate pieces in practice; modern applications usually handle those jobs themselves. Learn the layers as a framework for thinking, not as seven literal programs.

Layer 2 versus Layer 3 devices trip up almost everyone. A switch operates mainly at Layer 2: it forwards frames using 48-bit MAC addresses within a local network. A router operates at Layer 3: it forwards packets between networks using IP addresses. (A Layer 3 switch can do both.) When someone asks whether something is a "Layer 2 or Layer 3 problem," they're really asking whether the issue is local MAC-based switching or IP-based routing.

MAC and IP are not the same address. A MAC address is a 48-bit identifier tied to the network card and used only within the local link (Layer 2). An IP address is a logical Layer 3 address — 32 bits for IPv4, 128 bits for IPv6 — used to reach a device across networks. Both work together on every connection: IP gets the packet to the right network, and MAC delivers the frame to the right device on that final hop. Configuring these is covered in our step-by-step how-to guides; here the goal is just the concept.

Frequently asked questions

What is the difference between a frame, a packet, and a segment?

They're the same data at different layers, just wrapped differently. At the Transport layer (Layer 4) it's a segment; at the Network layer (Layer 3) it becomes a packet once an IP header is added; and at the Data Link layer (Layer 2) it's a frame once a MAC header and trailer are added. On the physical wire, it's simply bits. The name changes because each layer adds its own addressing information as the data is encapsulated.

Why does the OSI model have 7 layers but TCP/IP only 4?

They were designed with different goals. The OSI model was built as a complete, vendor-neutral reference that separates every function into its own layer for clarity — which is great for teaching and troubleshooting. TCP/IP grew out of working protocols and merges related jobs to stay practical, folding OSI's top three layers into one Application layer and its bottom two into one Network Access layer. Both describe the same journey; OSI just breaks it into more detail.

Does every network device operate at all 7 layers?

No. Devices operate only up to the layer they need. A basic switch works at Layers 1–2 (frames and MAC addresses), a router works up to Layer 3 (IP packets), and a firewall or load balancer may inspect all the way up to Layer 7 (application data). Your laptop, as an endpoint, uses the full stack because it's the source or destination of the traffic. As a rough rule, the more central a device is to just moving traffic, the fewer upper layers it needs to touch.

Now build it on real Cisco IOS

Concepts stick when you configure them. Try a free graded lab, then grade your own config against the answer key.