Subject: Re: kazaa and others limit with altq
To: Roberto Pereyra <netbsd@gualeguaychu.gov.ar>
From: Sebastian Prause <sebastian-p@gmx.net>
List: netbsd-users
Date: 04/02/2004 02:05:20
* Roberto Pereyra <netbsd@gualeguaychu.gov.ar> wrote:
| Hi all !

Hi

| Somebody has luck using altq to control kazaa and other p2p bandwidth ?

Most p2p software is able to limit the upload rate. I'm using that
feature in addition to my altq settings. Only using altq (with p2p
software) didn't satisfy me (web browsing had too high latency). 
Altq works very well with my local webserver and full upload traffic 
though.

Anyways, maybe my config helps so here it is:



interface pppoe0 bandwidth 124k cbq  # max real upload is 128kbit

class cbq pppoe0 root_class NULL pbandwidth 100

class cbq pppoe0 ctl_class root_class priority 6 pbandwidth 5 control
class cbq pppoe0 def_class root_class priority 1 borrow pbandwidth 95 default

class cbq pppoe0 fast_class def_class priority 5 borrow pbandwidth 15
filter pppoe0 fast_class 0 0 0 53 17 # dns UDP
filter pppoe0 fast_class 0 0 0 53 6 # dns TCP
filter pppoe0 fast_class 0 0 0 22 6 tos 0x10 # ssh TOS LOWDELAY
filter pppoe0 fast_class 0 22 0 0 6 tos 0x10 # ssh TOS LOWDELAY
filter pppoe0 fast_class 0 0 0 23 6 # telnet
filter pppoe0 fast_class 0 23 0 0 6 # telnet
filter pppoe0 fast_class 0 0 0 6667 6 # irc
filter pppoe0 fast_class 0 6667 0 0 6 # irc

class cbq pppoe0 norm_class def_class priority 4 borrow pbandwidth 15
filter pppoe0 norm_class 0 80 0 0 6 # http
filter pppoe0 norm_class 0 443 0 0 6 # https
filter pppoe0 norm_class 0 0 0 110 6 # pop3
filter pppoe0 norm_class 0 110 0 0 6 # pop3

filter pppoe0 norm_class 64.62.252.135 6054 0 0 6 # internet radio
filter pppoe0 norm_class 205.188.234.4 8024 0 0 6 # internet radio
filter pppoe0 norm_class 205.188.234.4 8016 0 0 6 # internet radio

class cbq pppoe0 sleep_class def_class priority 0 borrow pbandwidth 15
filter pppoe0 sleep_class 0 0 0 80 6 # local http upload
filter pppoe0 sleep_class 0 0 0 443 6 # local https upload
filter pppoe0 sleep_class 0 20 0 0 6 # ftp
filter pppoe0 sleep_class 0 0 0 20 6 # ftp

filter pppoe0 sleep_class 0 0 0 4661 6
filter pppoe0 sleep_class 0 4661 0 0 6
filter pppoe0 sleep_class 0 0 0 4662 6
filter pppoe0 sleep_class 0 4662 0 0 6
filter pppoe0 sleep_class 0 0 0 4666 17
filter pppoe0 sleep_class 0 4666 0 0 17

# these ports are used for bulk traffic
filter pppoe0 sleep_class 0 0 0 6969 6
filter pppoe0 sleep_class 0 6969 0 0 6
filter pppoe0 sleep_class 0 0 0 6881 6
filter pppoe0 sleep_class 0 6881 0 0 6
filter pppoe0 sleep_class 0 0 0 6882 6
filter pppoe0 sleep_class 0 6882 0 0 6
filter pppoe0 sleep_class 0 0 0 6883 6
filter pppoe0 sleep_class 0 6883 0 0 6
filter pppoe0 sleep_class 0 0 0 6884 6
filter pppoe0 sleep_class 0 6884 0 0 6
filter pppoe0 sleep_class 0 0 0 6885 6
filter pppoe0 sleep_class 0 6885 0 0 6
filter pppoe0 sleep_class 0 0 0 6886 6
filter pppoe0 sleep_class 0 6886 0 0 6
filter pppoe0 sleep_class 0 0 0 6887 6
filter pppoe0 sleep_class 0 6887 0 0 6
filter pppoe0 sleep_class 0 0 0 6888 6
filter pppoe0 sleep_class 0 6888 0 0 6
filter pppoe0 sleep_class 0 0 0 6889 6
filter pppoe0 sleep_class 0 6889 0 0 6


# eof



   -- Sebastian Prause