Linux LVS/UltraMonkey (load balancer) configuration question...

Stealth

Senior member
Oct 25, 2000
782
0
0
Apparently the forum software doesn't format the my thread nicely, so please check out this post of mine for easier reading: click here

Ok, here goes:

This is the first time I've fooled around with LVS/UltraMonkey, so I would really appreciate it if seasoned LVS/UltraMonkey veterans could chime in. Currently, this is how my network is setup:

(please disregard the '. . . .' - the spacing got messed up so I had to add them in)



Internet
|
|
| public IP address
|
|
------------
| firewall |
| NAT. . . .|
------------
| 192.168.123.254
|
|
| 192.168.123.182 (eth0)
------------
| LVS. . . .|
| Director |
------------
| 192.168.123.111 (eth1)
|
|
|
------------ . . . . . ------------
| switch | ====| Real #2 | 192.168.123.106 (eth0) / 192.168.123.107 (eth1)
------------ . . . . . ------------
||
--------------
| Real #1 |
--------------
192.168.123.102 (eth0)
192.168.123.103 (eth1)


I am currently testing my setup on my Road Runner cable modem setup, and also using AOL on top of my cable connection to test the setup from 'outside' of my network (since apparently the IP address when surfing via the AOL IE browser is different than my public IP address - I have another PC hanging off of the switch that is not displayed in the diagram). I have 1 director, and 2 real servers at the moment. I have my firewall/NAT router point to 192.168.123.182 for all http requests. When I access my site via my domain name (accesses the public IP) from outside of my network (using my AOL IE browser), my browser seems to take awhile to load (website found, waiting for reply), then gives me a '502 Connection Hangup' error message. When I use my cable modem to access my site (it goes out and searches for the URL, but when it reaches my router, I assume it gets forwarded to 192.168.123.182, and displays my site just fine. So basically, I can access my site fine locally, but no one outside of my network can see my site. What could I be doing wrong?

The director is currently running RedHat 7.2 with the 2.4.7-10.um.1 kernel. I have loaded up the UltraMonkey (v2.0.0) scripts and when I run ipvsadm -Ln on the director, I get the following:
----------------------------------------------------------------------
IP Virtual Server version 1.0.4 (size=4096)
Prot LocalAddress:port Scheduler Flags
-> RemoteAddress:port Forward Weight ActiveConn InActConn
TCP 192.168.123.182:80 rr persistent 600
-> 192.168.123.107:80 Masq 1 0 0
-> 192.168.123.103:80 Masq 1 0 0
-> 127.0.0.1:80 Local 0 0 0


running /sbin/route, I get the following (at the director):
--------------------------------------------------------------------------
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.123.0 * 255.255.255.0 U 0 0 0 eth0
192.168.123.0 * 255.255.255.0 U 0 0 0 eth1
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 192.168.123.254 0.0.0.0 UG 0 0 0 eth1
default 192.168.123.254 0.0.0.0 UG 0 0 0 eth0

my /etc/ha.d/ldirectord.cf looks like this:
---------------------------------------------------
# Global Directives
checktimeout=3
checkinterval=1
fallback=127.0.0.1:80
autoreload=yes
logfile="/var/log/ldirectord.log"
quiescent=yes

# Virtaul Server for HTTP
virtual=192.168.123.182:80
fallback=127.0.0.1:80
real=192.168.123.103:80 masq
real=192.168.123.107:80 masq
service=http
request="ldirector.html"
receive="vgtalk"
scheduler=rr
persistent=600
protocol=tcp

At Real Server #1, I am running RedHat 7.3 with the 2.4.18-10smp kernel.
At Real Server #2, I am running RedHat 7.3 with the 2.4.18-3smp kernel.

At Real Server #1 (192.168.123.102/103), running /sbin/route, I get:
---------------------------------------------------------------------------------------
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.123.0 * 255.255.255.0 U 0 0 0 eth1
192.168.123.0 * 255.255.255.0 U 0 0 0 eth1
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 192.168.123.254 0.0.0.0 UG 0 0 0 eth0

At Real Server #2 (192.168.123.106/107), running /sbin/route, I get:
---------------------------------------------------------------------------------------
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.123.0 * 255.255.255.0 U 0 0 0 eth1
192.168.123.0 * 255.255.255.0 U 0 0 0 eth1
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 192.168.123.254 0.0.0.0 UG 0 0 0 eth0

From all of this info, can anyone suggest a fix for my problem? If any other bit of information is needed, please let me know.
 

Buddha Bart

Diamond Member
Oct 11, 1999
3,064
0
0
Originally posted by: Stealth


Internet
|
|
| public IP address
|
|
------------
| firewall |
| NAT. . . .|
------------
| 192.168.123.254
|
|
| 192.168.123.182 (eth0)
------------
| LVS. . . .|
| Director |
------------
| 192.168.124.111 (eth1)
|
|
|
------------ . . . . . ------------
| switch | ====| Real #2 | 192.168.124.106 (eth0) / 192.168.124.107 (eth1)
------------ . . . . . ------------
||
--------------
| Real #1 |
--------------
192.168.124.102 (eth0)
192.168.124.103 (eth1)

I went back and bolded the IP's that should change.
 

Buddha Bart

Diamond Member
Oct 11, 1999
3,064
0
0
sorry i had a whole bunch to explain that, must have pasted over it.

Your director is basically a NATing router, so it needs each of its interfaces to be a seperate subnet.

Along with your IP's so must your default gateway change on the machines behind the director.

bart