What is the largest TCP/IP network port number allowable for IPv4?

前端 未结 8 1577
走了就别回头了
走了就别回头了 2020-11-29 16:19

What is the highest port number one can use?

8条回答
  •  青春惊慌失措
    2020-11-29 16:31

    Just a followup to smashery's answer. The ephemeral port range (on Linux at least, and I suspect other Unices as well) is not a fixed. This can be controlled by writing to /proc/sys/net/ipv4/ip_local_port_range

    The only restriction (as far as IANA is concerned) is that ports below 1024 are designated to be well-known ports. Ports above that are free for use. Often you'll find that ports below 1024 are restricted to superuser access, I believe for this very reason.

提交回复
热议问题