Builder · Lesson 01

How does a message become a packet?

A message crosses several boundaries before it reaches a cable. Encapsulation adds the information each layer needs, turning application data into a segment or datagram, then a packet and a frame.

One message, several wrappers

Each layer adds only what its job requires.

An application creates data. A transport protocol adds conversation information, the network layer adds source and destination IP (Internet Protocol) addresses, and the link layer prepares a frame for one local hop.

At the next router, the old frame is removed and a new frame is built for the next link. The packet can continue while the local wrapper changes.

Encapsulation is packaging with a purpose.Headers are not decoration: they tell the receiving layer how to deliver, process, or interpret the enclosed data.

Build the model

Four useful names

01

Data

The application message or payload.

02

Segment or datagram

Transport data with the rules of TCP or UDP.

03

Packet

Network-layer data with IP source and destination addresses.

04

Frame

Link-layer data prepared for one local connection.

At the destination

Decapsulation reveals the original message.

When the frame reaches the destination device, the link layer checks and removes its local wrapper. The network layer processes the IP header, and the transport layer delivers the remaining payload to the correct application endpoint.

The receiver therefore reverses the sender's packaging steps. At a router, only the local frame is removed and rebuilt; at the final host, each layer consumes the header meant for it.

Same payload, fewer wrappers.Decapsulation is not a second message transformation. It is the receiving stack exposing the enclosed data one layer at a time.
Encapsulation adds headers at the sender, a router replaces the local frame while the IP packet continues, and decapsulation removes headers at the receiver.
Encapsulation and decapsulation are opposite directions through the protocol stack.

Mini experiment

Build the frame

Add each wrapper and observe which information belongs to the local hop.

CURRENT WRAPPERData
PURPOSEThe application message is ready to travel.

Data is the innermost content of the exchange.

Knowledge check

Test your encapsulation model

Answer five questions. The answer order changes each time.

0 / 5