Why do we use layered models at all?
Show the answer
Say this first
Layering lets each protocol solve one problem and trust the layer below for the rest. You can swap Wi-Fi for Ethernet without changing TCP, or change HTTP without touching IP. It also gives engineers a shared vocabulary and a structured way to troubleshoot: prove the physical link, then layer 2, then layer 3, and so on.
Go deeper
What layering buys you
- Independence. Each layer offers a service to the one above through a defined interface. IP runs over Ethernet, Wi-Fi, LTE or an MPLS label switched path without changes.
- Interoperability. Vendors build to one layer's standard. A Cisco switch and a Linux host agree on Ethernet without agreeing on anything above it.
- Troubleshooting. "Link is up, I can ARP for the gateway, but I cannot ping past it" puts the fault at layer 3 in a few seconds.
- Encapsulation. Each layer adds its own header, so devices only look as deep as they need. A switch reads the Ethernet header; a router reads the IP header.
The cost
Every layer adds header overhead and some processing. Strict layering also hides useful information, which is why real systems cross layers on purpose: TCP MSS is set from the interface MTU, and QoS marks at layer 3 (DSCP) are mapped to layer 2 (CoS).
They will ask next
Give an example of one layer changing without affecting another.
A laptop moves from Ethernet to Wi-Fi. Layer 1 and layer 2 change completely. If it keeps the same IP address, its TCP sessions continue, because TCP only cares about IP addresses and ports.
Traps
- Treating the model as how packets are built in strict order in every case. Real stacks cross layers (MSS from MTU, ARP serving IP).