Configure CBR by modifying the NAT configuration files

If you have configured NAT forwarding and High Availability (but not source IP affinity or cross-port affinity), you may change the relevant lines in the configuration files for the primary Load Balancer and the Standby Load Balancer and then load the new configuration files.

  • The lines in the NAT configuration files that need to be changed are shown

    Example 19-5 NAT configuration file lines to be changed for CBR (two lines)

    dscontrol port add nat1.torolab.ibm.com:80 method nat reset no
    dscontrol port add nat1.torolab.ibm.com:443 method nat reset no

  • Change these lines and add a line for port 443 sticky time

    Example 19-6 New CBR configuration file lines for adding the ports (two lines)

    dscontrol port add nat1.torolab.ibm.com:80 method cbr protocol http
    reset no
    dscontrol port add nat1.torolab.ibm.com:443 method cbr protocol ssl
    reset no
    dscontrol port set nat1.torolab.ibm.com:443 stickytime 60

  • Save the new files to the configuration directory (LoadBalancer_Install_Dir/servers/configurations/dispatcher on Linux, AIX, and Solaris) on the primary Load Balancer and the Standby Load Balancer, then follow the remaining steps on each machine.

    We now need to load the new files using the GUI on each machine.

  • Open the Load Balancer GUI by running lbadmin and connect to your server

  • Right-click Host: Hostname and select Load New Configuration

    Loading a new configuration

  • A dialog is displayed showing the files in the configuration directory

    Choosing the configuration file from the configuration directory

  • Click OK.

    The new configuration is now being loaded and activated.

    SSL traffic is now sticky and the SSL session ID is saved as long as the sticky time. If a client does not make another request during that time, the ID is discarded and a new server is picked upon the next request for that client.

    When using CBR with the Dispatcher component, you may use an additional rule type (content) for HTTP ports by right-clicking Port: 80, selecting Add Rule, and then selecting Content

    rule type content for HTTP ports when using CBR forwarding

    Refer to Load Balancer Administration Guide, GC31-6858, for detailed information about how to configure content-based rules.

    Note, however, that, as mentioned above, passive cookie affinity does not work for any rule type with WebSphere Commerce cookies.