Help and Support
 

powered byLive Search

How to reserve a range of ephemeral ports on a computer that is running Windows Server 2003 or Windows 2000 Server

Article ID:812873
Last Review:June 24, 2008
Revision:5.0
On This Page

SUMMARY

This article describes how to reserve a range of ephemeral ports on a computer that is running Microsoft Windows Server 2003, Microsoft Windows XP Professional or Microsoft Windows 2000. In some situations, you may want to reserve a range of ports so that a program or process that requests a random port will not be assigned a port that is in the reserved range. When you reserve a range of ports, only a program or process that specifically requests a port that is in the reserved range can use the port.

Back to the top

MORE INFORMATION

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 (http://support.microsoft.com/kb/322756/) How to back up and restore the registry in Windows


To reserve a range of ports so that only a program or process that specifically requests a port that is in the reserved range can use the port, follow these steps.

Back to the top

Windows Server 2003 or Windows XP Professional

1.Start Registry Editor.
2.Locate and then click the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
3.On the Edit menu, point to New, and then click Multi-string Value.
4.Right-click the new value, click Rename, type ReservedPorts, and then press ENTER.
5.Double-click the ReservedPorts value, type the range of ports that you want to reserve, and then click OK.

Note You must type the range of ports in the following format:
xxxx-yyyy
To specify a single port, use the same value for x and y. For example, to specify port 4000, type 4000-4000.

Warning If you specify the continuous ports separately and if one port is reserved and not used, the next port is not correctly reserved, and it is used.
6.Click OK.
7.Quit Registry Editor.

Back to the top

Windows 2000

1.Start Registry Editor.
2.Locate and then click the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
3.On the Edit menu, click Add Value.
4.In the Value Name box, type ReservedPorts.
5.In the Data Type list, click REG_MULTI_SZ, and then click OK.
6.In the Multi-String Editor dialog box, type the range of ports that you want to reserve.

Note You must type the range of ports in the following format: xxxx-yyyy. To specify a single port, use the same value for x and y. For example, to specify port 4000, type 4000-4000.

Warning If you specify the continuous ports separately and if one port is reserved and not used, the next port is not correctly reserved, and it is used.
7.Click OK.
8.Quit Registry Editor.
Note You must restart the computer after you make these changes for the changes to take effect.

Back to the top


APPLIES TO
Microsoft Windows Server 2003, Standard Edition (32-bit x86)
Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
Microsoft Windows Small Business Server 2003 Standard Edition
Microsoft Windows Small Business Server 2003 Premium Edition
Microsoft Windows 2000 Server
Microsoft Windows 2000 Advanced Server
Microsoft Windows XP Professional

Back to the top

Keywords: 
kbinfo KB812873

Back to the top

Article Translations

 

Other Support Options

  • Need More Help?
    Contact a Support professional by Email, Online or Phone.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.