Using the SKIP and COUNT options to control port number assignments

For piped protocols (IP*.*PIPE, but not IP*.UDP or SNA), you can use the SKIP and COUNT options to control the way port numbers are assigned to components. These options are specified on the KDE_TRANSPORT environment variable in the KppENV member of the rhilev.rte.RKANPARU library (where pp is the component code).

Example:
  KDE_TRANSPORT=\                                                 
     IP.PIPE PORT:1918 COUNT:1 SKIP:2\
     IP.UDP PORT:1918\
     SNA.PIPE PORT:135
  • The PORT option specifies the well-known port for the monitoring server.
  • The COUNT:N option is the mechanism for reserving IP.PIPE ports for components that connect to the monitoring server. N is the number of IP.PIPE ports to reserve on the host system, in addition to the well-known port for the monitoring server.

    For example, if the well-known port for the monitoring server is 1918, COUNT:3 starts the search at port 6014 (1918 + 1*4096). If the monitoring agent process cannot bind to port 6014, the algorithm tries port 10110 (1918 + 2*4096). If port 10110 is not available, the search goes to port 14206 (1918 + 3*4096).

    The monitoring agent is assigned to the first available port encountered in the search. The process fails to start if the search reaches the highest port number without a successful binding (port 14206 in this example).

    Use the COUNT option to reserve ports for components that must be accessible from outside a firewall. Because these ports must be permitted at the firewall, the ports must be predictable.

  • The SKIP:N option specifies the number of ports to skip when starting the search for an available port.

    For example, if the well-known port for the monitoring server is 1918, SKIP:2 specifies to start the search at port 10110 (1918 + 2*4096), skipping ports 1918 and 6014 (1918 + 1*4096). The algorithm continues searching until it finds an available port.

    Use the SKIP option for components that do not require access across a firewall.