|Skip Navigation Links|
|Exit Print View|
|Managing Oracle Solaris 11.1 Network Performance Oracle Solaris 11.1 Information Library|
In ILB, a virtual service is represented by a load-balancing rule and is defined by the following parameters.
Virtual IP address
Transport protocol: TCP or UDP
Port number (or a port range)
Type of load-balancing mode (DSR, full-NAT, or half-NAT)
Server group consisting of a set of back-end servers
Optional server health checks that can be executed for each server in the server group
Optional port to use for health checks
Note - You can specify health checks on a particular port or on any port that the ilbd daemon randomly selects from the port range for the server.
Rule name to represent a virtual service
This section describes how you can use the ilbadm command to create, delete, and list the load-balancing rules.
To list the configuration details of a rule, use the ilbadm show-rule subcommand. If no rule name is specified, information is provided for all rules.
# ilbadm show-rule
The following is the sample command output.
# ilbadm create-servergroup -s server=server1:port-range1,server2:port-range2 sg1
# ilbadm create-healthcheck -h hc-test=protocol, \ hc-timeout=value1,hc-count=value2 \ ,hc-interval=value3 hc1
These are specified using the -i option.
If NAT is selected, you must specify the IP address range that is to be used as the proxy-src address. The range is limited to 10 IP addresses for full-NAT topology.
The parameters in step 4 and step 5 can be specified in the -m option. For more information, see ILB Algorithms.
For more information, see the ilbadm(1M) man page for details.
For more information about each option, see the ilbadm(1M) man page.
# ilbadm create-rule -e -i vip=ipaddr,port=port,protocol=protocol \ -m lbalg=lb-algorithm,type=topology-type,proxy-src=ipaddr1-ipaddr2, \ pmask=value4 -h hc-name=hc1 \ -o servergroup=sg1 rule1
The following example shows the steps to create a full-NAT rule with health check.
Example 12-6 Creating a Full-NAT Rule With Health Check Session Persistence
This example creates a health check called hc1 and a server group called sg1. The server group consists of two servers, each with a range of ports. The last command creates and enables a rule called rule1 and associates the rule to the server group and the health check. This rule implements the full-NAT mode of operation. Note that the creation of the server group and health check must precede the creation of the rule.
# ilbadm create-healthcheck -h hc-test=tcp,hc-timeout=2, \ hc-count=3,hc-interval=10 hc1 # ilbadm create-servergroup -s server=18.104.22.168:6000-6009,22.214.171.124:7000-7009 sg1 # ilbadm create-rule -e -i vip=126.96.36.199,port=5000-5009, \ protocol=tcp -m lbalg=rr,type=NAT, \ proxy-src=188.8.131.52-184.108.40.206,persist=24 \ -h hc-name=hc1 -o servergroup=sg1 rule1
When creating a half-NAT or a full-NAT rule, specify the value for the connection-drain timeout. The default value of conn-drain timeout is 0, meaning it will keep waiting until a connection is gracefully shut down.
To delete a rule, use the ilbadm delete-rule subcommand. To delete all rules, use the -a option. The following example deletes the rule called rule1:
# ilbadm delete-rule rule1