OSI & TCP/IP Models Explained — The Way I Wish Someone Taught Me

Abhishek NegiAbhishek Negi
4 min read

I’ll be honest — when I first heard about the OSI Model, I thought, “Great, just another boring theory thing to memorize.” But the more I started tinkering with servers, trying to troubleshoot connection issues, or configuring ports — the more I realized how valuable this stuff really is.

So, if you’re like me — someone who prefers real-world examples over textbook definitions — here’s how I broke it down for myself.


🍰 The OSI Model: 7 Layers, Like a Layered Cake

The OSI Model stands for Open Systems Interconnection, and it's a way to explain how data moves from one device to another — step by step.

It has 7 layers. I remembered them using the phrase:

All People Seem To Need Data Processing (Application → Physical)

Let me walk you through each one, the way I understood it — with real stuff we actually deal with.

LayerWhat it DoesReal Example
7 – ApplicationThis is what the user interacts withOpening your browser and hitting https://google.com – that’s Application Layer using HTTP
6 – PresentationPrepares the data for the appData gets encrypted using TLS here (think HTTPS)
5 – SessionManages sessions between systemsWhen you SSH into a server, this layer keeps the session alive
4 – TransportMakes sure data arrives correctlyTCP ensures that the webpage loads fully, not just bits of it
3 – NetworkDecides the path the data takesIP handles routing – like GPS for your data packets
2 – Data LinkMoves frames between devices on the same networkMAC addresses talk to each other here (like your router and laptop)
1 – PhysicalActual physical connectionEthernet cable, Wi-Fi signals – the stuff you can physically touch or sense

💡 A Simple Analogy: Sending a Gift 🎁

This helped me visualize it better:

  • You write a note = Application

  • You wrap the gift = Presentation

  • You schedule pickup = Session

  • Courier ensures it reaches = Transport

  • Courier chooses best route = Network

  • Delivery guy finds door = Data Link

  • Package is handed over = Physical

Boom. That’s the OSI model — just like sending something over Amazon 😄


🧰 TCP/IP Model: What We Actually Use

The OSI model is great for understanding concepts, but in the real world, we mostly work with the TCP/IP Model. It’s leaner — just 4 layers — and everything on the internet follows this.

Here’s how it maps:

TCP/IP LayerRelated OSI LayersWhat Happens Here
ApplicationLayers 5–7Protocols like HTTP, FTP, DNS do their thing
TransportLayer 4TCP/UDP ensures how data moves
InternetLayer 3IP routes your packets
Network AccessLayers 1–2Ethernet, Wi-Fi, MACs, etc. physically move data

This is what powers everything from sending an email to streaming YouTube.


🛠️ Real DevOps Examples by Layer

Here’s how this connects to stuff I’ve worked on:

  • Layer 7 (Application) – Setting up Nginx or Apache? That’s right here.

  • Layer 4 (Transport) – Need to check if port 22 or 443 is open? That’s the Transport layer.

  • Layer 3 (Internet) – Can’t ping your EC2 server? Could be an IP issue here.

  • Layer 1–2 (Physical + Data Link) – Messing with MAC filters on corporate networks or fixing network cards.

You don’t always think in terms of layers when you troubleshoot — but once you do, problems start making more sense.


🚀 Protocols You’ll Bump Into (a lot)

ProtocolPortWhat It's Used For
HTTP80Web traffic (insecure)
HTTPS443Encrypted web traffic
SSH22Secure shell login
DNS53Resolves domains to IP
FTP21File transfers (kind of old now)
ICMPUsed by ping, not port-based

In DevOps, you’ll find yourself configuring firewalls, security groups, or even just checking connectivity using these protocols.


🧪 Quick Troubleshooting Tip

Whenever something breaks, I use this mental checklist:

  1. Can I ping it? → Layer 3 (Internet)

  2. Can I reach the port? → Layer 4 (Transport)

  3. Is the service running correctly? → Layer 7 (Application)

It helps narrow things down fast — and makes you look like you know what you're doing, even if you're winging it 😅

0
Subscribe to my newsletter

Read articles from Abhishek Negi directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Abhishek Negi
Abhishek Negi