Unable to Connect from TCP Ports Above 5000
ID: Q196271
|
The information in this article applies to:
-
Microsoft Windows NT Server versions 3.51, 4.0
-
Microsoft Windows NT Server, Enterprise Edition version 4.0
-
Microsoft Windows NT Workstation versions 3.51, 4.0
IMPORTANT: This article contains information about editing the registry.
Before you edit the registry, make sure you understand how to restore it if
a problem occurs. For information about how to do this, view the "Restoring
the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key"
Help topic in Regedt32.exe.
SYMPTOMS
When you attempt to set up TCP connections from ports above 5000, the local
computer responds with a WSAENOBUFS (10055) error, which means:
An operation on a socket could not be performed because the system
lacked sufficient buffer space or because a queue was full.
RESOLUTION
The default maximum number of ephemeral TCP ports for Microsoft Windows NT
is 5000. A new parameter has been added to Windows NT 3.51 Service Pack 5
and to Windows NT 4.0. To increase the maximum number of ephemeral ports
you must set the following registry parameter:
IMPORTANT: This article contains information about editing the registry.
Before you edit the registry, make sure you understand how to restore it if
a problem occurs. For information about how to do this, view the "Restoring
the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key"
Help topic in Regedt32.exe.
WARNING: Using Registry Editor incorrectly can cause serious problems that
may require you to reinstall your operating system. Microsoft cannot
guarantee that problems resulting from the incorrect use of Registry Editor
can be solved. Use Registry Editor at your own risk.
For information about how to edit the registry, view the "Changing Keys And
Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete
Information in the Registry" and "Edit Registry Data" Help topics in
Regedt32.exe. Note that you should back up the registry before you edit it.
If you are running Windows NT, you should also update your Emergency
Repair Disk (ERD).
- Start Registry Editor (Regedt32.exe).
- Locate the following key in the registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
- On the Edit menu, click Add Value, and then add the following registry
value:
Value Name: MaxUserPort
Data Type: REG_DWORD
Value: 65534 <for example>
Valid Range: 5000-65534 (decimal)
Default: 0x1388 (5000 decimal)
Description: This parameter controls the maximum port number used when
an application requests any available user port from the system.
Normally, ephemeral (that is, short-lived) ports are allocated between
the values of 1024 and 5000 inclusive.
- Quit Registry Editor.
NOTE: An additional registry parameter TCPTimedWaitDelay will determine
how long a closed port will wait until being reused. For additional
information, please see the following article in the
Microsoft Knowledge Base:
Q149532
Windows NT Clients Run Out of Ports
MORE INFORMATION
For additional information, please see the following white paper available
on the Microsoft anonymous ftp server:
File Name: TCPIPIMP2.doc
Location :
ftp://ftp.microsoft.com/bussys/winnt/winnt-docs/papers/
Title : "Microsoft Windows NT 3.5/3.51/4.0: TCP/IP Implementation Details"
Keywords : kbnetwork
Version : WinNT:3.51,4.0
Platform : winnt
Issue type : kbprb