Computer Networks Computer Science Study Material for Gate Study Material for gate Computer Science

Data Encapsulation in Networking

Data Encapsulation in Networking

Data encapsulation in networking is an encapsulation process performed at sender side during data transmission over network. De-encapsulation in reverse process performed at receive side.

This tutorial covers the encapsulation process steps and the decapsulation process in networking. The concept of encapsulating meaning, Payload, OSI model layer explanation, OSI layer functions and encapsulation example is discussed in detail in this tutorial.

The advantages of encapsulation in networking are also explained here in this tutorial.

To study and understand the Computer  Networks subject clearly this become important that students should  have knowledge of data encapsulation process. So students are suggested to read the tutorial completely.

Frequently Asked Questions

Some frequently asked questions from encapsulation in networking topic are given below

  • What is encapsulation in networking?
  • When is data encapsulated?
  • What is the minimum size of the process data that can be encapsulated in a UDP datagram?
  • At which OSI layer is data added to a PDU during the encapsulation process?
  • What are the various advantages of encapsulation in networking?

Let’s understand the encapsulation process.

What is Data Encapsulation Process ?

  • Data encapsulation is a process of TCP/IP Model in which header information is added with data item by each layer at sending machine. This header information works as metadata.
  • The primary objective of data encapsulation is to provide communication between peers layers of sending and receiving the machine.
  • Data encapsulation in networking is required when we send the data from a source computer to the destination computer.
  • In a computer network sending and receiving data from one device to another is possible with the help of networking protocols when data is encapsulated at the sender’s side.
  • As a part of OSI layer functions, each layer communicates with its neighbor at the destination.

Let’s understand the term Protocol Data Unit.

What is Protocol Data Unit ?

  • Protocol Data Unit in networking refers to control information attached to data item at each layer during transmission. The information is attached to the data field header but at the end of the data field or trailer.
  • Each layer uses the Protocol Data unit to communicate and exchange information with it’s neighbor layer.
  • PDUs are encapsulated by attaching them to the data at each layer of the OSI reference model.
  • Each PDU has a name depending on the information each header has. Only the neighbor layer at the destination can read the information, which I then stripped off, and data is handed to the next layer.

Protocol Data Units of OSI Model

In the OSI model, protocol data unit of each layer has a specific name. Various protocol data units are as follow –

Transport Layer PDU

Protocol Data Unit of Transport layer is known as Segment. Transport layer creates  header and attach it with data piece. Header contains the information that remote host need to reassemble all data pieces. Header with data piece at transport layer is known as segment. Transport layer transfers segment to network layer for further processing.

Network Layer PDU

Protocol Data Unit of network layer is known as Packet. Network layer creates header for each segment received from transport layer. This header contains the information about addressing and routing.

Once the header created by network layer is attached to segment then this is known as Packet and transfer to data link layer.

Data Link Layer PDU

Protocol Data Unit of Data Link Layer is Called Frame. When Data link layer receive packet from network layer then it creates not only header but a trailer also for each received packet.

The header created by data link layer contains the switching information such as source hardware address and destination hardware address. Trailer contains the information about corrupt data packages that can be drop. When this header and trailer are attached to packet then it becomes Frame. This frame is transfer down to physical layer.

Physical Layer PDU

Protocol Data Unit of physical layer is called Bit. When physical layer receives frame from data link layer then it convert it in a format that a transmission media can carry. This format is known as Bit.

data encapsulation and de-encapsulation
Figure: Header Added in Data Encapsulation Process

Encapsulation Process in Networking

Data encapsulation process steps are as shown in the above figure are as follow-

During the data encapsulation process, a Header is added to each layer.

During the data encapsulation process, when the data is transmitted from sending machine to the destination, adding header control information at each layer is as follows.

Step 1 – TCP Header Encapsulation

The application layer data is converted for transmission. Data stream is then handed down to the transport layer, which set up a virtual circuit to the destination.

Data stream is then broken up, and the Transport layer header called Segment is created.

The header control information is attached to the data fields of the transport layer header.

Each Segment has a sequence number and sequenced adequately so that the data stream can put back together on the destination, and the exact message can be obtained or transmitted.

Step 2 – IP Header Encapsulation

On the sender side, after the transport layer, each Segment is then handed to the network layer for the logical addressing and routing through a routing protocol, for example, IP, IPX etc.

The network layer protocol adds a header to the packet handed down to the data link layer.

Step 3 – MAC Header Encapsulation

The data link layer receives the packet from the network layer and places them on the network medium such as cable or wireless medium.

After that data link layer encapsulates each packet into the frame and adds a MAC header to the packet, which carries the mac address of source and destination.

If the sending and receiving devices are on various network, then the frame is sent to a router to be routed through internetwork.

Step 4- Physical Layer Encapsulation

Once the frame gets to the destination network, a new frame is used to get the packet at the destination hist. To put this frame on the network, it must be first put on the digital signal.

Since a frame is a logical group of 1’s and 0’s, the OSI model physical layer is responsible for encapsulating these digits into a digital signal.

At the transmitting devices, data encapsulation at different layers works as follows.

Step 1 – User information is converted into the data on the network.

Step 2 – Data is converted into segments, and a reliable and unreliable connection is set up between the source and destination devices with a connection-oriented and connectionless protocol.

Step 3 – Segment are converted into packets with a logical address, such as an IP datagram using an IP Address.

Step 4 – Packets are converted into a frame for transmission on the local network.

Step 5 – Media access protocol ( MAC Address) or Ethernet Address are commonly used to identify the host on a local network segment.

Step 6 – Frame is converted into Bytes and bits, and a digital encoding or clocking or signaling method is used.

Also, encapsulation information would usually be pretended to the Payload. The only exception to this rule may happen in the data link and physical layers, where apart from a header, a trailer also may be added after the Payload.

Also Read: IP Address Classes Tutorial

De – Encapsulation Process in Networking

Decapsulation or De-Encapsulation is just the reverse process of Data Encapsulation. Following activities are performed in the de-encapsulation process.

Step 1 – In de-encapsulation, each layer at the receiving machine interprets the header information sent by its peer layer.

Step 2 – Layer takes the necessary action based on the information and removes the header before passing on the data to the next higher layer at the receiver side.

Step 3 – Receiving node or computer synchronize on the digital signal and extract the 1’s and 0’s from the signals.

Step 4 – At this point, receiving node build the frame and run a cycle redundancy check ( CRC Check) and check their output against the data frame’s Frame Check Sequence Field.

Step 5- If the information is the match, then the packet is pulled from the frame, and the frame is discarded.

This process is known as De-encapsulation.

The packet then transferred to the network layer, where the IP Address is checked. If the IP address is matched, then Segment is pulled from the packet, and the packet is discarded.

After that, data is processed at the transport layer that rebuilds the data stream and acknowledges to the transmitting station that it received each Segment. After that transport layer transfer the data to the upper layer application layer.

You can think of this process as analogous to removing the letter from the envelope by the receiver.

At the receiving end, the corresponding data link layer removes both the header and the trailer after interpreting the values inside them.

NEXT Tutorial:  Routing Table Cisco

Conclusion and Summary

In this data encapsulation in networking tutorial, we have discussed the data encapsulation and de-encapsulation process steps wise step. Protocol Data Units of each layer is also discussed.

I hope this tutorial will help the computer science student understand the data encapsulation and de-encapsulation concepts.

I kindly request to readers, please give your feedback and suggestion. If you find any mistake in this tutorial, then comment.

Do not stop learning and practice.

Leave a Reply

Your email address will not be published. Required fields are marked *