The OSI and TCP/IP models: layers, functions and encapsulation
In short: Network models break communication into layers so each part can be understood, built and fixed separately. OSI has seven layers; TCP/IP, which the internet actually uses, has four. As data moves down the layers each one adds a header, a process called encapsulation.
Why use network models?
Sending a message across a network involves many separate jobs: turning data into signals, finding the right device, choosing a route, checking for errors and presenting the result to the user. Network models split these jobs into layers. Each layer does one job and relies on the layer below it. They work much like a country's constitution: a common set of rules that everyone follows. Layered models:
- reduce complexity by breaking a big problem into small parts;
- standardise the interfaces between parts, so products from different vendors work together;
- let one layer change (for example, a new cable type) without changing the others;
- make teaching, learning and troubleshooting much easier.
The OSI model
The Open Systems Interconnection (OSI) model was published by ISO in 1984. It is a reference model, not a protocol: it describes what has to happen so that any two systems can communicate, whatever their hardware or software.
| Layer | Main job | Examples |
|---|---|---|
| 7 Application | Gives applications and users access to network services. | HTTP, DNS, SMTP, FTP |
| 6 Presentation | Translates data into a standard format; handles encryption and compression. | TLS encryption, JPEG, UTF-8 |
| 5 Session | Opens, manages and closes conversations (sessions) between applications. | Session setup and recovery |
| 4 Transport | Delivers data end to end between applications, using port numbers; splits data into segments, controls flow and recovers errors. | TCP, UDP |
| 3 Network | Logical (IP) addressing and routing packets from source to final destination across networks. | IP, ICMP; routers |
| 2 Data Link | Moves frames between neighbouring devices on the same link, using MAC addresses; detects errors. | Ethernet, Wi-Fi; switches |
| 1 Physical | Sends raw bits as electrical, light or radio signals. | Cables, connectors, radio |
Memory aid (top to bottom): All People Seem To Need Data Processing.
Encapsulation: how data travels down the layers
When you send something, each layer wraps the data from the layer above with its own control information, called a header:
- The application prepares the data, for example a web page request.
- The transport layer splits it into segments and adds a TCP header with port numbers, sequence numbers and a checksum.
- The network layer adds an IP header with the source and destination IP addresses, creating a packet.
- The data link layer adds a frame header with MAC addresses and a trailer with a Frame Check Sequence (FCS) for error detection, creating a frame.
- The physical layer sends the frame as bits.
At the receiver, the process runs in reverse (de-encapsulation): each layer reads and removes its own header, then passes the rest up.
The TCP/IP model
The TCP/IP model grew out of a US Department of Defense research project and became the model the internet actually runs on. It has four layers:
- Application: combines OSI layers 5, 6 and 7. Protocols: HTTP, DNS, SMTP, FTP, SSH.
- Transport: end-to-end delivery between hosts using TCP (reliable) or UDP (fast).
- Internet: addressing and routing packets across networks with IP, plus ICMP and ARP.
- Network Access (or Link): the physical connection and framing, such as Ethernet and Wi-Fi.
Engineers still talk in OSI layer numbers ("it's a layer 2 problem") because the seven layers are more precise, while the protocols themselves follow TCP/IP. See the OSI model, used the way engineers use it for troubleshooting tips.
Practice
Which OSI layer uses IP addresses, and which uses MAC addresses?
Put these in the order they are added when sending: IP header, TCP header, frame header.
Which OSI layers does the TCP/IP Application layer cover?
Key takeaways
- Layered models break communication into simpler jobs and let vendors interoperate.
- OSI has seven layers: Application, Presentation, Session, Transport, Network, Data Link, Physical.
- Data units: segment (layer 4), packet (layer 3), frame (layer 2), bits (layer 1).
- Encapsulation adds a header at each layer on the way down; the receiver removes them on the way up.
- TCP/IP has four layers and is what the internet really uses.
Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.