Hello everyone,
I've been running ipvs on our systems for quite a long time, we recently
upgraded some servers from CentOS 5 to CentOS 6 (which ships with kernel
2.6.32). Our setup is ipvs DR:
loadbalancer (two interfaces: eth0 public and eth1 private)
VIP configured on load balancer on eth0:0
real servers (two interfaces: eth0 public and eth1 private)
VIP configured on real servers lo:0
Requests from the web come to the loadbalancer through public interface
eth0, they get forwarded through private interface eth1 to real servers'
private interface eth1. lo:0 on real servers has VIP. Traffic is supposed
to go out from eth0 (public interface) on real servers, but there is
nothing going out. Packets are being discarded.
I ran tcpdump on real servers and saw packets come in through eth1, but
there was nothing going out, kernel was dropping the packets.
After talking with my senior guy, we figured out that RHEL/CentOS 6
behavior has changed in regards to asymmetric routes and reverse path
filtering. By default RHEL 6 now will employ strict reverse path filtering,
meaning if you have different networks and routes on the interface where
traffic comes in from, kernel will drop those packets.
You need to change the settings in order for IPVS DR to work if you have
private and public networks or different networks on different interfaces.
Those settings are:
echo 2 > /proc/sys/net/ipv4/conf/default/rp_filter
echo 2 > /proc/sys/net/ipv4/conf/all/rp_filter
or if you would like to just do the interface where loadbalancer is sending
traffic to, then:
echo 2 > /proc/sys/net/ipv4/conf/<interface of real server ip>/rp_filter
(in my case eth1, so echo 2 > /proc/sys/net/ipv4/conf/eth1/rp_filter)
Please note value of 1 does not have the same behavior on RHEL6 as it did
on RHEL5.
Hope this helps others who encounter the issue.
Cheers,
Alex
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/
LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
|