Mailing List Archive

newbie LVS_NAT
I would like to setup a director with multiple VIP's where each VIP can
forward port requests to different real servers.

For example

An http request:
VIP 10.1.1.1:80 would go to realserver's 10.2.1.1 and 10.2.1.2
VIP 10.1.1.2:80 would go to realservers 10.3.1.1 and 10.3.1.2

Is this posible using LVS_NAT? I am using Joseph Mack's configure script to
set things up, I can get it to work fine with one VIP, but I don't see a
good way of having multiple VIPs

Any help would be greatly helpful. :)
Re: newbie LVS_NAT [ In reply to ]
Jeremy,

Sure you can. You basically set up two virtual services.
Here's an example config

virtual cluster1 {
address = 10.1.1.1 eth1:0
active = 1
load_monitor = uptime
timeout = 5
reentry = 10
port = http
send = "GET / HTTP/1.0\r\n\r\n"
expect = "HTTP"
scheduler = wlc
persistent = 60
protocol = tcp

server Real1 {
address = 10.2.1.1
active = 1
weight = 1
}

server Real2 {
address = 10.2.1.2
active = 1
weight = 1
}
}

virtual cluster2 {
address = 10.1.1.2 eth1:1
active = 1
load_monitor = uptime
timeout = 5
reentry = 10
port = http
send = "GET / HTTP/1.0\r\n\r\n"
expect = "HTTP"
scheduler = wlc
persistent = 60
protocol = tcp

server Real1 {
address = 10.3.1.1
active = 1
weight = 1
}

server Real2 {
address = 10.3.1.2
active = 1
weight = 1
}
}

Hope this helps!

Raj Dutt
Voxel dot Net, Inc


Jeremy Kusnetz wrote:
>
> I would like to setup a director with multiple VIP's where each VIP can
> forward port requests to different real servers.
>
> For example
>
> An http request:
> VIP 10.1.1.1:80 would go to realserver's 10.2.1.1 and 10.2.1.2
> VIP 10.1.1.2:80 would go to realservers 10.3.1.1 and 10.3.1.2
>
> Is this posible using LVS_NAT? I am using Joseph Mack's configure script to
> set things up, I can get it to work fine with one VIP, but I don't see a
> good way of having multiple VIPs
>
> Any help would be greatly helpful. :)
>
> _______________________________________________
> LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
> Send requests to lvs-users-request@LinuxVirtualServer.org
> or go to http://www.in-addr.de/mailman/listinfo/lvs-users
RE: newbie LVS_NAT [ In reply to ]
What version of lvs does this configuration file work for?
I am using 0.9.15 for kernel 2.2.16 Is it worth upgrading to version 1.0.2
with kernel 2.2.18?

The config files I am using use this format:
LVS_TYPE=VS_NAT
INITIAL_STATE=on
VIP=eth1:110 lvs2 255.255.255.0 192.168.2.255
DIRECTOR_INSIDEIP=eth0 director-inside 192.168.1.0 255.255.255.0
192.168.1.255
DIRECTOR_DEFAULT_GW=client2
SERVICE=t telnet rr realserver1:telnet realserver2:telnet
SERVICE=t netpipe rr realserver1:netpipe
SERVER_NET_DEVICE=eth0
SERVER_DEFAULT_GW=director-inside
#----------end lvs_nat.conf------------------------------------

What config program do I use to use your config file format?

-----Original Message-----
From: raj dutt [mailto:rd@voxel.net]
Sent: Tuesday, December 26, 2000 6:05 PM
To: lvs-users@LinuxVirtualServer.org
Subject: Re: newbie LVS_NAT


Jeremy,

Sure you can. You basically set up two virtual services.
Here's an example config

virtual cluster1 {
address = 10.1.1.1 eth1:0
active = 1
load_monitor = uptime
timeout = 5
reentry = 10
port = http
send = "GET / HTTP/1.0\r\n\r\n"
expect = "HTTP"
scheduler = wlc
persistent = 60
protocol = tcp

server Real1 {
address = 10.2.1.1
active = 1
weight = 1
}

server Real2 {
address = 10.2.1.2
active = 1
weight = 1
}
}

virtual cluster2 {
address = 10.1.1.2 eth1:1
active = 1
load_monitor = uptime
timeout = 5
reentry = 10
port = http
send = "GET / HTTP/1.0\r\n\r\n"
expect = "HTTP"
scheduler = wlc
persistent = 60
protocol = tcp

server Real1 {
address = 10.3.1.1
active = 1
weight = 1
}

server Real2 {
address = 10.3.1.2
active = 1
weight = 1
}
}

Hope this helps!

Raj Dutt
Voxel dot Net, Inc


Jeremy Kusnetz wrote:
>
> I would like to setup a director with multiple VIP's where each VIP can
> forward port requests to different real servers.
>
> For example
>
> An http request:
> VIP 10.1.1.1:80 would go to realserver's 10.2.1.1 and 10.2.1.2
> VIP 10.1.1.2:80 would go to realservers 10.3.1.1 and 10.3.1.2
>
> Is this posible using LVS_NAT? I am using Joseph Mack's configure script
to
> set things up, I can get it to work fine with one VIP, but I don't see a
> good way of having multiple VIPs
>
> Any help would be greatly helpful. :)
>
> _______________________________________________
> LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
> Send requests to lvs-users-request@LinuxVirtualServer.org
> or go to http://www.in-addr.de/mailman/listinfo/lvs-users
RE: newbie LVS_NAT [ In reply to ]
On Thu, 28 Dec 2000, Jeremy Kusnetz wrote:

> What version of lvs does this configuration file work for?

there's two types of configure files here, mine (which is for simple LVSs)
and from Horms (I think it's his), which was designed for ultramonkey and
does HA. Horms is for more complicated LVSs. Unfortunately the two scripts
are incompatible. Eventually the two scripts will be merged, but that
hasn't happened yet.

> I am using 0.9.15 for kernel 2.2.16 Is it worth upgrading to version 1.0.2
> with kernel 2.2.18?

no, you can do what you want with any of these LVS verions.

My script clears the ipvsadm tables at startup. To run with 2 VIPs
you'd have to comment out the ipvsadm -C instruction in the rc.lvs file
and make two rc.lvs files and run them one after another.

> > I would like to setup a director with multiple VIP's where each VIP can
> > forward port requests to different real servers.

Joe
--
Joseph Mack mack@ncifcrf.gov