The Hidden Layers Behind Every Packet: Understanding OSI and TCP/IP
Tanya Awasthi
The Hidden Layers Behind Every Packet: Understanding OSI and TCP/IP

Tanya Awasthi
Looking Beyond the Click
In the last article, we explored how devices identify each other using IP addresses, how DNS translates names into destinations, and how protocols such as TCP and UDP move information across networks.
At first, the process seemed simple.
You type a website.
A request leaves your device.
Moments later, a response arrives.
But what actually leaves your device?
What exactly travels across cables, routers, wireless networks, and data centers before a webpage appears on your screen?
The answer is not as simple as “data.”
Before information can travel, it must be prepared, organized, addressed, and packaged in a way that every network device can understand.
And that process begins with layers.
Why Networks Need Layers
Imagine building a city where every person is responsible for everything.
One person builds roads, delivers packages, manages traffic, assigns addresses, and handles communication.
The result would be chaos.
Complex systems become manageable when responsibilities are divided.
Networks work the same way.
Instead of one giant process handling communication, networking divides responsibilities into layers. Each layer performs a specific task and then passes the information to the next layer.
This approach makes communication reliable, scalable, and easier to manage.
Without layers, the modern internet simply wouldn’t work.
Building a Packet: Where Everything Comes Together
In the previous article, we explored IP addresses, MAC addresses, DNS, ports, and protocols as individual concepts.
But a bigger question remained.
How do all these pieces come together when you open a website?
Imagine typing a URL into your browser and pressing Enter.
At that moment, the browser creates an HTTP request. The information exists as application data, but it cannot travel across a network on its own.
The Transport Layer steps in first and adds a TCP header. This contains information such as source and destination ports, sequencing details, and delivery instructions.
Next, the Network Layer adds another header containing source and destination IP addresses. This gives the packet a sense of direction, allowing routers to determine where it should travel.
Then the Data Link Layer prepares the information for communication within the local network. It creates a frame and adds the information needed for local delivery, including MAC addressing details.
Finally, the Physical Layer converts everything into electrical signals, radio waves, or pulses of light that can move through the network.
What started as simple application data has now been wrapped multiple times.
Application Data
↓
TCP Header + Data
↓
IP Header + TCP Header + Data
↓
Frame Header + IP Header + TCP Header + Data
↓
Bits Sent Across the Network
This process is called Encapsulation.
Rather than sending raw information, networks package data layer by layer. Each layer adds the information required to perform its own job.
For the first time, IP addresses, MAC addresses, ports, and protocols stop looking like separate concepts.
They become parts of a single journey.
Visualizing Encapsulation
Application Data
↓
Transport Layer
(TCP Header Added)
↓
Network Layer
(IP Header Added)
↓
Data Link Layer
(Frame Header Added)
↓
Physical Layer
(Bits on the Wire)
Once you see communication this way, networking starts to feel less like a collection of terms and more like a process.
The OSI Model: Understanding the Layers
To understand how communication works, engineers created the OSI (Open Systems Interconnection) Model.
It divides networking into seven layers:
Application
Presentation
Session
Transport
Network
Data Link
Physical
Many students try to memorize these layers.
But memorization is not the goal.
The real purpose is understanding what problem each layer solves.
The Physical Layer moves signals.
The Data Link Layer handles local communication.
The Network Layer manages logical addressing using IP addresses.
The Transport Layer ensures information is delivered correctly.
The upper layers focus on communication between applications and users.
The OSI Model acts as a blueprint that helps us understand the complete communication process.
Following a Packet’s Journey
Now let’s watch a packet travel.
You open a website.
The browser creates an HTTP request.
The Transport Layer adds TCP information.
The Network Layer adds IP addresses.
The Data Link Layer creates a frame.
The Physical Layer sends the data as signals.
The packet reaches your router.
The router reads the destination IP address and forwards it toward the next network.
More routers repeat the process.
Eventually, the packet reaches the destination server.
The server removes the headers layer by layer, processes the request, and generates a response.
That response follows the same process in reverse until it reaches your browser.
The webpage loads.
To most users, it feels instant.
Behind the scenes, dozens of systems have quietly worked together to make that moment possible.
The TCP/IP Model: The Internet’s Real Framework
While the OSI Model is useful for learning, the internet primarily operates using the TCP/IP Model.
Instead of seven layers, TCP/IP uses four:
Application
Transport
Internet
Network Access
The responsibilities remain largely the same.
The difference is that several OSI layers are combined together.
This makes TCP/IP simpler and more practical for real-world implementation.
In other words:
The OSI Model helps us understand networking.
The TCP/IP Model helps us build networking.
OSI vs TCP/IP: Mapping the Two Models
The two models describe the same communication process from different perspectives.
OSI Application
OSI Presentation
OSI Session
↓
TCP/IP Application
OSI Transport
↓
TCP/IP Transport
OSI Network
↓
TCP/IP Internet
OSI Data Link
OSI Physical
↓
TCP/IP Network Access
One model is educational.
The other is operational.
Both are valuable because they help explain different parts of the same system.
Seeing the Layers Yourself
Networking becomes much easier when you observe it directly.
Check your device’s IP address:
Windows
ipconfig
Linux/macOS
ip a
View active network connections:
netstat -an
Trace the route packets take across networks:
Windows
tracert google.com
Linux/macOS
traceroute google.com
For the first time, you’ll notice that communication rarely follows a straight path. Packets often travel through multiple devices, networks, and routing decisions before reaching their destination.
The internet is less like a straight road and more like a constantly changing transportation system.
Looking at the Internet Differently
Most people see a webpage.
A networking student sees a packet.
An engineer sees layers.
A network sees headers, addresses, protocols, and routing decisions working together.
Every click begins as application data.
Every layer adds information.
Every packet follows a carefully structured journey before reaching its destination.
The click was never the interesting part.
The journey was.
Where This Leads Next
Now we understand how communication is organized.
We know how packets are built.
We know how information moves through layers.
But another question appears.
How does a device receive an IP address in the first place?
How does it discover other devices on the network?
And how do multiple private devices share a single public internet connection?
Because before communication can begin, a few hidden systems must quietly prepare the network.
And that is where we go next.
메타데이터
- post_id
- 1ce2cd7b0674
- slug
- the-hidden-layers-behind-every-packet-understanding-osi-and-tcp-ip-1ce2cd7b0674
- url
- https://medium.com/@awasthitanya89/the-hidden-layers-behind-every-packet-understanding-osi-and-tcp-ip-1ce2cd7b0674
- canonical_url
- https://medium.com/@awasthitanya89/the-hidden-layers-behind-every-packet-understanding-osi-and-tcp-ip-1ce2cd7b0674
- author_url
- https://medium.com/@awasthitanya89
- status
- ok
- fetched_at
- 2026-07-22 12:16:40