Netgong Xiaobai Notes | Chapter One OSI Reference Model Study Notes

Introduce the role of each layer of the OSI reference model:

The OSI reference model is also called the Open System Interconnection/Reference Model (OSI/RM). It is mainly divided into seven layers. Through the different functions of these seven layers, the principles of network communication are explained to users. From the application software on the PC side to the data flow of 0 and 1 transmitted on the twisted pair cable, the processes that are not transparent to all users can be understood through the seven-layer model.

The seven-layer model mainly includes the physical layer, data link layer, network layer, transport layer, session layer, presentation layer and application layer.

In the process of studying, I found the teaching book for the computer network class in the university, and also checked some website materials. The understanding is still relatively jerky. The content of the teaching book is relatively general and official, and it is not easy to inquire. Fortunately, during the learning process, I asked my tutor Baige to answer questions in time. Record the following seven-layer model learned today.


0ff94f3ae20fa8acdae90afa08736c85.png

Physical layer:

As the name suggests, the physical layer expresses the "physical" transmission of data. The process of transmitting all data on different network cables is the representation of the physical layer. The physical layer defines four types of characteristics through various indicators: mechanical characteristics, electrical characteristics, functional characteristics and regulatory characteristics.

Mechanical features : What is the interface of the network cable and what is the medium of the network cable can be understood as a mechanical feature. (Appearance)

Electrical characteristics : the voltage range defined on various network cable interfaces. (Voltage and current)

Functional characteristics : what does it mean when a certain regular level of voltage appears on the network cable (what does a regular current represent)

Procedure characteristics : When data is transmitted in the form of electric current, who will transmit first (referring to the order of transmission)

The physical layer mainly defines the medium used when data is transmitted in a bit stream. The unit of data is bit.

The physical layer is mainly about the transmission medium and its characteristics.

Data link layer :

What kind of media is used for the physical layer to propagate, and the data link layer converts the line between the two underlying switching devices into a logical transmission line to provide point-to-point services. In the data link layer, data refers to data frames, and link refers to the physical line of two adjacent nodes, which are two adjacent nodes that are physically connected through the transmission medium. The data link is a logical link composed of a physical link plus necessary communication protocols.

What is a MAC address? The MAC address is 48 bits long and consists of 12 bits in hexadecimal; it is a unique name on each PC. Each device will only have one MAC address. There will be no two devices with the same MAC address in the world.

Ethernet is based on the Layer 2 network structure. In Ethernet, Layer 2 switching devices communicate by identifying MAC addresses.

The data link layer defines the point-to-point transmission and constructs a logical circuit. The data unit is a frame. The data link layer network is mainly identified and transmitted through the MAC address.

The data link layer describes the transmission between the nearest two terminals in a point-to-point manner. Ethernet (LAN) is built on the second layer of communication, and the main equipment is a switch.

Network layer :

The function of the network layer is mainly routing addressing and flow control. Routing is to calculate the distance from one host to another. The process of finding the most suitable path through some protocols is routing.

In the data transmission of the network layer, compared with the data link layer, the concept of an IP address is added.

An IP address refers to an Internet Protocol address, and can also be called an Internet Protocol address. It is a logically existing address. He assigns a logical address (which can be changed) to each host to replace the MAC (unique) address for communication. Mainly used in the transmission between the network layers, dedicated names in the network layer.

At first, when I was learning IP address in university classroom, I was confused. Why not use MAC address for communication instead of so-called IP address?

The existence of the IP address is to shield some differences in the MAC address (the MAC addresses of mobile phones and computers are different), so that each host can use the IP address to achieve fair and just communication.

The main function of the network layer is to provide reason selection, choose the optimal path to the destination host, and transmit data packets along the path. At the same time, the IP address is proposed as the logical address of each host to facilitate the unified guidance of the network layer.

Transport layer :

The transport layer is to achieve reliable end-to-end data segmented transmission and assembly, and mainly provides error control and flow control. The end-to-end transmission has already begun to ignore how the lower three layers work. No matter how the data is transmitted to the destination host, he only pays attention to whether the data itself has errors after the data arrives. The transport layer provides a series of protocols to solve errors in data transmission and verify the correctness of the data after it reaches the destination host.

The transport layer drops the data packets from the uppermost layer and uses some special protocols to verify and check the data. When the destination host receives the data, it will detect the data packets through the additional protocol of the transport layer to ensure the data Completeness and correctness.

The transport layer is used to implement end-to-end communication to ensure the integrity and security of data packets.

Session layer :

The conversation layer allows users on different machines to establish conversations, including recording and control in the conversation, which are all done by the conversation layer.

When introducing the session layer, Baige, the instructor, gave a very appropriate example: He said that Taobao can only use Alipay to pay, but not WeChat payment, indicating that Taobao and Alipay have opened the session layer interface, but they did not open a session with WeChat. Layer interface.

Used to establish a dialogue between users of different machines.

Presentation layer :

The presentation layer provides encryption and decryption, compression and decompression, and specific data conversion formats for data;

Baige said that the encoding format provided by the presentation layer is like using the JPG encoding format to represent picture data, and the MP3 encoding format to represent sound data. The encryption function in the presentation layer can be original, and a data can be encoded in an encoding format that only oneself knows.

Provide encryption and decryption, compression and decompression and corresponding encoding format for data.

Application layer:

The highest layer of the OSI reference model at the application layer is directly aimed at the needs of the user. The user's data, the picture, text and sound that the user sees on the network are all data from the application layer. For example, when you use QQ, you send a message to the other party, and the other party can receive the message through QQ.

The application layer directly communicates with users and provides logical peer-to-peer communication between users.

to sum up:

The OSI reference model specifically describes the entire network communication process from user to line. The data is packaged down one by one from the application layer, and after reaching the target host, it is unpacked one by one upwards, and when it reaches the user, it becomes a complete data again.


5c584279d32b20b01f6c059ccb85589a.png


Guess you like

Origin blog.51cto.com/14841124/2679486