On Thursday 28 February 2002 04:25, Ben wrote: > Hey all. I'm trying to set up QoS using the HTB qdisc in a very basic > setup, but it the example shown in the howto doesn't seem to be working= =2E > While the packets show up in the correct classes, they appear to be > completely ignoring the rates, meaning nothing gets shaped. > > My setup is that I've got a a bunch of machines behind my firewall/rout= er: > > > 1.2.3.1 +----------------------------+ 10.0.0.1 > 1.2.3.2 -----+eth0 firewall/router eth1+--- 10.0.0.2 > 1.2.3.3 +----------------------------+ 10.0.0.3 > > > 10.0.0.1 is nat'd to 1.2.3.1, 10.0.0.2 to 1.2.3.2, etc. eth0 is attache= d > to a 768Kbit DSL line, and eth1 to a 100Mb ethernet. > > I want to limit the output of 10.0.0.1, but let it borrow from everybod= y > else's bandwidth when the bandwidth would go unused. HTB seems ideal fo= r > this, and the TC stuff is pretty much identical to the basic one in the > howto: > > tc qdisc add dev eth0 handle 1: root htb default 11 > > tc class add dev eth0 parent 1: classid 1:1 htb rate 768kbit ceil 768kb= it > burst 15k tc class add dev eth0 parent 1:1 classid 1:10 htb rate 160kbi= t > ceil 768kbit burst 15k tc class add dev eth0 parent 1:1 classid 1:11 ht= b > rate 608kbit ceil 768kbit burst 15k > > tc qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10 > tc qdisc add dev eth0 parent 1:11 handle 10: sfq perturb 10 You use twice handle 10:. Typo ? > > tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip src > 1.2.3.1 flowid 1:10 > > > When I start sucking a lot of data from 10.0.0.1 and 10.0.0.2 from outs= ide > the firewall, the packets end up in the correct classes (judging by tc = -s > -d show dev eth0). But they also are processed at equal rates, not at t= he > 160:608 ratio I've specified. Do you use the full 768kbit ? When you do tc -s -d class show dev eth0, do you see any packets in class= =20 1:11?=20 Or better, post the output of that command. Stef --=20 stef.coene@docum.org More QOS info : http://www.docum.org/ Title : "Using Linux as bandwidth manager"