Networking Fundamentals
The OSI Model Explained, Layer by Layer
The OSI model is a mental map of how networks work, splitting the messy reality of communication into seven tidy layers.
Why a layered model?
Networking is complicated: cables, radio, addresses, error correction, encryption, applications. The Open Systems Interconnection (OSI) model tames that complexity by dividing it into seven layers, each responsible for one job and each talking only to the layers directly above and below it. This separation means you can change one layer (say, swap Wi-Fi for Ethernet) without rewriting everything else.
The seven layers, top to bottom
- 7. Application — what the user interacts with: web browsers, email, apps. Protocols like HTTP live here.
- 6. Presentation — formatting, encryption, and compression; making data readable to the application.
- 5. Session — starting, managing, and ending conversations between programs.
- 4. Transport — reliable delivery and flow control. TCP and UDP operate here, using port numbers.
- 3. Network — addressing and routing across networks. This is where IP addresses live.
- 2. Data Link — moving frames between directly connected devices; MAC addresses live here.
- 1. Physical — the raw bits on wires, fiber, or radio waves.
A quick example
When you load a web page, the application layer forms an HTTP request, the transport layer wraps it in TCP with a port number, the network layer adds source and destination IP addresses, the data link layer frames it for your local network, and the physical layer sends the actual signal. At the other end, the process runs in reverse, layer by layer.
OSI vs. reality
The real internet uses the simpler TCP/IP model, which collapses OSI's seven layers into four. So why learn OSI? Because it is the shared vocabulary of networking. When an engineer says "that's a layer 3 problem," they mean routing and IP addresses; "layer 7" means the application. The model is a map, not the territory — but it is the map everyone uses.
Remembering the layers
A classic mnemonic from top to bottom is "All People Seem To Need Data Processing." Silly, but it sticks — and knowing which layer a problem lives on is half of solving it.