Week 3 · Lesson 5

Data Encapsulation

Encapsulation is the mechanism that turns an application’s message into something a network can carry — and back again. This is the deep version: a real web request, header by header, hop by hop, including the ARP step that most explanations skip.

CCNA 200-301 Domain 1.0 Network Fundamentals Verified 2026-10-11
Part 1

Recap: two directions

Encapsulation adds control information — a header, and at Layer 2 a trailer — as data moves down the stack on the sending host. De-encapsulation removes that control information as data moves up the stack on the receiving host. Week 1, Lesson 18 introduced the idea; here we make it concrete.

Definition. Encapsulation = each layer treats everything from the layer above as pure payload and wraps its own header around it. De-encapsulation = each layer strips its own header and hands the payload up.
Encapsulation: each layer wraps the PDU handed down from above

  DATA      [ application data ]

  SEGMENT   [ TCP header ][ application data ]            + ports

  PACKET    [ IP header ][ TCP header ][ application data ]   + IP addresses

  FRAME     [ Ethernet header ][ IP header ][ TCP header ][ application data ][ FCS]

  BITS      . . .  1 0 1 1 0 1 0 0  1 1 0 1 0 1  1 0 1 0  . . .  (signals on the wire)

Read the diagram from top to bottom: nothing is ever discarded, everything is nested. The application data is still in there at the bottom — it is simply surrounded by more and more control information.

Build the frame · step down the stack
What the frame looks like now · select a field

Data

Part 2

TCP/IP encapsulation in a web request

You open a browser and type https://example.com. Here is the full trip down the stack on your PC before a single bit leaves the network card.

  1. Application layer. The browser builds an HTTP request (“GET / HTTP/1.1…”). This is the data. The browser must also learn the server’s IP address (via DNS), but that lookup is a separate conversation.
  2. Transport layer (TCP). TCP adds a header containing a source port (a random high number chosen by the browser) and a destination port 443 for HTTPS. The data plus this header is now a segment.
  3. Network / Internet layer (IP). IP adds a header containing the source IP (your PC) and destination IP (the server). The segment plus this header is now a packet.
  4. Data Link layer (Ethernet). Ethernet adds a header with a source MAC and a destination MAC, plus an FCS trailer. The packet plus these is now a frame.
  5. Physical layer. The frame is encoded as electrical, optical, or radio signals and transmitted — the bits.
A web request inside an Ethernet frame (fields shown as roles, not sizes)

 +------------------+-------------+---------------+---------------+-----+
 | Ethernet header  |  IP header  |  TCP header   | Application   | FCS |
 | src MAC, dst MAC | src IP,     | src port,     | data          |     |
 |                  | dst IP      | dst port (443)| (HTTP request)|     |
 +------------------+-------------+---------------+---------------+-----+
 |<----------- Frame (Data Link PDU) --------------------------------->|
        |<--------- Packet (Network PDU) ------------->|
        |              |<---- Segment (Transport PDU) -->|
        |              |               |<-- DATA -->|
Memory hook. Ports find the application, IP addresses find the host, MAC addresses find the next device on the wire, and the FCS finds errors: “apps, hosts, hops, checks.”
Part 3

Header families and PDUs

You do not need field sizes to reason about a network; you need to know what each family of fields achieves. Every layer also has a name for the thing it carries, and getting those names right is the single most examined detail in this topic.

HeaderField familyRole
Transport (TCP / UDP)Port numbers Identify the sending and receiving application, so the right program gets the data (HTTP = 80, HTTPS = 443, DNS = 53…).
Network (IPv4 / IPv6)Source and destination IP addresses Identify the hosts and let routers choose a path across networks, end to end.
Data Link (Ethernet)Source and destination MAC addresses Identify the network interfaces on the local link, so the frame reaches the next device on this hop only.
Data Link trailerFrame Check Sequence (FCS) A checksum the receiver recomputes to detect a corrupted frame; if it fails, the frame is dropped.
Which header family answers the question? · select one

PDUs revisited

LayerPDUHeader (and trailer) added
ApplicationDataNone at this layer (application protocol’s own data)
TransportSegment (TCP) / Datagram (UDP)TCP or UDP header (ports)
Network / InternetPacketIP header (IP addresses)
Data LinkFrameEthernet header (MAC) + FCS trailer
PhysicalBitsNone (encoded as signals)
Name the PDU · pick the layer

Exam tip. Learn these exact words: Data → Segment / Datagram → Packet → Frame → Bits. “Segment” is TCP; a UDP unit is a “datagram”. Only Layer 3 has “packets”. And remember: MAC addresses change at every router; IP addresses stay the same from source to destination (except when NAT rewrites them).
Part 4

The ARP step: resolving the next-hop MAC

There is a gap in the story above. To build the Ethernet frame, the PC needs the destination MAC address — but it only knows the destination IP. On an Ethernet link, ARP (Address Resolution Protocol) closes that gap by mapping an IP address to a MAC address on the local link.

