On Wed, Sep 28, 2005 at 03:27:08PM +0900, sipieter nicolas wrote:
> hi there,
> i'm having hard time setup a simple load balancer,
> so far:
>
> i've setup net.ipv4.ip_forward = 1 in /etc/sysctl.conf
Did you activate this change by running sysctl -p
> put those rules in ipvsadm:
>
> echo "
> -A -t 192.168.2.2:80 -s rr
> -a -t 192.168.2.2:80 -r 192.168.2.3:80 -m
> -a -t 192.168.2.2:80 -r 192.168.2.4:80 -m
> " | ipvsadm -R
Does "ipvsadm -L -n" look right?
> and set this in iptables:
> [root@parts niko]# /sbin/iptables -t nat -A POSTROUTING -j
> MASQUERADE -s 192.168.2.2/24
A few things about the above.
1) iptables MASQ rules are only needed if you want the real-servers
to be able to access the outside world. That is, initiate
connections to the ouside world.
It is _not_ needed for LVS to function
2) I think the rule has an error and should be
/sbin/iptables -t nat -A POSTROUTING -j MASQUERADE -s 192.168.2.0/24
> ...
> still, when i try to connect from another computer onto my
> load balancer nothing happen i'm not routed or forwarded
> anywhere
> it only keep searching until 1minutes or less, then
> display an error " page not found.. no information
> available etc etc
> what did i miss?
Note that any machine that connects to this service must
be on the external network, not the internal network where
the real-servers live.
If you have problems, watching packets using tcpdump is usually
profitable. As is looking at the output of ipvadm -L -c -n.
--
Horms
|