How to load-balance and fail-over with LVS

Disable ARP on nodes

ARP broadcasts are special packets which are recognised by your network's switches and used to associate MAC addresses with IP address. The LVS directors will share a common IP address with each of our nodes, and so in order to avoid confusing the switch we need to disable ARP on the nodes.

To disable ARP place the following lines in /etc/sysctl.conf:

/etc/sysctl.conf

net.ipv4.conf.eth0.arp_ignore=3
net.ipv4.conf.eth0.arp_announce=2

And then reboot, or run the following command to make the change take effect immediately:

sysctl -p /etc/sysctl.conf

You can then check the settings just by outputting the appropriate files in /proc:

cat /proc/sys/net/ipv4/conf/eth0/arp_announce
cat /proc/sys/net/ipv4/conf/eth0/arp_ignore 

If your using Shorewall then you will also need to add arp_ignore=3 to its configuration:

/etc/shorewall/interfaces

net     eth0            detect          dhcp,arp_ignore=3

Discussion

Enter your comment:

Subscribe to the RSS feed for Andy's Debian HOWTOs

Article from Andy's Debian HOWTOs (http://www.besy.co.uk/debian/debian)

 
debian/how_to_load-balance_and_fail-over_with_lvs.txt · Last modified: 2008/08/01 23:56 (external edit) · [Old revisions]
Recent changes RSS feed Powered by Debian Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki