Network protocols are divided into several layers
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.
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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



In recent years, Go language, as an efficient, lightweight, and excellent concurrency programming language, has attracted more and more people's attention and love. In terms of network programming, the Go language has rich network protocol support and can help developers build network applications quickly and conveniently. Let's take a look at the network protocols in Go language. 1.TCPTCP (TransmissionControlProtocol, Transmission Control Protocol) is a transmission protocol commonly used in computer networks.

Commonly used protocols in Java network programming include: TCP/IP: used for reliable data transmission and connection management. HTTP: used for web data transmission. HTTPS: A secure version of HTTP that uses encryption to transmit data. UDP: For fast but unstable data transfer. JDBC: used to interact with relational databases.

The three elements of the network protocol: 1. Semantics, which explains the meaning of each part of the control information; it stipulates what kind of control information needs to be sent, as well as the completed actions and what kind of responses should be made. 2. Grammar, that is, the structure and format of user data and control information, and the order in which data appears. 3. Timing, that is, a detailed description of the sequence of events.

Commonly used protocols and libraries for Java network programming: Protocols: TCP, UDP, HTTP, HTTPS, FTP Libraries: java.net, java.nio, ApacheHttpClient, Netty, OkHttp

How to set up a CentOS system to disable unnecessary network protocols and services Introduction: CentOS is a popular Linux operating system that is widely used in server environments. To improve system security and performance, unnecessary network protocols and services need to be disabled. This article will introduce how to set up a CentOS system to disable unnecessary network protocols and services. Steps: Log in to the CentOS system. Open a terminal and execute the following command with root user rights to edit the network configuration file. sudovi

Python language is a high-level programming language, and developers usually do not need to pay too much attention to its underlying technical implementation. However, when it comes to implementing network protocols, we need to have a deep understanding of its underlying technology in order to properly implement and optimize network applications. This article will delve into the underlying technology of Python, taking the implementation of a simple network protocol as an example, and provide specific code examples. 1. Introduction to network protocols Network protocols are communication rules and standards in computer networks, used to ensure that data communication between different computers is safe, effective and error-free. net

The main elements of the network protocol are: 1. Semantics; explaining the meaning of each part of the control information. 2. Grammar; the structure and format of user data and control information, and the order in which data appears. 3. Timing; a detailed description of the sequence of events.

The network protocol used by the Internet is "TCP/IP protocol". TCP/IP refers to Transmission Control Protocol/Internet Protocol, also known as network communication protocol. It is a protocol suite that can realize information transmission between multiple different networks. The TCP/IP transmission protocol stipulates the standards and methods for communication between various parts of the Internet; and, the TCP/IP transmission protocol is two important protocols that ensure the timely and complete transmission of network data information.