Traffic Prioritization and CBQ
Will Lotto
lotto@bssc.edu.au
Thu, 9 Aug 2001 09:51:04 +1000
This is a multi-part message in MIME format.
------=_NextPart_000_00B8_01C120B8.CE174F70
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
G'day,
I'm running CBQ on a linux router to limit our school bandwidth, and the =
ISP's bandwidth, and I've got a couple of questions...
First, if I turn 'Bounded' off, the classes don't seem to want to share =
bandwidth with their peers, or with their parent.
Second, I want to be able to set priorities with traffic, without =
setting a defined bandwidth to it. ... I have no idea where to start =
with this, any suggetions?
ie.
- Web server traffic to the world, priority 1
- Web REQUESTS (ISP to world port 80), priority 2
- ISP traffic, prioirty 3
- Internal office traffic, priority 4
... My classes are setup as follows:
# Root class, 10Mbit network
tc qdisc add dev eth0 root handle 1:0 cbq bandwidth 10Mbit avpkt 1000 =
cell 8
# Main parent class, takes up whole 10Mbit pipe
tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 10Mbit rate =
10Mbit weight 1Mbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000
# I dunno, cbq.init does this, another class taking up the whole 10Mbit =
pipe
tc class add dev eth0 parent 1:1 classid 1:101 cbq bandwidth 10Mbit rate =
10Mbit weight 1Mbit prio 1 allot 1514 cell 8 maxburst 20 avpkt 1000
# Setup a queue disciplin of tbf for the :101 class
tc qdisc add dev eth0 parent 1:101 tbf rate 10Mbit buffer 10Kb/8 limit =
15Kb mtu 1500
# Add a test class, 8kbit/s, parent :101 with TBF queueing
tc class add dev eth0 parent 1:101 classid 1:113 cbq bandwidth 10Mbit =
rate 8kbit weight 1kbit prio 1 allot 1514 cell 8 maxburst 20 avpkt 1000
tc qdisc add dev eth0 parent 1:113 tbf rate 8kbit buffer 10Kb/8 limit =
15Kb mtu 1500
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src =
myftpserver match ip dst myPC flowid 1:113
# Add a class for all ISP traffic, 500kbit/s, parent :101 with TBF =
queueing
tc class add dev eth0 parent 1:101 classid 1:119 cbq bandwidth 10Mbit =
rate 500kbit weight 50kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt =
1000
tc qdisc add dev eth0 parent 1:119 tbf rate 5000kbit buffer 10Kb/8 limit =
15Kb mtu 1500
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst =
TheISP flowid 1:119
... So there should be free bandwidth in the ISP class, and the parent =
class... by my PC *STILL* gets ftp traffic at 8kbit/s...=20
Any suggestions?
Will Lotto
Systems Administrator
Bendigo Senior Secondary College
------=_NextPart_000_00B8_01C120B8.CE174F70
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3315.2870" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>G'day,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>I'm running CBQ on a linux router to =
limit our=20
school bandwidth, and the ISP's bandwidth, and I've got a couple of=20
questions...</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>First, if I turn 'Bounded' off, the =
classes don't=20
seem to want to share bandwidth with their peers, or with their=20
parent.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Second, I want to be able to set =
priorities with=20
traffic, without setting a defined bandwidth to it. ... I have no idea =
where to=20
start with this, any suggetions?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>ie.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>- Web server traffic to the world, =
priority=20
1</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>- Web REQUESTS (ISP to world port 80), =
priority=20
2</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>- ISP traffic, prioirty 3</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>- Internal office traffic, priority =
4</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>... My classes are setup as =
follows:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2># Root class, 10Mbit =
network</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>tc qdisc add dev eth0 root handle 1:0 =
cbq bandwidth=20
10Mbit avpkt 1000 cell 8</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2># Main parent class, takes up whole =
10Mbit=20
pipe<BR>tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth =
10Mbit rate=20
10Mbit weight 1Mbit prio 8 allot 1514 cell 8 maxburst 20 avpkt =
1000</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2># I dunno, cbq.init does this, another =
class taking=20
up the whole 10Mbit pipe<BR>tc class add dev eth0 parent 1:1 classid =
1:101 cbq=20
bandwidth 10Mbit rate 10Mbit weight 1Mbit prio 1 allot 1514 cell 8 =
maxburst 20=20
avpkt 1000</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2># Setup a queue disciplin of tbf for =
the :101=20
class<BR>tc qdisc add dev eth0 parent 1:101 tbf rate 10Mbit buffer =
10Kb/8 limit=20
15Kb mtu 1500</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2># Add a test class, 8kbit/s, parent =
:101 with TBF=20
queueing<BR>tc class add dev eth0 parent 1:101 classid 1:113 cbq =
bandwidth=20
10Mbit rate 8kbit weight 1kbit prio 1 allot 1514 cell 8 maxburst 20 =
avpkt=20
1000</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>tc qdisc add dev eth0 parent 1:113 tbf =
rate 8kbit=20
buffer 10Kb/8 limit 15Kb mtu 1500</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>tc filter add dev eth0 parent 1:0 =
protocol ip prio=20
100 u32 match ip src <EM>myftpserver </EM>match ip dst <EM>myPC =
</EM>flowid=20
1:113</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2># Add a class for all ISP traffic, =
500kbit/s,=20
parent :101 with TBF queueing<BR>tc class add dev eth0 parent 1:101 =
classid=20
1:119 cbq bandwidth 10Mbit rate 500kbit weight 50kbit prio 5 allot 1514 =
cell 8=20
maxburst 20 avpkt 1000</FONT><FONT face=3DArial size=3D2><BR>tc qdisc =
add dev eth0=20
parent 1:119 tbf rate 5000kbit buffer 10Kb/8 limit 15Kb mtu =
1500</FONT><FONT=20
face=3DArial size=3D2><BR>tc filter add dev eth0 parent 1:0 protocol ip =
prio 100 u32=20
match ip dst <EM>TheISP</EM> flowid 1:119</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>... So there should be free bandwidth =
in the ISP=20
class, and the parent class... by my PC *STILL* gets ftp traffic at =
8kbit/s...=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Any suggestions?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Will Lotto</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Systems Administrator</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Bendigo Senior Secondary=20
College<BR></DIV></FONT></BODY></HTML>
------=_NextPart_000_00B8_01C120B8.CE174F70--