Hi there,
first, I am completely new to LVS :-)
I want to set up easy and simple Apache Load Balancing. So I patched my 2.2.22
kernel with the latest patch available for 2.2.xx, compiled ipvsadm 1.15 and
did the following:
fw-rot:~# ipvsadm -L
IP Virtual Server version 1.0.8 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
fw-rot:~# ifconfig eth1:1 10.0.0.200 netmask 255.255.255.0 up
fw-rot:~# ifconfig eth1:1
eth1:1 Link encap:Ethernet HWaddr 00:02:B3:B9:63:A3
inet addr:10.0.0.200 Bcast:10.255.255.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:4 Base address:0xb000
fw-rot:~# echo "1" > /proc/sys/net/ipv4/ip_forward
fw-rot:~# echo "1" > /proc/sys/net/ipv4/ip_always_defrag
fw-rot:~# ipchains -F
fw-rot:~# ipchains -A forward -j MASQ -s 10.0.1.0/24 -d 0.0.0.0/0
fw-rot:~# ipvsadm -C
fw-rot:~# ipvsadm -A -t 10.0.0.200:80 -s wlc
fw-rot:~# lsmod
Module Size Used by
ip_vs_wlc 1652 1 (autoclean)
fw-rot:~# ipvsadm -a -t 10.0.0.200:80 -r 10.0.1.10:80 -w 50 -m
fw-rot:~# ipvsadm -a -t 10.0.0.200:80 -r 10.0.1.11:80 -w 50 -m
setsockopt failed: File exists
fw-rot:~# ^^^ ERR WHY?
fw-rot:~# ipvsadm -L -n
IP Virtual Server version 1.0.8 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 10.0.0.200:80 wlc
-> 0.80.0.0:0 Masq 0 0 0
fw-rot:~#
the last output from ipvsadm looks really strange to me.
All I want is load balancing between 3 apache servers. Connects should come up
on 10.0.0.200 and should go to 10.0.1.10, 10.0.1.11 and 10.0.1.12
What am I doing wrong? ... I've checked also the 2.4 patch (I've included the
latest IPVS for sure in WOLK :-) ... and there it's doing fine. But I have to
set this up with a 2.2 kernel.
Many thnx for your help!!
Selected kernel options for IPVS are:
[*] IP: masquerading virtual server support (EXPERIMENTAL)
[*] IP virtual server debugging
(12) IP masquerading VS table size (the Nth power of 2)
<M> IPVS: round-robin scheduling
<M> IPVS: weighted round-robin scheduling
<M> IPVS: least-connection scheduling
<M> IPVS: weighted least-connection scheduling
<M> IPVS: locality-based least-connection scheduling
<M> IPVS: locality-based least-connection with replication scheduling
ciao, Marc
|