Foundations: What a Network Is

layering

Layering is the big organizing idea of networking, and it shows up all over engineering: break a hard job into a stack of layers, where each layer does one thing well, offers a tidy service to the layer above, and uses the service of the layer below — without needing to know how that lower layer does its job. Think of nested envelopes, or of how you can drive a car using the steering wheel and pedals without understanding the engine: a clean interface hides the messy details beneath.

Concretely, layering means defining clear boundaries. The application layer worries about web pages and emails; it hands data down and trusts the transport layer to deliver it reliably; the transport layer trusts the network layer to find a route; the network layer trusts the link layer to cross one hop; the link layer trusts the physical layer to push bits. Each layer talks logically to its peer layer on the other machine (HTTP to HTTP, TCP to TCP) while physically only ever passing data to its neighbors above and below. The contract between layers is a service interface; how a layer fulfills it is its own private business.

Why do it this way? Modularity and evolution. Because layers are independent, you can replace or upgrade one without rewriting the others — fiber can replace copper at the physical layer, QUIC can replace TCP at the transport layer, and the layers above carry on. The cost is some inefficiency (each layer adds its own header and sometimes duplicates work) and the fact that strict layering is occasionally violated for performance. But the benefit — a global network built by countless independent teams that still interoperates — is exactly what layering buys.

When Wi-Fi replaced cabled Ethernet, your browser, TCP, and IP did not change a single line — only the link and physical layers did. That is layering paying off.

Each layer a self-contained job behind a clean interface — swap one, the rest carry on.

Layering trades a little efficiency (extra headers, occasional duplicate work) for enormous modularity. Knowing when a real system deliberately breaks layering (NAT, TLS termination) is a sign of deeper understanding, not a flaw in the idea.

Also called
protocol layering分層協定分層