Skip to content

unclearThing/network-data-encapsulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 

Repository files navigation

🧠 Understanding Data Encapsulation

Based on CompTIA Network+, Chapter 6, Page 220


🧩 Overview

Each layer in the OSI or TCP/IP model has its own role in the creation and encapsulation of a data stream.
As data travels through the layers, each layer adds its own header (and sometimes trailer) that contains control information required for the next step in transmission.


βš™οΈ Concept of PDU

A PDU (Protocol Data Unit) acts like an elevator, carrying the data up and down through the layers:

  • From top to bottom in the sender
  • From bottom to top in the receiver
πŸ’‘ Technical Note:
Each layer uses a different term for its PDU:
Layer PDU Name
Application Data
Transport Segment (TCP) / Datagram (UDP)
Internet Packet
Data Link Frame
Physical Bits

🌐 Example: Requesting google.com

Step 1 β€” Initial Request (DNS Resolution)
At the beginning, we only know the domain name β€” not its IP address. We need to contact a DNS server to resolve it.

β€œDo you know the IP address for google.com?”

πŸ’‘ Technical Note: Even DNS queries are encapsulated through the Transport Layer (typically using UDP, port 53).

Step 2 β€” Transport Layer
Three-way handshake ensures the receiver is ready. Data is divided into segments.
  • Sequence number (ensures proper reassembly)
  • Acknowledgment number
  • Window size
  • Error control and buffering

πŸ’‘ UDP skips the handshake and simply sends datagrams.

Step 3 β€” Internet Layer
Adds source & destination IP addresses. MAC addresses are only used for local delivery.
Step 4 β€” Data Link & Physical Layers
Frames are created, MAC addresses added, data converted to bits, transmitted through cable, light, or radio.

βœ… Summary
Data encapsulation ensures each layer adds necessary information for proper delivery, while PDUs carry the data between layers. Logical addressing, segmenting, and local delivery mechanisms work together to move data reliably from sender to receiver.

About

Visual guide and notes on Data Encapsulation in networking, based on CompTIA Network+ concepts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published