Skip to contentSkip to conversation

Bandwidth limiting on HTB.

LARTC [email protected] 2 participants 2 messages Mar 3, 2003 – Mar 8, 2003

lore
Share & tools
lore
#0 lore raw

Hi, I've got a problem with HTB bandwidth limiting. I've read many docs and manuals and I still don't know what is wrong. I've got an internet connection on ppp0. I'm trying to set some limits on it, but it doesn't work. Now, I'm trying to set almost the easiest configuration I can imagine:

tc qdisc add dev ppp0 root handle 1: htb default 10 r2q 1

tc class add dev ppp0 parent 1: classid 1:1 htb rate 10kbps ceil 10kbps tc class add dev ppp0 parent 1:1 classid 1:10 htb prio 3 rate 5kbps ceil 5kbps
tc class add dev ppp0 parent 1:1 classid 1:20 htb prio 3 rate 5kbps ceil 5kbps

tc qdisc add dev ppp0 parent 1:10 handle 110: sfq perturb 10 tc qdisc add dev ppp0 parent 1:20 handle 120: sfq perturb 10

(I didn't attach filters and ingress qdisc)

I just want to divide my 10kbps bandwidth into two groups each 5kbps. In fact it doesn't work - when I use wget I download with 10kbps and I can't see my download in tc -s -d qdisc nor in tc -s -d class ls dev ppp0. The counters don't count like they should - in fact only ingress counts correctly. What can be wrong? I compiled kernel 2.4.20 with all QoS options (modules where possible) and I downloaded htb3.6-020525.tgz from Martin Devera's site.

Thanks in advance,
Krzysztof Urbanski

Signature · 11 lines
Krzysztof Urbanski
[email protected]
[email protected]





_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#1 lore raw
Quoted 19 lines · On Monday 03 March 2003 21:41, [email protected] wrote:

Hi, I've got a problem with HTB bandwidth limiting. I've read many docs and manuals and I still don't know what is wrong. I've got an internet connection on ppp0. I'm trying to set some limits on it, but it doesn't work. Now, I'm trying to set almost the easiest configuration I can imagine:

tc qdisc add dev ppp0 root handle 1: htb default 10 r2q 1

tc class add dev ppp0 parent 1: classid 1:1 htb rate 10kbps ceil 10kbps tc class add dev ppp0 parent 1:1 classid 1:10 htb prio 3 rate 5kbps ceil 5kbps
tc class add dev ppp0 parent 1:1 classid 1:20 htb prio 3 rate 5kbps ceil 5kbps

tc qdisc add dev ppp0 parent 1:10 handle 110: sfq perturb 10 tc qdisc add dev ppp0 parent 1:20 handle 120: sfq perturb 10

(I didn't attach filters and ingress qdisc)

Quoted 7 lines

I just want to divide my 10kbps bandwidth into two groups each 5kbps. In fact it doesn't work - when I use wget I download with 10kbps and I can't see my download in tc -s -d qdisc nor in tc -s -d class ls dev ppp0. The counters don't count like they should - in fact only ingress counts correctly. What can be wrong? I compiled kernel 2.4.20 with all QoS options (modules where possible) and I downloaded htb3.6-020525.tgz from Martin Devera's site.

You add the qdisc to the ppp0 device. So you throttle packets going to the internet. So you are not limiting your download but your upload.

Stef

Signature · 8 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/