Re: [LARTC] tc+mrtg

2004-08-19 Thread Michael Eck
I can't seem to find tcrrd2.pl on the site.


On Fri, 23 Jul 2004 19:45:51 +0200, Stef Coene [EMAIL PROTECTED] wrote:
 On Tuesday 20 July 2004 07:43, Kristiadi Himawan wrote:
  I already use external script that fetch iptables mangle table from
  PREROUTING and POSTROUTING counter.
  But the traffic isn't really accurate, i found when there's bulk UDP
  traffic come to the shaper, my mrtg shown that
  the traffic shown bigger than allocated bandwidth for that class. So the
  question, it's possible to make script from tc command,
  that count bandwith acctually passing through the shaper.
 You can patch snmp so you can get the tc counters and process them in a custom
 script or use mrtg:
 http://www.docum.org/docum.org/tc-snmp/
 
 Stef
 
 --
 [EMAIL PROTECTED]
  Using Linux as bandwidth manager
  http://www.docum.org/
 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[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