LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

linux router as loadbalancing director

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: linux router as loadbalancing director
From: tito <extlists@xxxxxxxxxxxxx>
Date: 25 May 2004 10:36:56 +0200
Hi everybody!

I'm just trying to get working my Linux router with load balancing.
As I've seen in LVS-HOWTO I'm trying to configure it LVS-DR and Julian's
martian modification. I've added the patch, compiled the kernel with the
needed options (kernel 2.6.6) and tried to configure it with configure
script. I don't know what I'm doing wrong but int doesn't works at all.
The configuration I'm using is something like that:

                   |
                  ISP
                   |eth0 80.25.117.69
                Router/Firewall/Director (LVS box)
                   |eth1 192.168.1.1
        +----------+------------+
        |eth0                   |eth0
        Real 1                  Real2
        192.168.1.2             192.168.1.3

and also I'm trying it by hand:

Linux director side:

echo "0" >/proc/sys/net/ipv4/ip_forward
echo "1" >/proc/sys/net/ipv4/conf/all/send_redirects
echo "1" >/proc/sys/net/ipv4/conf/default/send_redirects
echo "1" >/proc/sys/net/ipv4/conf/eth0/send_redirects
/sbin/ifconfig eth1:110 192.168.1.110 broadcast 192.168.1.110 netmask 
255.255.255.255
/sbin/route add -host 192.168.1.110 dev eth1:110
/sbin/ipvsadm -C
/sbin/ipvsadm -A -t 192.168.1.110:telnet -s rr
/sbin/ipvsadm -a -t 192.168.1.110:telnet -r 192.168.1.2 -g -w 1
#forwarding telnet to realserver using direct routing with weight 1
/sbin/ipvsadm -a -t 192.168.1.110:telnet -r 192.168.1.12 -g -w 1

On Realservers side:

/sbin/route add default gw 192.168.1.1
echo "0" >/proc/sys/net/ipv4/ip_forward
/sbin/ifconfig lo:110 192.168.1.110 broadcast 192.168.1.110 netmask 0xffffffff 
up
/sbin/route add -host 192.168.1.110 dev lo:110
#hiding interface lo:110, will not arp
echo "1" >/proc/sys/net/ipv4/conf/all/hidden
cat       /proc/sys/net/ipv4/conf/all/hidden
echo "1" >/proc/sys/net/ipv4/conf/lo/hidden
cat       /proc/sys/net/ipv4/conf/lo/hidden


For testing purposes all iptables chains are enabled, and all IP addresses are 
pingable between them (director <-> realservers, and lvs <- all)


Don't know what's wrong, and sorry for my newbie question.

Thanks in advance.

tito



<Prev in Thread] Current Thread [Next in Thread>