|Skip Navigation Links|
|Exit Print View|
|Managing Oracle Solaris 11.1 Network Performance Oracle Solaris 11.1 Information Library|
This section describes how you can use the ilbadm command to create, delete, and list ILB server groups.
Servers can be specified by their host name or IP address and optional port.
# ilbadm create-servergroup -s servers= \ server1,server2,server3 servergroup
Example 12-1 Creating an ILB Server Group
The following example creates a server group called webgroup consisting of three servers:
# ilbadm create-servergroup -s servers=webserv1,webserv2,webserv3 webgroup
# ilbadm show-servergroup -o all
The following sample command lists detailed information about all the server groups:
The above table shows two server groups, specgroup and test123. The specgroup contains two servers, 184.108.40.206 and 220.127.116.11 and the server is using port 7001. Similarly, test123 also contains two servers, 18.104.22.168 and 22.214.171.124. This server is using the port 7002.
The server group must not be in use by an active rule. Otherwise, the deletion will fail.
# ilbadm delete-servergroup servergroup
Example 12-2 Deleting an ILB Server Group
The following example removes the server group called webgroup:
# ilbadm delete-servergroup webgroup
This section describes how you can use the ilbadm command to add, remove, enable, and disable one or more back-end servers within a server group.
Server specifications must include a host name or IP address and can also include an optional port or a range of ports. Server entries with the same IP address are disallowed within a server group.
# ilbadm add-server -s server=192.168.89.1,192.168.89.2 ftpgroup # ilbadm add-server -s server=[2001:7::feed:6]:8080 sgrp
The -e option enables the servers that are added in the server groups.
Note - IPv6 addresses must be enclosed in square brackets.
Example 12-3 Adding a Back-End Server to an ILB Server Group
The following example adds back-end servers to server groups ftpgroup and sgrp, and enables the servers.
# ilbadm add-server -e -s \ server=192.168.89.1,192.168.89.2 ftpgroup # ilbadm add-server -e -s server=[2001:7::feed:6]:8080 sgrp
The server ID is a unique name for the IP address that is assigned to a system when the server is added to a server group. This can be obtained from the output of show-servergroup -o all subcommand.
# ilbadm remove-server -s server=serverID servergroup
Example 12-4 Removing a Back-End Server From an ILB Server Group
The following example removes the server with server ID _sg1.2 from server group sg1:
# ilbadm remove-server -s server=_sg1.2 sg1
Note the following:
If the server is being used by a NAT or half-NAT rule, disable the server by using the disable-server subcommand before removal. For more information, see How to Re-enable or Disable a Back-End Server in an ILB Server Group. When a server is disabled, it enters the connection-draining state. After all the connections are drained, the server can be removed by using the remove-server subcommand. After issuing the disable-server command, periodically check the NAT table (by using the show-nat command) to see if the server in question still has connections. After all of the connections are drained (the server does not get displayed in the show-nat command output), the server can then be removed by using the remove-server command.
If the conn-drain timeout value is set, the connection-draining state will be completed upon conclusion of the timeout period. The default value of conn-drain timeout is 0, meaning it will keep waiting until a connection is gracefully shut down.
If an IP address or host name is specified, the server will be re-enabled or disabled for the all rules associated with it. If a server ID is specified, the server will be re-enabled or disabled for the specific rules that are associated with the server ID.
Note - A server can have multiple server IDs, if it belongs to multiple server groups.
# ilbadm enable-server webservergroup.1 # ilbadm disable-server webservergroup.1
Example 12-5 Re-enabling and Disabling a Back-End Server in an ILB Server Group
In the following example, a server with server ID websg.1 is enabled and then disabled:
# ilbadm enable-server websg.1 # ilbadm disable-server websg.1