Skip to contentSkip to conversation

HTB and bursts

LARTC Pablo Fernandes Yahoo 2 participants 2 messages May 11, 2007 – May 12, 2007

lore
Share & tools
lore
#0 lore raw

Hey,

i saw a related question made by another user in this list, but i still do not understanding how to do it or each values put.

I have HTB "rules" in a ISP and i control for each customer this way:

Flush and 1:0 class

tc qdisc del dev eth0 root

tc qdisc add dev eth0 root handle 1:0 htb

tc class add dev eth0 parent 1:0 classid 1:1 htb rate 100mbit

tc qdisc del dev eth1 root

tc qdisc add dev eth1 root handle 1:0 htb

tc class add dev eth1 parent 1:0 classid 1:1 htb rate 100mbit

Upload and Download: user1

tc class add dev eth0 parent 1:1 classid 1:5 htb rate 150kbit ceil 150kbit

tc qdisc add dev eth0 parent 1:5 handle 5: sfq perturb 10

tc class add dev eth1 parent 1:1 classid 1:5 htb rate 50kbit ceil 50kbit

tc qdisc add dev eth1 parent 1:5 handle 5: sfq perturb 10

iptables -t mangle -A POSTROUTING --dest x.x.x.x -o eth0 -j CLASSIFY --set-class 1:5

iptables -t mangle -A FORWARD --src x.x.x.x -o eth1 -j CLASSIFY --set-class 1:5

Upload and Download: user2

tc class add dev eth0 parent 1:1 classid 1:8 htb rate 150kbit ceil 150kbit

tc qdisc add dev eth0 parent 1:8 handle 8: sfq perturb 10

tc class add dev eth1 parent 1:1 classid 1:8 htb rate 50kbit ceil 50kbit

tc qdisc add dev eth1 parent 1:8 handle 8: sfq perturb 10

iptables -t mangle -A POSTROUTING --dest y.y.y.y -o eth0 -j CLASSIFY --set-class 1:8

iptables -t mangle -A FORWARD --src y.y.y.y -o eth1 -j CLASSIFY --set-class 1:8

(.)

I would like to have the customer using 150kbit stable in a download. But at the begining of the conection, i would like to have a 200kbit burst. This will help the navigation between web sites in internet, downloading the gifs and texts during the burst and then have just 150kbit (thinking in a big download, for example). Is it possible? We have more products (100kbit, 150kbit, 200kbit, 300kbit, 450kbit, 600kbit, 1mbit, 1,5mbit 2mbit.

Thank's any help in advance.

Pablo Fernandes

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#1 lore raw
Quoted 2 lines · Pablo Fernandes Yahoo

I would like to have the customer using 150kbit stable in a download. But at the begining of the conection, i would like to have a 200kbit burst.

Depends what you mean - burst is an amount of data not a bitrate. If you want them (using your setup) to have 25k of data unlimited rate then burst 25k cburst 25k should do it.

I think that if your class has a different ceil to rate then giving a burst but not cburst will give them burst bytes capped at ceil rate.

I haven't tested the exact behavior or read all recent posts yet.

Andy.

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc