OSI Model
What Actually Happens When We Send a File Over the Internet?
OSI Model







What Actually Happens When We Send a File Over the Internet?
What happens when I send an image to someone?
Let’s say I want to send a photo.jpg.
It starts as Data
At the application layer, I simply have my image.
photo.jpg
At this point, it is just application data. The networking layers don’t need to know that it is a photo. It is simply a sequence of bytes.
Then the data moves down through the network stack.
Data becomes a Segment
At the Transport Layer, suppose we are using TCP.
TCP adds its own header to the data.
[TCP Header][Image Data]
Now we call this a TCP segment.
The TCP header contains information such as:
- Source port
- Destination port
- Sequence number
- Acknowledgment number
- Flags
- Checksum
Why do we need this?
Because TCP needs to keep track of the communication between applications. If the data is split into multiple pieces, sequence numbers help the receiver put those pieces back in the correct order.
For example:
Segment 1 → Sequence 0
Segment 2 → Sequence 1460
Segment 3 → Sequence 2920
Segment becomes a Packet
Next, the data reaches the Network Layer.
Here, IP adds an IP header.
[IP Header][TCP Header][Image Data]
It is now called an IP packet.
The IP header contains information such as:
Source IP → 192.168.1.10
Destination IP → 10.0.0.5
TTL → 64
Protocol → TCP
The important part here is the IP addresses.
Routers use IP information to decide where the packet should go next.
So, at this point, we have:
IP Packet
└── IP Header
└── TCP Segment
└── Image Data
Packet becomes a Frame
Now we reach the Data Link Layer.
Suppose we are using Ethernet.
Ethernet adds information for communication over the current network link.
[Ethernet Header][IP Packet][FCS]
It is now called an Ethernet frame.
The Ethernet header contains MAC addresses:
Destination MAC → BB:BB:BB:BB:BB:BB
Source MAC → AA:AA:AA:AA:AA:AA
There is also an FCS at the end of the frame, which helps detect errors in the frame.
So now we have:
Frame
├── Ethernet Header
│
├── IP Packet
│ ├── IP Header
│ │
│ └── TCP Segment
│ ├── TCP Header
│ │
│ └── Image Data
│
└── FCS
This is the part that finally made the OSI model much clearer to me.
Each layer is basically adding information needed for its own job.
Then everything becomes Bits
Finally, the Physical Layer takes the frame and sends it as signals.
Conceptually:
Frame
↓
010101010101010101...
↓
Physical signals
Depending on the medium, those signals can be electrical signals, light pulses, or radio signals.
So the image that started as:
photo.jpg
eventually becomes a stream of bits moving through the network.
What happens at the other side?
The receiver does almost the opposite thing.
The signals are received and converted back into bits.
Then:
Bits
↓
Frame
↓
Packet
↓
Segment
↓
Data
The receiver removes the information added by each layer.
For example:
[Ethernet Header][IP Header][TCP Header][Image Data][FCS]
↓ remove Ethernet information
[IP Header][TCP Header][Image Data]
↓ remove IP information
[TCP Header][Image Data]
↓ remove TCP information
[Image Data]
Finally, the application gets the original image.
📷 photo.jpg
The easiest way I remember it
I stopped trying to memorize only the layer names.
Instead, I remember what each layer is adding:
Application
↓
Data
Transport
↓
Segment
+ Port information
Network
↓
Packet
+ IP information
Data Link
↓
Frame
+ MAC information
Physical
↓
Bits
+ Physical signals
And on the receiving side, the process happens in reverse.
Sender Receiver
Data Data
↓ ↑
Segment Segment
↓ ↑
Packet Packet
↓ ↑
Frame Frame
↓ ↑
Bits ─────── Network ───────→ Bits
One thing I finally understood
The names Data, Segment, Packet, Frame, and Bits do not mean that five completely different copies of my image exist.
It is basically the same data being wrapped with more information as it moves down the stack.
[DATA]
[TCP Header][DATA]
[IP Header][TCP Header][DATA]
[Ethernet Header][IP Header][TCP Header][DATA][FCS]
That simple picture helped me understand the OSI model much better than memorizing the seven layer names.
메타데이터
- post_id
- db3b40933924
- slug
- osi-model-db3b40933924
- url
- https://medium.com/@ashik.cse.ah/osi-model-db3b40933924
- canonical_url
- https://medium.com/@ashik.cse.ah/osi-model-db3b40933924
- author_url
- https://medium.com/@ashik.cse.ah
- status
- ok
- fetched_at
- 2026-09-01 01:26:22