为什么TCP/IP Suite中的最大端口范围为65535? [英] Why is the maximum port range 65535 in the TCP/IP Suite?

查看:331
本文介绍了为什么TCP/IP Suite中的最大端口范围为65535?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的疑问是-端口只是逻辑上的,那为什么要这样限制呢?为什么我不能拥有9924593或类似的端口?

My doubt is that - a port is just logical, so why such restriction ? Why can't I have a port of 9924593 or something like that ?

推荐答案

查看数据包格式, TCP段.端口标识符是16位无符号整数,这意味着可以在其中输入的最大数字为2 16 -1 = 65535.

Look at the packet format for the TCP segment. The port identifiers are unsigned 16-bit integers, meaning that the largest number you can put in there is 216-1 = 65535.

这篇关于为什么TCP/IP Suite中的最大端口范围为65535?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