The OSI Model — Seven Layers
Networking Fundamentals
Chapter 2 · The OSI Model — Seven Layers
net1-1 promised a full explanation of "layers" — this chapter is the first, most widely-referenced version of that idea: the seven-layer OSI model. It's a conceptual reference model, not something running anywhere directly, and understanding that distinction is half the point of this chapter.
The Seven Layers, Bottom to Top
- Physical — the actual medium carrying raw bits: cables, radio waves, voltage levels.
- Data Link — framing raw bits into discrete frames, MAC addresses, the layer switches operate at.
- Network — logical addressing (IP addresses) and routing between networks, the layer routers operate at.
- Transport — end-to-end reliability between two endpoints; TCP and UDP, and ports, live here.
- Session — establishing, managing, and tearing down a communication session between applications.
- Presentation — data format translation, encryption, and compression.
- Application — the actual protocols applications use directly: HTTP, DNS, SSH.
A classic mnemonic, bottom to top: Please Do Not Throw Sausage Pizza Away — Physical, Data Link, Network, Transport, Session, Presentation, Application.
Why "Nothing Implements It in Pure Form"
OSI was originally designed in the late 1970s and 1980s as an actual protocol suite, not just a teaching reference — but TCP/IP won out as the real-world implementation the internet actually runs on (the full story is net1-3's own). In practice, real protocols rarely map cleanly onto exactly one OSI layer. TLS, for example, handles concerns that sit somewhere between the session and presentation layers, but in everyday conversation it's usually just described as sitting "between transport and application" — nobody insists on pinning it to layer 5 or layer 6 specifically.
Despite this mismatch, OSI remains genuinely valuable as shared, precise vocabulary. "Layer 2 switch," "Layer 3 routing," "Layer 4 load balancer," "Layer 7 firewall" are all real, commonly used industry terms that only make sense with this model as the shared reference point — that's the actual reason it's still taught, even though nothing runs it directly.
A Worked Example — A Simple File Download
Downloading a file over Wi-Fi, layer by layer: Physical is the actual radio signal between your laptop and the router. Data Link is your network card framing data and addressing it to your router's MAC address. Network is the destination server's IP address. Transport is the TCP connection on port 443, making sure every byte of the file arrives, in order, with nothing missing. Session/Presentation is the TLS encryption wrapping the whole exchange. Application is the actual HTTP GET request asking for the file in the first place.
Where This Course's Own Terminology Will Land
A mental map for the rest of this course: net1-4/net1-5 (IP addressing, subnetting) and net1-6 (routing) all live at Layer 3. net1-7 (TCP vs. UDP) and net1-8 (ports) both live at Layer 4. net1-9 (DNS) is an application-layer (Layer 7) protocol, despite being one of the very first things that happens in any request.
| Layer | Name | Real-world example |
|---|---|---|
| 7 | Application | HTTP, DNS, SSH |
| 6 | Presentation | TLS encryption, data compression |
| 5 | Session | Establishing/tearing down a session |
| 4 | Transport | TCP, UDP, ports |
| 3 | Network | IP addresses, routers |
| 2 | Data Link | MAC addresses, switches |
| 1 | Physical | Cables, radio waves, voltage |
Hands-On Exercises
A colleague says "our load balancer operates at Layer 4, and we're thinking about switching to a Layer 7 load balancer instead." Using this chapter's own table, explain the practical difference between what each type of load balancer can "see" and act on.
📄 View solutionUsing this chapter's own worked file-download example, explain what would happen at the Physical layer specifically if you unplugged your ethernet cable mid-download, and why that's different from a failure at the Transport layer.
📄 View solutionA student insists that TLS must be assigned to exactly one OSI layer, either 5 or 6, and refuses to move on until it's settled. Using this chapter's own warn-box, explain why this is the wrong question to be stuck on.
📄 View solutionChapter 2 Quick Reference
- Seven layers, bottom to top: Physical, Data Link, Network, Transport, Session, Presentation, Application
- Mnemonic: Please Do Not Throw Sausage Pizza Away
- OSI is a reference model and shared vocabulary — nothing runs it in pure form
- "Layer 2 switch," "Layer 3 routing," "Layer 4 load balancer," "Layer 7 firewall" are real, precise industry terms
- Session and Presentation are often folded into "the application" in real TCP/IP-based systems
- net1-4/5/6 → Layer 3, net1-7/8 → Layer 4, net1-9 (DNS) → Layer 7