Knowledgebase: SolarCloud VPS
How do you configure load balancer applications?
Posted by Support on 07 September 2011 01:21 PM
How do you configure load balancer applications and complete the load balancer setup?

Each real server (VM) needs a loopback IP address to be configured as the VIP. This address needs to be stopped from responding to ARP requests and the real server needs to be configured to respond to this IP address.

With most modern Linux kernels (>2.6) you can alter the ARP behavior allowing you to configure a loopback adapter without worrying about ARP issues. To do this just add the following lines to /etc/sysctl.conf and reboot, or run /sbin/sysctl.conf -p to reload the file:

net.ipv4.conf.all.arp_ignore=1
net.ipv4.conf.eth0.arp_ignore=1
net.ipv4.conf.eth1.arp_ignore=1
net.ipv4.conf.all.arp_announce=2
net.ipv4.conf.eth0.arp_announce=2
net.ipv4.conf.eth1.arp_announce=2

Alternatively, the following commands may be used to change the settings interactively during runtime:

echo 1 > /proc/sys/net/ipv4/conf/all/arp_ignore
echo 1 > /proc/sys/net/ipv4/conf/eth0/arp_ignore
echo 1 > /proc/sys/net/ipv4/conf/eth1/arp_ignore
echo 2 > /proc/sys/net/ipv4/conf/all/arp_announce
echo 2 > /proc/sys/net/ipv4/conf/eth0/arp_announce
echo 2 > /proc/sys/net/ipv4/conf/eth1/arp_announce

Once you have configured your Linux real server so that it won't respond to ARP requests for the loopback adapter you can configure your VIPs as follows replacing the VIP with the actual IP address setup in the load balancers:

ifconfig lo:0 VIP netmask 255.255.255.255 up

To make this permanent and reboot safe you may include this command in rc.firewall, equivalent network card file or in a equivalent customizable start-up script. Failure to correctly configure the real servers to handle the ARP problem is the most common problem in DR configurations.
(145 vote(s))
Helpful
Not helpful

Comments (0)