Setting UDP and TCP Kernel Parameters Manually

If you do not use a Fixup script or CVU to set ephemeral ports, then follow these guidelines to ensure smooth and high performance experience with least errors or issues.

  • Choose lower and higher numbers that are even/odd not both odd or both even.
  • Ensure that the lower range is set to 9000 or higher to avoid well known ports and those commonly registered for use by Oracle and other vendors or servers.
  • Set the port range high enough to include reserved ports for any applications you may intend to use and large enough ephemeral ports for the anticipated server workload.
For example, with IPv4, use the following command to check your current range for ephemeral ports:
$ cat /proc/sys/net/ipv4/ip_local_port_range
32768 61001

In the preceding example, the lowest port (32768) and the highest port (61000) are set to the default range.

If necessary, update the UDP and TCP ephemeral port range to a range high enough for anticipated system workloads, and to ensure that the ephemeral port range starts at 9000 and above. For example:
# echo 9000 65535 > /proc/sys/net/ipv4/ip_local_port_range
Oracle recommends that you make these settings permanent. For example, as root, use a text editor to open /etc/sysctl.conf, and add or change to the following: net.ipv4.ip_local_port_range = 9000 65535, and then restart the network:
$ sudo systemctl restart NetworkManager.service

Refer to your Linux distribution system administration documentation for information about automating ephemeral port range alteration on system restarts.