Konstas.Engineering Notes
Networking · Cybersecurity · Infrastructure
Networking

The OSI and TCP/IP Models, Revisited

Articles · July 2026 · Ioannis (John) Konstas

The OSI model is the most-memorized, least-understood diagram in networking. Learners recite seven layers for an exam and promptly forget why they exist. The point was never the mnemonic — it's that networking is layered abstraction, where each layer offers a service to the one above and consumes the one below, so problems can be reasoned about in isolation. Get that, and the model becomes a diagnostic tool instead of trivia.

The seven layers, by what they actually do

#LayerJobYou'd recognize
7ApplicationWhat the user/app speaksHTTP, DNS, SMTP
6PresentationEncoding, encryption, compressionTLS, character sets
5SessionEstablishing/managing dialogsSession setup, RPC
4TransportEnd-to-end delivery, portsTCP, UDP, QUIC
3NetworkLogical addressing, routingIP, ICMP, routing
2Data LinkLocal delivery, framing, MACEthernet, ARP, switches
1PhysicalBits on the wire/airCables, radio, voltages

TCP/IP: the model we actually run

The internet doesn't implement OSI — it runs the TCP/IP (DoD) model, which predates OSI and collapses those seven layers into four: Application (OSI 5-7), Transport (4), Internet (3), and Link/Network Access (1-2). OSI is the reference vocabulary; TCP/IP is the engineering reality. Both are useful — you'll hear engineers say "that's a Layer 2 problem" (OSI) while debugging a stack that's really TCP/IP. Hold both without confusing them.

Encapsulation: the idea that makes it work

As data descends the stack, each layer wraps it in its own header (and sometimes trailer): your HTTP request becomes a TCP segment, inside an IP packet, inside an Ethernet frame, becomes bits. The receiver reverses it on the way up. This nesting is why a switch can forward a frame without caring about HTTP, and why a router rewrites Layer-2 addresses at every hop while leaving Layer-3 intact.

# Watch encapsulation live: one HTTP GET, every layer visible
sudo tcpdump -i any -n -vvv -X 'tcp port 80' &
curl http://example.com/ > /dev/null
# tcpdump shows: Ethernet frame -> IP packet -> TCP segment -> HTTP payload
# Note how src/dst MAC (L2) differ from src/dst IP (L3): the router rewrote L2.

The model as a troubleshooting ladder

The layers' real payoff is a debugging method — work bottom-up and stop guessing:

  1. L1 Physical: link light, cable, interface up? ip link
  2. L2 Data Link: ARP resolving, correct VLAN, switch port? ip neigh
  3. L3 Network: IP, gateway, route, can you ping? ip addr, ip route, ping
  4. L4 Transport: is the port open, firewall in the way? ss -tlnp, nc -vz host port
  5. L7 Application: DNS, TLS, the app itself? dig, curl -v

"It's DNS" is funny because it's an L7 problem people reach for after skipping L1-L4. The layered method stops that.

The security angle

Attacks and defenses live at layers too, and naming the layer clarifies the fix: ARP spoofing is L2, IP spoofing and routing attacks are L3, SYN floods are L4, and application exploits and most DDoS are L7. A firewall that only inspects L3-4 cannot see an L7 attack — the exact gap that drove the evolution toward next-gen firewalls (see Firewall Architectures).

The OSI model isn't seven words to memorize — it's a promise that networking is layered, so a problem can be isolated to one layer and solved there. TCP/IP is what actually runs; OSI is how we talk about it.

← All articles

Research and direction by Ioannis (John) Konstas; compiled and finalized with AI assistance.

👁· views