Field guide · Networking & wireless
The OSI Model, Layer by Layer
The OSI model is the seven-layer map every network conversation follows, from the application at the top to the wire at the bottom. This one is interactive: rotate the stack, click any layer, and see what it does, the protocols and data unit it works in, and how it hands off to the layers on either side of it.
Diagram
Seven layers, what each does, and how they hand off.
The layer applications talk to — not the app itself, but the network-facing protocols software speaks to send and receive over the network.
What it does- Exposes network services to applications
- Defines the request/response protocols
- Handles human-level naming — URLs, email and host addresses
HTTP, HTTPS, DNS, SMTP, IMAP, FTP, SSH, DHCP
Browsers, mail clients, API servers, next-gen firewalls
Encapsulation. To send, data travels down the stack — each layer wraps what it gets from above in its own header. To receive, it travels up — each layer strips its header and hands the rest up. That is why a hub only reaches Layer 1, a switch Layer 2, a router Layer 3, and a classic firewall Layer 4.
All People Seem To Need Data Processing
The layer applications talk to — not the app itself, but the network-facing protocols software speaks to send and receive over the network.
HTTP, HTTPS, DNS, SMTP, IMAP, FTP, SSH, DHCP
Top of the stack. Passes your data down to Presentation (6) to be formatted and, where needed, encrypted before it goes near the wire.
The translator. It puts data into a form both ends agree on — character encoding, compression, and encryption all happen here.
TLS/SSL, Unicode/ASCII, JPEG, PNG, MP4, ASN.1
Takes application data from Application (7) and encodes or encrypts it into a wire-ready shape. Hands the formatted data to Session (5) to be placed in a managed conversation.
The conversation manager. It opens, tracks, and closes the dialogues between two applications and keeps concurrent ones from tangling.
NetBIOS, RPC, SMB, sockets, TLS session resumption
Wraps Presentation's (6) data in a session so both ends know which conversation it belongs to. Relies on Transport (4) to actually deliver the session's data between the two hosts.
End-to-end delivery between programs. It splits data into segments, labels them with port numbers, and — with TCP — guarantees they arrive in order and intact.
TCP, UDP, QUIC · ports 443, 80, 22
Breaks the session's stream into numbered segments and adds source and destination ports so the right program gets it. Hands each segment to Network (3) to be routed across networks to the destination host.
Routing between networks. It gives every host a logical address (IP) and chooses a path for packets to cross from one network to another.
IP, ICMP, IPsec · OSPF, BGP
Wraps each Transport (4) segment in a packet stamped with source and destination IP addresses. Hands the packet to Data Link (2) for delivery across the next single hop.
Delivery across one link. It moves frames between two directly-connected nodes using hardware (MAC) addresses and catches errors on that hop.
Ethernet, Wi-Fi (802.11), ARP, PPP, VLANs
Wraps the Network (3) packet in a frame with source and destination MAC addresses for the next hop. Hands the frame to Physical (1) to be sent as raw signals on the medium.
The wire itself. It turns bits into signals — voltage, light, or radio — and defines the cables, connectors, and pinouts that carry them.
Cat6/Cat6A copper, fibre, radio (RF)
Encodes the Data Link (2) frame's bits as physical signals on the medium. Sits directly on the physical medium.
Questions
Questions people actually ask
- What are the seven layers of the OSI model?
- From the top down: Application, Presentation, Session, Transport, Network, Data Link, and Physical — layers 7 to 1. A common mnemonic is 'All People Seem To Need Data Processing.' Data travels down the stack to send and back up it to receive.
- What is the difference between the OSI model and TCP/IP?
- The OSI model is a seven-layer teaching reference; TCP/IP is the four-layer model the internet actually runs on. TCP/IP's Application layer covers OSI 5–7, its Transport and Internet layers map to OSI 4 and 3, and its Link layer covers OSI 2 and 1. OSI is better for reasoning about where a problem lives; TCP/IP is what is implemented.
- What is a Protocol Data Unit (PDU)?
- The name for the chunk of data at each layer. It is Data at layers 5–7, a Segment (a Datagram for UDP) at Layer 4, a Packet at Layer 3, a Frame at Layer 2, and a Bit at Layer 1. Each layer wraps the one above it — that wrapping is encapsulation.
- Which layer does a router, switch, or firewall work at?
- A hub is Layer 1, a switch is Layer 2 (it forwards by MAC address), and a router is Layer 3 (it routes by IP address). A traditional firewall works at Layer 4 on ports, while a next-generation firewall inspects all the way up to Layer 7.
- Is HTTPS encryption at Layer 6 or Layer 7?
- Encryption is usually taught at Layer 6, Presentation, because that is the layer that turns data into a wire format. In practice TLS sits just below the application and above TCP, which is why HTTPS is called application-layer in TCP/IP terms. Both are right, depending on which model you are using.
Other guides
Related guides
- 01
Subnetting, Explained
Where the numbers come from, and the meaning behind them. - 02
Active Directory, Explained
Forests, domains, roles, and how a login really works. - 03
Writing a Switch Configuration
From factory default to a switch you would hand over. - 04
VLANs and Trunking
Access, trunk, tagged, native — and which one is the security hole. - 05
Spanning Tree and Switching Loops
Why one patch cord can take a whole floor down in seconds. - 06
Reading a Traceroute
Which loss is real, and whose network it is in.
Book the work
We do this work
as well as document it
Anyone studying for a networking cert, learning where a protocol or device fits, or explaining the stack to someone else.
- Free guides
- No sign-up
- Nothing tracked
- Written on the job