This section describes the steps for setting up ILB to use a half-NAT topology to load balance traffic among two servers. See the NAT topology implementation in ILB Operation Modes.
How to Configure ILB
Assume a role that includes the ILB Management rights profile, or become superuser.
You can assign the ILB Management rights profile to a role that you create. To create the role and assign the role to a user, see Initially Configuring RBAC (Task Map) in Oracle Solaris 11.1 Administration: Security Services.
Set up the back-end servers.
The back-end servers are set up to use ILB as the default router in this scenario. This can be done by running the following commands on both servers.
# route add -p default 192.168.1.21
After executing this command, start the server applications on both servers. Assume that it is a TCP application listening on port 5000.
Set up the server group in ILB.
There are 2 servers, 192.168.1.50 and 18.104.22.168. A server group, srvgrp1, consisting of these two servers can be created by typing the following command.
# ilbadm create-sg -s servers=192.168.1.50,192.168.1.60 srvgrp1
Set up a simple health check called hc-srvgrp1, can be created by typing the following command.
A simple TCP level health check is used to detect if the server application is reachable. This check is done every 60 seconds. It will try at most 3 times and wait for at most 3 seconds between trials to see if a server is healthy. If all 3 trials fail, it will mark the server as dead.
# ilbadm create-hc -h hc-test=tcp,hc-timeout=3, \
Set up an ILB rule by typing the following command.
Persistence (with 32 bits mask) is used in this rule. And the load balance algorithm is round robin. The server group srvgrp1 is used and the health check mechanism used is hc-srvgrp1. The rule can be created by typing the following command.
# ilbadm create-rule -e -p -i vip=10.0.2.20,port=5000 -m \
-h hc-name=hc-srvgrp1 -o servergroup=srvgrp1 rule1_rr