<html><div style=''background-color:''><DIV
class=RTE>hey, i wrote the queue schedulling script for controlling the
bandwidth use by FTP and HTTP.</DIV>
<DIV class=RTE>I didnt get any error message when i execute the
scrip.</DIV>
<DIV class=RTE>But when i setup the LAN to test the Qos gateway.
</DIV>
<DIV class=RTE>The Qos gateway not fuctionning...</DIV>
<DIV class=RTE>If anyone read this script, please info
me where is the error. Thank you.</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>
<P class=MsoBodyText style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 200%;
TEXT-AUTOSPACE: ideograph-numeric; mso-layout-grid-align: auto; mso-hyphenate:
none"><FONT face="Times New Roman" size=3>#!/bin/bash
-x</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>DOWNLINK=80000</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>UPLINK=80000</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>DEV0="eth0"</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>DEV1="eth1"</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>if [ "$1" = "status"
]</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>then</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>tc -s qdisc ls dev $DEV0</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>tc -s class ls dev $DEV0</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>tc -s qdisc ls dev $DEV1</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>tc -s class ls dev $DEV1</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>exit</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>fi</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>#Remove all previous queues</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>echo "deleting..."</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>tc qdisc <?xml:namespace prefix = st1 ns =
"urn:schemas-microsoft-com:office:smarttags"
/><st1:State><st1:place>del</st1:place></st1:State>
dev $DEV0 root 2> /dev/null > /dev/null</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>tc qdisc
<st1:State><st1:place>del</st1:place></st1:State> dev
$DEV1 root 2> /dev/null > /dev/null</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>tc class
<st1:State><st1:place>del</st1:place></st1:State> dev
$DEV0 ingress 2> /dev/null > /dev/null</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>tc class
<st1:State><st1:place>del</st1:place></st1:State> dev
$DEV1 ingress 2> /dev/null > /dev/null</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>if [ "$1" = "stop"
]</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>then</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>exit</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>fi</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>#add the root</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>echo "adding..."</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>tc qdisc add dev $DEV0 root handle 1: htb default
30</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>tc qdisc add dev $DEV1 root handle 2: htb default
30</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>tc class add dev $DEV0 parent 1: classid 1:1 htb rate
100Mbit burst 256k</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>tc class add dev $DEV1 parent 2: classid 2:2 htb rate
100Mbit burst 256k</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><?xml:namespace prefix = o ns =
"urn:schemas-microsoft-com:office:office" /><o:p><FONT
face="Times New Roman"
size=3> </FONT></o:p></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>#set up two classes attached to the root (download from
server)</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>tc class add dev $DEV0 parent 1:1 classid <st1:time
Hour="13" Minute="10">1:10</st1:time> htb rate
10Mbit burst 256k</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>tc class add dev $DEV0 parent 1:1 classid <st1:time
Hour="13" Minute="20">1:20</st1:time> htb rate
90Mbit burst 256k</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>#set up two classes attached to the root (upload from
client)</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>tc class add dev $DEV1 parent 2:2 classid <st1:time
Hour="14" Minute="10">2:10</st1:time> htb rate
10Mbit burst 256k</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>tc class add dev $DEV1 parent 2:2 classid <st1:time
Hour="14" Minute="20">2:20</st1:time> htb rate
90Mbit burst 256k</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>#make each of them use stochasitic fairness queueing
(download from server)</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>tc qdisc add dev $DEV0 parent <st1:time
Hour="13" Minute="10">1:10</st1:time> handle 10:
sfq perturb 10</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>tc qdisc add dev $DEV0 parent <st1:time
Hour="13" Minute="20">1:20</st1:time> handle 20:
sfq perturb 10</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>#make each of them use stochasitic fairness queueing
(upload from client)</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>tc qdisc add dev $DEV1 parent <st1:time
Hour="14" Minute="10">2:10</st1:time> handle 10:
sfq perturb 10</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>tc qdisc add dev $DEV1 parent <st1:time
Hour="14" Minute="20">2:20</st1:time> handle 20:
sfq perturb 10</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>#add the layer7 filter to two of them (download from
server)</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>tc filter add dev $DEV0 protocol ip parent 1:0 prio 1
layer7 protocol ftp classid 1:10</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>tc filter add dev $DEV0 protocol ip parent 1:0 prio 1
layer7 protocol http classid 1:20</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>#add the layer7 filter to two of them (download from
server)</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>tc filter add dev $DEV1 protocol ip parent 2:0 prio 2
layer7 protocol ftp classid 2:10</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>tc filter add dev $DEV1 protocol ip parent 2:0 prio 1
layer7 protocol http classid 2:20</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>if [ "$1" = "stop"
]</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>then</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>exit</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>fi</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>#show the result</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3>echo "the ftp use 30% bandwidth http use 70%
"</FONT></P>
<P style="MARGIN-BOTTOM: 0pt"><FONT face="Times New
Roman" size=3></FONT> </P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT:
200%"><SPAN style="mso-bidi-font-weight:
bold"><o:p><FONT face="Times New Roman"
size=3> And the figure below is my testing
eviroment.</FONT></o:p></SPAN><SPAN style="FONT-SIZE:
12pt; FONT-FAMILY: ''Times New Roman''"><SPAN
style="mso-spacerun: yes">
</SPAN><o:p></o:p></SPAN></P><PRE><SPAN
style="FONT-SIZE: 12pt; FONT-FAMILY: ''Times New
Roman''"><SPAN style="mso-spacerun:
yes"> </SPAN><B
style="mso-bidi-font-weight: normal">PC1</B><SPAN
style="mso-tab-count:
1">
</SPAN> <SPAN style="mso-tab-count:
1">
</SPAN><B style="mso-bidi-font-weight: normal"><SPAN
style="mso-spacerun: yes"> &
nbsp; </SPAN><SPAN
style="mso-spacerun: yes
"> </SPAN>PC2</B><SPAN
style="mso-tab-count:
2">
</SPAN><SPAN style="mso-spacerun:
yes">
</SPAN><SPAN style="mso-spacerun:
yes"> </SPAN><SPAN style="mso-spacerun:
yes"> </SPAN><B
style="mso-bidi-font-weight:
normal">PC3</B><o:p></o:p></SPAN></PRE><PRE><SPAN
style="FONT-SIZE: 12pt; FONT-FAMILY: ''Times New
Roman''"><SPAN style="mso-spacerun:
yes"> </SPAN><SPAN
style="mso-spacerun:
yes"> </SPAN>eth0<SPAN
style="mso-tab-count:
1">
</SPAN><SPAN style="mso-spacerun:
yes"> </SPAN><SPAN
style="mso-spacerun:
yes"> </SPAN><SPAN
style="mso-spacerun: yes">&
nbsp;</SPAN><SPAN style="mso-spacerun:
yes"> </SPAN><SPAN style="mso-spacerun:
yes"> </SPAN>eth0<SPAN
style="mso-tab-count:
1">
</SPAN><SPAN style="mso-spacerun:
yes"> </SPAN><SPAN
style="mso-spacerun:
yes"> </SPAN>eth1<SPAN
style="mso-tab-count:
2">
</SPAN> <SPAN style="mso-spacerun:
yes"> </SPAN>eth0<o:p></o:p></SPAN></PRE><PRE><SPAN
style="FONT-SIZE: 12pt; FONT-FAMILY: ''Times New
Roman''"><SPAN style="mso-spacerun:
yes"> </SPAN>192.168.1.0<SPAN
style="mso-spacerun:
yes">
</SPAN><SPAN style="mso
-spacerun:
yes"> </SPAN>192.168.1.245<SPAN
style="mso-t
ab-count: 1"> </SPAN><SPAN style="mso-spacerun:
yes">
</SPAN>192.168.2.245 <SPAN style="mso-spacerun:
yes"> </SPAN><SPAN style="mso-tab-count:
1">
</SPAN>192.168.2.0<SPAN style="mso-tab-count:
1">
</SPAN><o:p></o:p></SPAN></PRE><PRE><SPAN
style="FONT-SIZE: 12pt; FONT-FAMILY: ''Times New
Roman''"><o:p> </o:p></SPAN></PRE><PRE><SPAN
style="FONT-SIZE: 12pt; FONT-FAMILY: ''Times New
Roman''"><SPAN style="mso-spacerun:
yes"> </SPAN><B
style="mso-bidi-font-weight: normal">FTP Server<SPAN
style="mso-tab-count:
1">
</SPAN><SPAN style="mso-spacerun:
yes"> </SPAN><SPAN
style="mso-spacerun: yes"> </SPAN>Sub-network
A<SPAN style="mso-
spacerun: yes"> </SPAN>Sub-network
B<SPAN style="mso-tab-count: 1"> 
; </SPAN> <SPAN style="mso-spacerun:
yes"> </SPAN>Client
<o:p></o:p></B></SPAN></PRE><PRE><B
style="mso-bidi-font-weight: normal"><SPAN
style="FONT-SIZE: 12pt; FONT-FAMILY: ''Times New
Roman''"><SPAN style="mso-spacerun:
yes"> </SPAN>Web-Server<SPAN
style="mso-tab-count:
1">
</SPAN><SPAN style="mso-spacerun:
yes">
</SPAN><SPAN style="mso-tab-count: 1">
</SPAN><SPAN style="mso-spacerun:
yes"> </SPAN><SPAN
style="mso-spacerun: yes"> </SPAN><SPAN
style="mso-spacerun:
yes"> </SPAN>Qos
Tool <SPAN style="mso-tab-count: 1">
</SPAN><SPAN style="mso-tab-count:
1">
</SPAN><SPAN style="mso-sp
acerun:
yes">  
;</SPAN>Download tool</SPAN></B><SPAN
style="FONT-SIZE: 12pt; FONT-FAMILY: ''Times New
Roman''"><SPAN style="mso-tab-count:
1">
</SPAN><o:p></o:p></SPAN></PRE><PRE><SPAN
style="FONT-SIZE: 12pt; FONT-FAMILY: ''Times New
Roman''"><o:p> </o:p></SPAN></PRE><PRE><SPAN
style="FONT-SIZE: 12pt; FONT-FAMILY: ''Times New
Roman''"><o:p> </o:p></SPAN></PRE><PRE
style="LINE-HEIGHT: 200%"><SPAN style="FONT-SIZE: 12pt;
LINE-HEIGHT: 200%; FONT-FAMILY: ''Times New
Roman''">FTP-Server = </SPAN><SPAN
style="FONT-SIZE: 12pt; LINE-HEIGHT: 200%; FONT-FAMILY: ''Times New
Roman''; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight:
bold">Bullet Proof FTP Server v2.21</SPAN><B><SPAN
style="FONT-SIZE: 12pt; LINE-HEIGHT: 200%; mso-bidi-font-size:
10.0pt"> </SPAN></B><SPAN style="FONT-SIZE: 12pt;
LINE-HEIGHT: 200%; FONT-FAMILY: ''Times New
Roman''"><SPAN style="mso-space
run:
yes"> </SPAN><o:p></o:p></SPAN></PRE><PRE
style="LINE-HEIGHT: 200%"><SPAN style "FONT-SIZE: 12pt;
LINE-HEIGHT: 200%; FONT-FAMILY: ''Times New
Roman''">Web-Server = TOMCAT
Apache<o:p></o:p></SPAN></PRE><PRE
style="LINE-HEIGHT: 200%"><SPAN style="FONT-SIZE: 12pt;
LINE-HEIGHT: 200%; FONT-FAMILY: ''Times New
Roman''">Download tool = Net
Transfer<o:p></o:p></SPAN></PRE><PRE
style="LINE-HEIGHT: 200%"><SPAN style="FONT-SIZE: 12pt;
LINE-HEIGHT: 200%; FONT-FAMILY: ''Times New Roman''">Qos
tool = Qos Layer 7 Packet
filter<o:p></o:p></SPAN></PRE><PRE><SPAN
style="FONT-SIZE: 12pt; FONT-FAMILY: ''Times New
Roman''"><SPAN style="mso-tab-count:
2">
</SPAN> The testing system
environment<o:p></o:p></SPAN></PRE>
<P class=MsoNormal style="MARGIN: 0in 0in
0pt"><o:p><FONT face="Times New Roman"
size=3> Isnt possible i succes to control the transfer rate of the
application??</FONT></o:p></P> </DIV></div><br
clear=all><hr>MSN 8 helps <a
href="http://g.msn.com/8HMAEN/2752??PS=">ELIMINATE E-MAIL
VIRUSES.</a> Get 2 months FREE*.</html>
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/