I have setup split access with load balancing on a router that runs squid but it appears that the second line it almost empty, the router send packets trough the second line only from time to time, very rarely adn the mrtg graphs only show something like 10-16kbit used on that line and instead the primary line is full all the time. I have setup this only for squid, I don''t do any masqurading for the local net, just web acces via squid proxy server. What''s the remedy for this situation? Why does this happen? If that all I can do then I have no use for such a setup , it doesn''t help me at all. Thanks, Alex Here the script that I use: (192.168.55.1 is another router which actualy has the second line conected physicaly and on that router I do SNAT for the squid machine) IF0="eth1" IF1="eth2" IF2="eth0" IP0="192.168.254.125" IP1="1.2.3.4" IP2="192.168.55.2" P1="1.2.3.1" P2="192.168.55.1" P0_NET="192.168.254.0/24" P1_NET="1.2.3.0/26" P2_NET="192.168.55.0/24" # ip route add 1.2.3.0/26 dev eth2 src 81.196.96.11 table T1 ip route add default via 1.2.3.1 table T1 ip route add 192.168.55.0/24 dev eth0 src 192.168.55.2 table T2 ip route add default via 192.168.55.1 table T2 # ip route add 1.2.3.0/26 dev eth2 src 1.2.3.4 ip route add 192.168.55.0/24 dev eth0 src 192.168.55.2 ip rule add from 81.196.96.11 table T1 ip rule add from 192.168.55.2 table T2 ##ip route add $P0_NET dev $IF0 table T1 ip route add 192.168.55.0/24 dev eth0 table T1 ##ip route add 127.0.0.0/8 dev lo table T1 ##ip route add $P0_NET dev $IF0 table T2 ip route add 1.2.3.0/26 dev eth2 table T2 ##ip route add 127.0.0.0/8 dev lo table T2 # ip route del default ip route flush cache ip route add default scope global nexthop via 1.2.3.1 dev eth2 weight 1 nexthop via 192.168.55.1 dev eth0 weight 1 _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Sat, 2003-08-30 at 00:13, Alex wrote:> I have setup split access with load balancing on a router that runs squid > but it appears that the second line it almost empty, the router send packets > trough the second line only from time to time, very rarely adn the mrtg > graphs only show something like 10-16kbit used on that line and instead the > primary line is full all the time. I have setup this only for squid, I don''t > do any masqurading for the local net, just web acces via squid proxy server. > What''s the remedy for this situation? Why does this happen? If that all I > can do then I have no use for such a setup , it doesn''t help me at all.The problem is the type of load-balancing you are using here. Simply add the word "equalize", viz ;> ip route add default scope global nexthop via 1.2.3.1 dev eth2 weight 1 > nexthop via 192.168.55.1 dev eth0 weight 1ip route add equalize default scope global \ nexthop via 1.2.3.1 dev eth2 weight 1 \ nexthop via 192.168.55.1 dev eth0 weight 1 Without the ''equalize` parameter, the links will be equalized on the basis of connection spreading, not alternate packets. Since you only /have/ one outgoing connection(squid) there are no connections(plural) to equalize! ''equalize'' forces iproute2 to equalise at the /packet/ level, not the connection level - more appropriate in your situation. google for "policy routing book" for more on this. (see chapter 5) DISCLAIMER: I''m new at this. Let the List Gurus comment before converting your production system on my say.. 8-/ HTH, Steve _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/