LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Help with Setting up a LVS

To: "Linux Virtual Servers List" <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Help with Setting up a LVS
Cc: "Johnny Stork \(Academic\)" <stork@xxxxxxxxxxxxxxxxxxxxxx>
From: "Johnny Stork" <stork@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 17 May 2000 07:53:16 -0700
I apologize for the LVS "newbie" questions but I was hopinh someone could
take a look at my settings to help me determine if all is ok. I am not
certain things are running properly. My Network consists of the following.

LINUX_LVS       (RH 6.2 with 2 NICs to be LVS   eth0:DHCP to DSL Connection
and currently 216.232.98.221. eth0: 192.168.1.1 connected to Hub)
LINUX_RS1       (RH 6.2 with one NIC to be Real Server. eth0: 192.168.1.2
Server          (NT Server 4, IIS and 1 NIC eth0: 192.168.1.4

Johnny          (NT WS 4 with 1 NIC eth0: 192.168.1.3) Main Workstation



The LINUX_LVS has two nics, one going to a hub which connects the others,
and the other to a DSL modem.
I am trying to setup the LINUX_LVS machine as a Firewall/Proxy so all other
machines have Internet Access and as a LVS. I can get out to the Internet
and the LINUX_LVS is running Pulse and I can hear it sending the "rsh
192.168.1.2 uptime" command to the LINUX_RS1 box every ten seconds, but how
do I know if things are working? When I access the internet the only machine
I hear chuggin away is my Main Worksation, and the LINUX_LVS box. How do I
know that the LINUX_RS1 box running RH 6.2 and Apache, and the Server box
running NTS4 amd IIS, are all working as HTTP? I hope this is not too much
trouble but here are my system details. I was also hoping to have the
LINUX_LVS machine use itself rather than just to route/load balance
requests. Any monitoring tools would also be helpful if anyone knows of any.

I also created a .rhosts file on LINUX_RS1 so that the "rsh 192.168.1.2
uptime" will work.




Piranha Details running on LINUX_LVS

CURRENT LVS ROUTING TABLE


         IP Virtual Server version 0.9.7 (size=4096)
 Prot LocalAddress:Port Scheduler Flags
   -> RemoteAddress:Port          Forward Weight ActiveConn InActConn
 TCP  216.232.98.221:80 wlc
   -> 192.168.1.4:80              Masq    1      0          0
   -> 192.168.1.2:80              Masq    1      0          0
   -> 127.0.0.1:80                Local   1      0          0


 CURRENT LVS PROCESSES

 root     31022  0.0  0.8  1268  520 ?        S    07:15   0:00 pulse
 root     31054  0.0  0.9  1312  624 ?        S    07:15   0:00
/usr/sbin/nanny -c -h 192.168.1.2 -p 80 -s GET / HTTP/1.0\r\n\r\n -x
 root     31058  0.0  0.9  1312  576 ?        S    07:15   0:00
/usr/sbin/nanny -c -h 192.168.1.4 -p 80 -s GET / HTTP/1.0\r\n\r\n -x
 root     31060  0.0  0.9  1312  576 ?        S    07:15   0:00
/usr/sbin/nanny -c -h 127.0.0.1 -p 80 -s GET / HTTP/1.0\r\n\r\n -x HT


Contents of /etc/lvs.cf


primary = 216.232.98.221
service = lvs
rsh_command = rsh
backup_active = 0
backup = 0.0.0.0
heartbeat = 1
heartbeat_port = 539
keepalive = 6
deadtime = 18
network = nat
nat_router = 192.168.1.1 eth1
virtual Linux_LVS {
     active = 1
     address = 216.232.98.221 eth0:1
     port = 80
     send = "GET / HTTP/1.0\r\n\r\n"
     expect = "HTTP"
     load_monitor = uptime
     scheduler = wlc
     protocol = tcp
     timeout = 6
     reentry = 15
     server Linux_RS1 {
         address = 192.168.1.2
         active = 1
         weight = 1
     }
     server Server {
         address = 192.168.1.4
         active = 1
         weight = 1
     }
     server Johnny {
         address = 192.168.1.3
         active = 0
         weight = 1
     }
     server LocalHost] {
         address = 127.0.0.1
         active = 1
         weight = 1
     }
}



Contents of /etc/sysconfig/network


NETWORKING=yes
FORWARD_IPV4=yes
#DEFRAG_IPV4=yes
HOSTNAME=akgn59f4y1779.bc.hsia.telus.net

Added to/etc/rc.d/rc.local

/sbin/route add -host 255.255.255.255 dev eth1
ipchains -A forward -j MASQ -s 192.168.1.0/24 -d 0.0.0.0



LINUX_LVS Details

ifconfig:

eth0      Link encap:Ethernet  HWaddr 00:50:BA:84:9C:F1  
          inet addr:216.232.98.221  Bcast:216.232.99.255  Mask:255.255.252.0
          UP BROADCAST RUNNING  MTU:1500  Metric:1
          RX packets:8447 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15288 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          Interrupt:11 Base address:0xf800 

eth0:1    Link encap:Ethernet  HWaddr 00:50:BA:84:9C:F1  
          inet addr:216.232.98.221  Bcast:216.232.98.255  Mask:255.255.255.0
          UP BROADCAST RUNNING  MTU:1500  Metric:1
          Interrupt:11 Base address:0xf800 

eth1      Link encap:Ethernet  HWaddr 00:A0:CC:E5:DE:49  
          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:84114 errors:0 dropped:0 overruns:0 frame:0
          TX packets:95470 errors:16 dropped:0 overruns:0 carrier:32
          collisions:6572 txqueuelen:100 
          Interrupt:10 Base address:0xf400 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:3924  Metric:1
          RX packets:5820 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5820 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 


route:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 eth1
216.232.98.0    *               255.255.255.0   U     0      0        0 eth0
216.232.96.0    *               255.255.252.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         216.232.96.254  0.0.0.0         UG    0      0        0 eth0






LINUX_RS1 Details

ipconfig:

eth0      Link encap:Ethernet  HWaddr 00:50:BA:85:30:34  
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING  MTU:1500  Metric:1
          RX packets:113067 errors:0 dropped:0 overruns:0 frame:0
          TX packets:96678 errors:0 dropped:0 overruns:0 carrier:0
          collisions:9939 txqueuelen:100 
          Interrupt:3 Base address:0xd000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:3924  Metric:1
          RX packets:5641 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5641 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 

route:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
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
default         LINUX_LVS       0.0.0.0         UG    0      0        0 eth0


SERVER Details:


ifconfig:

Windows NT IP Configuration  Ethernet adapter RTL80291:         
IP Address. . . . . . . . . : 192.168.1.4       
Subnet Mask . . . . . . . . : 255.255.255.0     
Default Gateway . . . . . . : 192.168.1.1 

PPP adapter NdisWan5:   
IP Address. . . . . . . . . : 0.0.0.0   
Subnet Mask . . . . . . . . : 0.0.0.0   
Default Gateway . . . . . . :  

PPP adapter NdisWan6:   
IP Address. . . . . . . . . : 0.0.0.0   
Subnet Mask . . . . . . . . : 0.0.0.0   
Default Gateway . . . . . . :  

Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0      192.168.1.1     192.168.1.4       1
        127.0.0.0        255.0.0.0        127.0.0.1       127.0.0.1       1
      192.168.1.0    255.255.255.0      192.168.1.4     192.168.1.4       1
      192.168.1.4  255.255.255.255        127.0.0.1       127.0.0.1       1
    192.168.1.255  255.255.255.255      192.168.1.4     192.168.1.4       1
        224.0.0.0        224.0.0.0      192.168.1.4     192.168.1.4       1
  255.255.255.255  255.255.255.255      192.168.1.4     192.168.1.4       1
===========================================================================


Johnny Stork 
ACADEMIC COMPUTERS 
Day: jstork@xxxxxxxxxxxxxx 
Evening: stork@xxxxxxxxxxxxxxxxxxxxxx 
Web: http://www.academic-computers.com/johnny 




<<attachment: winmail.dat>>





<Prev in Thread] Current Thread [Next in Thread>
  • Help with Setting up a LVS, Johnny Stork <=