Wireshark Packet Analysis Data encapsulation

Source: Internet
Author: User

Wireshark Packet Analysis Data encapsulation

Data encapsulation refers to the process of encapsulating Protocol data units (PDUs) in a set of protocol headers and tails. In the OSI seven-layer reference model, each layer is primarily responsible for communicating with peers on other machines. The process is implemented in the Protocol Data Unit (PDU), wherein each layer of PDU is generally composed of the protocol header, protocol tail and data encapsulation of this layer is selected from the wireshark data Packet Analysis of Tsinghua University Press .

To help users understand the data encapsulation process more clearly, an example is given below to illustrate the process. Assuming that a corporate LAN uses Ethernet, when an employee downloads a file from an FTP server on a local area network, the file from the FTP server to the employee host transfer process 1.17 is shown in this article selected from the wireshark data Packet Analysis of Tsinghua University Press .


Figure 1.17 Transfer of data in TCP/IP

In Figure 1.17, the FTP server acts as the sending side of the data, and the employee hosts as the receiving end of the data. The following sections describe the data sending and receiving processes respectively.

1. Data transmission processing Process Data Encapsulation Protocol Data unit Package Wireshark packet Analysis

(1) The application layer gives the data to the transport layer, the transport layer adds the control information of TCP (called the TCP header), the data unit is called the segment (Segment), the process of adding control information is called encapsulation. Then, give the segment to the network layer.

(2) The network layer receives the segment, plus the IP header, this data unit is called the Packet (Packet). The package is then handed over to the data link layer.

(3) The Data link layer receives the packet, adds the Mac head and the tail, this data unit is called the frame. Then, give the frame to the physical layer.

(4) The physical layer converts the received data into a bit stream and then transmits it in the network cable.

2. Data receive processing process Data Encapsulation Protocol Data unit Package Wireshark packet Analysis

(1) The physical layer receives the bitstream and passes the data to the data link layer after processing.

(2) The Data link layer converts the received data into a data frame, and then removes the Mac head and tail, the process of removing the control information is called unpacking, and then the packet is delivered to the network layer.

(3) The network layer receives the packet, removes the IP header, and then gives the segment to the transport layer.

(4) The Transport layer receives the segment, then drops the TCP header and then gives the data to the application layer.

From the above transmission process, the following points can be summed up. As shown below:

(1) The method of data processing by the sender is from the high level to the bottom layer, and then encapsulates it.

(2) The method of data processing by the receiver is from the bottom layer to the high level, and then encapsulates it by layers.

(3) Each layer of the receiving party only takes the data that is meaningful to the layer, or each layer can only process the data of the sender's equivalent layer, and then pass the remainder to the previous layer, which is the concept of peer-to-peer communication. The analysis of the Wireshark data packet in the actual combat in Tsinghua University Press Data Encapsulation Protocol data unit encapsulates Wireshark packet analysis .


Wireshark Packet Analysis Data encapsulation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.