Data Encapsulation Explained in Networking OSI Model

Data Encapsulation Explained in Networking – OSI Model

What is Encapsulation in Networking?

When we talk about encapsulation, we talk about moving data from point A to point B. Data must be encapsulated to get to its destination. Encapsulation adds information to the data so that it can be transported using the information. It’s sort of like packaging, with insurance and addressing all attached to it. Without the packaging and all the information around the content, it can’t get to its destination. Just like that, raw data, itself, cannot get to its destination on its own.

Data Encapsulation and Decapsulation

Data encapsulation is the method of adding extra details to a data object in order to add functionality to it. In our network, we use either the OSI or the TCP/IP models, and data is transmitted across different layers in these models. Data encapsulation applies protocol information to data so that data transmission can occur properly. This detail may be used in the data’s header or footer.

The reverse method of data encapsulation is data de-encapsulation. To retrieve the original data, the encapsulated information is stripped from the obtained data. This procedure is carried out at the receiver’s end. The data is de-encapsulated at the receiver’s end to the encapsulated layer at the sender’s end at the same layer. This process removes the added header and trailer information from the data.


Deeper Dive into Data Encapsulation

In computer networking, the word encapsulation is often used, but what exactly does it mean, technically?

The word encapsulation refers to the method of wrapping data in headers and trailers. The four-layer TCP/IP model can be used to describe this method, with each stage explaining the position of the layer. For example, consider what happens when you send an email from your preferred email client (such as Outlook or Thunderbird):

  1. From the Application layer to the Transport layer, the email is sent.
  2. The Transport layer encapsulates the data and adds its own header with details such as which port will be used before passing it to the Internet layer
  3. The Internet layer encapsulates the received data and adds its own header, which usually includes the source and destination IP addresses.
  4. The data is then passed from the Internet layer to the Network Access layer, which is the only layer that adds both a header and a trailer.
  5. The data is then transmitted over a physical network connection.

Here is a graphical representation of how each layer add its own information:


Each packet (header + encapsulated data) defined by a particular layer has a specific name:

  • Frame – The Network Access layer defines encapsulated data. A frame may have a header as well as a trailer.
  • Packet – Encapsulated data specified by the network layer A header includes the source and destination IP addresses.
  • Segment –  The Transport layer defines encapsulated data. The header contains information such as the source and destination ports, as well as sequence and acknowledgment numbers.

As mentioned above, the method of removing headers and trailers as data moves from lower to upper layers is referred to as decapsulation. This procedure is carried out on the device that is receiving data.


Data Encapsulation in the OSI Reference Model

Each OSI layer, like the TCP/IP layers, requests resources from the next lower layer. Between a header and a footer, the lower layer encapsulates the data of the higher layer (Data Link protocols also add a trailer).

While the TCP/IP model employs terms such as segment, packet, and frame to refer to a data packet specified by a specific layer, the OSI model employs a different term: protocol data unit (PDU). A PDU is a data unit that includes headers and trailers for the specific layer as well as the encapsulated data. Since the OSI model has seven layers, PDUs are numbered one through seven, with the Physical layer being the first. For example, the term Layer 3 PDU refers to data encapsulated at the OSI model’s Network layer.

Here is a graphical representation of all the PDUs in the OSI model:

Previous Article
Next Article