Simple Rule to Cap P2P Uploads

Linux Advanced Routing and Traffic Control

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

 



Hi,
  I'm new at traffic control and was reading up on HTB and using it to put an upper limit on traffic.  I have a 256k DSL with 64k upload (which translates to about 5/6KB uploads).  The machine running the P2P applications keeps filling up the 64K so my browsing from other machines in the network ends up being very slow.  Since there are several P2P applications, I wanted to set the entire upload cap to something like 3KB/s so it doesn't disrupt browsing.  However, I would also like to ssh and scp from this machine without having an upload cap.  The machine has a single interface to the network: eth0.  I tried the following tc lines but it appears to affect both the P2P traffic and my ssh traffic, resulting in a very slow ssh sessions:
 
tc qdisc add dev eth0 root handle 1: htb default 3
tc class add dev eth0 parent 1: classid 1:1 htb rate 102400kbps ceil 102400kbps
tc class add dev eth0 parent 1:1 classid 1:2 htb rate 102400kbps ceil 102400kbps
tc class add dev eth0 parent 1:1 classid 1:3 htb rate 3kbps ceil 3kbps
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 22 0xffff flowid 1:2

Any ideas?  Thanks for your time.


Do you Yahoo!?
Next-gen email? Have it all with the all-new Yahoo! Mail Beta.
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux