I use direct routing mode. How do I make the loadbalanced service available to the director (DIR) using the virtual service ip (VIP)?
When I try to connect from DIR to the VIP, Linux (3.2.0) sees that the VIP is bound to a local interface and uses the VIP itself as source address.
Tcpdump:
08:47:51.573100 IP VIP.34762 > VIP.ssh: Flags [S]
According to tcpdump, the packet is not forwarded. Ipvsadm does see an extra inactive connection though. Even if it was forwarded, it wouldn't matter, as the realserver (RS) would not be able to send a reply, as it would not know where to send it to (RS has the VIP bound to the lo interface).
IMHO, the solution is to force the DIR to never create packets with the VIP as source address. When connecting to the VIP, it should use the DIR IP as source address.
However, another problem might be, that IPVS doesn't listen on the loopback interface.
# ip route get VIP
local VIP dev lo src VIP
I could use iptables to rewrite the packets, but that feels quite hackish.
TIA.
0 Answers