[LARTC] HTB prio question

2006-01-30 Thread Anton Glinkov
Hello

Is the prio specification in the htb class global or is it on a per class
basis? A simple example:

class 1:10 parent 1:
class 1:130 parent 1:10 prio 3

class 1:170 parent 1:10 prio 7
class 1:171 parent 1:170 prio 1
class 1:172 parent 1:170 prio 2

Which class will get excessive bandwidth first? 130 or 171/172?

Thanks.


___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] HTB prio question

2006-01-30 Thread Andreas Klauer
On Mon, Jan 30, 2006 at 02:35:36PM +0200, Anton Glinkov wrote:
 Is the prio specification in the htb class global or is it on a per class
 basis? A simple example:
 
 class 1:10 parent 1:
 class 1:130 parent 1:10 prio 3
 
 class 1:170 parent 1:10 prio 7
 class 1:171 parent 1:170 prio 1
 class 1:172 parent 1:170 prio 2
 
 Which class will get excessive bandwidth first? 130 or 171/172?

I haven't tested it, but from my understanding, it should be 1:130.

Children classes should not be able to borrow from the outside 
by themselves - they can only tell their parent to borrow for 
them, so it's 1:130 (prio 3) vs 1:170 (prio 7) here.

Regards
Andreas Klauer
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] HTB prio question

2004-08-18 Thread Michael Eck
Hi all.  I have a bridge running Linux 2.4.24 that I use as a
bandwidth manager on a broadband wireless network.  I'm using HTB and
SFQ to prioritize that share bandwidth on a per-cell basis.  My IP
tables rules divide the traffic based on IPand traffic type (using
layer-7 filter and ipp2p).  My goal is to make sure that p2p traffic
on the network doesn't sink all of the bandwidth and affect the
performance of high-priority commercial customers.  For the most part
it works very well, but I'm not getting the kind of prioritization I'm
expecting.  I'm not seeing p2p traffic go down on my graphs as
higher-priority traffic goes up.  Consequently, my high-priority
traffic suffers.  I am able to control the p2p but putting it into a
very small bitrate queue but would rather late the shaper do the work
based on priority.

What am I missing?  My rules are posted below.

Thanks,
Michael Eck

Sorry if these are a bit long


###
# Root qdisc
###

/sbin/tc qdisc add dev eth0 root handle 1: htb default 5


# Parent Classes

# The Entire Interface
/sbin/tc class add dev eth0 parent 1: classid 1:1 htb rate 102401kbit
ceil 102401kbit quantum 2

# Default Class
/sbin/tc class add dev eth0 parent 1:1 classid 1:5 htb rate 100864kbit
ceil 100864kbit prio 1 quantum 2
/sbin/tc qdisc add dev eth0 parent 1:5 handle 5: sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 5 fw
flowid 1:5

# Low Prio p2p class - This is only here for uses that get out of control
/sbin/tc class add dev eth0 parent 1:5 classid 1:53 htb rate 56kbit
ceil 56kbit prio 4 quantum 1501
/sbin/tc qdisc add dev eth0 parent 1:53 handle 5: sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 53
fw flowid 1:53

# Parent class for VL AU - Retel
/sbin/tc class add dev eth0 parent 1:1 classid 1:3 htb rate 1536kbit
ceil 1536kbit

# Zero Rate High Priority Class - seldom used
/sbin/tc class add dev eth0 parent 1:3 classid 1:30 htb rate 1kbit
ceil 1536kbit prio 1 quantum 1501 burst 1501 cburst 1501
/sbin/tc qdisc add dev eth0 parent 1:30 handle 30: sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 30
fw flowid 1:30

# Commercial Class for VL - Retel
/sbin/tc class add dev eth0 parent 1:3 classid 1:31 htb rate 1152kbit
ceil 1536kbit prio 2
/sbin/tc qdisc add dev eth0 parent 1:31 handle 31: sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 31
fw flowid 1:31

# Residential Class for VL - Retel
/sbin/tc class add dev eth0 parent 1:3 classid 1:32 htb rate 384kbit
ceil 1536kbit prio 3
/sbin/tc qdisc add dev eth0 parent 1:32 handle 32: sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 32
fw flowid 1:32

# Zero Rate Low Priority Class - VL - Retel - All p2p traffic for
this sector goes through here
/sbin/tc class add dev eth0 parent 1:3 classid 1:33 htb rate 1kbit
ceil 56kbit prio 4 quantum 1501 burst 1501 cburst 1501
/sbin/tc qdisc add dev eth0 parent 1:33 handle 33: sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 33
fw flowid 1:33

# Parent class for VL AU - WHOT
/sbin/tc class add dev eth0 parent 1:1 classid 1:4 htb rate 1536kbit
ceil 1536kbit

# Zero Rate High Priority Class
/sbin/tc class add dev eth0 parent 1:4 classid 1:40 htb rate 1kbit
ceil 1536kbit prio 1 quantum 1501 burst 1501 cburst 1501
/sbin/tc qdisc add dev eth0 parent 1:40 handle 40: sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 40
fw flowid 1:40

# Commercial Class for VL - WHOT
/sbin/tc class add dev eth0 parent 1:4 classid 1:41 htb rate 1152kbit
ceil 1536kbit prio 2
/sbin/tc qdisc add dev eth0 parent 1:41 handle 41: sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 41
fw flowid 1:41

# Residential Class for VL - WHOT
/sbin/tc class add dev eth0 parent 1:4 classid 1:42 htb rate 384kbit
ceil 1536kbit prio 3
/sbin/tc qdisc add dev eth0 parent 1:42 handle 42: sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 42
fw flowid 1:42

# Zerio Rate Low Priority Class - VL - WHOT Abusers All p2p traffic
for this sector goes through here
/sbin/tc class add dev eth0  parent 1:4 classid 1:43 htb rate 1kbit
ceil 56kbit prio 4 quantum 1501 burst 1501 cburst 1501
/sbin/tc qdisc add dev eth0 parent 1:43 handle 43: sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 43
fw flowid 1:43

# Parent class for ChilAU
/sbin/tc class add dev eth0 parent 1:1 classid 1:6 htb rate 1536kbit
ceil 1536kbit

# Zero Rate High Priority Class -
/sbin/tc class add dev eth0 parent 1:6 classid 1:60 htb rate 1kbit
ceil 1536kbit prio 1 quantum 1501 burst 1501 cburst 1501
/sbin/tc qdisc add dev eth0 parent 1:60 handle 60: sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 60
fw flowid 1:60

# Commercial Class for ChilAU
/sbin/tc class add dev eth0 parent 1:6 classid 1:61 htb rate 1152kbit
ceil 1536kbit