On Thursday 13 May 2004 14:59, Lars Oeschey wrote: > Andreas Klauer wrote: > >The modified wondershaper is here: > > http://www.metamorpher.de/files/wshaper-over-lan.htb > > I tested the script now, it works good so far in that LAN traffic isn't > slowed down anymore . But when p2p has full Bandwidth, http over the > proxy is very slow. I would like that p2p just gets the bandwidth thats > left over after http, is that possible? What I tried with the original > script was this, could that work? I imagine you set $DEV to ethX, right? (In the original script it was ppp0.) Anyway, as to the p2p traffic, it is usually pretty pervasive. You will need to use something like IPP2P or L7-Filter to catch it and stick it in a p2p or bulk class. I found that for edonkey, for example, matching on port 4662 only caught 80% of the traffic in the best case scenario and 50% in the worst, making things like HTTP virtually unusable. You'll need to patch your kernel to use either one and they both have IPTables components you will need to use to match traffic. IPP2P needs CONNMARK, which is available in patch-o-matic for Netfilter. Be advised that you need the CVS version of IPTables to use CONNMARK with 2.6. IPP2P and CONNMARK work well on my 2.4.24 kernel with the CONNMARK patch from patch-o-matic. (The non -ng variant.) I also recommend the CLASSIFY patch if you are going to be using IPTables anyway. I have found that for the simple case of traffic shaping, it is actually easy to write your own basic script to handle it. Wondershaper is a nice template to start with. The usual procedure is 1) decide on classes and leafs and define them with `tc` and 2) decide how best to match traffic destined for your classes, using either `tc` or IPTables, and define matching rules. > tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \ > match ip dport 3128 0xffff flowid 1:10 > > tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \ > match ip sport 3128 0xffff flowid 1:10 > > tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \ > match ip dport 80 0xffff flowid 1:10 > > tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \ > match ip sport 80 0xffff flowid 1:10 > > Lars _______________________________________________ LARTC mailing list / LARTC@xxxxxxxxxxxxxxx http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/