Data Encapsulation, generally speaking, is to map business data to the payload of an encapsulation protocol, then fill in the header of the corresponding protocol to form a data packet of the encapsulation protocol, and complete rate adaptation. match.
It can be seen from the above analysis that data packet encapsulation is actually very complicated: to achieve reliable, accurate and efficient purposes, many influencing factors must be considered , and take targeted preventive measures. (Recommended learning: web front-end video tutorial)
In practical applications, the data encapsulation of the network is carried out in layers based on functions. The purpose is very simple, which is to decompose the complex system into many Modules, each module is independent and does not affect each other. Each module (each layer) uses interfaces to connect and interact, and provide services to each other. This not only makes it easier to implement functions, but also makes the entire system have good compatibility and scalability.
The process of data encapsulation is roughly as follows:
1. Convert user information into data for transmission on the network
2. Convert data into data segment, and establish a reliable connection between the sender and the receiving host
3. Convert the data segment into a data packet or datagram, and put a logical address in the header, so that each data packet Can be transmitted through the Internet
4. Packets or datagrams are converted into frames for transmission in the local network. On the local network segment, each host is uniquely identified using its hardware address.
5. Frames are converted into bit streams, and digital encoding and clocking schemes are used
Taking the common OSI model as an example, it is divided into seven layers, from bottom to top: Physical Layer, data link layer, network layer, transport layer, session layer, presentation layer, application layer, each layer corresponds to different functions. In order to realize the corresponding functions, the data will be encapsulated in the protocol header and protocol tail according to the protocol of this layer, and then the encapsulated data will be transmitted to the lower layer. The data encapsulation process of each layer is shown in the figure below.
The transport layer uses the TCP header to mark the connection to a specific application and encapsulates the data into data segments; the network layer uses the IP header to mark the connected device network address. And based on this information, network path selection can be performed. At this time, the data is encapsulated into data packets; at the data link layer, the data has been encapsulated into data frames, and the physical address of the device is given in the MAC header. Of course, Data verification and other functional fields; when it reaches the physical layer, it has been encapsulated into a bit stream and becomes a pure physical connection.
The above is the detailed content of What is data encapsulation called at the data link layer?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 Mac version
God-level code editing software (SublimeText3)

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Atom editor mac version download
The most popular open source editor