Route Work by IP Address with QSYS2.SET_SERVER_SBS_ROUTING() Service
In this iCan blog post, IBM i expert Dawn May explains how to route work by client IP address without Navigator for i.
In the post Subsystem Configuration for Prestart Jobs, I reviewed how you could route work by client IP addressfor prestart server jobs. Until recently, the only way to implement this configuration required Navigator for i.
IBM has enhanced the QSYS2.SET_SERVER_SBS_ROUTING()procedure to route work to a specified subsystem by IP address; this can be a specific IP address or a range of IP addresses. This is the same service used to route work by user profile. There’s also a new service to review the configuration by IP address, QSYS2.SERVER_SBS_CONFIGURATION.
Using the SQL procedure to route work by IP address gives you a programmatic way to do the same configuration previously done with Navigator. If you defined your configuration to route by IP address using this service, you will see that configuration displayed in the Navigator GUI. Likewise, if you had done the configuration in the GUI, you can review the configuration with the QSYS2.SERVER_SBS_CONFIGURATION service.
The following SQL statement results in routing all requests from IP address 184.108.40.206 for the Remote Command Server (QZRCSRVS) to the DAWNMAY subsystem. If subsystem DAWNMAY isn’t active, the request is rejected and the user cannot connect to the server.
Thought should be given to the ALLOW_ROLLOVER setting. If you’re configuring subsystems to better manage server jobs on your system, why would you allow the users to connect if their configured subsystem wasn’t active? In addition, if the configured subsystem was not active, ALLOW_ROLLOVER => ‘YES’ results in the connection running in a batch immediate job (BCI), so you lose the advantages of prestart jobs as well.
Using the Navigator for i Network → Servers interface to review the properties for the Remote Command Server, the subsystem configuration will be displayed:
I have configured several servers to route work by a specific IP address; the following SELECT statement shows me the configuration:
WHEREIP_ADDRESS_START NOT LIKE'';
Dawn May is an IBM i consultant. She owns Dawn May Consulting, LLC in the Greater Boston area. Dawn is a former IBM senior technical staff member.
See more by Dawn May