Linux/windows Setting the completion port interval

Source: Internet
Author: User

Recently out of a very bad thing, the completion port occupies the listening port, causing the program to fail to start.
So looked up some information, see where can be set.

Linux (CentOS):
The system default value is 32768-61000.

Modification Method:
In/etc/sysctl.conf, add the following configuration: (Open 20000-50000 is the completion port)

net.ipv4.ip_local_port_range=2000050000

Restart the platform after configuration is complete, or type sysctl-p to take effect immediately

Commands can be used

sysctl net.ipv4.ip_local_port_range

View the relevant configuration.

Windows Server 2008/win7/vista: (open 10000-50000 for completion port)
The system default value is 49152-65535.
Modification Method:

intset dynamicportrange tcp startport=10000 numberofports=40000

After the configuration is complete, you can use

int

View the effect.

Windows Server 2003:
Default open port segment is 1024-5000
Modification Method:
Can be in the registry path

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters

Add a DWORD field, MaxUserPort, to configure the maximum port number (minimum non-dynamic).

Linux/windows Setting the completion port interval

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.