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

Sakshi KushwahaSakshi Kushwaha
4 min read

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 LayerLayer NameExample
7.ApplicationWeb Browsers (HTTP), Apps (WhatsApp), FTP
6.PresentationEncryption (SSL/TLS), JPEG/MP4 compression
5.SessionLogin Sessions (Netflix stays logged in)
4.TransportTCP (Reliable), UDP (Fast like video streaming)
3.NetworkIP Addressing & Routing (finding server’s location)
2.Data LinkMAC Addresses, LAN Switching
1.PhysicalEthernet, 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 LayerLayer NameExample
4.ApplicationHTTP, HTTPS, DNS, SSH
3.TransportTCP, UDP
2.InternetIP (Internet Protocol), ICMP (ping)
1.Network AccessEthernet, Wi-Fi, MAC Address

OSI vs TCP/IP — How They Connect

Let’s map the two models together:

OSI LayerTCP/IP LayerExample
Application (7), Presentation (6), Session (5)ApplicationHTTP, HTTPS, FTP, DNS
Transport (4)TransportTCP, UDP
Network (3)InternetIP, ICMP
Data Link (2), Physical (1)Network AccessEthernet, 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):

ProtocolPortUse Case
HTTP80Websites (insecure)
HTTPS443Secure websites (SSL/TLS)
FTP21File Transfers
SSH22Secure remote terminal (DevOps essential)
DNS53Converts names to IP addresses
MySQL3306Database connections
PostgreSQL5432Database connections
Redis6379In-memory cache
MongoDB27017NoSQL database

Routers vs Switches — Your Daily Network Tools

DeviceFunctionExample
RouterConnects local network to the internetYour home Wi-Fi router
SwitchConnects devices inside a local networkOffice 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

0
Subscribe to my newsletter

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

Written by

Sakshi Kushwaha
Sakshi Kushwaha