Why layer anything at all?
A single web request touches dozens of separate concerns: what the user asked for, how the data is encoded, whether the connection is encrypted, how it's split into packets, which path those packets take across the internet, and how electrical signals move across a physical cable. No single piece of software could sanely handle all of that at once. So networking splits the problem into layers, each one solving exactly one concern and trusting that the layer below it already solved its own.
A food delivery app works the same way. The app itself only cares about what you ordered. It doesn't think about how your payment gets encrypted, which delivery zone your address falls into, or which street the rider takes to get there. Those are separate systems, each doing one job. OSI and TCP/IP are just two different ways of drawing the lines between those jobs for a network connection. We'll use this same delivery app the whole way down, one layer at a time, so the mapping actually sticks.
The OSI Model (7 layers)
OSI (Open Systems Interconnection) is the academic, 7-layer version. Almost nothing implements it exactly as written, but its vocabulary is what engineers actually say out loud: "that's a Layer 2 problem," "we're seeing Layer 7 errors." You need the terms even though the real internet doesn't run on this model directly.
- Layer 7 (Application): the request itself, the thing the user actually wants. In the app, this is tapping "order" on one large pepperoni pizza. On a network, this is HTTP (Hypertext Transfer Protocol), DNS (Domain Name System), and SMTP (Simple Mail Transfer Protocol) doing the actual asking.
- Layer 6 (Presentation): putting that request into a format both ends agree on, and locking it up if it's sensitive. The app encrypts your card number and formats the order into whatever structure the restaurant's point-of-sale system expects. On the wire, this is TLS/SSL (Transport Layer Security / Secure Sockets Layer) encryption and formats like JPEG (Joint Photographic Experts Group) or ASCII (American Standard Code for Information Interchange) text encoding.
- Layer 5 (Session): keeping one continuous conversation open instead of treating every exchange as a one-off. The app keeps a live order thread running from "placed" to "out for delivery" to "delivered," not five unrelated pings. This is what protocols like NetBIOS (Network Basic Input/Output System) and RPC (Remote Procedure Call) manage on real systems.
- Layer 4 (Transport): deciding how reliable delivery needs to be. Some apps track your order with confirmations at every step; others just fire off a notification and move on. That's the difference between TCP (Transmission Control Protocol: reliable, ordered, acknowledged) and UDP (User Datagram Protocol: fast, no guarantees).
- Layer 3 (Network): figuring out which route gets the order across the city to your address. This is the app's dispatch system doing city-to-city routing, and on a real network it's IP (Internet Protocol) addressing and the routers that forward packets between different networks.
- Layer 2 (Data Link): the last, very local handoff: the rider pulling up to your actual building and finding your specific door. On the wire this is Ethernet framing and MAC (Media Access Control) addresses, handled by switches on the local segment.
- Layer 1 (Physical): the scooter, the road, the fuel. The physical stuff nothing else could happen without. On a network this is voltage on copper, light pulses in fiber, and radio waves for Wi-Fi, the actual signal on the medium.
The TCP/IP Model (4 layers)
TCP/IP is the model the real internet is actually built on. It's more practical than OSI because it merges layers that, in practice, get handled by the same piece of software anyway.
- Application: merges OSI's Application, Presentation, and Session. HTTP, DNS, TLS, and SSH (Secure Shell) all live here: the request, its formatting/encryption, and its session tracking, together.
- Transport: the same job as OSI Layer 4: TCP or UDP deciding how reliable the delivery needs to be.
- Internet: the same job as OSI Layer 3: IP addressing and the routing decisions that get a packet to the right network.
- Network Access (also called Link): merges OSI's Data Link and Physical. Ethernet, Wi-Fi, and the actual signaling on the medium.
Side by side
| OSI Layer | TCP/IP Layer | Delivery-app equivalent | Examples |
|---|---|---|---|
| 7 Application, 6 Presentation, 5 Session | Application | Placing the order, encrypting payment, keeping the order thread open | HTTP, DNS, TLS, SSH, RPC |
| 4 Transport | Transport | Tracked order updates vs. a fire-and-forget notification | TCP, UDP |
| 3 Network | Internet | Dispatch routing the order across the city | IP, ICMP (Internet Control Message Protocol), routers |
| 2 Data Link, 1 Physical | Network Access | The rider finding your door, and the road they rode in on | Ethernet, MAC addresses, Wi-Fi, fiber, copper |
Engineers talk in OSI terms because it's precise and it's what everyone was taught: "that's a Layer 3 issue," "we're doing Layer 2 troubleshooting." But the packets actually on the wire are structured according to TCP/IP's four layers. Expect to use OSI vocabulary in conversation and TCP/IP's real header structures when you're reading a packet capture.