The OSI Reference Model and the TCP/IP Model
Learn how OSI and TCP/IP layer models separate IP, TCP/UDP, TLS, HTTP, DNS, cookies, browser state, and anonymity risks.
When learning about networks, you encounter the terms OSI reference model and TCP/IP model.
Both are models for understanding communication mechanisms by dividing them into layers. Instead of seeing communication as one huge mechanism, separating it by role makes it easier to organize where something is happening and what is happening there.
This layered view is also useful when thinking about anonymity.
IP addresses, TCP, UDP, TLS, HTTP, DNS, cookies, and browser information are not all the same kind of issue. When you separate what is visible at each layer, it becomes easier to understand "what changes with a VPN," "what HTTPS protects," and "why cookies are a separate problem."
This article organizes the basics of the OSI reference model and the TCP/IP model. A more detailed explanation of layers is covered in "What Is a Network Layer Model?"
What Is the OSI Reference Model?
The OSI reference model is a model that divides communication into seven layers.
Rather than representing real Internet implementations exactly as they are, it is used as a way of thinking that organizes the roles of communication.
| Layer | Main role | Examples |
|---|---|---|
| Layer 7 Application layer | Application communication | HTTP, DNS |
| Layer 6 Presentation layer | Data formats and representation | Character encoding, compression, encryption concepts |
| Layer 5 Session layer | Managing communication conversations | Session management concepts |
| Layer 4 Transport layer | How data is delivered | TCP, UDP |
| Layer 3 Network layer | Delivery to the destination | IP, routing |
| Layer 2 Data link layer | Communication within the same segment | Ethernet, Wi-Fi |
| Layer 1 Physical layer | Carrying data as signals | Electrical signals, radio waves, light |
The OSI reference model is useful as a learning map.
However, in many cases the TCP/IP model is easier for explaining the actual Internet.
What Is the TCP/IP Model?
The TCP/IP model is often used when understanding actual Internet communication.
It is generally organized into four layers.
| Layer | Main role | Examples |
|---|---|---|
| Application layer | Communication rules between applications | HTTP, DNS, SMTP |
| Transport layer | How data is delivered | TCP, UDP |
| Internet layer | Delivering to the destination by IP address | IP |
| Network interface layer | Carrying data over the actual communication medium | Wi-Fi, Ethernet, fiber-optic line |
When viewing a web page, the browser creates an HTTP request, TCP or UDP handles how it is delivered, IP sends it toward the destination, and Wi-Fi or wired LAN carries the actual communication.
Looking by layer separates each role.
How the Two Models Relate
The OSI reference model and the TCP/IP model do not correspond perfectly one-to-one.
However, they can be roughly mapped.
| OSI reference model | TCP/IP model | Example from an anonymity viewpoint |
|---|---|---|
| Application, presentation, session | Application layer | HTTP, DNS, cookies, login state |
| Transport layer | Transport layer | TCP, UDP, port numbers |
| Network layer | Internet layer | IP address, routing |
| Data link and physical layers | Network interface layer | Wi-Fi, Ethernet, radio waves, light |
For learning, it is easier to think of OSI as a map that divides roles in detail and TCP/IP as a map that makes the actual Internet easier to explain.
Why Layers Matter for Anonymity
For anonymity, it is important to separate which layer's information you are handling.
With HTTPS, HTTP exchanges are protected by TLS. In the TCP/IP model, this is often treated as a mechanism on the application-layer side, but it is easier to understand TLS itself as a protective layer located between HTTP and TCP. IP addresses are necessary for delivery at the Internet layer. Cookies and login state are application-layer problems.
| Information | Layer mainly involved | Caution |
|---|---|---|
| IP address | Internet layer | Necessary for delivery to the communication destination |
| TCP/UDP port | Transport layer | A clue to the type of communication or service |
| HTTP content | Application layer | HTTPS/TLS protects the body during transit, but destination, cookies, and login state are separate issues |
| Cookie | Application layer | Even if the IP changes, it can be treated as the same browser |
| Wi-Fi connection | Network interface layer | Local records and administrators are involved |
With this viewpoint, it becomes easier to understand points such as "a VPN does not delete cookies," "HTTPS does not remove the destination IP," and "post content remains even with Tor."
Common Confusions
Without knowing layer models, people may try to solve problems at different layers with the same countermeasure.
| Misunderstanding | Why it is different |
|---|---|
| HTTPS means anonymity | It protects HTTP content, but the destination and login remain |
| A VPN also removes cookies | A VPN is a communication route; cookies are browser storage |
| If I hide my IP, post content is also safe | Post content is application-layer information |
| Changing Wi-Fi breaks past behavior too | Cookies and accounts remain |
| Encrypting DNS hides everything | DNS only concerns domain lookups |
For anonymity, you need to see which layer a countermeasure affects.
If you confuse problems from different layers, you miss the parts that are not protected.
Learning Order
You do not need to memorize the OSI reference model or TCP/IP model from the start.
First, use web access as an example and look at where the browser, DNS, HTTP, TCP/UDP, IP, and Wi-Fi are involved. After that, check which layer's problems VPNs, Tor, HTTPS, and cookies affect.
| Order | What to look at |
|---|---|
| 1 | The flow of displaying a web page |
| 2 | The flow of converting a name to an IP with DNS |
| 3 | The mechanism that delivers to a destination with IP |
| 4 | Why delivery differs between TCP and UDP |
| 5 | The position of HTTP/HTTPS and cookies |
| 6 | Which visible aspects VPNs and Tor change |
Learning in this order makes it harder to overestimate anonymity countermeasures.
For example, HTTPS protects HTTP content, but cookies and login state reach the destination. A VPN changes the connection route, but it does not change application-layer post content. Layer models help with this separation.
Summary
The OSI reference model and the TCP/IP model are ways of understanding communication in layers.
The OSI reference model is organized into seven layers, and the TCP/IP model is mainly organized into four layers.
For understanding real Internet communication, the TCP/IP model is often easier. At the same time, the OSI reference model is useful as a map for thinking about roles in detail.
For anonymity, it is important to separate which layer information relates to.
If IP, TCP/UDP, HTTP, TLS, cookies, and Wi-Fi are treated as the same thing, countermeasures will be mistaken.
Layer models are a foundation for organizing where something is visible in communication and which countermeasures affect which parts.
