Tuesday, January 25, 2011

Priorize linux traffic in same protocol (http download vs htto browsing) with htb/tc

I have a big time reading but i cant figure-out how to do this. always i have a download in mu network all http browsing are affected, i need to do some specific or dont use sfq ? some one have a script sample to show me how to run a fair queue in same protocol/port

regrads.

  • You can't control the speed of incoming traffic on the internet side. A common workaround/solution is to shape the traffic on the interface facing your network instead.

    HOWEVER, if you mean you want to differentiate a http download of a web page vs the http download of an ISO, slowing down the ISO download, then you are more likely looking at some kind solution that inspects the actual network traffic, not just source/destination port. A proxy might fit the bill here.

    From David
  • I remember there were rules like guarantie 100kbit/sec for the first 2 seconds then 10kbit

    like

    tc class add dev eth0 parent 1:1 classid 1:30 hfsc \sc m1 100kbit d 2000ms m2 10kbit ul rate 1000kbit

    It's actually what you need but remember the modern browsers could use a long keep-alive queues which you could block with such rules as well.

    From disserman
  • That's not an easy task. One thing you could try on Linux is to try to get iptables to do some accounting on the packets and mark those with a high transfer rate. Then add tc classes matching these marks.

    The proxy way suggested in an other answer seems to be a good way too.

    From AndreasM

0 comments:

Post a Comment