qdisc unbounding question
Hello,
I'm trying to setup a linux box as follows:
<---- 170kbs 170kbs ------------>
if Dest. = 10.10.20.97 if Dest. = 10.10.30.3
(classid=170) (classid=171)
|------| |------
| eth0 | |eth1 |
| |-----| |
-------- -------
<------30kbs 30kbs --------------->
if Dest. = 10.10.20.95 if Dest. = 10.10.30.2
(classid=30) (classid=31)Brief synopsis:
basically what I have outlined above works fine. The problem that I'm having is
when I'm NOT experiencing any traffic on #170, then #30 is NOT able to inherit any excess bandwidth.
Any ideas where to start?
Also, what I'm trying to do here, is intentionally throttle down the the total bandwidth to 200kbs.
Anyone have any pointers here?
Here is what I have below:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tc qdisc add dev eth0 root handle 1:0 cbq bandwidth 200Kbit avpkt 1000 cell 8
tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 200Kbit rate 200Kbit weight 20Kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000
tc qdisc add dev eth1 root handle 1:0 cbq bandwidth 200Kbit avpkt 1000 cell 8
tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 200Kbit rate 200Kbit weight 20Kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000
tc class add dev eth0 parent 1:1 classid 1:170 cbq bandwidth 200Kbit rate 170Kbit weight 17Kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000
tc qdisc add dev eth0 parent 1:170 tbf rate 170Kbit buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst 10.10.20.97 flowid 1:170
tc class add dev eth1 parent 1:1 classid 1:171 cbq bandwidth 200Kbit rate 170Kbit weight 17Kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000
tc qdisc add dev eth1 parent 1:171 tbf rate 170Kbit buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst 10.10.30.3 flowid 1:171
tc class add dev eth0 parent 1:170 classid 1:30 cbq bandwidth 200Kbit rate 30Kbit weight 3Kbit prio 6 allot 1514 cell 8 maxburst 20 avpkt 1000 tc qdisc add dev eth0 parent 1:30 tbf rate 30Kbit buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst 10.10.20.95 flowid 1:30
tc class add dev eth1 parent 1:171 classid 1:31 cbq bandwidth 200Kbit rate 30Kbit weight 3Kbit prio 6 allot 1514 cell 8 maxburst 20 avpkt 1000 tc qdisc add dev eth1 parent 1:31 tbf rate 30Kbit buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst 10.10.30.2 flowid 1:31
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
Quoted 53 lines · Andy Pyles
I'm trying to setup a linux box as follows:
<---- 170kbs 170kbs ------------>
if Dest. = 10.10.20.97 if Dest. = 10.10.30.3 (classid0) (classid1) |------| |------ | eth0 | |eth1 | | |-----| | -------- ------- <------30kbs 30kbs ---------------> if Dest. = 10.10.20.95 if Dest. = 10.10.30.2 (classid0) (classid1)Brief synopsis:
basically what I have outlined above works fine. The problem that I'm having is
when I'm NOT experiencing any traffic on #170, then #30 is NOT able to inherit any excess bandwidth.Here is what I have below:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tc qdisc add dev eth0 root handle 1:0 cbq bandwidth 200Kbit avpkt 1000 cell 8
tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 200Kbit rate 200Kbit weight 20Kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000tc qdisc add dev eth1 root handle 1:0 cbq bandwidth 200Kbit avpkt 1000 cell 8
tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 200Kbit rate 200Kbit weight 20Kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000tc class add dev eth0 parent 1:1 classid 1:170 cbq bandwidth 200Kbit rate 170Kbit weight 17Kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000
tc qdisc add dev eth0 parent 1:170 tbf rate 170Kbit buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst 10.10.20.97 flowid 1:170tc class add dev eth1 parent 1:1 classid 1:171 cbq bandwidth 200Kbit rate 170Kbit weight 17Kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000
tc qdisc add dev eth1 parent 1:171 tbf rate 170Kbit buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst 10.10.30.3 flowid 1:171
Quoted 2 lines
tc class add dev eth0 parent 1:170 classid 1:30 cbq bandwidth 200Kbit rate 30Kbit weight 3Kbit prio 6 allot 1514 cell 8 maxburst 20 avpkt 1000
Shouldn't the parent class be 1:1 instead of 1:170 ??
I believe in the current scheme, 1:170 is child from 1:1 and 1:30 a child from 1:170. I think you want both 1:170 as 1:30 to be children from 1:1.
Quoted 11 lines
tc qdisc add dev eth0 parent 1:30 tbf rate 30Kbit buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst 10.10.20.95 flowid 1:30tc class add dev eth1 parent 1:171 classid 1:31 cbq bandwidth 200Kbit rate 30Kbit weight 3Kbit prio 6 allot 1514 cell 8 maxburst 20 avpkt 1000 tc qdisc add dev eth1 parent 1:31 tbf rate 30Kbit buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst 10.10.30.2 flowid 1:31
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
Hi,
Quoted 8 lines
Quoted 2 lines
tc class add dev eth0 parent 1:170 classid 1:30 cbq bandwidth 200Kbit rate 30Kbit weight 3Kbit prio 6 allot 1514 cell 8 maxburst 20 avpkt 1000
Shouldn't the parent class be 1:1 instead of 1:170 ??
I believe in the current scheme, 1:170 is child from 1:1 and 1:30 a child from 1:170. I think you want both 1:170 as 1:30 to be children from 1:1.
I agree with this.
Also, shouldn't root qdisc 1:0 have full interface bandwidth? and then root class 1:1 have "bandwidth $TOTAL rate 200kbit bounded" ?
Something else, isn't it necesary to have a qdisc for each interface? Right now it's 1:0 for eth0 and 1:0 for eth1, I don't know if this works, I've always done it using (for example) 1:0 for eth0 and 2:0 for eth1.
If I'm off track please tell me =)
Cheers,
Rodrigo
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
Quoted 21 lines
-----Original Message-----
From: Rodrigo Goya [mailto:[email protected]]
Sent: Friday, June 01, 2001 9:55 AM
To: Linux Advanced Router & Traffic Control
Subject: Re: [LARTC] qdisc unbounding questionHi,
Quoted 1 line
Quoted 1 line
tc class add dev eth0 parent 1:170 classid 1:30 cbq
bandwidth 200Kbit
Quoted 1 line
Quoted 1 line
rate 30Kbit weight 3Kbit prio 6 allot 1514 cell 8
maxburst 20 avpkt 1000
Quoted 4 lines
Shouldn't the parent class be 1:1 instead of 1:170 ??
I believe in the current scheme, 1:170 is child from 1:1
and 1:30 a child
Quoted 1 line
from 1:170. I think you want both 1:170 as 1:30 to be
Quoted 8 lines
children from 1:1.
Quoted 1 line
I agree with this.
Also, shouldn't root qdisc 1:0 have full interface bandwidth? and then root
class 1:1 have "bandwidth $TOTAL rate 200kbit bounded" ?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
< I'm throwing in the diagram again in for clarity >
<---- 170kbs 170kbs ------------>
if Dest. = 10.10.20.97 if Dest. = 10.10.30.3
(classid=170) (classid=171)
|------| |------
| eth0 | |eth1 |
| |-----| |
-------- -------
<------30kbs 30kbs --------------->
if Dest. = 10.10.20.95 if Dest. = 10.10.30.2
(classid=30) (classid=31)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ok.. I guess I could implement this. However, as it is now, I am effectively keeping the
maximum bandwidth under 200kbs. So, I don't see a reason for it. Is there one?
Let me clarify, I have been able to determine, through testing, that these seperate classes are
indeed working. In other words, I am not able to exceed the bandwidth limitations set in their seperate classes.
I.e. no more than 170kbs with dest ip= 10.10.20.97 AND no more than 30kbs if dest. ip = 10.10.20.95.
Now, the only problem I'm having is having is to allow class 30 to borrow from it's parent class.
Quoted 8 lines
Something else, isn't it necesary to have a qdisc for each interface? Right now
it's 1:0 for eth0 and 1:0 for eth1, I don't know if this works, I've always
done it using (for example) 1:0 for eth0 and 2:0 for eth1.If I'm off track please tell me =)
Ok. This definetly makes sense. I set this up. so that there is a new qdisc classifier for each respective device
1:0 for eth0 2.0 for eth1
Unfortunately, I'm still back to square one. I Still can't seem to share between classes.
Heres the latest revised output:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~
tc qdisc add dev eth0 root handle 1:0 cbq bandwidth 200Kbit avpkt 1000 cell 8
tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 200Kbit rate 200Kbit weight 20Kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000
tc qdisc add dev eth1 root handle 2:0 cbq bandwidth 200Kbit avpkt 1000 cell 8
tc class add dev eth1 parent 2:0 classid 2:1 cbq bandwidth 200Kbit rate 200Kbit weight 20Kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000
tc class add dev eth0 parent 1:1 classid 1:170 cbq bandwidth 200Kbit rate 170Kbit weight 17Kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000
tc qdisc add dev eth0 parent 1:170 tbf rate 170Kbit buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst 10.10.20.97 flowid 1:170
tc class add dev eth1 parent 2:1 classid 2:171 cbq bandwidth 200Kbit rate 170Kbit weight 17Kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000
tc qdisc add dev eth1 parent 2:171 tbf rate 170Kbit buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth1 parent 2:0 protocol ip prio 100 u32 match ip dst 10.10.30.3 flowid 2:171
tc class add dev eth0 parent 1:1 classid 1:30 cbq bandwidth 200Kbit rate 30Kbit weight 3Kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000 tc qdisc add dev eth0 parent 1:30 tbf rate 30Kbit buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst 10.10.20.95 flowid 1:30
tc class add dev eth1 parent 2:1 classid 2:31 cbq bandwidth 200Kbit rate 30Kbit weight 3Kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000 tc qdisc add dev eth1 parent 2:31 tbf rate 30Kbit buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth1 parent 2:0 protocol ip prio 100 u32 match ip dst 10.10.30.2 flowid 2:31
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
Quoted 58 lines · Andy Pyles
Quoted 20 lines
-----Original Message-----
From: Rodrigo Goya [mailto:[email protected]]
Sent: Friday, June 01, 2001 9:55 AM
To: Linux Advanced Router & Traffic Control
Subject: Re: [LARTC] qdisc unbounding questionHi,
Quoted 1 line
Quoted 1 line
tc class add dev eth0 parent 1:170 classid 1:30 cbq
bandwidth 200Kbit
Quoted 1 line
Quoted 1 line
rate 30Kbit weight 3Kbit prio 6 allot 1514 cell 8
maxburst 20 avpkt 1000
Quoted 4 lines
Shouldn't the parent class be 1:1 instead of 1:170 ??
I believe in the current scheme, 1:170 is child from 1:1
and 1:30 a child
Quoted 1 line
from 1:170. I think you want both 1:170 as 1:30 to be
Quoted 8 lines
children from 1:1.
Quoted 1 line
I agree with this.
Also, shouldn't root qdisc 1:0 have full interface bandwidth? and then root
class 1:1 have "bandwidth $TOTAL rate 200kbit bounded" ?~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
< I'm throwing in the diagram again in for clarity ><---- 170kbs 170kbs ------------>
if Dest. = 10.10.20.97 if Dest. = 10.10.30.3 (classid0) (classid1) |------| |------ | eth0 | |eth1 | | |-----| | -------- ------- <------30kbs 30kbs ---------------> if Dest. = 10.10.20.95 if Dest. = 10.10.30.2 (classid0) (classid1)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ok.. I guess I could implement this. However, as it is now, I am effectively keeping the
maximum bandwidth under 200kbs. So, I don't see a reason for it. Is there one?Let me clarify, I have been able to determine, through testing, that these seperate classes are
indeed working. In other words, I am not able to exceed the bandwidth limitations set in their seperate classes.
I.e. no more than 170kbs with dest ip= 10.10.20.97 AND no more than 30kbs if dest. ip = 10.10.20.95.
Quoted 2 lines
Now, the only problem I'm having is having is to allow class 30 to borrow from it's parent class.
If you want to do this, follow the following scheme :
CBQ root qdisc 10: with BW = link BW (10Mbit)
CBQ BOUNDED class 10:1, parent 10: with BW = link BW and rate = 200
kbps
CBQ qdisc 20: on class 10:1 with BW = 200kbps
CBQ Class 20:170 with BW 200kbps and rate 170kbps, prio 3, no weight CBQ Class 20:30 with BW 200kbps and rate 30kbps, prio 3, no weight
Now class 20:170 and 20:30 will share the bandwidth and class 20:170 will get 170/200*100% of available bandwidth (200kbps).
There is only one problem. The bounded parameter on the class 10:1 will bound the class (and thus qdisc 20:0) in theory to 200 kbps BUT CBQ is very inaccurate. It will bound the traffic to 140kbps in stead of 200kbps. I'm still testing it, but you can find the first results on
http://users.belgacom.net/staf/qos/tests/cbq/bounded-accuracy.html. So if you try this, and the BW is 140kbps, it's working, don't blame me, it's CBQ that's not accurate.
Quoted 5 lines
Quoted 5 lines
Something else, isn't it necesary to have a qdisc for each interface? Right now
it's 1:0 for eth0 and 1:0 for eth1, I don't know if this works, I've always
done it using (for example) 1:0 for eth0 and 2:0 for eth1.
You may use the same number since the device is different
Signature · 8 lines
Stef More QOS info : http://users.belgacom.net/staf/ _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
Quoted 58 lines · Andy Pyles
Quoted 20 lines
-----Original Message-----
From: Rodrigo Goya [mailto:[email protected]]
Sent: Friday, June 01, 2001 9:55 AM
To: Linux Advanced Router & Traffic Control
Subject: Re: [LARTC] qdisc unbounding questionHi,
Quoted 1 line
Quoted 1 line
tc class add dev eth0 parent 1:170 classid 1:30 cbq
bandwidth 200Kbit
Quoted 1 line
Quoted 1 line
rate 30Kbit weight 3Kbit prio 6 allot 1514 cell 8
maxburst 20 avpkt 1000
Quoted 4 lines
Shouldn't the parent class be 1:1 instead of 1:170 ??
I believe in the current scheme, 1:170 is child from 1:1
and 1:30 a child
Quoted 1 line
from 1:170. I think you want both 1:170 as 1:30 to be
Quoted 8 lines
children from 1:1.
Quoted 1 line
I agree with this.
Also, shouldn't root qdisc 1:0 have full interface bandwidth? and then root
class 1:1 have "bandwidth $TOTAL rate 200kbit bounded" ?~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
< I'm throwing in the diagram again in for clarity ><---- 170kbs 170kbs ------------>
if Dest. = 10.10.20.97 if Dest. = 10.10.30.3 (classid0) (classid1) |------| |------ | eth0 | |eth1 | | |-----| | -------- ------- <------30kbs 30kbs ---------------> if Dest. = 10.10.20.95 if Dest. = 10.10.30.2 (classid0) (classid1)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ok.. I guess I could implement this. However, as it is now, I am effectively keeping the
maximum bandwidth under 200kbs. So, I don't see a reason for it. Is there one?Let me clarify, I have been able to determine, through testing, that these seperate classes are
indeed working. In other words, I am not able to exceed the bandwidth limitations set in their seperate classes.
I.e. no more than 170kbs with dest ip= 10.10.20.97 AND no more than 30kbs if dest. ip = 10.10.20.95.
Quoted 2 lines
Now, the only problem I'm having is having is to allow class 30 to borrow from it's parent class.
If you want to do this, follow the following scheme :
CBQ root qdisc 10: with BW = link BW (10Mbit)
CBQ BOUNDED class 10:1, parent 10: with BW = link BW and rate = 200
kbps
CBQ qdisc 20: on class 10:1 with BW = 200kbps
CBQ Class 20:170 with BW 200kbps and rate 170kbps, prio 3, no weight CBQ Class 20:30 with BW 200kbps and rate 30kbps, prio 3, no weight
Now class 20:170 and 20:30 will share the bandwidth and class 20:170 will get 170/200*100% of available bandwidth (200kbps).
There is only one problem. The bounded parameter on the class 10:1 will bound the class (and thus qdisc 20:0) in theory to 200 kbps BUT CBQ is very inaccurate. It will bound the traffic to 140kbps in stead of 200kbps. I'm still testing it, but you can find the first results on
http://users.belgacom.net/staf/qos/tests/cbq/bounded-accuracy.html. So if you try this, and the BW is 140kbps, it's working, don't blame me, it's CBQ that's not accurate.
Quoted 5 lines
Quoted 5 lines
Something else, isn't it necesary to have a qdisc for each interface? Right now
it's 1:0 for eth0 and 1:0 for eth1, I don't know if this works, I've always
done it using (for example) 1:0 for eth0 and 2:0 for eth1.
You may use the same number since the device is different
Signature · 9 lines
Stef More QOS info : http://users.belgacom.net/staf/ _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/