The role of each layer in the TCP/IP four-layer model (protocol cluster)

Posted Jun 16, 20202 min read

The OSI seven-layer model is an international standard. It is divided into seven layers. The concept is clear, but it is too complicated. As a result, a de facto standard, the **TCP/IP four-layer model, has evolved. This model combines the application layer and the presentation layer. , Conversation layer merged into one layerapplication layer, merged data link layer and physical layerintolink layer`.

OSI seven-layer model TCP/IP four-layer model Protocol
Application Layer
Presentation layer
Session layer Application layer HTTP, TCP, DNS, SMTP, TFTP, etc.
Transport layer Transport layer TCP/UDP
Network layer Network layer IP
Data Link Layer
Physical layer Link layer -

The role of each layer in the TCP/IP four-layer model

- Function
Application layer The application layer is at the top of the four-layer model. He determines the communication activities when providing application services to users.
In human speaking, this layer directly acts on the kernel of your operating system, for session management, data encryption/decryption, providing services for applications, etc..
Transport layer Establish, maintain, and manage the end-to-end data transmission of two computers in the network connection. We often say that TCP/UDP works on this layer.
Network layer Handles packets flowing on the network. It stipulates how to reach the other party's computer through the path, and transmits the data packet to the other party(IP address selection, routing).
Link layer Used to deal with the hardware part of the link network, including control operating system, driver, network card, etc.


One day, you bought a desktop computer on a treasure. After the merchant(terminal application) received your order, after checking the warehouse and confirming that the warehouse was in stock, he was ready to store things(data package) Sent out(application layer initiates a delivery request), so the merchant called the courier(transport layer), the courier found that there are too many accessories for the computer, a package can not fit, so the various accessories Packed in different boxes(divide the data), and posted a courier note(marked serial number and port number), and then delivered the express package to the courier company(network layer), At first glance, the courier company does not write the postal code. Oh, it is Beijing to Chongqing. Then add the postal code(add the MAC address of the communication destination), it is not an expedited item, then take the ground transportation, first come Xi'an and then to Chongqing(IP site selection), so the package was handed over to the freight forwarder(link layer).