In the previous article, we have learned various layers of the OSI reference model. We have discussed the function of each layer and relationship with other layers as well as with remote end. For example, the session layer at the source will interact with the session layer of the destination. For this interaction, each layer adds a header in front of the data from the earlier layer. This header contains control information related to the protocol uses at that layer. This process is the encapsulation Process. The steps of the encapsulation process are:
- Upper layers (Application layer, Presentation layer and Session layer) convert the message to data and send it to the Transport layer which is the heart of the OSI Model.
- The Transport layer converts the data to segments and sends it to the Network layer.
- The Network layer converts the segments to packets and sends these packets to the Data Link layer.
- The Data Link layer converts the packets to frames and then sends frames to the Physical layer.
- The Physical layer converts the frames to binary 1’s and 0’s in the shape of electrical or light signals and sends them across the network.
The figure below illustrates the data encapsulation process at each layer; where header information is added.
Data De-Encapsulation Process
At the receiving end, the process is reversed, with headers being stripped off at each layer. This reverse process is known as de-encapsulation. As shown in the figure below when Layer 1 takes the data and sends it to Layer 2. Here the Layer 2 header, as well as the trailer, examined and removed.
The resulting Layer 3 PDU, then sent to Layer 3. Layer 3, in turn, examines the header in the PDU and removes it. The resulting PDU sent to Layer 4. Similarly, each layer removes the header added by the corresponding layer at the source before sending the data to the upper layer. Finally, the Application layer removes the Layer 7 header and sends the data to the application.