Click the blue text above to follow us
Resource Release
Huawei Certified Beginner to Advanced Practical Course
↓ Scan to watch the video ↓
1
1. OSI Reference Model

The seven-layer model, also known as OSI (Open System Interconnection), is a standard framework established by the International Organization for Standardization (ISO) for interconnecting computer or communication systems, commonly referred to as the OSI reference model or seven-layer model. It is an abstract model consisting of seven layers, which includes a series of abstract terms or concepts as well as specific protocols.
Composition of the OSI Seven-Layer Reference Model
Physical Layer: The message header and upper layer data are composed of binary arrays. The role of the physical layer is to convert these binary numbers into electrical signals for transmission over the network.
Data Link Layer: The upper layer data is encapsulated into data frames along with the source and destination physical (MAC) addresses. The MAC address is used to identify the physical address of the network card, establishing the data link; when data errors are detected, the data frame can be retransmitted.
Network Layer: The upper layer data is encapsulated into packets along with the source and destination logical (IP) addresses, facilitating data transmission from the source to the destination.
Transport Layer: The upper layer data is segmented and encapsulated into data segments with port numbers, or through identifying the port in the message header, enabling data communication between user processes on different hosts in the network. It acts as a bridge between the upper and lower layers.
Session Layer: Responsible for establishing, maintaining, and terminating communication between two nodes in the network. For example, server authentication of user login is performed by the session layer.
Presentation Layer: Responsible for data format conversion, such as encryption/decryption, translation, and compression/decompression.
Application Layer: The human-computer interaction interface, where human language is input into the computer, such as in a WeChat chat window.
1
2. TCP/IP Model

TCP/IP is a set of protocols that includes many protocols, forming the TCP/IP protocol suite. It simplifies the OSI seven-layer model into a five-layer model.
1. Comparison of TCP/IP Model and OSI Model
2. Composition of TCP/IP Protocol Suite
(1) Ports and Protocol Functions Based on TCP Protocol (Transmission Control Protocol) ——- More stable and reliable transmission
(2) Ports and Protocol Functions Based on UDP Protocol (User Datagram Protocol) ——– Higher transmission efficiency
1
3. Encapsulation and Decapsulation Process of Data Transmission

1. Data Encapsulation Process
The data encapsulation process is: raw data → data segment → data packet → data frame → bit stream
-
Application Layer: Raw data is converted into binary data
-
Transport Layer: Data is encapsulated with a transport layer header, such as TCP header, into a segment. The key information at this step is the port number.
-
Network Layer: Data is given an IP header and encapsulated into a packet. The key information at this step is the source and destination IP addresses.
-
Data Link Layer: Data is given a frame header and encapsulated into a frame. The key information in the header is the source and destination MAC addresses.
-
Physical Layer: The binary data is converted into high and low electrical frequency signals or optical signals over wires or fibers.
-
The data frame is ultimately transmitted over the physical layer (twisted pair, fiber optic jumper) as electrical or optical signals.
-
This process of passing data down the protocol stack while adding headers and trailers is called encapsulation.
2. Data Decapsulation Process
The data decapsulation process is: bit stream → data frame → data packet → data segment → raw data
-
Physical Layer: Converts data into binary data and sends it to the data link layer.
-
Data Link Layer: First checks the MAC address; if it is its own MAC address, it retains it; otherwise, it discards it. Then it removes the frame header, checks the type field, and determines which protocol is used by the upper layer (network layer), and sends the data to the network layer.
-
Network Layer: First checks the IP address; if it is its own IP address, it retains it; otherwise, it discards it. Then it removes the IP header, checks the protocol number, and determines which protocol is used by the upper layer (transport layer), and sends the data to the transport layer.
-
Transport Layer: Checks the port number and then sends it to the application layer.
-
Application Layer: Converts binary data back to raw data.
Summary:
This article briefly introduces the composition of the OSI and TCP/IP models, as well as the encapsulation and decapsulation processes of data transmission between the layers.

