Home  >  Article  >  Network protocols are divided into several layers

Network protocols are divided into several layers

青灯夜游
青灯夜游Original
2021-05-24 13:50:2522578browse

The network protocol is divided into 7 layers, namely: 1. Application layer; 2. Presentation layer, whose main function is to define data format and encryption; 3. Session layer; 4. Transport layer; 5. Network layer; 6. Data link layer, which defines how to transmit data on a single link; 7. Physical layer, which uses multiple specifications to define all details.

Network protocols are divided into several layers

The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

Network seven-layer protocol

OSI is an open communication system interconnection reference model. It is a very well-defined protocol. specification. The OSI model has a 7-layer structure, and each layer can have several sub-layers. The 7 layers of OSI from top to bottom are: 7 application layer, 6 presentation layer, 5 session layer, 4 transport layer, 3 network layer, 2 data link layer, 1 physical layer; among them, the upper layers (i.e. 7, 6, 5 , Layer 4) defines the functions of the application. The following three layers (i.e., Layers 3, 2, and 1) are mainly oriented to the end-to-end and point-to-point data flow through the network.

  • Application layer

    An application that communicates with other computers, which corresponds to the communication service of the application. For example, a word processing program without communication capabilities cannot execute communication code, and programmers working in word processing do not care about OSI layer 7. However, if you add an option to transfer files, then the word processor program will need to implement OSI layer 7. Examples: TELNET, HTTP, FTP, NFS, SMTP, etc.

  • Presentation layer

    The main function of this layer is to define data format and encryption. For example, FTP allows you to choose to transfer in binary or ASCII format. If Binary is selected, the sender and receiver do not change the contents of the file. If ASCII format is selected, the sender will convert the text from the sender's character set to standard ASCII before sending the data. Convert standard ASCII to the character set of the receiving computer at the receiving end. Examples: encryption, ASCII, etc.

  • Session layer

    It defines how to start, control and end a session, including the control and management of multiple two-way messages so that The application can be notified when only part of a continuous message is completed, so that the data seen by the presentation layer is continuous. In some cases, if the presentation layer receives all the data, the data is used to represent the presentation layer. Examples: RPC, SQL, etc.

  • Transport layer

    The functions of this layer include whether to choose an error recovery protocol or an error-free recovery protocol, and to support different applications on the same host. Multiplexing the input of the data stream, and also includes the function of reordering the received data packets in the wrong order. Examples: TCP, UDP, SPX.

  • Network layer

    This layer defines end-to-end packet transmission. It defines the logical addresses that can identify all nodes, and also Defines the routing implementation method and learning method. In order to adapt to transmission media where the maximum transmission unit length is smaller than the packet length, the network layer also defines a segmentation method for how to decompose a packet into smaller packets. Example: IP, IPX, etc.

  • Data Link Layer

    It defines how data is transmitted over a single link. These protocols are relevant to the various media in question. Example: ATM, FDDI, etc.

  • Physical Layer

    OSI's physical layer specifications are related to the characteristics of the transmission medium. These specifications usually refer to standards developed by other organizations. Connectors, frames, frame usage, current, encoding and light modulation are all part of various physical layer specifications. The physical layer often uses multiple specifications to define all the details. Example: Rj45, 802.3, etc.

For more related knowledge, please visit the FAQ column!

The above is the detailed content of Network protocols are divided into several layers. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn