1. OSI reference model
Today we’ll start with the most basic and important aspect of Ethernet — the OSI reference model.
1. Source of OSI
Open System Interconnect (OSI) stands for Open System interconnection. Commonly known as the OSI reference model, it is a network interconnection model developed by ISO (International Organization for Standardization) in 1985.
ISO introduced the OSI reference model in order to make the network application more popular. The implication is to recommend that all companies use this specification to control the network. So that all companies have the same specifications and can connect.
2. Division of OSI seven-layer model
OSI defines seven layers of network interconnection framework (physical layer, data link layer, network layer, transport layer, session layer, presentation layer, application layer), namely ISO Open interconnection system Reference model. The diagram below.
Each layer implements its own functions and protocols, and completes interface communication with adjacent layers. The OSI service definition specifies the services provided by each layer. A service at one layer is a capability of that layer and the layers below it, provided through an interface to a higher layer. The services provided by each layer are independent of how they are implemented.
3. Functional definition of each layer
We will only give a functional overview of the OSI layers here without going into detail, because each layer is actually a complex layer. Later, I will also carry out in-depth study of some layers according to my personal direction. Here we have an overview. Let’s start with the top layer, the application layer. The whole process is explained with A commercial quotation sent by company A and Company B as an example.
- The application layer
The layer closest to the user in the OSI reference model is the application interface for the computer user, as well as the direct provision of various network services to the user. Our common application layer network service protocols are: HTTP, HTTPS, FTP, POP3, SMTP and so on.
The boss of company A is the user we mentioned, and the commercial quotation he wants to send is A network service provided by the application layer. Of course, the boss can also choose other services, such as sending A commercial contract, sending an inquiry, and so on.
- The presentation layer
The presentation layer provides various encoding and conversion functions for application layer data, ensuring that data sent by the application layer of one system can be identified by the application layer of another system. If necessary, this layer can provide a standard representation for converting multiple data formats within a computer into a standard representation for communication. Data compression and encryption are also among the transformation capabilities that the presentation layer can provide.
Since Company A and COMPANY B are from different countries, English is used as the communication language by agreement between them. Therefore, the presentation layer (the secretary of the company) is to translate the information transmitted by the application layer into English. At the same time, in order to prevent other companies from seeing it, the people of Company A will also do some encryption processing on this quotation. That’s what presentation is for, translating data at the application layer and so on.
- The session layer
The session layer is responsible for establishing, managing, and terminating communication sessions between presentation layer entities. Communication at this layer consists of service requests and responses between applications in different devices.
Colleagues at the conversation level get the converted data of colleagues at the presentation level (the colleagues at the conversation level are similar to the communications department of the company), and the colleagues at the conversation level may have the contact information of their company with many other companies, where the company is the entity in the actual transmission process. They manage their company’s communications with many outside companies. After receiving the data from the presentation layer, the session layer establishes and records the session. It first finds the address information of Company B and then puts the whole document in an envelope with the address and contact information. Prepare to send the information. When it is confirmed that company B has received this quotation, the conversation is over and the colleagues in the public relations department will terminate the conversation.
- The transport layer
The transport layer establishes end-to-end links between hosts. The transport layer provides end-to-end reliable and transparent data transmission services for upper-layer protocols, including error control and flow control. This layer hides the details of the lower level data communication from the upper level, so that the upper level user sees only a reliable host-to-host data path that can be controlled and set by the user between the two transport entities. We usually talk about TCP UDP at this layer. The port number is the “port” here.
The transport layer is the equivalent of the company’s deliverers, the company’s own deliverers, who deliver the material to the company or post office from the next level.
- The network layer
This layer establishes the connection between the two nodes through IP addressing, selects appropriate routing and switching nodes for packets sent by the transport layer at the source end, and correctly transmits them to the transport layer at the destination end according to the address. It is usually called the IP layer. This layer is known as the IP protocol layer. The IP protocol is the foundation of the Internet.
Network layer is equivalent to express company huge network of express different distribution centers nationwide, for example, from shenzhen to Beijing along abundant express (land transportation as an example, the air seemed to fly directly to Beijing), first of all, to the motion of the distribution center in shenzhen, from shenzhen hub to hub to wuhan again, from wuhan hub to send to Beijing shunyi hub. Each of these hubs is like an IP node in the network.
- Data link layer
Bits are combined into bytes, and bytes into frames, using link layer addresses (Ethernet uses MAC addresses) to access the media, and error detection.
The data link layer is divided into two sub-layers: logical link control layer (LLC) and media access control layer (MAC).
MAC sub-layer processing CSMA/CD algorithm, data error check, frame, etc. The LLC sublayer defines fields that enable the last protocol to share the data link layer. In practical use, the LLC sublayer is not required.
- The physical layer
The actual transmission of the final signal is through the physical layer. Transmit bitstreams over physical media. Level, speed and cable pins are specified. Common devices include hubs, Repeaters, modems, network cables, twisted-pair cables, and coaxial cables. These are transport media for the physical layer.
The means of transportation in the process of express delivery are equivalent to our physical layer, such as cars, trains, planes and ships.
Second, TCP/IP five-layer model
The TCP/IP Layer 5 protocols are as follows.
Different devices work at each layer. For example, the commonly used switch works at the data link layer, while the common router works at the network layer.
The protocols implemented at each layer are also different, that is, the services at each layer are different. The following figure lists the major protocols for each layer.