LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[lvs-users] question about load balancing smtp

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: [lvs-users] question about load balancing smtp
From: Michiel van Es <mve@xxxxxxxxxxxxxxxxx>
Date: Sun, 25 Apr 2010 20:03:54 +0200
Hi,

I want to load balance smtp with LVS because I heard that LVS is capable 
of showing the source ip to the real servers.
Is that correct?

I tried the following howto:
http://www.howtoforge.com/efficient-high-available-loadbalanced-cluster-on-centos-5.3-direct-routing-method

And use CentOS 5.4 .

ut I can not get a listening port 25 on my server.

Some configs:
-bash-3.2# ip addr sh eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast 
qlen 1000
link/ether 00:16:3e:4b:df:69 brd ff:ff:ff:ff:ff:ff
inet 178.21.112.162/24 brd 178.21.112.255 scope global eth0
inet 178.21.112.169/24 brd 178.21.112.255 scope global secondary eth0:1
inet6 fe80::216:3eff:fe4b:df69/64 scope link
valid_lft forever preferred_lft forever

my /etc/ha.d/ldirectord.conf:
checktimeout=30
checkinterval=2
autoreload=yes
logfile="/var/log/ldirectord.log"
quiescent=no
virtual=178.21.112.169:25
fallback=127.0.0.1:80
real=194.145.200.17:25 gate
real=194.145.200.171:25 gate
service=smtp
persistent=100
scheduler=lblc
protocol=tcp
checktype=negotiate

In /var/log/ldirectord.log:
[Sun Apr 25 19:12:59 2010|ldirectord|15310] Invoking ldirectord invoked 
as: /usr/sbin/ldirectord start
[Sun Apr 25 19:12:59 2010|ldirectord|15310] Starting Linux Director 
v1.186-ha-2.1.3 as daemon
[Sun Apr 25 19:12:59 2010|ldirectord|15313] Added virtual server: 
178.21.112.169:25
[Sun Apr 25 19:12:59 2010|ldirectord|15313] Added fallback server: 
127.0.0.1:80 (178.21.112.169:25) (Weight set to 1)
[Sun Apr 25 19:12:59 2010|ldirectord|15313] Added real server: 
194.145.200.17:25 (178.21.112.169:25) (Weight set to 1)
[Sun Apr 25 19:12:59 2010|ldirectord|15313] Deleted fallback server: 
127.0.0.1:25 mapped from 127.0.0.1:80 (178.21.112.169:25)
[Sun Apr 25 19:12:59 2010|ldirectord|15313] Added real server: 
194.145.200.171:25 (178.21.112.169:25) (Weight set to 1)

Should I restart something?
Why isn't anything listening on port 25?

I want to use the direct routing method because of the 2 real servers 
being able to connect direct ot the internet.

The real servers have the following setup:

Cluster Nodes Configurations (Apache Real Web Servers Configuration)
On both web servers http1 and http2, apache should be running having a 
common serving file (for purpose of get checked by ldirectord).

yum install httpd -y
echo "webserverisworking" > /var/www/html/check.txt
service httpd start
chkconfig httpd on

Now, Create a loopback interface on each web server, so it doesn’t 
communicate with your network gateway/router directly.

vi /etc/sysconfig/network-scripts/ifcfg-lo:0

It must look like this:

DEVICE=lo:0
IPADDR=10.10.10.53
NETMASK=255.255.255.255
ONBOOT=yes
NAME=loopback
vi /etc/sysctl.conf

It must look like this:

net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.eth0.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2
net.ipv4.conf.eth0.arp_announce = 2
sysctl -p
ifup lo:0



Kind regards,

Michiel

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

<Prev in Thread] Current Thread [Next in Thread>