OSI is an open reference model for System Interconnection. It is a well-defined protocol specification. The OSI model has a layer-7 structure, and each layer can have several child layers. Next I will briefly introduce these 7 layers and their functions.
Layer 7 of OSI is
7 Application Layer
6 presentation layer
5 Session Layer
4 Transport Layer
3 network layer
2. Data Link Layer
1 Physical Layer
Among them, Layer 7, layer 6, layer 5, and Layer 4 define the functions of the application. Layer 3, Layer 3, and Layer 1 are mainly oriented to end-to-end data streams through the network. Next I will introduce the features of these 7 layers:
(1) Application Layer: an application that communicates with other computers. It corresponds to the communication service of applications. For example, a word processing program without communication functions cannot execute communication code, and programmers engaged in word processing do not care about OSI Layer 7th. However, if a file transfer option is added, the programmer of the word processor needs to implement the OSI Layer 7th. Example: telnet, HTTP, FTP, WWW, NFS, SMTP, etc.
(2) Presentation Layer: The main function of this layer is to define the data format and encryption. For example, FTP allows you to transfer data in binary or ASII format. If binary is selected, the sender and receiver do not change the file content. If the ASII format is selected, the sender converts the text from the sender's character set to the standard ASII and then sends the data. The receiver converts the standard ASII to the character set of the receiver's computer. Example: encryption, ASII, etc.
(3) Session Layer: it defines how to start, control, and end a session, including control and management of multiple two-way hours, so that the application can be notified when only part of the continuous message is completed, so that the data seen in the presentation layer is continuous. In some cases, if the presentation layer receives all the data, data is used to represent the presentation layer. Example: RPC and SQL.
(4) Transport Layer: This layer features whether to select the error recovery protocol or error-free recovery protocol, and reuse the input of data streams of different applications on the same host, it also includes the re-sorting function for packets that are not in the correct order. Example: TCP, UDP, and SPX.
(5) network layer: This layer defines the end-to-end packet transmission. It defines the logical addresses that can identify all nodes, and also defines the routing implementation and learning methods. To adapt to the transmission medium whose maximum transmission unit length is smaller than the packet length, the network layer also defines how to break a packet into smaller packets. Example: IP, IPX, etc.
(6) data link layer: it defines how data is transmitted on a single link. These protocols are related to the song media discussed. Example: ATM, FDDI, etc.
(7) Physical Layer: OSI physical layer specifications are characteristic standards for transmission media. These specifications are generally referred to standards developed by other organizations. Connector, needle, needle usage, current, current, encoding and optical modulation all belong to the content of various physical layer specifications. Multiple specifications are commonly used in the physical layer to define all details. Example: Rj45, 802.3, etc.
Advantages of OSI layering:
(1) people can easily discuss and learn the normative details of protocols.
(2) The standard interface between layers facilitates modular engineering.
(3) creating a better interconnection environment.
(4) Reduced Complexity, made the program easier to modify, and made product development faster.
(5) Each layer makes it easier to remember the functions of each layer by taking advantage of the adjacent lower-layer services.
Most computer networks adopt hierarchical structures. A computer network is divided into several layers. A system at a high level only uses interfaces and functions provided by systems at a lower level, you do not need to know the algorithms and protocols used to implement this function at the lower layer. The lower layer only uses parameters transmitted from the higher level system. This is the independence between layers. With this independence, each module in the hierarchy can be replaced by a new module, as long as the new module and the old module have the same functions and interfaces, even if they use different algorithms and protocols.
To transmit information and data correctly between computers and terminals in the network, there must be an agreement or rule on the order of data transmission, data format and content, such an agreement or rule is called an agreement. The network protocol consists of three parts:
1. Semantics:
Is to explain the meaning of the Protocol element, the meaning of different types of protocol elements are different. For example, what control information should be sent, what actions should be completed, and the response should be obtained.
2. Syntax:
The combination of several protocol elements and data is used to express the format that should be followed by a complete content, that is, to define the data structure of information. For example, the structure and format of user data and control information.
3. Time Series:
Detailed description of the event Implementation sequence. For example, when both parties communicate, a data packet is sent from the sending point. If the target point is correctly received, the source point is correctly received. If an error message is received, the source point must be resold once.
Since 1970s, some major foreign computer manufacturers have successively introduced their respective network architecture, but they are all dedicated.
To enable computers of different computer manufacturers to communicate with each other and establish computer networks in a larger scope, it is necessary to establish an international network architecture standard.
In 1981, ISO officially recommended a network System structure-layer-7 reference model called Open System Interconnection (OSI ). The establishment of this standard model makes various computer networks move closer to it, greatly promoting the development of network communication.
The OSI reference model divides the entire network communication function into seven layers, as shown in figure 1. They are physical layer (PH), link layer (DL), network layer (N), Transport Layer (T), meeting layer (S), and presentation layer (P) application Layer (). Each layer provides certain functions, and each layer directly provides services for its upper layer, and all layers support each other. Layer 4 to Layer 7 are mainly responsible for interoperability, while Layer 1 to Layer 3 is used to create physical connections between two network devices.
1. Physical Layer
The physical layer is the first layer of OSI. Although it is at the bottom layer, it is the basis of the entire open system. The physical layer provides transmission media and interconnection devices for data communication between devices, providing a reliable environment for data transmission.
1.1 media and interconnect Devices
Media in the physical layer includes overhead cables, balanced cables, optical fiber cables, and wireless channels. Communication devices are the interconnection devices between DTE and DCE. DTE includes both data terminal devices and physical devices, such as computers and terminals. DCE is a data communication device or circuit connection device, such as a modem. Data transmission is typically a path through the DTE--DCE, and then through the DCE--DTE. A interconnect device is a device that connects DTE and DCE, such as various plugs and sockets. Various coarse and fine coaxial cables, T-connectors, plugs, receivers, transmitters, and reconnections in the LAN are physical media and connectors.
1.2 Main features of the Physical Layer
1.2.1 provides a data transmission path for a data device. A data path can be a physical media or a connection composed of multiple physical media. A complete data transfer, including activating a physical connection, transferring data, and terminating a physical connection. activation means that no matter how many physical media are involved, the two data terminal devices in the communication must be connected to form a channel.
1.2.2 transfer data. the physical layer must form entities suitable for data transmission and serve data transmission. first, ensure that the data can pass through the data correctly, and second, provide sufficient bandwidth (bandwidth refers to the number of BITs that can pass each second ), to reduce channel congestion. the data transmission method can meet the requirements of point-to-point, point-to-point, serial or parallel, half-duplex or full-duplex, synchronous or asynchronous transmission.
1.3 some important standards of the Physical Layer
Some standards and protocols of the physical layer have been established and applied before the establishment of the OSI/TC97/C16 Technical Committee. OSI has also developed some standards and adopted some existing results. some important standards are listed below for readers to check. ISO2110: "Data Communication ---- 25-core DTE/dce interface connector and pin distribution ". it works with EIA (us e-engineering
Industry associations) "RS-232-C" is basically compatible. ISO2593: "Data Communication ---- 34-core DTE/DCE ---- INTERFACE connector and pin distribution ". ISO4092: known as "Data Communication ---- 37-core DTE/DEC ---- INTERFACE connector and pin distribution". compatible with EIARS-449. CCITT V.24: "interface circuit definition table between a data terminal device (DTE) and a data circuit final device". Its functionality is compatible with EIARS-232-C and RS-449 on a 100 series online.
2. Data Link Layer
Data links can be roughly understood as data channels. The physical layer provides transmission media and connections for data communication between devices. the media is persistent and the connection has a lifetime. during the connection lifetime, data communication between the two ends can be performed once or multiple times. each communication must go through two steps: establishing a communication contact and removing a communication contact. the established data transmission and receiving relationship is called a data link. however, data transmitted on physical media is inevitably affected by various unreliable factors and may cause errors. In order to make up for the deficiencies in the physical layer, it provides error-free data transmission for the upper layer, you must be able to check and correct data errors. data Link establishment, removal, and data error detection and error correction are basic tasks of the data link layer.
2.1 main functions of the Link Layer
The link layer provides the data transmission service for the network layer, which relies on the features of this layer. The link layer should have the following functions:
2.1.1 establish, remove, and separate link connections.
2.1.2 frame demarcation and frame synchronization. The data transmission unit at the link layer is a frame. The protocol is different, and the frame length and interface are also different. However, frames must be bounded in any case.
2.1.3 sequential control refers to the control of the sending and receiving sequence of frames.
2.1.4 error detection and recovery. There are also link identification and traffic control. error Detection uses square matrix code verification and cyclic code verification to detect the error codes of data on the channel, while Frame loss uses serial number detection. recovery of various errors often relies on feedback and resend technology.
2.2 Main data link layer protocols
The data link layer protocol is designed to ensure consistency between peer-to-peer entities, and to smoothly complete the services at the network layer. The main protocols are as follows:
2.2.1ISO1745 -- 1975: "Basic Data Communication System control procedure ". this is a character-oriented standard that uses 10 control characters to establish, remove, and exchange links. these characters are also used to send and receive frames and restore errors. multiple link control and data transmission modes can be formed through the use of ISO1155, ISO1177, ISO2626, ISO2629 and other standards.
2.2.2ISO3309 -- 1984: "HDLC Frame Structure ". ISO4335--1984: known as "HDLC procedural elements ". ISO7809--1984: known as "hdlc procedure type assembly ". these three standards are designed for bit-oriented data transmission control. some people are used to calling these three standard combinations the advanced link control procedure.
2.2.3ISO7776: known as "DTE data link layer procedure". compatible with CCITT X.25LAB "balanced link access procedure.
2.3 link layer products
Nic is the most common type of independent link products, and bridging is also a link product. Some of MODEM functions are considered to belong to the link layer, which is controversial. The data link layer turns unreliable transmission media into reliable transmission channels for the network layer. In, the data link layer is divided into two sub-layers: Logical Link Control and media access control. Shows the 802.3lan architecture.
AUI = connection Unit Interface PMA = physical media connection
MAU = media connection unit PLS = physical signaling
MDI = media related APIs
3. Network Layer
The emergence of the network layer is also the result of network development. in the environment of online system and line switching, the functions of the network layer are of little significance. when the number of data terminals increases. they are connected by a relay device. in this case, the requirement of a terminal is not only to communicate with the only one, but to communicate with multiple terminals. This is the problem of connecting the data of any two data terminal devices, that is, routing or route finding. in addition, when a physical channel is established and used by a user, many idle time is often wasted. people naturally want to share a link with multiple users. To solve this problem, logical channel technology and virtual circuit technology have emerged.
3.1 main network layer Functions
To establish a network connection and provide services for the upper layer, the network layer should have the following main functions:
3.1.1 route selection and relay.
3.1.2 activate and terminate the network connection.
3.1.3 multiple network connections are reused on a data link.
3.1.4 error detection and recovery.
3.1.5 sorting and Traffic Control.
3.1.6 Select Services.
3.1.7 Network Management.
3.2 introduction to network layer standards
The main standards of the network layer are as follows:
3.2.1 ISO. DIS8208: "X.25 group-level protocol for DTE"
3.2.2 ISO. DIS8348: referred to as "CO network service definition" (connection oriented)
3.2.3 ISO. DIS8349: referred to as "CL network service definition" (for connectionless)
3.2.4 ISO. DIS8473: known as "CL network protocol"
3.2.5 ISO. DIS8348: known as "Network Layer addressing"
3.2.6 In addition to the above standards, there are also many standards. These standards only provide some functions at the network layer. Therefore, you must use several standards at the network layer to complete the functions at the network layer. due to different networks, the network layer will adopt different standard combinations.
Network Layer functions must be configured for data terminal devices in open networks. Currently, hardware devices sold on the market mainly include gateways and routers.
4. Transport Layer
The transport layer is the first end-to-end Layer for data communication between two computers over the network. When the network layer service quality does not meet the requirements, it improves the Service to meet the requirements of the senior level. When the network layer service quality is good, it only uses a small amount of work. The transport layer can also be reused, that is, multiple logical connections can be created on a network connection. The transport layer is also called the transport layer. the transport layer only exists in the end-to-end open system. It is a layer between the low-Layer 3 Communication Subnet system and the high-Layer 3, but a very important layer. it is the last layer from the source to the target to control data transmission.
There is a fact that the performance of various communication subnets in the world is very different. for example, Communication subnets such as the telephone exchange network, group exchange network, Public Data Exchange Network, and LAN can be interconnected, but the throughput, transmission rate, and data delay communication fees are different. for the session layer, a constant performance interface is required. the Transport Layer undertakes this function. it uses the shunting/confluence, multiplexing/multiplexing technology to adjust the differences between the above communication subnets, so that the Session Layer does not feel it.
In addition, the transport layer also provides error recovery, traffic control, and other functions to shield the Session Layer from the details and differences of the Communication Subnet in these aspects. the Data Object facing the transport layer is no longer the network address and host address, but the interface port of the Session Layer. the final purpose of the above functions is to provide reliable and error-free data transmission for sessions. A service at the transport layer generally goes through the transmission connection establishment phase, the data transmission phase, and the transmission connection release phase to complete a complete service process. in the data transmission stage, there are two types of data transmission: general data transmission and accelerated data transmission. The transport layer service is divided into five types, which can basically meet the different requirements of transmission quality, transmission speed and transmission cost. The transport layer protocol standards include the following:
4.1 ISO8072: "connection-oriented transmission service definition"
4.2 ISO8072: "connection-oriented transmission protocol specifications"
5. Session Layer
The Session Layer provides services that allow applications to establish and maintain sessions and synchronize sessions. The Session Layer uses the verification point to resume communication from the verification point when the communication fails. This capability is extremely important for transferring large files. The Session Layer, presentation layer, and application layer constitute the three high layers of the open system. They provide distributed processing, conversation management, information representation, and recovery of final Errors for application processes.
The Session Layer is also responsible for the service requirements of application processes, and the work that cannot be done by the transport layer can compensate for the functional gaps in the transport layer. The main function is dialog management, data stream synchronization, and re-synchronization. To complete these functions, a large number of service unit functions need to be combined. Dozens of functional units have been developed. The main functions of the Session Layer are described as follows.
5.1 establish a connection between session entities. To establish a session connection for two peer-to-peer session service users, you should do the following:
5.1.1 map session addresses to transport addresses
5.1.2 select the required transport service quality parameters (QOS)
5.1.3 negotiate session parameters
5.1.3 identify various Session connections
5.1.4 transmit limited transparent user data
5.2 Data Transmission Phase
In this phase, the two session users implement organized and synchronized data transmission. the user data unit is SSDU, and the protocol data unit is SPDU. the data transfer process between session users is to convert SSDU into SPDU.
5.3 connection release
Connection release releases Session connections through "ordered release", "obsolete", "limited transparent user data transmission", and other functional units. the Session Layer standard defines 12 functional units in order to enable functional negotiation during the session connection establishment phase and to facilitate reference and reference of other international standards. each system can select other functional units to form a reasonable session service subset based on its own situation and needs. the main criteria for the Session Layer are "DIS8236: Session Service Definition" and "DIS8237: Session Protocol Specification ".
6. Presentation Layer
One of the functions of the presentation layer is to provide a public language for communications between different hosts for interoperability. This type of service is required because different computer architectures use different data representations. For example, the IBM host uses EBCDIC encoding, while most PCs use ASCII codes. In this case, the Session Layer is required to complete the conversion.
Through the previous introduction, we can see that the layer 5 below the Session Layer completes end-to-end data transmission and is reliable and error-free. however, data transmission is only a means rather than an aim. In the end, data must be used. because the data definitions of various systems are not exactly the same, the easiest example is the keyboard. Some keys have different meanings in many systems. this naturally creates barriers to the use of data from other systems. the presentation layer and application layer are responsible for eliminating such obstacles.
User data can be analyzed from two aspects: data meaning is called semantics, and data representation is called syntax. text, graphics, sound, text, compression, encryption, and so on all belong to the syntax category. the presentation layer is designed with three types of 15 functional units. The context Management Unit is to communicate data encoding rules between users so that both parties can have consistent data forms and can understand each other. the ISO presentation layer provides a series of standards such as DP8822, DP8823, and DIS6937/2.
7. Application Layer
The application layer provides services to applications. These services are divided into groups based on the features they provide to applications and are called service elements. Some can be used together by multiple applications, while others are used by a small number of applications. The application layer is the highest level of an open system and serves application processes directly. The function is to complete a series of services required for business processing while multiple system application processes communicate with each other. the service elements are divided into two types: the common application service element CASE and the specific application service element SASE. CASE provides the most basic service. It becomes the user of any user in the application layer and any service element. It mainly provides the basic control mechanism for application process communication and distribution system implementation. specific services such as file transfer, access management, job transfer, bank transactions, and order input must be met by SASE.
These will involve virtual terminals, job transmission and operations, file transfer and access management, remote database access, graphics core systems, and Open System Interconnection Management. the application layer standards include DP8649 "public application service elements", DP8650 "public application service elements use protocols", file transfer, access and management services and protocols.
Discussion: the OSI Layer-7 model is a theoretical model and its practical application is ever-changing. Therefore, it is used as a basis for analyzing and judging various network technologies. For most applications, the protocol family (that is, the protocol stack) is roughly matched with the layer-7 model to see if the specific Protocol actually used belongs to a sub-layer in layer-7, or whether it includes the upper and lower layers.
The advantages of such layering are:
1. It makes it easy for people to explore and understand many details of the Protocol.
2. Standardized interfaces between different layers allow different products to provide only one part of the functions of each layer (for example, one or three layers of routers), or only provide part of the protocol function. (For example, Microsoft TCP/IP in Win95)
3. Create a better integrated environment.
4. Reduce complexity and make it easier to program changes or evaluate quickly.
5. Use headers and trailers at each layer to troubleshoot the problem.
6. The lower layer provides services for the higher layer.
7. Divide complex networks into layers that are easier to manage.