Re: traffic shapping with squid in the middle

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

 



>Hello.

Hi,

>I've been experiencing some problems trying to shape our network
>bandwidth. We have a gw with squid doing the contents cache and would
>like to assign each client a fair bw trying to avoid sluggish
>connections. 
>...
>I've been trying to get this working for a while now but, can't get it.
>Please guide me to where I can find a light at the end of the tunnel
>since, that's how I feel: Have no way out.

You can use IFB [1] to shape upload traffic before it's "eaten" by
squid. Do this:

tc qdisc add dev eth1 ingress
tc filter add dev eth1 protocol ip parent ffff: prio 4 u32 match ip \
dst 0.0.0.0/0 flowid :1 action mirred egress redirect dev ifb0

... and now you can shape upload traffic on ifb0. Solution would work
ok with or without squid in the middle.

With this solution you won't be able to use mark based shaping
(prerouting marking is done after ingress shaping). You'll have to use
u32 tc classifier [2].

Good luck!

[1] http://www.linuxfoundation.org/collaborate/workgroups/networking/ifb
[2] http://tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.adv-filter.u32.html

Best regards,
Marek
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux