Re: [squid-users] Random outgoing ip

From: BERTRAND Joël <joel.bertrand_at_systella.fr>
Date: Mon, 04 Feb 2013 13:02:41 +0100

Amos Jeffries wrote:
> On 5/02/2013 12:25 a.m., BERTRAND Joël wrote:
>> Hello,
>>
>> I'm trying to configure squid to use a random ip for outgoing packets.
>>
>> My hardware configuration is :
>>
>> (internet)-----(gateway)-----(proxy squid)
>>
>> Gateway only translates 192.168.1.X addresses to public addresses. I
>> have tested that a simple squid configuration (without round robin)
>> works like a charm. When I try to add round robin, all requests always
>> use the same outgoing address (!). Proxy has one ethernet interface
>> with one real address (192.168.1.72) and four virtual addresses
>> (192.168.1.73 to 192.168.1.76). Squid (2.7) runs on a linux sparc
>> operatic system.

        Thanks a lot for your answer but I don't understand.

> You are making several mistakes.
> 1) using round-robin, which is a predictable cycle over a fixed set of
> IPs - as far from random as you can get. It is also *destination*
> selection, not a source IP selection.

        RR is enough for my usage even if I would prefer a real random algorithm.

        To write my config, I have followed this howto:
http://www.everydayinternetstuff.com/2011/03/squid-random-outgoing-ipinterface-selection/

> 2) using cache_peer at all. Again a destination IP selection, nothing to
> do with source IP.
> 3) turning balance_on_multiiple_ip on. Again a destination IP selection,
> nothing to do with source IP.

        I _want_ to use destination IP selection to force squid to use four
different outgoing addresses. 192.168.1.72 receives a request that it
sends to one of the slave (192.168.7[3456]). First step works fine, but
I don't understand why outgoing address is always 192.168.1.73.

> 4) trying to do this with HTTP. All the optimizations which make
> HTTP/1.1 faster than HTTP/1.0 (or wais, or email, or gopher) are about
> *reducing* the DNS, TCP, routing and processing overheads of message
> delivery. By doing this you are maximizing the overhead cost encountered
> by every single message.

        Regards,

        JB
Received on Mon Feb 04 2013 - 12:02:57 MST

This archive was generated by hypermail 2.2.0 : Tue Feb 05 2013 - 12:00:03 MST