Category: Linux
Setup Linux Web Server to listen to Loadbalancer VIP
*Edit kernal to stop ARP
vi /etc/sysctl.conf
* Copy to the bottom of the file, add or remove eth1 lines below if you don’t have that adapter
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
* If you only have eth0
net.ipv4.conf.all.arp_ignore=1 net.ipv4.conf.eth0.arp_ignore=1 net.ipv4.conf.all.arp_announce=2 net.ipv4.conf.eth0.arp_announce=2
* Reload Kernel Changes
/sbin/sysctl -p
Edit vi /etc/sysconfig/network-scripts/ifcfg-lo:0
DEVICE=lo:0 IPADDR=[VIP NETMASK=255.255.255.255 ONBOOT=yes NAME=loopback
* Setup Web server to listen on new loopback ip VIP
* Restart the network adapter
service network restart
* Check its listening:
netstat -ntulp