Configure Dispatcher for IPv4 and IPv6 on the machine that you will use to load balance
server traffic.
Before you begin
Before setting up the Dispatcher machine, you must be the root user (for AIX or Linux) or the
Administrator on Windows systems.
For the Dispatcher machine you will need at least two valid IP addresses.
The figure below shows an example of Load Balancer set up with a single cluster, two ports, and
three servers.
About this task
You must configure the machine on which Load Balancer is installed before you can load
balance traffic in your network environment.
Review the new
features section for what was added and improved in this release.
Best practice: Maximize your load-balancing by being aware of explicit addressing in links,
and avoid it where possible.
If your pages specify links that point to individual servers for your
site, you are in effect forcing a client to go to a specific machine, thus bypassing any load
balancing function that might otherwise be in effect.
In general, the load balancing function
works independently of the content of the sites on which you use the product, but link addressing is
one area in which the site content can be important. Decisions that you make regarding the site's
content can have a significant impact upon the Load Balancer's efficiency. Use the address of Load
Balancer in any links contained in your pages. Note that the kind of addressing used might not
always be apparent if your site uses automated programming that dynamically creates HTML.
bprac
Avoid trouble: Be aware of the following restrictions:
- Load Balancer does not support passive FTP.
- z/OS back-end servers: There is no support for load-balancing IPv6 traffic to backend
z/OS servers. However, you can load balance IPv4 traffic to back-end z/OS servers using Load
Balancer for IPv4 and IPv6 installations.
gotcha
Procedure
![[AIX]](../images/aixlogo.gif)
Start the server function. To start the server function, type the following at a command
prompt:dsserver
Note: A default configuration file (default.cfg) gets
automatically loaded when starting dsserver. If the user decides to save the Dispatcher
configuration in default.cfg, then everything saved in this file is automatically loaded next time
dsserver gets started.
- Start the executor function.
- Optional: If you are using IPv6 addresses, enable the processing of IPv6 packets.
![[AIX]](../images/aixlogo.gif)
![[Linux]](../images/linux.gif)
![[Windows]](../images/windows.gif)
Prior to starting the executor (
dscontrol executor start), the following must be issued from the command line as root:
These commands enable processing of IPv6 packets in the respective operating systems. Issue
this command only once. Thereafter, you can start and stop the executor as often as you need. If you
do not issue the command to enable processing of IPv6 packets on these systems, the executor will
not start.
- To start the executor function, enter the dscontrol
executor start command. You may also change various executor settings at this time.
- Optional: Define the non-forwarding address if it is different from the host name. The non-forwarding address is used to connect to the machine for administrative purposes, such
as using Telnet or SMTP to this machine.
By default, this address is the hostname. To define the
non-forwarding address, enter the following command, or edit the configuration
file:
dscontrol executor set nfa IP_address
where
IP_address is either the symbolic name or the IP address.
- Define a cluster and set cluster options. Dispatcher will balance the requests sent to the cluster address to the servers configured on
the ports for that cluster. The cluster is either the symbolic name, the dotted decimal address, or
the special address 0.0.0.0 that defines a wildcard cluster. Wildcard clusters can be used to match
multiple IP addresses for incoming packets to be load balanced.
- To define a cluster, issue the dscontrol cluster
add command:
dscontrol cluster add cluster
- To set cluster options, use the dscontrol cluster
set command. Issue the following
command:
dscontrol cluster set options
- Optional: Beginning with fix pack 9.0.0.6, you can issue a command to configure and
unconfigure the cluster. When the cluster is configured, it immediately advertises the availability
of the address on the local subnet. This can be helpful in environments where a different machine
recently used the address, or on AIX systems in which the load balancer cannot use local resources
to advertise the address. This is not valid for layer 3 mode on Linux on z/OS.
dscontrol cluster configure cluster
If you use a qeth/OSA implementation in layer 3 mode on Linux on z/OS, perform the following
additional configuration steps to setup Load Balancer. Note: These steps are not required if you run qeth/OSA in layer 2 mode.
- 1. Configure the cluster address using ip or ifconfig
command:
ip -version addr add cluster_address/prefix_length dev device
For
example:ip -4 addr add 12.42.38.125/24 dev eth0
ip -6 addr add 3ffe:34::24:45/64 dev eth0
- Add an iptables rule to drop incoming packets destined to the cluster address:
For IPv4
addresses:iptables -t filter -A INPUT -d cluster_address -j DROP
For
IPv6 addresses:
ip6tables -t filter -A INPUT -d cluster_address -j DROP
For
example:
iptables -t filter -A INPUT -d 12.42.38.125 -j DROP
ip6tables -t filter -A INPUT -d 3ffe:34::24:45 -j DROP
- To undo the above configuration, use the following
commands:
ip -version addr del cluster_address/prefix_length dev device
iptables -t filter -D INPUT -d cluster_address -j DROP
ip6tables -t filter -D INPUT -d cluster_address -j DROP
- Define ports and set port options with the dscontrol port
add command. You must define and configure all servers for a port.
- Define a port. Enter the following command:
dscontrol port add cluster@port
- cluster is either the symbolic name or the IP address
- port is the number of the port you are using for that protocol
- Change various port settings. Read dscontrol port for more information on this command and the
available options.

New feature:
You can select a new option for the selection algorithm
that Load Balancer uses to route traffic:
- conn+affinity: Specifies that server selection is based on an existing connection. For
new connections, the server selection is based on affinity.
newfeat
You can also edit the sample configuration file or use the GUI.
- Define the load-balanced server machines. To define a load-balanced server machine, enter the following
command:
dscontrol server add cluster@port@server
You can also edit the sample configuration file or use the GUI. Cluster is either
the symbolic name or the IP address, and port is the number of the port you are
using for that protocol. You must define more than one server to a port on a cluster in order to
perform load balancing.- Configure IPv6 link-local address: With IPv6 addressing, each machine in the Load
Balancer configuration must have an IPv6 link-local address. The link-local address is the address used for neighbor discovery traffic for IPv6, and
without this address on the Load Balancer machine and on the back-end servers neighbor discovery
does not occur, and the machines are not known to each other. Load Balancer for IPv6 cannot forward
traffic without a link-local IPv6 address configured on an interface of each machine in the Load
Balancer configuration.
- Optional: Bind-specific servers: If the Dispatcher component is load balancing to bind-specific
servers, then the servers must be configured to bind to the cluster address. Because the Dispatcher forwards packets without changing the destination IP address, when the
packets reach the server, the packets will still contain the cluster address as the destination. If
a server has been configured to bind to an IP address other than the cluster address, then the
server will be unable to accept requests destined for the cluster.
To determine if the server is
bind specific, issue the netstat -an command and look for the server@port. If the
server is not bind specific, the result from this command will be 0.0.0.0@80. If the server is bind
specific, you will see an address such as 192.168.15.103@80.
- Optional: Start the manager function. The manager function improves load balancing. To start the manager, enter the dscontrol manager start command, edit the sample configuration
file, or use the GUI. For example:
dscontrol manager start
- Optional: Start the advisor function. The advisors give the manager more information about the ability of the load-balanced server
machines to respond to requests. An advisor is specific to a protocol. For example, to start the
HTTP advisor, issue the following command:
dscontrol advisor start http port
For a list of advisors
along with their default ports, see List of advisors.
- Set cluster proportions, as required. If you start advisors, you may modify the proportion of importance given to advisor
information being included in the load balancing decisions. To set the cluster proportions, issue
the dscontrol cluster set cluster proportions command.
For more information, see Tuning the proportion of importance given to status information
- Configure the server machines.