DEV Community

Cover image for OSI Model — Clean, Confusion-Free Explanation (For When You’re Stuck)
Micheal Angelo
Micheal Angelo

Posted on

OSI Model — Clean, Confusion-Free Explanation (For When You’re Stuck)

I’ve added a simple OSI diagram image at the top of this post for visual grounding.

Refer to it while reading — it makes the flow much easier to follow.

These notes are written for moments when the OSI model feels confusing.

They intentionally avoid jargon overload and focus on clear mental models.


1️⃣ What Is a PDU (Protocol Data Unit)?

A PDU is simply the form data takes at a given OSI layer.

👉 The key idea: the PDU name changes at each layer

OSI Layer PDU Name
Application / Presentation / Session Data
Transport Segment (TCP) / Datagram (UDP)
Network Packet
Data Link Frame
Physical Bits (signals)

At the top layers, the PDU is just Data.

Example:

"Hello"
Enter fullscreen mode Exit fullscreen mode

2️⃣ Is Application Data Already 0s and 1s?

This is a very common confusion.

  • Logically: ❌ No
    • It’s strings, bytes, JSON, text, objects
  • Physically (later): ✅ Yes
    • It will eventually become signals

Important distinction:

  • Higher layers think in structure and meaning
  • Lower layers think in signals

Both are correct — just at different layers.


3️⃣ Transport Layer (TCP / UDP)

What the Transport Layer Adds

  • Source Port
  • Destination Port
  • Transport control information

This is called the TCP header or UDP header.

✔️ Yes — the TCP header includes source + destination ports (and more).

TCP vs UDP (Quick Comparison)

TCP UDP
Reliable Unreliable
Ordered Unordered
Slower Faster
Retransmits lost data No retransmission
  • ✅ UDP is faster
  • ✅ TCP is more widely used because it’s reliable

4️⃣ Network Layer

What the Network Layer Adds

  • Source IP address
  • Destination IP address

This is the IP header.

After this step:

Segment → Packet
Enter fullscreen mode Exit fullscreen mode

IP answers one question:

“Where should this data go globally?”


5️⃣ Data Link Layer

What the Data Link Layer Adds

  • Source MAC address
  • Destination MAC address
  • Error-checking trailer (CRC)

This is the MAC header + trailer.

After this step:

Packet → Frame
Enter fullscreen mode Exit fullscreen mode

MAC answers:

“Which exact device on this local network should receive this?”

Critical Rule (Very Important)

  • IP stays the same end-to-end
  • MAC changes at every hop

6️⃣ Physical Layer

The physical layer:

  • ❌ Does NOT understand headers or addresses
  • ✅ Converts frames into physical signals

Examples:

  • Wi-Fi → Radio waves
  • Ethernet → Electrical signals
  • Fiber → Light pulses

So yes:

  • Wi-Fi = radio
  • Ethernet = electricity

7️⃣ Encapsulation Flow (One Line)

Data → Segment → Packet → Frame → Signals
Enter fullscreen mode Exit fullscreen mode

Each layer adds only its own information.


8️⃣ Header Mapping (Common Doubt)

Header Contains
TCP / UDP Header Source Port, Destination Port, control info
IP Header Source IP, Destination IP
MAC Header Source MAC, Destination MAC

✔️ If this was your doubt — your understanding is correct.


9️⃣ One-Sentence Mental Model

Application creates meaning → Transport manages conversation → Network finds destination → Data Link finds device → Physical moves signals


Final Note

These notes are:

  • Lightweight
  • Mental-model focused
  • Safe to revisit anytime you’re confused

If this helped, feel free to bookmark or share.

Happy networking 🚀

Top comments (1)

Collapse
 
khadijah profile image
Khadijah (Dana Ordalina)

nice post