linux本地随机端口范围及预留端口

  1. The /proc/sys/net/ipv4/ip_local_port_range defines the local port range that is used by TCP and UDP traffic to choose the local port. You will see in the parameters of this file two numbers: The first number is the first local port allowed for TCP and UDP traffic on the server, the second is the last local port number.

本地端口范围:

cat /proc/sys/net/ipv4/ip_local_port_range 
  1. Should the system administrator write a comma-separated list of ports (or ranges of ports denoted by a hyphen) to this parameter, the networking layer will avoid those ports whenever it picks a port number for a new socket. Reserving ports in this manner will not interfere with any application which binds to those ports explicitly.

本地预留端口:

cat /proc/sys/net/ipv4/ip_local_reserved_ports

你可能感兴趣的:(Linux,linux)