Limit range of ephemeral ports that can be opened by an RVD process under Windows.
book
Article ID: KB0094326
calendar_today
Updated On:
Products
Versions
TIBCO Rendezvous
-
Not Applicable
-
Description
Description: Ephemeral ports opened by an RVD process running under Windows.
Symptoms: When initiating an RVD process on Windows, you can see additional ports are taken by the RVD daemon.
Example: ------------- C:\Users\rlucas>rvd -listen 7500 <- this gives process id 12484)
C:\Users\rlucas>netstat -ano | findstr 12484 TCP 0.0.0.0:7500 0.0.0.0:0 LISTENING 12484 TCP 0.0.0.0:64388 0.0.0.0:0 LISTENING 12484 TCP 127.0.0.1:64384 127.0.0.1:64385 ESTABLISHED 12484 TCP 127.0.0.1:64385 127.0.0.1:64384 ESTABLISHED 12484 TCP 127.0.0.1:64386 127.0.0.1:64387 ESTABLISHED 12484 TCP 127.0.0.1:64387 127.0.0.1:64386 ESTABLISHED 12484
Cause: Those additional ports are created for RV daemon internal usage:
emulating the UNIX socket_pair call by creating a pair of TCP sockets
on the loopback on windows platforms. More information on this is
covered in KB: 31546
Issue/Introduction
Limit range of ephemeral ports that can be opened by an RVD process under Windows.
Environment
Windows operating System
Resolution
On most systems, ephemeral port selection is "predictable" from an administrator's perspective. The next ephemeral port used will be the last ephemeral port used (system wide) plus 1, skipping ports that are already in use within the range of non-privileged ports (1024 to 32767 or 65535 depending upon the implementation). We cannot control which number will be used within the range.
The ephemeral port numbers are determined by the operating system, not by TIBCO Rendezvous. RV cannot control which number will be used. Though these are ephemeral, they can effectively stop other processes using these ports which was the client's complaint. To check the current TCP range of ephemeral ports you can use the following command:
netsh int ipv6 show dynamicport tcp
To set up and restrict the the port range used for selection as ephemeral ports, the following command can be used.
Example: c:> netsh int ipv4|ipv6 set dynamic tcp|udp start=64000 num=1000
The example above would restrict the range of potential ephemeral ports to be taken between ports 64000 and 65000. Note that the netsh commands should be run as Administrator from an elevated command prompt.