LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Redirect Question

To: "'lvs-users@xxxxxxxxxxxxxxxxxxxxxx'" <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Redirect Question
From: Ben Barringer <BBarringer@xxxxxxxxxxxx>
Date: Thu, 18 Jan 2001 11:24:59 -0500
I am trying to get a simple load balancing setup on my boxes. I can't get
the HTTP to redirect/forward. However Telnet redirect works fine. I can't
figure out why the telnet redirect is working and the HTTP is not. 

Let me know if you need more info. Please make suggestions. 

Configuration and misc. details below.

Thanks
Ben


I have 1 LVS director and two Real Servers that are web servers. 

I am running RedHat Linux version 2.2.14-5.0.14.um.3 

Here are the steps. 
1. Create virtual ip eth0:0 192.168.25.18

2. Edit the sysctl.conf file  to look like this.
net.ipv4.ip_forward = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.ip_always_defrag = 0
kernel.sysrq = 1 

3. /sysctl -p
4. configure ipvsadm on the LVS  So ipvsadm -L -n looks like this.

IP Virtual Server version 0.9.11 (size=4096)  
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port          Forward Weight ActiveConn InActConn
TCP  192.168.25.18:23 wlc persistent 360
     -> 192.168.25.16:23            Route   1      0          0

     -> 192.168.25.17:23            Route   1      0          0


TCP  192.168.25.18:80 wlc persistent 360
      -> 192.168.25.16:80            Route   1      0          0    
      -> 192.168.25.17:80            Route   1      0          0




5. Routes on LVS looks like this...

Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
192.168.25.20   *               255.255.255.255 UH    0      0        0 eth0
192.168.25.18   *               255.255.255.255 UH    0      0        0 eth0
192.168.25.0    *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         192.168.25.1    0.0.0.0         UG    0      0        0 eth0


On the Real Servers I setup an local loopback to address 192.168.25.18. 
and set sysctl.conf file to this.

net.ipv4.ip_forward = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.ip_always_defrag = 0
kernel.sysrq = 0 





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