Friday, March 24, 2023
HomeProgrammingEncapsulation and Decapsulation in Networking

Encapsulation and Decapsulation in Networking


In right this moment’s period Community or Web is used to ship and obtain knowledge worldwide. As we all know the community is a fancy construction consisting of a lot of computer systems and networking units.

The system which seeks knowledge is called the Consumer and the system which offers the information is called Host.

Additionally, we all know that the TCP/IP and OSI fashions are the fashions that are used most. Each use layer structure.

Layer Architecture of TCP/IP and OSI model
Layer Structure of TCP/IP and OSI Mannequin

Earlier than transmission knowledge strikes between these layered architectures. Encapsulation and decapsulation are two processes used on this layered structure. It’s like Boxing and Unboxing a real-world object for despatched over courier.

We are able to’t ship any knowledge instantly on the web. There are many issues to do earlier than transmission, like set up host to host communication, offers supply and vacation spot IP addresses and so forth. Fortuitously, we as a consumer don’t must do any chores. The Community mannequin does the credit. All we have to do is to only choose the information and press “ship or add”.

Encapsulation

It’s a course of by which further info is added with the unique knowledge packet which is required for correct and secure transmission of knowledge over the Web.

Right here encapsulation may very well be described as a technique of designing modular communication protocols. These protocols are used to create Protocol Information Unit (PDU). These PDU are being connected with the unique knowledge packet, which is forwarded over the web. These PDU are created by the layers of the community mannequin reminiscent of TCP/IP and OSI. Every layer has its personal distinctive PDU and performs the duty as per the layer’s functioning.

Once we choose knowledge for transmission, the layers begin their work step-by-step. The chosen knowledge transfer downwards in these layers. At each layer some new form of knowledge (Not the consumer knowledge, the system knowledge like IP addresses, body dimension and so forth.) also called PDU, is added with the unique knowledge packet (Chosen by consumer). So, this entire course of in generally known as Encapsulation.

Let’s take an instance.

Encapsulation in TCP/IP model
Encapsulation in TCP/IP Mannequin

Right here on this instance, the consumer makes use of TCP/IP mannequin.

Right here in above talked about diagram, the yellow-coloured field is consumer knowledge, which he/she desires to ship over the community. When the consumer press sends or add from his gadget, the information is forwarded to the Software layer.

That is step 1. Right here Information itself is a PDU on this stage. The applying layer reveals the information to the consumer, obtained from the community in a format, which is simple to know for the consumer. Each facility like electronic mail service, web browsing l, on-line purchasing, and so forth is falling into this class.

In step 2, the information packet is forwarded to the transport layer, the place the information is encapsuled by the UDP (Person Datagram Protocol) knowledge. As you possibly can see within the above diagram. Additionally, the UDP header is connected for identification of UDP knowledge packet. Right here this PDU is called a section.

In 3rd step, the section is shipped to the Web layer. Right here the section is encapsulated by the IP knowledge and the IP header is connected. That is the PDU of this layer.

This PDU is called Packet. Each gadget or system within the community has a person and distinctive IP deal with. IP header is answerable for containing supply and vacation spot IP addresses. These particulars are used to look and discover out the placement of the consumer and host within the community.

In 4th step this packet is shipped to the Community Entry Layer. Right here the obtained knowledge packet is encapsulated by the MAC deal with. Now this PDU known as Body. Every body has Body Header and Footer. MAC Handle or Media Entry Management really represents a real-world {hardware} or bodily deal with of the Community Adapter or system like the pc of a number. This deal with or {hardware} ID is allotted by the Producer of the NIC (Community Interface Card).

As soon as the 4th step is accomplished the body is shipped over the community. So, as we are able to see within the above diagram the unique knowledge is encapsulated by a lot further info in every stage. This knowledge or info addition is called Encapsulation.

Every layer encapsule the unique knowledge with its personal PDU, and this entire PDU is once more encapsulated in a brand new PDU on the subsequent stage. The method continued until the final layer arrived.

Decapsulation

That is the reverse strategy of encapsulation. On this, the extra info is plucked out from the unique knowledge. As soon as the body reached at its vacation spot or the host system, the reverse course of is began. That is right down to high method, the place the body is obtained by the community layer first after which after decapsulation, it’s despatched to the higher layer reminiscent of Web layer.

Just like Encapsulation every layer has its personal Decapsulation format. For instance, take the above-mentioned determine however this time it will likely be in reverse order reminiscent of given under:

Decapsulation in TCP:IP Model
Decapsulation in TCP/IP Mannequin

At 1st step the body is shipped from the consumer, and obtained by the community layer of the host pc. This PDU or body is eliminated, and solely this PDU Packet is forwarded to the Web layer.

In step 2 the packet is decapsulated and the Packet PDU is eliminated and now it’s the section PDU. That is forwarded to the Transport layer.

In step 3 the section is once more decapsulated and the PDU section is eliminated and eventually, the unique knowledge is forwarded to the Software layer.

In step 4 the unique knowledge is proven to the consumer.

Each processes are associated and vital for easy and safe knowledge transmission over the community.

Distinction between Encapsulation and Decapsulation

Encapsulation Decapsulation
It follows High to Down method; the information strikes in sequence between layers however goes down layer from the latest higher one. It follows Right down to TOP method; the information strikes in sequence between layers however goes upward layer from the latest down one.
In every layer the extra info is added with the unique knowledge. In every layer the extra info is eliminated until the unique knowledge is decapsulated.
At every step the scale is elevated. At every stage the scale is decreased.

The encapsulation method and Decapsulation method are used to safe the unique knowledge and supply 100% safe and profitable knowledge transmission.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments