← Module 01 · Networking Fundamentals FUND

OSI Model vs TCP/IP Model

Two different ways of slicing up "everything involved in getting data from A to B" into layers. You'll hear both used interchangeably in the real world, so you need to be fluent in both.

Why layer anything at all?

Imagine you had to think about electrical voltage on a cable at the exact same moment you were thinking about what a web page's HTML looks like. That would be unmanageable — so networking is broken into layers, where each layer only has to worry about its own job and trusts the layer below it to have already handled its part.

Think about mailing a letter internationally. You write a letter (the content), put it in an envelope with an address (so the postal system can route it), the local post office bags it with other mail heading the same direction, a truck carries the bag to an airport, a plane flies it to the destination country, and a local carrier makes the final delivery to the door. You never think about "how planes fly" while writing the letter — that's a different layer's problem. Networking models exist for the same reason: to separate concerns.

The OSI Model — 7 layers

OSI (Open Systems Interconnection) is the theoretical, academic model. It's rarely implemented exactly as written, but its vocabulary is everywhere — "that's a Layer 2 problem," "we're seeing Layer 7 errors" — so you need it even though the real Internet doesn't run on it directly.

The TCP/IP Model — 4 layers

TCP/IP is the model the real Internet is actually built on. It's more practical and compresses OSI's upper three layers into one, since in practice applications, presentation, and session concerns are usually handled together by the same piece of software.

OSI MODEL TCP/IP MODEL 7 · Application 6 · Presentation 5 · Session 4 · Transport 3 · Network 2 · Data Link 1 · Physical Application Transport Internet Network Access
OSI's Application, Presentation, and Session layers all collapse into one TCP/IP Application layer; Data Link and Physical collapse into Network Access.

Side by side

OSI LayerTCP/IP LayerReal-world analogyExamples
7 Application, 6 Presentation, 5 SessionApplicationWriting the letter, choosing the language, agreeing to keep writing back and forthHTTP, DNS, TLS, SSH
4 TransportTransportTracked courier vs. a postcardTCP, UDP
3 NetworkInternetThe destination address that routes it across citiesIP, ICMP, routers
2 Data Link, 1 PhysicalNetwork AccessThe local carrier and the actual road/truckEthernet, MAC addresses, Wi-Fi, cabling
WHY YOU NEED BOTH

Engineers talk in OSI terms ("that's a Layer 3 issue," "we're doing Layer 2 troubleshooting") because it's precise and everyone was taught it — but the actual packets on the wire are structured according to TCP/IP. You'll use OSI vocabulary daily and TCP/IP's actual header structures whenever you're reading a packet capture.