freeCodeCamp/guide/chinese/computer-science/ports/index.md

28 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
title: Ports
localeTitle: 端口
---
## 端口
端口是互联网协议套件中操作系统的通信端点。服务名称和端口号用于区分通过传输协议如TCPUDPDCCP和SCTP运行的不同服务。 当计算机从另一个源接收消息时,端口将帮助确定哪个进程正在期望该消息。
端口始终与主机的IP地址和通信的协议类型相关从而完成通信会话的目的地或始发网络地址。操作系统中有65536个可用端口。通过16位数字通常称为端口号为每个地址和协议标识端口。例如地址可以是“协议TCPIP地址1.2.3.4端口号80”当从上下文中获知协议时可以写入1.2.3.4:80。 约定使用某些端口号来标识特定服务,例如:
* 20 - FTP
* 21 - FTP
* 22 - SSH
* 23 - Telnet
* 25 - SMTP
* 42 - 名称服务器
* 53 - 域名系统DNS
* 80 - http
* 110 - pop3
* 143 - imap
* 194 - irc
* 443 - https
### 来源
* [iana.org](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml)
* [维基百科](https://en.wikipedia.org/index.php?q=aHR0cHM6Ly9lbi53aWtpcGVkaWEub3JnL3dpa2kvUG9ydF8oY29tcHV0ZXJfbmV0d29ya2luZyk)
* [Webopedia](https://www.webopedia.com/quick_ref/portnumbers.asp)