RE: [squid-users] help with acl src and par or impar ip (odd number or even number i think.).

From: Soporte Técnico <soporte_at_nodoalem.com.ar>
Date: Wed, 8 Jun 2011 20:02:20 -0300

Hi Amos, thanks for the help, two question:

acl even src 192.168.0.0/0.0.0.1

would work ?

There´s any detailed information about sourcehash ? I tested before round-robing with no good results for my network, I looked into google and squid wiki and I can´t find detailed information for sourcehash.

Jorge.

-----Mensaje original-----
De: Amos Jeffries [mailto:squid3_at_treenet.co.nz]
Enviado el: miércoles, 08 de junio de 2011 12:25 a.m.
Para: squid-users_at_squid-cache.org
Asunto: Re: [squid-users] help with acl src and par or impar ip (odd number or even number i think.).

 On Tue, 7 Jun 2011 13:35:33 -0300, Soporte Técnico wrote:
> I have 2 two parents for my main squid (Freebsd).
>
> I want to load balancing to each one parent the par ip (odd) and the
> impar
> ip (even).
>
> Ex.
> acl pares src 192.168.0.10, 192.168.0.12, 192.168.0.14, 192.168.0.16
> …
> 192.168.0.254
>
> acl impares src 192.168.0.11, 192.168.0.13, 192.168.0.15,
> 192.168.0.17 ..
> 192.168.0.253
>
>
>
> May I have 2 files ?
 <snip>
>
> This would work ?

 Yes, but...

> The speed there´s not going to be slow in because this large acl
> files?

 Well its relatively very fast. But slower than any of the options
 below...

>
> There´s another way to do this more intelligent.
>

 What you ask for is better done via bitmask:

  acl even src 0.0.0.0/0.0.0.1

  cache_peer_access A allow even
  cache_peer_access B allow !even

 Note: this is IPv4-only.

 Or you could use real load balancing algorithms built into Squid ...

  cache_peer A ... sourcehash
  cache_peer B ... sourcehash

 or

  cache_peer A ... round-robin
  cache_peer B ... round-robin

 or

  cache_peer A ... carp
  cache_peer B ... carp

 Amos
Received on Wed Jun 08 2011 - 23:02:25 MDT

This archive was generated by hypermail 2.2.0 : Thu Jun 09 2011 - 12:00:01 MDT