Defining the PORTRANGE available for RSE server

This is a part of rse.env customization that specifies the ports on which the RSE server can communicate with the client. This range of ports has no connection with the RSE daemon port.

To help understand the port usage, a brief description of RSE's connection process follows:
  1. The client connects to host system port 4035, RSE daemon.
  2. The RSE daemon creates an RSE server thread.
  3. The RSE server opens a host system port for the client to connect. The selection of this port can be configured by using the _RSE_PORTRANGE definition in rse.env.
  4. The RSE daemon returns the port number to the client.
  5. The client connects to the host system port.
Note:
  • For more information, see "Understanding z/OS® Explorer" in the Host Configuration Reference Guide (SC27-8438).
To specify the port range, for the client to communicate with z/OS, uncomment and customize the following line in rse.env:
#_RSE_PORTRANGE=8108–8118
Note: Before selecting a port range, verify that the range is available on your system by using the NETSTAT and NETSTAT PORTL commands.

The format of PORTRANGE is: _RSE_PORTRANGE=min-max. The value for max is non-inclusive; for example, the expression _RSE_PORTRANGE=8108-8118 means port numbers from 8108 up to 8117 are usable.

The port number used by the RSE server is determined in the following order:
  1. If a nonzero port number is specified in the subsystem properties on the client, the specified port number is used. If the port is not available, the connection fails. This setup is not recommended.
    Note: The host system can deny this type of connection request by specifying the deny.nonzero.port=true directive in rse.env. For more information about this directive, see Defining extra Java startup parameters with _RSE_JAVAOPTS.
  2. If the port number in the subsystem properties is 0 and if _RSE_PORTRANGE is specified in rse.env, the port range specified by _RSE_PORTRANGE is used. If no port in the range is available, the connection fails.

    RSE server does not need the port exclusively for the duration of the client connection. It is only in the time span between the server bind and the client connect that no other RSE server can bind to the port. This means that most connections use the first port in the range, with the rest of the range being a buffer in case of multiple simultaneous logons.

  3. If the port number in the subsystem properties is 0 and _RSE_PORTRANGE is not specified in rse.env, any available port is used.