Week 1 · Lesson 18

Encapsulation & Decapsulation

This is the single most important idea in networking. Every protocol on the way down the stack wraps the data in its own header; every protocol on the way up strips one off. If you understand this one mechanism, headers, frames, packets and segments all fall into place.

CCNA 200-301 Domain 1.1 Verified 2026-10-11
Part 1

The core idea

Encapsulation is the process of adding control information (a header, and sometimes a trailer) to data as it travels down the protocol stack. De-encapsulation is the reverse: removing that control information as data travels up the stack at the receiver.

Definition. Encapsulation = wrapping data with the headers each layer needs, on the way down. De-encapsulation = removing those headers, one layer at a time, on the way up.
Remember. Encapsulation = down = add headers. De-encapsulation = up = remove headers. Anchor the direction: ENCapsulate = ENClose going down.
Part 2

Why encapsulation exists

Layering would be pointless without encapsulation. Each layer is responsible for one job, and it needs to give instructions to the matching layer on the far side. Instead of putting all the information in one giant block, each layer adds only the fields it owns.

Because each header is added by a different layer, the receiving device can peel them off one at a time and hand each to the correct layer. This is what allows a PC running Windows to talk to a Linux web server over a Cisco switch — every vendor implements the same headers in the same order.

Part 3

PDUs at each layer

The unit of data has a different name at each layer. That name is the Protocol Data Unit (PDU). Exams expect the exact words.

Layer (OSI)PDU nameHeader added
Application / upperDataApplication protocol data
Transport (4)Segment (TCP) / Datagram (UDP)TCP or UDP header
Network (3)PacketIPv4 / IPv6 header
Data Link (2)FrameEthernet header + FCS trailer
Physical (1)BitsNone (encoded as signals)
Exam tip. Learn this ladder cold: Segment → Packet → Frame → Bits. “Segment” is specifically TCP; a UDP unit is a datagram. A common trap is to call everything a “packet”. Only Layer 3 has packets.
The PDU ladder · select a layer

Part 4

Headers and trailers

A header is metadata placed in front of the data. It never replaces the data; it is added alongside it. A trailer is metadata placed after the data and is used only at the Data Link layer, where it holds the Frame Check Sequence (FCS) — a checksum that lets the receiver detect corruption.

The payload of one layer is simply the entire PDU of the layer above. That nesting is the whole point:

1. Application data Data (payload) 2. Add TCP header → Segment TCP Data 3. Add IP header → Packet IP TCP Data 4. Add Ethernet header + FCS trailer → Frame Ethernet IP TCP Data FCS A header is added in front of the data - the data is never lost. Each header becomes the payload of the layer below it. The FCS trailer detects transmission errors and is checked at every data-link hop.
Build the PDU · choose how far down the stack you are

Part 5

A worked example, hop by hop

You type https://example.com in a browser. Here is what actually happens on the way down, and what each device in the path does with it.

  1. Application layer builds an HTTP request (data).
  2. Transport layer (TCP) adds a header with the destination port 443 (HTTPS) and a source port. Now it is a segment.
  3. Network layer (IP) adds a header with your source IP and the server’s destination IP. Now it is a packet.
  4. Data Link layer (Ethernet) adds a header with the MAC addresses of your PC and your router, plus an FCS trailer. Now it is a frame.
  5. Physical layer converts the frame to electrical, optical or radio signals and puts it on the medium — the bits.

The critical subtlety: headers are added and removed per hop, not just once. A switch forwards within one network and only needs Layer 2. A router forwards between networks and must go up to Layer 3.

Per-hop de-encapsulation · step through the path

    Part 6

    Mapping to OSI and TCP/IP, and the common pitfalls

    The TCP/IP model collapses OSI’s top three layers into “Application” and its bottom two into “Network Access”. We use the OSI names because exams and engineers do, but the TCP/IP model is what was actually implemented.

    OSI layerTCP/IP modelPDUAddress type
    7–5 Application, Presentation, SessionApplicationDataNames / URLs
    4 TransportTransportSegment / DatagramPort numbers
    3 NetworkInternetPacketIP addresses
    2 Data LinkNetwork AccessFrameMAC addresses
    1 PhysicalNetwork AccessBits—
    What changes where · pick a hop

    Exam tip. Two facts the exam loves: (1) MAC addresses change at every router hop; (2) IP addresses do not change from source to destination (barring NAT). If a question shows a packet arriving at a router, the source/destination MAC in the new frame will be the router and the next-hop device, not the original sender.
    Part 7 · Your turn

    Review

    Check what you have learned with these review questions.

    Review · 6 questions

    TermMeaning
    EncapsulationAdding control information (headers, and at L2 a trailer) as data moves down the stack.
    De-encapsulationRemoving that control information as data moves up the stack.
    PDUProtocol Data Unit; the name of the data unit at a given layer (data, segment/datagram, packet, frame, bits).
    HeaderControl fields placed before the data.
    TrailerControl fields placed after the data; at Layer 2 this is the FCS.
    FCSFrame Check Sequence; a checksum used to detect transmission errors.
    Sources & references
    1. Braden, R. RFC 1122: Requirements for Internet Hosts — Communication Layers, Section 1.3.3 (“Terminology”). rfc-editor.org/rfc/rfc1122.
    2. Socolofsky, T. & Kale, C. RFC 1180: A TCP/IP Tutorial, Section 2.2 (PDU naming). rfc-editor.org/rfc/rfc1180.
    3. IEEE. IEEE 802.3 (Ethernet frame format, including the FCS). standards.ieee.org.
    4. Cisco. CCNA (200-301) Exam Topics, Network Fundamentals. cisco.com.
    Sources

    Sources & references

    1. Braden, R. RFC 1122: Requirements for Internet Hosts — Communication Layers, Section 1.3.3 (“Terminology”), which defines TCP segment, IP packet, and related PDUs. rfc-editor.org/rfc/rfc1122.
    2. Socolofsky, T. & Kale, C. RFC 1180: A TCP/IP Tutorial, Section 2.2 (PDU naming). rfc-editor.org/rfc/rfc1180.
    3. IEEE. IEEE 802.3 (Ethernet frame format, including the FCS). standards.ieee.org.
    4. Cisco. CCNA (200-301) Exam Topics, Network Fundamentals. cisco.com.

    Target exams: CCNA 200-301 v1.1 · CyberOps Associate 200-201. Last content verification: 2026-10-11.