Mailing List Archive

LVS'ing a CIDR block.
Hello,

I would like to put a CIDR block of addresses (/25) through my LVS
server. Is there a way I can set one entry for a VIP range and then the
load balancing will be handled over the entire range. Or, do I need to
create a Virtual Server per IP address and treat them seperately?

I'm running 2.4.0 with 0.2.0 LVS code. I need a seperate IP address per
SSL server and want to route a /25 to the director

Example: (IP's have been changed to protect the security challenged (me))

Director1 Real IP address. 192.168.1.1
Director2 Real IP address. 192.168.1.2

Virtual IP address 192.168.1.3
Virtual IP block 192.168.2.0/25

Real Server IP address 192.168.1.10
Real Server IP Address 192.168.1.11
Real Server IP Address 192.168.1.12
Real Server IP Address 192.168.1.13

Cisco router is configured with

ip route 192.168.2.0 255.255.255.128 192.168.1.3

Director1 is arping for VIP, Director2 is hot heartbeat standby
Real servers have dummy interfaces for each IP in VIP block (128 dummies)

inbound packet for IP in VIP Block gets routed to Director1 via router.
Director one swaps MAC address for a Real Server NIC. Ethernet switch
delivers packet to the real server.

Directors won't get connections on the VIP itself, only routed packets
from the VIP block. I don't want to setup/manage 128 virtual servers in
the director.

If director goes down, backup director starts arping for VIP, router
re-aims the inbound packets.

I want to create a single Virtual Server entry in ipvsadm to cover the
whole CIDR block with a WLC scheduler

The CIDR block will be used for FTP and SSL virtual servers

Can this be done?
Do I need to use FMARK for it to work?
Can someone send me a config to make it work?

-Matt

--

----------------------------------------------------------------------
Matthew S. Crocker
Vice President / Internet Division Email: matthew@crocker.com
Crocker Communications Phone: (413) 587-3350
PO BOX 710 Fax: (413) 587-3352
Greenfield, MA 01302-0710 http://www.crocker.com
----------------------------------------------------------------------
Re: LVS'ing a CIDR block. [ In reply to ]
"Matthew S. Crocker" wrote:
>
> Hello,
>
> I would like to put a CIDR block of addresses (/25) through my LVS
> server. Is there a way I can set one entry for a VIP range and then the
> load balancing will be handled over the entire range.

> Can this be done?
> Do I need to use FMARK for it to work?

yes this is what fwmark does. I don't know how to do it though.

Joe

--
Joseph Mack PhD, Senior Systems Engineer, Lockheed Martin
contractor to the National Environmental Supercomputer Center,
mailto:mack.joseph@epa.gov ph# 919-541-0007, RTP, NC, USA
Re: LVS'ing a CIDR block. [ In reply to ]
On Fri, Jan 12, 2001 at 06:24:15AM -0500, Joseph Mack wrote:
> "Matthew S. Crocker" wrote:
> >
> > Hello,
> >
> > I would like to put a CIDR block of addresses (/25) through my LVS
> > server. Is there a way I can set one entry for a VIP range and then the
> > load balancing will be handled over the entire range.
>
> > Can this be done?
> > Do I need to use FMARK for it to work?
>
> yes this is what fwmark does. I don't know how to do it though.

1. Set up fwmark rules on the input chain to match incoming packets for
the CIDR and mark them with a fwmark.

e.g.

ipchains -A input -d 192.168.192.0/24 -m 1


2. Use the fwmark (1 in this case) as the virtual service.

ipvsadm -A -f 1
ipvsadm -a -f 1 -r 10.0.0.1
ipvsadm -a -f 1 -r 10.0.0.2

--
Horms