In the era of information technology development like today, surely all of us use computers to serve our work as well as entertainment needs of each person.
It can be said that applications such as sending emails, images, data files … are used a lot and are indispensable in daily life.
So have you ever asked yourself how the data can be sent like that?
Yes! In this article, I will help you better understand how the mechanism of data encapsulation and data reception of a computer will happen. Okay, let’s start!
#first. Data encapsulation (sending machine)
Data encapsulation takes place at the sending machine, which is described in terms of OSI . model as follows:
- The data is generated from the application layer (Application – Floor 7) in various forms, passed down to class Presentation – 6th floor to encrypt and compress data.
- Next, the data will be passed down to the layer Session – 5th floor to add the necessary information for this session.
- When data is passed down layer Transport – 4th floorat this layer the data will be broken into pieces.
- The purpose of this is to increase the speed suitable for the transmission environment and minimize data loss. And it will encapsulate the Transport header information into the Data. At this point the data is called a Segment.
- Data continues to be transferred to the layer Network – 3rd floorat this layer the data will be packed with Network Header information containing important information, including IP address source and destination. At this point the data is called a Packet.
- Data continues to be transferred to the layer Data Link – 2nd Floor, at this layer data will be encapsulated with Frame header and Frame trailer information signaling the end of data encapsulation. At this point the data is called a Frame.
- Finally, the frame is sent to the physical layer (Physical – Floor 1) converted into the appropriate signal form for transmission.
Thus, data encapsulation is a top-down process according to the OSI model, where protocols add their information to the data. It is repeated layer by layer until it is sent as a stream of bits.
At each stage of the process, the data has a different name. PDU is called a data unit, terms such as: Data, Segment, Packet, Frame, Bits are called data units corresponding to layers in the OSI model.

#2. Data packet opening process (receiver)
- On the floor Physical – Floor 1, The receiver will check the synchronization process information and will notify the layer again Data Link that the data has been received.
- After that, floor Data Link – 2nd Floor will proceed to check for errors in the Frame, check the Data Link address. If an error occurs, the packet will be dropped, and if not, the layer header will be removed Data Link to continue moving upstairs Network.
- Floor Network – 3rd floor will check if the IP address in the packet matches the IP address of the receiver. If it matches, we will remove the Header of the Network layer to continue moving to the next floor Transport.
- On the floor Transport – 4th floor will proceed to send ACK, NAK packets to see if the packets have reached the receiver or not. In addition, in this layer, the data will be corrected and sorted by segmentation => then put the data to the next layer. Session.
- Floor Session – 5th floor will ensure the data in the packet is intact and proceed to remove the headers to bring the data to the layer Presentation.
- Presentation – 6th floor will process the packets by converting the data formats accordingly before transferring to the Application.
- Last floor Application – Floor 7 will proceed to remove the headers and the receiver will receive the complete data.
Thus: Unpacking data is a bottom-up process according to the OSI model.
As a general rule, headers are opened at the respective layers. This process is repeated until the destination machine receives the data, then the unpacking process ends.
So, I have finished presenting to you the process of encapsulating data and receiving data.
We can see that the process of closing and receiving data is done sequentially and according to a general rule.
To be able to understand and visualize the actual path, as well as the information of a packet, you can use Wireshark software Read, analyze and understand more details.
Hope the information in this article will be useful to you!
Read more:
CTV: Dinh Hoang Thach – Blogchiasekienthuc.com
Edit by Kien Nguyen
Note: Was this article helpful to you? Don’t forget to rate the article, like and share it with your friends and family!