Protocols
计算机网络协议按 OSI 模型分层 (Network Protocols by OSI Model Layer)¶
1. 物理层 (Physical Layer)¶
- 定义 (Definition): 负责传输原始比特流的硬件和技术,包括电缆、无线电波等。
- Responsible for the transmission of raw bitstreams over physical hardware and technologies such as cables and radio waves.
- 协议 (Protocols):
- 以太网 (Ethernet): 定义了在局域网中传输数据的电气和机械规范,确保设备间的互操作性。
- Defines the electrical and mechanical specifications for data transmission within a local area network (LAN), ensuring interoperability between devices.
- USB (Universal Serial Bus): 用于短距离的高速数据传输和设备连接。
- Used for short-distance, high-speed data transmission and device connectivity.
- IEEE 802.11 (Wi-Fi): 无线局域网标准,用于无线通信。
- A wireless LAN standard used for wireless communication.
2. 数据链路层 (Data Link Layer)¶
- 定义 (Definition): 负责在相邻网络节点之间传输数据帧,处理物理地址(MAC 地址)和错误检测。
- Handles the transmission of data frames between adjacent network nodes, managing physical addresses (MAC addresses) and error detection.
- 协议 (Protocols):
- 以太网 (Ethernet): 处理数据帧的封装和传输,提供基于 MAC 地址的节点通信。
- Handles the encapsulation and transmission of data frames, providing node-to-node communication based on MAC addresses.
- 帧中继 (Frame Relay): 用于广域网中的虚电路传输数据帧,常用于远程通信。
- Used for transmitting data frames over virtual circuits in a wide area network (WAN), commonly used for remote communication.
- 点对点协议 (PPP, Point-to-Point Protocol): 提供直接连接两个网络节点的链路层协议,支持认证、加密和压缩。
- Provides a link layer protocol for directly connecting two network nodes, supporting authentication, encryption, and compression.
- HDLC (High-Level Data Link Control): 面向比特的同步数据链路层协议,常用于点对点和多点通信。
- A bit-oriented synchronous data link layer protocol commonly used in point-to-point and multipoint communications.
- MPLS (Multi-Protocol Label Switching): 基于标签交换的技术,用于加速网络流量的转发。
- A label-switching technology used to accelerate the forwarding of network traffic.
- 以太网 (Ethernet): 处理数据帧的封装和传输,提供基于 MAC 地址的节点通信。
3. 网络层 (Network Layer)¶
- 定义 (Definition): 负责路由选择和数据包的传输,处理逻辑地址(如 IP 地址)。
- Responsible for routing and packet forwarding, managing logical addresses such as IP addresses.
- 协议 (Protocols):
- IP (Internet Protocol): 提供唯一的 IP 地址以标识网络中的设备,并负责数据包的分组和路由选择。
- Provides unique IP addresses to identify devices on a network and handles the segmentation and routing of packets.
- IPv4: 使用 32 位地址的 IP 协议版本,广泛应用于互联网。
- The version of IP that uses 32-bit addresses, widely used on the internet.
- IPv6: 使用 128 位地址的新一代 IP 协议,提供更大的地址空间。
- The next-generation IP protocol using 128-bit addresses, providing a larger address space.
- ICMP (Internet Control Message Protocol): 用于网络设备之间传递控制消息,主要用于错误报告和网络诊断。
- Used for sending control messages between network devices, mainly for error reporting and network diagnostics.
- ARP (Address Resolution Protocol): 将 IP 地址解析为物理 MAC 地址,以确保数据包正确地传输到目标设备。
- Resolves IP addresses to physical MAC addresses to ensure that packets are correctly delivered to the target device.
- OSPF (Open Shortest Path First): 链路状态路由协议,使用 Dijkstra 算法计算最短路径。
- A link-state routing protocol that uses the Dijkstra algorithm to compute the shortest path.
- BGP (Border Gateway Protocol): 自治系统之间使用的路径向量路由协议,用于管理互联网路由。
- A path-vector routing protocol used between autonomous systems to manage internet routing.
- 使用的默认端口 (Default Port): 179
- RIP (Routing Information Protocol): 基于距离向量的路由协议,使用跳数作为度量标准。
- A distance-vector routing protocol that uses hop count as a metric.
- 使用的默认端口 (Default Port): 520 (RIPv1, RIPv2)
- IP (Internet Protocol): 提供唯一的 IP 地址以标识网络中的设备,并负责数据包的分组和路由选择。
4. 传输层 (Transport Layer)¶
- 定义 (Definition): 提供端到端的通信管理,包括数据的分段、传输控制、错误检测和流量控制。
- Provides end-to-end communication management, including data segmentation, transmission control, error detection, and flow control.
- 协议 (Protocols):
- TCP (Transmission Control Protocol): 面向连接的传输层协议,提供可靠的数据传输服务,确保数据包按序到达。
- A connection-oriented Transport Layer protocol that provides reliable data transmission services, ensuring that packets arrive in order.
- 使用的默认端口 (Default Port): 动态分配 (Dynamically assigned)
- UDP (User Datagram Protocol): 无连接的传输层协议,不提供可靠性保障,适用于需要快速传输但不要求准确性的应用。
- A connectionless Transport Layer protocol that does not guarantee reliability, suitable for applications requiring fast transmission but not necessarily accuracy.
- 使用的默认端口 (Default Port): 动态分配 (Dynamically assigned)
- SCTP (Stream Control Transmission Protocol): 支持多重流的传输层协议,结合了TCP的可靠性和UDP的无连接性。
- A Transport Layer protocol that supports multiple streams, combining the reliability of TCP and the connectionless nature of UDP.
- 使用的默认端口 (Default Port): 动态分配 (Dynamically assigned)
5. 会话层 (Session Layer)¶
- 定义 (Definition): 管理和控制应用程序之间的对话,包括会话的建立、管理和终止。
- Manages and controls the dialogue between applications, including the establishment, management, and termination of sessions.
- 协议 (Protocols):
- NetBIOS (Network Basic Input/Output System): 提供应用程序之间的会话管理和名字解析服务,广泛用于局域网。
- Provides session management and name resolution services between applications, widely used in LANs.
- 使用的默认端口 (Default Port): 137, 138, 139
- PPTP (Point-to-Point Tunneling Protocol): 用于建立虚拟专用网络 (VPN) 的协议,支持远程访问。
- A protocol used for establishing Virtual Private Networks (VPNs), supporting remote access.
- 使用的默认端口 (Default Port): 1723
6. 表示层 (Presentation Layer)¶
- 定义 (Definition): 负责数据的格式转换、加密和解密,以确保来自不同应用的通信数据能够被正确理解和处理。
- Responsible for translating and converting data formats, encrypting and decrypting data, ensuring that communication data from different applications can be correctly interpreted and processed.
- 协议 (Protocols):
- SSL/TLS (Secure Sockets Layer/Transport Layer Security): 用于加密网络通信,确保数据的机密性和完整性。
- Used for encrypting network communications, ensuring data confidentiality and integrity.
- 使用的默认端口 (Default Port): 443 (通常与 HTTPS 结合使用 / Typically used with HTTPS)
- ASCII (American Standard Code for Information Interchange): 用于文本数据的字符编码标准,广泛用于计算机系统和通信。
- A character encoding standard for text data, widely used in computer systems and communication.
7. 应用层 (Application Layer)¶
- 定义 (Definition): 直接为用户提供网络服务,处理应用程序的网络请求,并充当用户与网络之间的接口。
- Directly provides network services to users, handling network requests from applications, and serving as the interface between users and the network.
- 协议 (Protocols):
-
HTTP (Hypertext Transfer Protocol): 用于在万维网上传输超文本数据,如网页、图像和视频。
- Used for transmitting hypertext data, such as web pages, images, and videos, over the World Wide Web.
- 使用的默认端口 (Default Port): 80
-
HTTPS (Hypertext Transfer Protocol Secure): HTTP 的加密版本,通过 TLS 或 SSL 协议为网络通信提供安全保护。
- The encrypted version of HTTP, providing secure communication over the network through TLS or SSL protocols.
- 使用的默认端口 (Default Port): 443
-
FTP (File Transfer Protocol): 用于在客户端和服务器之间传输文件,支持文件的上传和下载。
- Used for transferring files between a client and a server, supporting file uploads and downloads.
- 使用的默认端口 (Default Port): 21
-
SMTP (Simple Mail Transfer Protocol): 一种用于电子邮件传输的协议,负责在邮件服务器之间传输电子邮件。
- A protocol used for email transmission, responsible for transferring emails between mail servers.
- 使用的默认端口 (Default Port): 25
-
POP3 (Post Office Protocol version 3): 用于从邮件服务器上接收电子邮件的协议,通常用于客户端邮件读取。
- A protocol used for receiving emails from a mail server, typically used for client-side email retrieval.
- 使用的默认端口 (Default Port): 110
-
IMAP (Internet Message Access Protocol): 用于访问和管理存储在邮件服务器上的电子邮件的协议,允许多设备同步。
- A protocol used to access and manage emails stored on a mail server, allowing for synchronization across multiple devices.
- 使用的默认端口 (Default Port): 143
-
DNS (Domain Name System): 将域名转换为 IP 地址的系统,帮助浏览器等客户端找到网络资源的位置。
- A system that translates domain names into IP addresses, helping clients like web browsers locate resources on the network.
- 使用的默认端口 (Default Port): 53
-
Telnet: 提供基于文本的远程登录功能,允许用户连接和管理远程计算机。
- Provides text-based remote login functionality, allowing users to connect to and manage remote computers.
- 使用的默认端口 (Default Port): 23
-
SSH (Secure Shell): 提供加密的远程登录功能,用于安全地管理远程计算机。
- Provides encrypted remote login functionality, used for securely managing remote computers.
- 使用的默认端口 (Default Port): 22
-
NTP (Network Time Protocol): 用于同步计算机系统时间的协议,确保网络中所有设备的时间一致性。
- A protocol used to synchronize the time of computer systems, ensuring time consistency across all devices in a network.
- 使用的默认端口 (Default Port): 123
-
SNMP (Simple Network Management Protocol): 用于管理和监控网络设备的协议,允许管理员查看和修改设备的状态。
- A protocol used for managing and monitoring network devices, allowing administrators to view and modify the status of devices.
- 使用的默认端口 (Default Port): 161 (SNMP), 162 (SNMP Trap)
-
RDP (Remote Desktop Protocol): 一种用于远程访问和控制另一台计算机的协议,广泛用于远程技术支持和远程工作。
- A protocol used for remote access and control of another computer, widely used for remote technical support and telecommuting.
- 使用的默认端口 (Default Port): 3389
-
DHCP (Dynamic Host Configuration Protocol): 用于动态分配 IP 地址和网络配置信息给网络设备的协议,简化网络管理。
- A protocol used for dynamically assigning IP addresses and network configuration information to network devices, simplifying network management.
- 使用的默认端口 (Default Port): 67 (服务器), 68 (客户端) / 67 (Server), 68 (Client)
-
TFTP (Trivial File Transfer Protocol): 一种简单的文件传输协议,常用于网络设备的启动和配置文件传输。
- A simple file transfer protocol commonly used for booting network devices and transferring configuration files.
- 使用的默认端口 (Default Port): 69
-
LDAP (Lightweight Directory Access Protocol): 用于访问和维护分布式目录信息的协议,通常用于身份验证和目录查询。
- A protocol used for accessing and maintaining distributed directory information, commonly used for authentication and directory queries.
- 使用的默认端口 (Default Port): 389 (未加密), 636 (LDAPS, 加密)
-
SIP (Session Initiation Protocol): 用于建立、修改和终止多媒体会话的应用层协议,常用于 VoIP 和视频会议。
- An application layer protocol used for establishing, modifying, and terminating multimedia sessions, commonly used in VoIP and video conferencing.
- 使用的默认端口 (Default Port): 5060 (UDP/TCP), 5061 (TLS)
-
IRC (Internet Relay Chat): 用于即时通讯的协议,支持文本通信和文件共享。
- A protocol used for instant messaging, supporting text communication and file sharing.
- 使用的默认端口 (Default Port): 194, 6665-6669
-
XMPP (Extensible Messaging and Presence Protocol): 一种基于 XML 的协议,用于即时通讯和在线状态信息传输。
- An XML-based protocol used for instant messaging and presence information transmission.
- 使用的默认端口 (Default Port): 5222 (客户端到服务器), 5269 (服务器到服务器) / 5222 (Client to Server), 5269 (Server to Server)
-
SOAP (Simple Object Access Protocol): 用于在分布式网络环境中交换结构化信息的协议,通常用于 Web 服务通信。
- A protocol used for exchanging structured information in a distributed network environment, commonly used in web services communication.
- 使用的默认端口 (Default Port): 动态分配 (Dynamically assigned, typically uses HTTP/HTTPS ports)