From: "Pablo Fernandes Yahoo" Date: Fri, 11 May 2007 15:02:05 +0000 Subject: [LARTC] HTB and bursts Message-Id: <20070511190348.41B6D450A@outpost.ds9a.nl> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============0232568905==" List-Id: To: lartc@vger.kernel.org This is a multi-part message in MIME format. --===============0232568905== Content-Type: multipart/alternative; boundary="----=_NextPart_000_009C_01C793E5.BDF655E0" This is a multi-part message in MIME format. ------=_NextPart_000_009C_01C793E5.BDF655E0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 ------=_NextPart_000_009C_01C793E5.BDF655E0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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

 

------=_NextPart_000_009C_01C793E5.BDF655E0-- _______________________________________________________ Yahoo! Mail - Sempre a melhor opgco para vocj! Experimente ja e veja as novidades. http://br.yahoo.com/mailbeta/tudonovo/ --===============0232568905== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc --===============0232568905==-- _______________________________________________________ Yahoo! Mail - Sempre a melhor opgco para vocj! Experimente ja e veja as novidades. http://br.yahoo.com/mailbeta/tudonovo/