web服务中80端口及相关端口内容(包含各个端口的功能自己整理)

文章:alvincr.com

原文:http://alvincr.com/2020/05/web%e6%9c%8d%e5%8a%a1%e4%b8%ad80%e7%ab%af%e5%8f%a3%e5%8f%8a%e7%9b%b8%e5%85%b3%e5%86%85%e5%ae%b9/

1端口

1.1 定义

In computer networking, a port is a communication endpoint. At the software level, within an operating system, a port is a logical construct that identifies a specific process or a type of network service. Ports are identified for each protocol and address combination by 16-bit unsigned numbers, commonly known as the port number. The most common protocols that use port numbers are the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP).

在计算机网络中,端口是一个通信端点。在软件级别,在操作系统中,端口是一个逻辑结构,用于标识特定的进程或网络服务的类型。每个协议和地址组合的端口由16位无符号数字标识,通常称为端口号。使用端口号的最常见协议是传输控制协议(TCP)和用户数据报协议(UDP)。

1.2 作用

A port number is always associated with an IP address of a host and the protocol type of the communication. It completes the destination or origination network address of a message. Specific port numbers are commonly reserved to identify specific services, so that an arriving packet can be easily forwarded to a running application. For this purpose, the lowest numbered 1024 port numbers identify the historically most commonly used services, and are called the well-known port numbers. Higher-numbered ports are available for general use by applications and are known as ephemeral ports.

端口号总是与主机的IP地址和通信的协议类型相关联。它完成消息的目标或发起网络地址。特定的端口号通常用于标识特定的服务,以便将到达的包轻松转发到正在运行的应用程序。为此,编号最低的1024端口号标识历史上最常用的服务,称为众所周知的端口号。较高编号的端口可供应用程序一般使用,称为临时端口。

1.3 端口上限

A port number is a 16-bit unsigned integer, thus ranging from 0 to 65535. For TCP, port number 0 is reserved and cannot be used, while for UDP, the source port is optional and a value of zero means no port.

端口号是一个16位无符号整数,从0到65535。对于TCP,端口号0是保留的,不能使用,而对于UDP,源端口是可选的,值0表示没有端口。

因此认为有65535个可以使用的端口,计算方法:2^16-1

 

 

2 80端口

80是http协议的默认端口,是在输入网站的时浏览器(非IE)自动输入,因此当输入alvincr.com,其实是访问alvincr.com:80,

 

2.1 起源

80端口主要用于WWW(World Wide Web)即万维网传输信息的协议。可以通过HTTP地址(即常说的"网址")加":80"来访问网站,因为浏览网页服务默认的端口号都是80,因此只需输入网址即可,不用输入":80"了。

 

2.2 8080端口

8080,一般用与webcahe,完全不一样的两个,比如linux服务器里apache默认跑80端口,而apache-tomcat默认跑8080端口,其实端口没有实际意义只是一个接口,主要是看服务的监听端口,如果我的服务器监听的27端口,就需要输入alvincr.com:27

 

2.3 目的

默认输入80,完全是为了方便

至于为什么是80,这就是约定俗成了。

3 固定端口

这些端口是默认设定的,类似于网页的80端口,不要对其进行占用,如果非要占用,可能会出现很严重的问题

Port numberAssignment
20File Transfer Protocol (FTP) Data Transfer
21File Transfer Protocol (FTP) Command Control
22Secure Shell (SSH) Secure Login
23Telnet remote login service, unencrypted text messages
25Simple Mail Transfer Protocol (SMTP) E-mail routing
53Domain Name System (DNS) service
67, 68Dynamic Host Configuration Protocol (DHCP)
80Hypertext Transfer Protocol (HTTP) used in the World Wide Web
110Post Office Protocol (POP3)
119Network News Transfer Protocol (NNTP)
123Network Time Protocol (NTP)
143Internet Message Access Protocol (IMAP) Management of digital mail
161Simple Network Management Protocol (SNMP)
194Internet Relay Chat (IRC)
443HTTP Secure (HTTPS) HTTP over TLS/SSL

 

Port numberAssignment(解语·花言整理翻译)
20文件传输协议(FTP)- 数据传输
21文件传送协议(FTP)- 命令控制
22安全Shell(壳)(SSH)- 安全登录(登录端口默认是22,但是为了安全可以改成其它端口)
23远程登录服务,未加密的文本信息
25简单邮件传输协议(SMTP)(在以前文章中有设置过,可以用于alvincr.com注册发邮件,POP3主管收)
53域名系统(DNS)服务 (如果开放DNS服务,黑客可以通过分析DNS服务器而直接获取Web服务器等主机的IP地址,再利用53端口突破某些不稳定的防火墙,从而实施攻击,如果当前的计算机不是用于提供域名解析服务,建议关闭该端口。)
67, 68动态主机配置协议(DHCP)(通常被应用在大型的局域网络环境中,主要作用是集中的管理、分配IP地址,使网络环境中的主机动态的获得IP地址、Gateway地址、DNS服务器地址等信息,并能够提升地址的使用率)
80超文本传输协议(HTTP)(网站地址开头字符)
110邮局协议版本3(POP3)(本协议主要用于支持使用客户端远程管理在服务器上的电子邮件,管收文件)
119网络新闻传输协议(NNTP)(主要用于阅读和张贴新闻文章)
123网络时间协议(NTP)(用来使计算机时间同步化的一种协议)(时间同步就是通过对本地时钟的某些操作,达到为分布式系统提供一个统一时间标度的过程。)
143IMAP个人翻译成互联网邮件访问协议(可以认为是POP3的升级版,以前叫做交互邮件访问协议)
161简单网络管理协议(SNMP)(使网络管理员能够管理网络效能,发现并解决网络问题以及规划网络增长。)
194因特网中继聊天(IRC)(一般称为互联网中继聊天,名字有点奇怪,像是一个application)
443HTTPS(个人翻译为超文本传输协议安全版,是http的升级,使用SSL秘钥进行加密)

 

 

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值