[newbie] Experimenting with LVS

To: "'lvs-users@xxxxxxxxxxxxxxxxxxxxxx'" <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: [newbie] Experimenting with LVS
From: Michael Jervis <michael.jervis@xxxxxxxxx>
Date: Tue, 25 Feb 2003 11:30:19 -0000

I have been set a task to build a small LVS based network to 'sanity check'
that we can do this. So far, we can't :(

We have two machines to set up with failover and load balancing of an Apache
based web site, all flat HTML. I'm using Redhat 7.2 with the folling LVS
RPMs from the Redhat ftp:


The machines each have two NICs, and I'm aiming to have machine 1 run
primary director, and an Apache instance. Machine 2 will run the backup
director, with the second Apache instance. The idea being that if machine 2
fails, machine 1 will be capable of hosting the site. If machine 1 fails,
machine 2 will take over director and site role until machine 1 is restored

I'm having some problems getting this working, I'm currently aiming for a
set up with no back up director to simplify things.

Machine 1 has the IP addresses:

The 10 address is visible on our LAN, the 192 address places it onto a
private network for the LVS system. Apache on this system is set to listen
on only.

Machine 2 has the IP adresses:

Apache is listening on all ip addresses, and is there when I telnet to port
80 on the machine.

When I hit the cluster on the 10 address I only get Machine 2 responding. is enclosed at end of mail.

My LVS Routing table is:
IP Virtual Server version 0.8.1 (size=65536)                   
Prot LocalAddress:Port Scheduler Flags                         
  -> RemoteAddress:Port             Forward Weight ActiveConn InActConn
TCP rr
  ->                 Masq    1      0          8         
  ->                 Local   1      0          7

When I change Apache on machine 1 to run on all IP addresses, as expected it
overrides the LVS listening on port 80 and grabs all traffic. So, I assume
in future I'll need to change NIC 1 to and alias the virtual IP to it? How do I do this? I am not exactly a wizard with Linux,
I'm just the poor sap in the office with most skills.

Thanks for any pointers.      

serial_no = 52
primary =
service = lvs
backup =
heartbeat = 1
heartbeat_port = 539
keepalive = 6
deadtime = 18
network = nat
nat_nmask =
reservation_conflict_action = preempt
debug_level = NONE
virtual web1 {
     active = 1
     address = eth0:1
     vip_nmask =
     port = 80
     send = "GET / HTTP/1.0\r\n\r\n"
     expect = "HTTP"
     load_monitor = uptime
     scheduler = rr
     protocol = tcp
     timeout = 6
     reentry = 15
     quiesce_server = 0
     server Real2 {
         address =
         active = 1
         weight = 1
     server Real1 {
         address =
         active = 1
         weight = 1
<Prev in Thread] Current Thread [Next in Thread>