Encounter the five-layer network model

Encounter the five-layer network model

Don’t talk nonsense, just serve the dishes

Application layer

The program or software on the server is called: application layer The
communication between the browser and the server is to ensure correct communication by setting the corresponding protocol,
just like the application layer protocol, such as HTTP protocol, DNS protocol (domain name resolution), FTP protocol ( File transfer), SMTP protocol (mail transfer), etc.
The encryption method is like a program that can recognize the HTTP protocol to interpret the data content transmitted in the HTTP protocol.

Transport layer

The establishment and management of data transmission connections is called in the network world: Transport layer
There are many ways to connect, and each of these methods is called a protocol, which is the transport layer protocol.
For example: UDP protocol , UDP protocol does its best to ensure that the data is delivered, but it does not guarantee that the data will be delivered. The ping command we often use to test whether the hosts are connected is based on the UDP protocol. This kind of resource loss during resource transmission is called packet loss in the network world.
For example: TCP protocol , TCP protocol is to ensure the correctness of the data, but also to ensure the sequence of the data, which is also the transmission method we often use.

Network layer

Every computer has a port, and the network of the computer world is like a map transportation network in our real life. In the network world, we call it: the network layer .
In real life, we need an accurate address to find a person. Similarly, we need to find a host in the network world to accurately locate it. Finding a computer address requires a certain format. This format is analogous to a protocol in the network world. Call it a network layer protocol. We usually use IP plus port to locate a program in the network. This method is a network layer protocol, which we call: IP protocol.

data link layer

The route planning of resource transmission is called the data link layer .
The data link layer is divided into two parts or called two sublayers, one is the route displayed on the map, which we call: the logical link control sublayer, and the other is the route in the real world, which we call: media Access control sublayer, the abbreviation of this layer must be familiar to everyone-MAC, which is what we often call MAC address.

Physical layer

The transmission path or tool used in the process of resource transmission. This layer is called the physical layer in the network .

Simulate data transmission process

Simulate host A sending information to host B, Insert picture description here
host A application layer generates information and sets the application layer protocol, and then the transport layer determines the transmission mode to generate the corresponding protocol such as TCP protocol, and then locates the location to be sent to host B at the network layer. The network layer protocol is to plan the route for transmission to the host B through the data link layer, and finally select a convenient transmission tool for transmission through the physical layer.
When the data of host A arrives at host B, it will first leave the transmission tool that is the physical layer -> data link layer, and then find the corresponding transmission location based on the IP address, that is, the data link layer -> network layer. The method (TCP protocol) responds to the host, namely the network layer -> transport layer, and finally confirms the correct communication through the application layer protocol identification, that is, the transport layer -> application layer. After the analysis of the application layer protocol, then B Receive A's message.
The general process is like this, basically going back and forth through the five-layer model, carrying various stacks of protocols when going, and analyzing various protocols layer by layer when returning, and finally get the desired information .

Five-layer network mode

The five-layer network modes are: application layer, transport layer, network layer, data link layer and physical layer .

In the process of data transmission, the five-layer network model shows that from the application layer outside A to the transport layer to the network layer to the data link layer to the physical layer, the data is transported to B, and then from the physical layer of B to the data Link layer to network layer to transport layer to application layer.
The essence of each layer of protocol is to put a layer of data in a special format outside. Therefore, when sending data, you need to disassemble this layer of agreement before you can get the data inside. (The agreement is removed layer by layer)
Insert picture description here

Seven-layer network model

Simply talk about the seven-layer network model. The seven-layer network model divides the application layer into three, namely the application layer, the presentation layer, and the session layer .
The new presentation layer and session layer do not have corresponding protocols. Generally speaking, the presentation layer does operations such as formatting or encrypting data. Safe and secret transmission of resource information.

Guess you like

Origin blog.csdn.net/kzj0916/article/details/109096425