The OSI 7-Layer Model and Protocols
Why Layered Models Exist
Sending data across a network involves dozens of different tasks: converting a file to electrical signals, addressing packets, establishing connections, encrypting data, and presenting information on screen. The OSI model (Open Systems Interconnection model) organises these tasks into seven separate layers. Each layer has a clearly defined job and only needs to communicate with the layers directly above and below it. This makes networks easier to design, troubleshoot and develop: engineers can update one layer without rewriting the rest.
A common weakness is being able to name the OSI layers but not describe what each one does. This lesson focusses on function, not just naming. A common mnemonic for the layers from bottom to top: Please Do Not Throw Sausage Pizza Away (Physical, Data Link, Network, Transport, Session, Presentation, Application).
The seven OSI layers from bottom to top are: Physical (1), Data Link (2), Network (3), Transport (4), Session (5), Presentation (6), Application (7). The mnemonic “Please Do Not Throw Sausage Pizza Away” helps you recall the correct order.
Layer 1 — Physical
The Physical layer is responsible for transmitting raw bits (0s and 1s) over a physical medium — copper cable, fibre-optic cable or radio waves. It defines the electrical signals, voltages, connector types and timing used to represent binary data. The Physical layer has no concept of structure or meaning; it simply transmits and receives signals.
Protocols and standards at this layer include Ethernet (cabling) and IEEE 802.11 (Wi-Fi radio). Hardware at this layer includes cables, repeaters and hubs.
Layer 2 — Data Link
The Data Link layer takes the raw bits from the Physical layer and organises them into frames. It handles node-to-node delivery within a single network segment, using MAC addresses to identify source and destination. The Data Link layer also performs basic error detection (not correction) to check whether a frame arrived without corruption.
Protocols at this layer include Ethernet (the framing standard for wired LANs) and Wi-Fi (IEEE 802.11). Hardware: switches and bridges operate at this layer.
Layer 3 — Network
The Network layer is responsible for routing data across multiple networks from source to destination. It uses IP addresses (logical addresses) to identify devices globally and selects the best path for each packet. The data unit at this layer is a packet.
The key protocol at this layer is IP (Internet Protocol). Hardware: routers operate at this layer, reading IP addresses to decide where to forward each packet.
Layer 4 — Transport
The Transport layer manages end-to-end communication between applications on different hosts. It breaks data into segments and ensures they are reassembled correctly at the destination. It also handles flow control (preventing a fast sender from overwhelming a slow receiver) and error recovery (requesting retransmission of lost segments).
Two key protocols operate here:
- TCP (Transmission Control Protocol) — connection-oriented. Before data is sent, TCP establishes a connection with a three-way handshake and guarantees delivery by acknowledging every segment. Used where accuracy matters: web pages (HTTP), email (SMTP), file transfer (FTP).
- UDP (User Datagram Protocol) — connectionless. Segments are sent without acknowledgement, so UDP is faster but unreliable. Used where speed matters more than accuracy: video streaming, online gaming, voice calls.
TCP (Transport layer) guarantees reliable, ordered delivery by acknowledging every segment — used by HTTP, SMTP and FTP. UDP sends segments without acknowledgement for speed — used by video streaming and online gaming. Both are Transport layer protocols.
Layer 5 — Session
The Session layer establishes, manages and terminates sessions (conversations) between applications. A session is an ongoing exchange: for example, a video call between two computers involves a session that keeps both sides synchronised. The Session layer also provides checkpointing — if a large data transfer fails midway, the transfer can resume from the last checkpoint rather than restarting from scratch.
Layer 6 — Presentation
The Presentation layer is responsible for translating data between the format the application uses and the format the network requires. Its three main tasks are data translation (converting character encodings, for example between UTF-8 and ASCII), data compression (reducing size before transmission) and encryption (scrambling data for secure transmission). HTTPS encryption (TLS/SSL) is handled at this layer.
Layer 7 — Application
The Application layer is the topmost layer and the one users interact with directly. It provides the interface between the network and the software applications running on a device. This is where user-facing protocols operate.
Key Application layer protocols:
- HTTP (Hypertext Transfer Protocol) — transfers web pages between a server and a browser.
- HTTPS (HTTP Secure) — HTTP with TLS encryption; used for secure web browsing and online transactions.
- FTP (File Transfer Protocol) — transfers files between a client and a server.
- SMTP (Simple Mail Transfer Protocol) — sends email from a client to a mail server or between mail servers.
- POP3 / IMAP — retrieve email from a server. POP3 downloads and deletes from the server; IMAP keeps mail on the server and synchronises across devices.
- DNS (Domain Name System) — translates human-readable domain names (e.g. studyvault.co.uk) into IP addresses.
- DHCP (Dynamic Host Configuration Protocol) — automatically assigns IP addresses to devices joining a network.
Use this table to review all seven layers before a practice exam:
| Layer | Name | Responsibility | Key protocols / hardware |
|---|---|---|---|
| 7 | Application | User-facing services | HTTP, HTTPS, FTP, SMTP, DNS, DHCP |
| 6 | Presentation | Translation, compression, encryption | TLS/SSL, JPEG, ASCII |
| 5 | Session | Start, manage and end sessions | NetBIOS, checkpointing |
| 4 | Transport | End-to-end delivery, flow control | TCP, UDP |
| 3 | Network | Routing packets across networks | IP — Routers |
| 2 | Data Link | Frame delivery within a network segment | Ethernet, Wi-Fi — Switches, Bridges |
| 1 | Physical | Transmit raw bits over a medium | Cables, Hubs, Repeaters |
Misconception 1: “HTTP is at the Transport layer.” HTTP is an Application layer protocol. The Transport layer is where TCP and UDP operate — HTTP runs on top of TCP at the Application layer.
Misconception 2: “Routers work at the Data Link layer.” Routers operate at the Network layer (layer 3), reading IP addresses. Switches operate at the Data Link layer (layer 2), reading MAC addresses.
Misconception 3: “Encryption happens at the Application layer.” Encryption is primarily a Presentation layer function (layer 6). TLS/SSL, used for HTTPS, is a Presentation layer service even though it is triggered by an Application layer protocol.