The PC first decides who the next hop is:

ARP on the local link (accurate, simplified)

  PC-A wants to send to 192.168.10.20, which is on the SAME subnet:
    1. Compare to my subnet mask  -> same subnet, so the next hop is 192.168.10.20
    2. Check my ARP cache         -> not there
    3. Broadcast request          -> "Who has 192.168.10.20? Tell 192.168.10.10"
                                     (dst MAC = FF:FF:FF:FF:FF:FF, a broadcast)
    4. Unicast reply              -> "192.168.10.20 is at aa:bb:cc:00:11:22"
    5. Build the frame            -> dst MAC = aa:bb:cc:00:11:22

  If the destination were on a DIFFERENT subnet, step 4 would return the
  ROUTER's MAC, and the frame would be sent to the router, not the far host.
Who do I ARP for? · choose the destination
PC-A 192.168.10.10 ARP cache? IP → MAC not cached Destination host aa:bb:cc:00:11:22 Default gateway 192.168.10.1 same subnet remote subnet

Key point. ARP only answers for addresses on the local link. It never resolves a MAC for a host on the far side of a router — that is impossible, because MAC addresses do not cross a router. For off-subnet traffic you always resolve the gateway’s MAC.
Part 5

De-encapsulation at the destination

At the far end, the receiving host runs the same stack in reverse. Each layer peels off its own header and passes the rest upward.

De-encapsulation at the server, top to bottom of the trip

  BITS    NIC receives the signals and reassembles the frame
   |
  FRAME   NIC checks the FCS, then strips the Ethernet header  (dst MAC was mine)
   |
  PACKET  IP checks the destination IP  (it is mine) then strips the IP header
   |
  SEGMENT TCP checks the destination port (443) then strips the TCP header
   |
  DATA    The web-server application receives the HTTP request

If the FCS check fails, the frame is silently dropped — error detection, not correction. If IP finds the destination address is not its own, it would forward the packet instead of delivering it upward (that is the router’s job). If TCP finds the port is not open, it answers with a reset or an ICMP error.

Part 6

The full journey, down and up

Now follow the whole path: PC → switch → router → server. The switch stays at Layer 2 and reads only the Ethernet header. The router goes up to Layer 3, reads the IP header, and then builds a brand-new Ethernet frame for the next hop.

PC A 192.168.10.10 Switch Router R1 192.168.10.1 Server ENCAPSULATE ↓ DE-ENCAPSULATE ↑ Frame 1 src MAC = PC-A · dst MAC = R1 Frame 2 (new) src MAC = R1 · dst MAC = Server Router strips Frame 1 → reads IP → builds Frame 2 (new MACs) IP packet unchanged end to end: src 192.168.10.10 → dst 203.0.113.10 Switch reads only the Ethernet header (Layer 2). Router goes up to Layer 3, then re-encapsulates. Ports and IP addresses are preserved hop to hop; MAC addresses are rewritten hop to hop.
Exam tip. Two facts decide many questions: (1) the exact PDU names data, segment/datagram, packet, frame, bits; (2) at each router hop the MAC addresses change while the IP addresses stay the same. If a diagram shows a frame arriving at a router, the outgoing frame’s source MAC is the router’s and its destination MAC is the next-hop device’s — not the original sender’s.
Part 7

Common pitfalls

Key terms

TermMeaning
EncapsulationWrapping a layer’s payload with that layer’s header (and, at Layer 2, a trailer) on the way down the stack.
De-encapsulationRemoving each layer’s header (and trailer) on the way up the stack at the receiver.
PDUProtocol Data Unit; the data unit’s name at a given layer (data, segment/datagram, packet, frame, bits).
FCSFrame Check Sequence; the Layer 2 trailer checksum used to detect corruption.
ARPAddress Resolution Protocol; maps an IPv4 address to a MAC address on the local link.
Default gatewayThe router a host sends off-subnet traffic to when the destination is not on its own network.
Part 8 · Your turn

Review

Check what you have learned with these review questions.

Review · 6 questions

Sources

Sources & references

  1. Postel, J. RFC 791: Internet Protocol (1981) — the IP header and its fields. rfc-editor.org/rfc/rfc791.
  2. Braden, R. RFC 1122: Requirements for Internet Hosts — Communication Layers, Section 1.3.3 (PDU terminology). rfc-editor.org/rfc/rfc1122.
  3. Socolofsky, T. & Kale, C. RFC 1180: A TCP/IP Tutorial, Sections 2.2–4 (encapsulation and ARP). rfc-editor.org/rfc/rfc1180.
  4. Plummer, D. RFC 826: An Ethernet Address Resolution Protocol (1982). rfc-editor.org/rfc/rfc826.
  5. IEEE. IEEE 802.3 (Ethernet frame format, including the FCS). standards.ieee.org.
  6. 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.