为什么TCP / IP套件中的最大端口范围为65535?

时间:2016-04-22 14:07:54

标签: networking tcp ip network-protocols ports

我怀疑的是 - 一个端口是合乎逻辑的,为什么这样的限制呢?为什么我的端口没有9924593或类似的东西?

1 个答案:

答案 0 :(得分:16)

查看TCP段的packet format。端口标识符是无符号的16位整数,这意味着您可以放入的最大数字是2 16 -1 = 65535。