The stack, layer by layer.
Two maps of the same territory. The OSI model splits the network into seven teaching layers; the TCP/IP model collapses them into the four the internet actually runs on. Every protocol and device on this site is filed by where it sits here.
Choose a layer to trace it through the page — its band in TCP/IP, its entry in the detail list, its plate in both stacks and the box it adds when the data is wrapped all light together. Choose it again, or press Esc, to let go.
Data travels down the stack on the way out and back up on the way in — each layer adding, then stripping, its own header. Layer assignments are the classic teaching model; many real devices span several at once.
The seven layers, in detail
Provides network services straight to applications — web requests, email, file transfer, name lookups — and defines the format of the messages they exchange.
Converts data into a form both ends agree on — character encoding, serialization, compression, and the encryption and decryption that keep it private.
Opens, coordinates and closes the dialogue between two hosts — setup, checkpoints and teardown — so a long exchange stays organised.
Splits data into segments and addresses them to a port. TCP guarantees order and reliability; UDP drops the guarantees for raw speed.
Adds IP addresses and routes each packet across networks toward its destination, choosing a path one hop at a time.
Frames the bits, addresses them by MAC on the local link, and checks for errors — moving data between directly connected nodes.
Turns bits into signals — voltage, light or radio — and defines the cables, connectors and timing that carry them on the wire.
Sender and receiver
Data travels down the sender's stack — each layer wrapping the last in its own header — crosses the wire, then travels up the receiver's stack, each layer stripping the header meant for it.
The bits leave the sender's Physical layer, cross the medium, and arrive at the receiver's Physical layer — then climb back up, header by header, until the application reads the original data.
How the data gets wrapped
Going down, each layer takes what it's handed and puts it in its own box — adding a header in front. The application's data becomes the payload inside the transport's box, inside the network's box, inside the frame.
At the receiver it runs in reverse — each layer opens its box, reads and removes its header, and hands the payload up until only the original data is left.
Why two models?
Seven clean layers that make it easy to reason about where a job belongs. Great for learning; no network runs exactly this way.
Four layers that describe what the internet actually implements. OSI’s top three fold into one Application layer.
Each layer wraps the one above in its own header on the way out, and unwraps it on the way in — a packet inside a frame inside a signal.