Networking

OSI Model

Open Systems Interconnection Model

The seven-layer map of how networks work, from the cable in the wall to the app on your screen. It is not how the internet is literally built — but it is the shared language everyone uses to describe and fix it.

The OSI model (Open Systems Interconnection) divides network communication into seven stacked layers, each with one job. Data created by an app travels down the stack on the sending device — each layer wrapping it with its own information — crosses the network, then travels back up the stack on the receiving device, each layer unwrapping its part. The model is a teaching and troubleshooting framework: it gives everyone a common vocabulary for where in the chain something happens.

The seven layers

#LayerJobExamples
7ApplicationWhat the user interacts withHTTP, DNS, SMTP
6PresentationFormatting, encryption, compressionTLS, JPEG
5SessionOpening and managing conversationsSession setup/teardown
4TransportReliable or fast delivery, portsTCP, UDP
3NetworkAddressing and routing between networksIP, ICMP
2Data LinkLocal delivery on one link, MAC addressesEthernet, Wi-Fi, ARP
1PhysicalRaw bits over a mediumCables, radio, fiber

A common mnemonic, bottom to top, is "Please Do Not Throw Sausage Pizza Away."

Encapsulation: the journey of a packet

The model's real insight is encapsulation. When you load a web page, layer 7 hands the request to layer 4, which adds a TCP header (with ports); layer 3 wraps that in an IP packet (with addresses); layer 2 wraps that in an Ethernet frame (with MAC addresses); and layer 1 turns it into electrical, light, or radio signals. The receiving device reverses the process, each layer stripping its own header and passing the rest up. Every layer only needs to understand its own wrapper.

Why "layer 1" and "layer 7" are everyday shorthand

Engineers constantly refer to layers by number. "It's a layer 1 problem" means a physical fault — an unplugged or damaged cable. "A layer 3 issue" points to IP addressing or routing. "Layer 7" describes application-aware features, like a firewall that inspects HTTP. A switch is called a "layer 2 device" and a router a "layer 3 device" because of where they operate. This numbering is the model's most enduring practical legacy.

OSI vs the TCP/IP model

Here is the catch: the internet does not actually run on OSI — it runs on the simpler, four-layer TCP/IP model, which collapses OSI's top three layers into one "application" layer and its bottom two into one "link" layer. OSI is the descriptive framework; TCP/IP is the working implementation. Both matter: TCP/IP is what your packets follow, while OSI is the richer mental map professionals use to reason about and troubleshoot them. Knowing how the two line up is part of understanding networks.

Related Terms

More From This Section