LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

NAT? LVS HTTP Routing not working

To: "'lvs-users@xxxxxxxxxxxxxxxxxxxxxx'" <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: NAT? LVS HTTP Routing not working
From: "Patman, Marcus" <patmanm@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 29 Mar 2001 12:23:53 -0600

Greetings,

Please excuse if there is answer to this in a FAQ somewhere I need to get the LVS working for this project pretty quick and hope someone can point me in the right direction I'd greatly appreciate it..

I am attempting to configure an LVS cluster and I have the FOS component working just great BUT I can't get the LVS router to redirect requests to http. When I have UDP selected of course I can resolve pull pages from the HTTP server on 10.2.9.50 but when I enable TCP and the ipvsadm routing table the redirection isn't working. Running Redhat 6.2 with all the patches and latest RPM's.

Here's the lvs.cf:
primary = 10.2.9.21
service = lvs
rsh_command = rsh
backup_active = 1
backup = 10.2.9.17
heartbeat = 1
heartbeat_port = 1050
keepalive = 6
deadtime = 18
network = nat
nat_router = 10.11.1.254 eth1:1
virtual server1 {
     active = 1
     address = 10.2.9.50 eth0:1
     port = 80
     send = "GET / HTTP/1.0\r\n\r\n"
     expect = "HTTP"
     load_monitor = ruptime
     scheduler = rr
     protocol = tcp
     timeout = 5
     reentry = 10
     server innovyx3 {
         address = 10.11.1.3
         active = 1
         weight = 1
     }
     server innovyx5 {
         address = 10.11.1.5
         active = 1
         weight = 1
     }
}       

Things I've tried:
You'll notice the netmasks for eth0:1 and eth1:1 are different from eth0 and eth1 I tried duplicating these with no luck.

Ip forwarding and ip defag is enabled
I can ping the NAT router and the LVS IP

I have the following:
LVS Cluster Server 1 - 10.2.9.21
eth0      Link encap:Ethernet  HWaddr 00:A0:C9:66:18:58
          inet addr:10.2.9.21  Bcast:10.2.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:349228 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18853 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          Interrupt:11
eth0:1    Link encap:Ethernet  HWaddr 00:A0:C9:66:18:58 <***Virtual Server IP
          inet addr:10.2.9.50  Bcast:10.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:11
eth1      Link encap:Ethernet  HWaddr 00:A0:C9:26:A3:3F
          inet addr:10.11.1.1  Bcast:10.11.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:256919 errors:0 dropped:0 overruns:0 frame:0
          TX packets:302688 errors:0 dropped:0 overruns:0 carrier:0
          collisions:8 txqueuelen:100
          Interrupt:11 Base address:0x2000
eth1:1    Link encap:Ethernet  HWaddr 00:A0:C9:26:A3:3F    <****NAT ROUTER IP
          inet addr:10.11.1.254  Bcast:10.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:11 Base address:0x2000

Cluster Server 2: - 10.2.9.17
eth0      Link encap:Ethernet  HWaddr 00:50:8B:B0:09:BC
          inet addr:10.2.9.17  Bcast:10.2.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:347097 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16258 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          Interrupt:11
eth1      Link encap:Ethernet  HWaddr 00:A0:C9:1F:4E:D9
          inet addr:10.11.1.2  Bcast:10.11.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2776 errors:0 dropped:0 overruns:0 frame:0
          TX packets:425 errors:0 dropped:0 overruns:0 carrier:0
          collisions:4 txqueuelen:100
          Interrupt:11 Base address:0x2000     

Ipvsadm route:
TCP  10.2.9.50:www rr
  -> innovyx5:www                Masq    1      0          0 - 10.11.1.5
  -> innovyx3:www                Masq    1      0          0 - 10.11.1.3

ipchains route on 10.2.9.21:
target     prot opt     source                destination           ports
MASQ       all  ------  10.2.0.0/16          anywhere              n/a        

Ipchains on 10.2.9.17:
target     prot opt     source                destination           ports
MASQ       all  ------  10.2.0.0/16          anywhere              n/a        

So from the looks of it everything works great the FOS will failover with no problems to 10.2.9.17 and switch back just the same but I cannot get it to route http between my 2 web servers. I am out of things to try at the moment so any light you can shed on the subject please beam it my way.



Marcus Patman
MTG - Network Services
patmanm@xxxxxxxxxxxxxxxxxxxxxxxxxxxx


<Prev in Thread] Current Thread [Next in Thread>
  • NAT? LVS HTTP Routing not working, Patman, Marcus <=