How does the TCP/IP model differ from the OSI model?
Show the answer
Say this first
The TCP/IP model is the one the internet actually runs. RFC 1122 defines four layers: link, internet, transport and application. OSI splits the link layer into physical and data link, and splits the top into session, presentation and application. Many textbooks use a five-layer hybrid: physical, data link, network, transport, application. OSI is the vocabulary we use; TCP/IP is the protocol suite that won.
Go deeper
Side by side
| OSI | TCP/IP (RFC 1122) | Protocols |
|---|---|---|
| 7 Application, 6 Presentation, 5 Session | Application | HTTP, DNS, DHCP, SSH, TLS, BGP |
| 4 Transport | Transport | TCP, UDP |
| 3 Network | Internet | IPv4, IPv6, ICMP |
| 2 Data link, 1 Physical | Link | Ethernet, Wi-Fi, PPP |
Why the difference matters
- OSI was designed first as a model, then protocols were written to fit it. TCP/IP grew from working protocols, and the model describes what was built.
- In TCP/IP the application handles what OSI calls session and presentation. TLS, for example, is a library the application calls.
- When engineers say "layer 2", "layer 3", "layer 4" or "layer 7" they borrow OSI numbers even though they run TCP/IP. Nobody says "layer 5 problem" in practice.
They will ask next
Why do some books show TCP/IP with five layers and others with four?
The original RFC 1122 model has four layers, with one link layer. Many teaching texts split the link layer into physical and data link because the two have very different problems (signals versus framing). Both are fine as long as you say which you are using.
Where does TLS sit in the TCP/IP model?
In the application layer. It runs on top of TCP and below HTTP, so in OSI terms people place it at layer 6 or describe it as sitting between layers 4 and 7.
Traps
- Saying TCP/IP has seven layers. It has four (or five in the teaching variant).