LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

configuring LVS multiple realservers in director with localnode in SMP m

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: configuring LVS multiple realservers in director with localnode in SMP machine
From: "Alexander Osorio" <maosorionet@xxxxxxxxx>
Date: Sat, 2 Jun 2007 16:25:12 -0500
Hello,

I'm make a service that bind in a given ip and port, now, i'm working
with SMP computer, so, i need one service by processor, and i need
load balancing between the process, i'm trying with LVS, but don't
work (the director and the services need to be in the same computer).

The services can be in any ip-port, so i try with fwmark and LVS:

My PC have a bond device with ip 192.168.1.5

1) configure iptables

iptables -t mangle -F
iptables -t mangle -A PREROUTING -p tcp -s 0.0.0.0/0 -d
192.168.1.105/255.255.255.255 --dport 5000 -j MARK --set-mark 1

2) configure the listen VIP for mark:

ifconfig bond0:1 192.168.1.105 netmask 255.255.255.255 broadcast
192.168.1.105 up
route add -host 192.168.1.105 dev bond0:1

3) configure the VIP for service

ifconfig bond0:2 192.168.1.205 netmask 255.255.255.255 broadcast
192.168.1.205 up
route add -host 192.168.1.205 dev bond0:2

Ok, now, run the service in 192.168.1.205:5000 (the service is a echo service)

from another machine, telnet 192.168.1.105 and no response.

reading about localnode, the packet is forwarding by lvs from
192.168.1.105 to 192.168.1.205, but the dest_addr is 192.168.1.105, so
my service can't make a connection...

please, how i can make a connection?

Alex Osorio.


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