Sorry that I forget to mention how to setup a virtual server via direct routing.
Each real server is required to
ifconfig lo:0 <virtual IP address> netmask 255.255.255.255 broadcase
<virtual IP
address> up
route add -host <virtual IP address> dev lo:0
And, the load balancer and the real servers are required to have
interfaces linked on the same physical network.
Note that currently real server cannot run Linux 2.2.x, because Linux 2.2.x
kernel answer ARP requests for its interfaces except the LOOPBACK or
MULTICAST addresses. This will make the virtual server doesn't work.
I will add a web page about how to setup a virtual server via direct routing
in detail soon.
Cheers,
Wensong
|