|Skip Navigation Links|
|Exit Print View|
|Oracle Solaris Administration: IP Services Oracle Solaris 11 Information Library|
You can use ilbadm to create, delete, and list the load-balancing rules. For definition of a load-balancing rule and the parameters needed to create a rule, see ILB Terminology.
# ilbadm create-servergroup -s server=220.127.116.11:6000-6009,18.104.22.168:7000-7009 sg1
# ilbadm create-healthcheck -h hc-test=tcp,hc-timeout=2,hc-count=3,hc-interval=10 hc1
# ilbadm create-rule -e -i vip=22.214.171.124,port=5000-5009,protocol=tcp\ -m lbalg=rr,type=NAT,proxy-src=126.96.36.199-188.8.131.52,persist=/24 -h hc-name=hc1 -o servergroup=sg1 rule1
Example 23-6 Creating a Full-NAT Rule With a Health Check Session Persistence
This example creates a health check called hc1, and a server group called sg1 (consisting of two servers, each with a range of ports). The last command creates and enables a rule called rule1 of full-NAT mode and associates the rule to the server group and the health check. 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=184.108.40.206:6000-6009,220.127.116.11:7000-7009 sg1 ilbadm create-rule -e -i vip=18.104.22.168,port=5000-5009,protocol=tcp \ -m lbalg=rr,type=NAT,proxy-src=22.214.171.124-126.96.36.199,persist=/24 -h hc-name=hc1 -o servergroup=sg1 rule1
When creating a NAT/half NAT rule, it is recommended to specify the value for 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 delete-rule subcommand. If you want to remove all rules, use the -a option. The following example deletes the rule called rule1:
# ilbadm delete-rule rule1
To list the configuration details of a rule, use the list-rule subcommand. If no rule name is specified, information is provided for all rules.
# ilbadm show-rule