Internet Architecture - OSI Model, TCP/IP, Protocols, Ports & Networking Devices

In the last post, we talked about how the Internet works and how your data travels through underwater cables.
Today, let’s go one level deeper and understand the actual architecture of the internet using models, protocols, ports, and devices.
OSI Model — The 7-Layer of Networking
Think of the OSI Model (Open Systems Interconnection) like a 7-layer cake, where each layer handles a specific part of the communication process.
OSI Layer | Layer Name | Example |
7. | Application | Web Browsers (HTTP), Apps (WhatsApp), FTP |
6. | Presentation | Encryption (SSL/TLS), JPEG/MP4 compression |
5. | Session | Login Sessions (Netflix stays logged in) |
4. | Transport | TCP (Reliable), UDP (Fast like video streaming) |
3. | Network | IP Addressing & Routing (finding server’s location) |
2. | Data Link | MAC Addresses, LAN Switching |
1. | Physical | Ethernet, Wi-Fi, Fiber Cables |
TCP/IP Model — The Practical Internet Model
The TCP/IP Model is what the internet actually uses in real life. It’s simpler and has 4 layers.
TCP/IP Layer | Layer Name | Example |
4. | Application | HTTP, HTTPS, DNS, SSH |
3. | Transport | TCP, UDP |
2. | Internet | IP (Internet Protocol), ICMP (ping) |
1. | Network Access | Ethernet, Wi-Fi, MAC Address |
OSI vs TCP/IP — How They Connect
Let’s map the two models together:
OSI Layer | TCP/IP Layer | Example |
Application (7), Presentation (6), Session (5) | Application | HTTP, HTTPS, FTP, DNS |
Transport (4) | Transport | TCP, UDP |
Network (3) | Internet | IP, ICMP |
Data Link (2), Physical (1) | Network Access | Ethernet, Wi-Fi, MAC Address |
OSI is more theoretical (7 layers), TCP/IP is more practical (4 layers).
OSI focuses on “how it should work”, TCP/IP focuses on “how it actually works on the internet.”
Common Protocols and Port Numbers You See Every Day
Here are the most used protocols and their port numbers (super useful in DevOps):
Protocol | Port | Use Case |
HTTP | 80 | Websites (insecure) |
HTTPS | 443 | Secure websites (SSL/TLS) |
FTP | 21 | File Transfers |
SSH | 22 | Secure remote terminal (DevOps essential) |
DNS | 53 | Converts names to IP addresses |
MySQL | 3306 | Database connections |
PostgreSQL | 5432 | Database connections |
Redis | 6379 | In-memory cache |
MongoDB | 27017 | NoSQL database |
Routers vs Switches — Your Daily Network Tools
Device | Function | Example |
Router | Connects local network to the internet | Your home Wi-Fi router |
Switch | Connects devices inside a local network | Office LAN switches |
Simple Trick:
Router = Connects you to the world 🌍
Switch = Connects your devices locally 🖥️
Client-Server Model — How Apps Like YouTube Work
Every time you use an app like YouTube or Instagram:
You: Client (sending requests).
Server (Youtube’s Server): Server (responding with data).
This Client-Server Model is the backbone of the modern internet.
- Client sends request → Server processes and responds → Client receives data.
Quick Reminder on Ports & Firewalls
Ports are like apartment doors in a big building (your computer).
Example: HTTP uses Port 80, SSH uses Port 22, etc.
Firewalls can open/close ports to allow or block services for security.
You can check open ports using:
netstat -tulnp
Summary
OSI Model — 7 layers explained
TCP/IP — 4-layer practical model
Protocols & Ports — daily internet rules
Routers & Switches — how networks connect
Client-Server — how apps communicate
Subscribe to my newsletter
Read articles from Sakshi Kushwaha directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
