LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: LVS'ing a CIDR block.

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: LVS'ing a CIDR block.
From: Horms <horms@xxxxxxxxxxxx>
Date: Sat, 13 Jan 2001 18:33:13 +1100
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


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