LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

http requests does not go to real server.!!!

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx, lvs-users-help@xxxxxxxxxxxxxxxxxxxxxx
Subject: http requests does not go to real server.!!!
From: "Dronamraju Rajesh" <drajesh80@xxxxxxxxxxx>
Date: Tue, 05 Dec 2000 16:06:58 +0530
Dear All,

I am trying a very simple config i have done for lvs-nat but it does not work. sorry to make it long.

The following are the steps i followed:-

1.) We have a cisco router configured to connect to the InterNet.
       Private IP of router    ----        10.10.10.4 / 255.255.255.0

2.) The diagram that I have tried to implement

-------------
|  router  |
-------------
    |    10.10.10.4 / 255.255.255.0
    |
    |    10.10.10.202 / 255.255.255.0  - eth0
-----------------------  10.10.10.201 / 255.255.255.0 - eth0:1
|  Virtual server |
-----------------------    192.168.1.1 / 255.255.255.0 - eth1
   |                \      192.168.1.254 / 255.255.255.0 - eth:1
   |                 \
   |                  \
   |                   \
------------        ----------------
| RS1   |        |    RS2    |
-----------         ---------------
192.168.1.3            192.168.1.4
255.255.255.0         255.255.255.0

The steps i followed to configure the same (NOTE:- Iam using only one system as two real servers by configuring one ip virtually )

1.) Installed Red Hat 6.2 linux
2.) Patched with LVS patches for kernel 2.2.14
3.) Using pulse, nanny, lvs, ipvsadm for the configuration
4.) configured virtual server network card with the IP numbers
   mentioned above using ifconfig and route
   The o/p of ifconfig and route are as follows:-
ifconfig
----------
eth0      Link encap:Ethernet  HWaddr 00:03:47:1B:A8:74
         inet addr:10.10.10.202  Bcast:10.255.255.255  Mask:255.255.255.0
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:30371 errors:0 dropped:0 overruns:0 frame:0
         TX packets:2015 errors:0 dropped:0 overruns:0 carrier:0
         collisions:96 txqueuelen:100
         Interrupt:11 Base address:0xf000

eth0:1    Link encap:Ethernet  HWaddr 00:03:47:1B:A8:74
         inet addr:10.10.10.201  Bcast:10.255.255.255  Mask:255.255.255.0
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         Interrupt:11 Base address:0x2000

eth1      Link encap:Ethernet  HWaddr 00:50:8B:EA:3E:E4
         inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:32870 errors:0 dropped:0 overruns:0 frame:0
         TX packets:5477 errors:0 dropped:0 overruns:0 carrier:0
         collisions:1176 txqueuelen:100
         Interrupt:11 Base address:0x1000

eth1:1   Link encap:Ethernet  HWaddr 00:50:8B:EA:3E:E4
         inet addr:192.168.1.254  Bcast:192.168.1.255  Mask:255.255.255.0
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

route
--------
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default         192.168.1.254   255.255.255.0   UG    0      0        0 eth1
default 10.10.10.4 255.255.255.0 UG 0 0 0 eth0
192.168.1.0     *               255.255.255.0   U     0      0        0 eth1
10.10.10.0      *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo

5.)  the following is the real server network config

ifconfig
----------
eth0      Link encap:Ethernet  HWaddr 00:80:C8:05:0E:20
         inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:79674 errors:0 dropped:0 overruns:0 frame:0
         TX packets:52346 errors:1 dropped:0 overruns:0 carrier:1
         collisions:1642 txqueuelen:100
         Interrupt:11 Base address:0x2000

eth0:1    Link encap:Ethernet  HWaddr 00:80:C8:05:0E:20
         inet addr:192.168.1.4  Bcast:192.168.1.255  Mask:255.255.255.0
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         Interrupt:11 Base address:0x2000

route
--------
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default         192.168.1.254   255.255.255.0   UG    0      0        0 eth0
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo

6.) added entries FORWARD_IPV4, DEFRAG_IPV4 to yes in /etc/sysconfig/network
7.) echo 1 > /proc/sys/net/ipv4/ip_forward
8.) echo 1 > /proc/sys/net/ipv4/ip_always_defrag
9.) ipchains -A forward -j MASQ -s 192.168.1.0/24 -d 0.0.0.0 (also added in /etc/rc.d/rc.local) 10.) commented security lines in /etc/pam.d/login to login from each server to check their health
11.) configured /etc/lvs.cf  as follows
#global section
primary = 10.10.10.202
backup = 10.10.10.203
keepalive = 2
deadtime = 10
heartbeat_port = 1050
rsh_command = rsh
network = nat
nat_router = 192.168.1.254 eth1:1
#Per Virtual server section
virtual server1 {
 address = 10.10.10.201 eth0:1
 active = 1
 load_monitor = ruptime
 timeout = 10
 reentry = 180
 port = 80
 scheduler = wlc
 #per-real-server section
 server rs1 {
   address = 192.168.1.3
   active = 1
   weight = 1
 }
 server rs2 {
   address = 192.168.1.4
   active = 1
   weight = 1
 }
}
12.) /etc/rc.d/init.d/pulse start

These are the steps i followed to configure LVS-NAT . Now the result is that 1.) the httpd_acces_log in realserver 192.168.1.3 gets continuos requests from 192.168.1.1 checking the health of port. 2.) the /var/log/messages shows the ruptime command being executed but tells that it is bad load on real servers. 3.) all daemons on virtual server have started and internally executed the ipvsadm command also.
4.) But unable to send request or get response from the browser.

I guess there may be some problem in the routing and network config.

Sorry for making it a long mail , but i thought if I mention all the config it would be easier to locate the problem. Thank you for all your help.

Thanks & Regards
Rajesh,
tech solutions,
Intercept Consulting - INDIA.
_____________________________________________________________________________________
Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com



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