Search squid archive

Re: Random outgoing ip

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux