What is Encapsulation
Commonly, encapsulation is used for the inclusion of one thing within another thing so that the included thing is not apparent. In networking, encapsulation is the process which includes one data structure within another data structure as a result that the first data structure is hidden for the time being.
As application layer data is passed down the protocol stack on its way to being transmitted across the network media; various protocol information is added at each level and the original data structure is changed. This is known as the encapsulation process.
What is De-encapsulation
Decapsulation is the removal or the making apparent a thing previously encapsulated during the encapsulation process. This process is reversed at the receiving host and is known as de-encapsulation. It is the process used by a receiving device to remove one or more of the protocol headers. The data is de-encapsulated as it moves up the stack toward the end-user application.
Protocol Data Unit (PDU),
The form that a piece of data takes at any layer is called a protocol data unit (PDU). During encapsulation; each succeeding layer encapsulates the PDU; that it receives from the layer above in accordance with the protocol being used. At each stage of the process; a PDU; has a different name to reflect its new functions.The PDUs are named according to the protocols of the TCP/IP suite, as shown below. Figure 2.3 Shows the protocol data unit(PDU) at different layers.
Data – The general term for the PDU used at the application layer and upper layers of the OSI Model.
Segment – This is the transport layer PDU.
Packet – This is the Network layer PDU.
Frame – This is Data Link layer PDU.
Bits – A Physical layer PDU is used when physically transmitting data over the medium.
Figure 2-3 PDU- PDUs at different layers