HCIA (Detailed explanation of OSI seven-layer reference model)

Detailed explanation of the OSI seven-layer reference model


Preface

1. In the previous section, we introduced the concept of computer network and the meaning of network protocol model. If you haven’t read it, you can click on the link below to watch: computer network concept, network protocol model meaning

2. In this section, we briefly introduce the OSI seven-layer reference model


Tip: The following is the content of this article

1. The role of the OSI seven-layer reference model

The role of the OSI seven-layer reference model is to enable computers produced by different manufacturers to communicate with each other, and a common standard is agreed upon, that is, a network protocol.

We need to know that various functions of network equipment are realized by running various corresponding protocols. Therefore, different model layers have corresponding agreements.


2. Advantages of the OSI seven-layer reference model

1. Independent: Each layer protocol operates independently and does not affect each other. (That is to do their own things separately)

2. Promote standardization: define standard interfaces and realize the interaction of multiple manufacturers. (Just like the charger, for example, you can also charge Xiaomi's mobile phone with Huawei's charger, because they all comply with the same standard)


3. What are the seven layers of the OSI seven-layer reference model and their basic functions

OSI defines a seven-layer framework ( physical layer, data link layer, network layer, transport layer, session layer, presentation layer, application layer ). That is, the open system interconnection model .

Layer name The main function
Application layer Provide rich system application interfaces to user application software
Presentation layer Perform data format conversion to ensure that the application layer data of one system can be recognized by the application layer of another system
Session layer Establish, manage, and terminate the session between the two communicating parties, determine whether the two parties should start the communication initiated by one party, etc.
Transport layer Establish, maintain, and cancel an end-to-end data transmission process, control the speed of the transmission rhythm, adjust the sequence of data, etc.
Network layer According to the network layer target address information contained in the data, the data transmission process from any node to any other node is realized
data link layer A logical data link is established between adjacent nodes connected by a physical link, and point-to-point or multipoint direct communication of data is realized on the data link.
Physical layer Define physical equipment standards and interfaces; realize the sending and receiving of physical signals

4. Detailed explanation of the functions of each layer of the OSI reference model*

1. Physical layer

Mainly define the physical equipment standards, such as the interface type of the network cable, the interface type of the optical fiber, and the transmission rate of various transmission media. Its main function is to transmit a bit stream (that is, to convert from 0, 1 to current strength for transmission, and to convert to 1, 0 after reaching the destination). Simply put, it is to send and receive bit streams. The physical layer is like the means of transportation in our lives, such as cars and airplanes.

2. Data link layer

This layer effects include physical address addressing, data framing, flow control, error detection data, such as retransmission . This layer controls the communication between the network layer and the physical layer, and solves the problem of the accuracy of the transmitted data. In order to ensure transmission, the data received from the network layer is divided into specific frames that can be transmitted by the physical layer. A frame is a structured packet used to move data. It includes not only the original data, but also the physical addresses of the sender and receiver, as well as error correction and control information. The address determines the location where the frame will be sent, and error correction and control information ensure that the frame arrives accurately. If in the process of transmitting data, the receiving point detects that there is an error in the data, it will notify the sender to resend the frame.

3. Network layer

This layer establishes a connection between two nodes through IP addressing . For the data packets sent by the transmission layer at the source end, select the appropriate routing and switching nodes, and transmit them to the transport layer at the destination end according to the correct address. This layer is what we often call the IP protocol layer. Common IP protocols include IPv4 and IPv6. In addition to the IP protocol, the network layer also has protocols such as IPX, CLNP, and Appletalk.
(For example, for common express transportation, I bought a USB flash drive on Pinduoduo, and shipped it from Guangzhou to Changsha. It will be sent from the Guangzhou distribution center first, sent to the Changsha distribution center, and then sent to the sales department, and finally sent to me In hand, this distribution center and sales department are equivalent to an IP node. According to the destination address, the node will choose the optimal path to send the package)

4. Transport layer

The transport layer establishes an end-to-end connection from the host. The role of the transport layer is to provide end-to-end reliable and transparent data transmission services for upper-layer protocols, including handling problems such as error control and flow control . The TCP and UDP protocols we often talk about are at this layer, and the port number is the "end" here.
(The transport layer is equivalent to the person responsible for the delivery of express mail in the company, and the company's own delivery staff, who are responsible for delivering the information to be sent from the upper layer to the express company or post office)

5. Session layer

The session layer is responsible for establishing, managing, and terminating communication sessions between presentation layer entities. The communication at this layer consists of service requests and responses between applications in different devices.
(For example, I need a quotation for a certain product in the company. The department responsible for this area will go to the outside world to ask the company responsible for the production of this product, and record the conversation. When the relevant company’s quotation is sent, the department confirms the receipt After reaching the quotation, close this session)

6. Presentation layer

The presentation layer provides various encoding and conversion functions for application layer data to ensure that the data sent by the application layer of one system can be recognized by the application layer of another system . Data compression and encryption are also one of the conversion functions that the presentation layer can provide.
(That is, two people from different countries of A and B, they have discussed between them to use English to talk, but they do not speak English, so at this time the presentation layer (the two of them requested a translation) is to transfer information from the application layer (The information in their respective national languages) is translated into English. At the same time, the two of them are afraid that other people will see the content of their dialogue, and they will also encrypt the dialogue)

7. Application layer

This is the layer closest to the user in the OSI seven-layer model. It provides application interfaces for computer users and also provides users with various network services directly. Common network services are: HTTP, HTTPS, FTP, SMTP, etc.

Guess you like

Origin blog.csdn.net/qq313088385/article/details/115279988