From mboxrd@z Thu Jan 1 00:00:00 1970 From: "wong cheongseng" Date: Sun, 29 Feb 2004 11:57:43 +0000 Subject: [LARTC] Testing system evironment...not working? Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org
hey, i wrote the qu= eue schedulling script for controlling the bandwidth use by FTP and HTTP.
I didnt get any error message when i execute the scri= p.
But when i setup the LAN to test the Qos gateway.
The Qos gateway not fuctionning...
If anyone read this script, please info me = where is the error. Thank you.
 
 

#!/bin/bash -x

DOW= NLINK=80000

UPL= INK=80000

DEV= 0=3D"eth0"

DEV= 1=3D"eth1"

if = [ "$1" =3D "status" ]

the= n

tc = -s qdisc ls dev $DEV0

tc = -s class ls dev $DEV0

tc = -s qdisc ls dev $DEV1

tc = -s class ls dev $DEV1

exi= t

fi<= /FONT>

#Re= move all previous queues

ech= o "deleting..."

tc = qdisc del dev $DEV0= root 2> /dev/null > /dev/null

tc = qdisc del dev $DEV1 root 2>= ; /dev/null > /dev/null

tc = class del dev $DEV0 ingress 2= > /dev/null > /dev/null

tc = class del dev $DEV1 ingress 2= > /dev/null > /dev/null

if = [ "$1" =3D "stop" ]

the= n

exi= t

fi<= /FONT>

#ad= d the root

ech= o "adding..."

tc = qdisc add dev $DEV0 root handle 1: htb default 30

tc = qdisc add dev $DEV1 root handle 2: htb default 30

tc = class add dev $DEV0 parent 1: classid 1:1 htb rate 100Mbit burst 256k

tc = class add dev $DEV1 parent 2: classid 2:2 htb rate 100Mbit burst 256k

 

#se= t up two classes attached to the root (download from server)

tc = class add dev $DEV0 parent 1:1 classid = 1:10 htb rate 10Mbit burst 256k

tc = class add dev $DEV0 parent 1:1 classid = 1:20 htb rate 90Mbit burst 256k

#se= t up two classes attached to the root (upload from client)

tc = class add dev $DEV1 parent 2:2 classid = 2:10 htb rate 10Mbit burst 256k

tc = class add dev $DEV1 parent 2:2 classid = 2:20 htb rate 90Mbit burst 256k

#ma= ke each of them use stochasitic fairness queueing (download from server)

tc = qdisc add dev $DEV0 parent 1:10 handle 10: sfq perturb 10

tc = qdisc add dev $DEV0 parent 1:20 handle 20: sfq perturb 10

#ma= ke each of them use stochasitic fairness queueing (upload from client)

tc = qdisc add dev $DEV1 parent 2:10 handle 10: sfq perturb 10

tc = qdisc add dev $DEV1 parent 2:20 handle 20: sfq perturb 10

#ad= d the layer7 filter to two of them (download from server)

tc = filter add dev $DEV0 protocol ip parent 1:0 prio 1 layer7 protocol ftp clas= sid 1:10

tc = filter add dev $DEV0 protocol ip parent 1:0 prio 1 layer7 protocol http cla= ssid 1:20

#ad= d the layer7 filter to two of them (download from server)

tc = filter add dev $DEV1 protocol ip parent 2:0 prio 2 layer7 protocol ftp clas= sid 2:10

tc = filter add dev $DEV1 protocol ip parent 2:0 prio 1 layer7 protocol http cla= ssid 2:20

if = [ "$1" =3D "stop" ]

the= n

exi= t

fi<= /FONT>

#sh= ow the result

ech= o "the ftp use 30% bandwidth http use 70% "

 

 And the figure below is my testing eviroment.   

=
        =
; PC1         =
;       &n=
bsp;            =
;            =
;    PC2 &=
nbsp;           &nbs=
p;                  &nbs=
p;           &nbs=
p;PC3
         eth0         &n=
bsp;      =
;      &
 nbsp;       eth0                     &nb=
sp;   eth1 &nbs=
p;            &=
nbsp;              eth0<=
/PRE>
<=
SPAN style=3D"mso-spacerun: yes">   192.168.1.0               <=
/SPAN>192.168.1.245    &=
nbsp;    192.168.2.245      &=
nbsp;        192.168.2.0        &nb=
sp;   
 
    FTP Server  &nb= sp;      =     Sub-netw= ork A    Sub-networ= k B  ;     Client
   Web-Server               =
            =
       Qos Tool     =
                   =
       
 ;Download tool   &n=
bsp;     
 
F=
TP-Server =3D Bullet Proof FTP Server v2.21  
Web-Server =3D TOMCAT Apache
Download tool =3D Net Tr=
ansfer
Qos=
 tool =3D Qos Layer 7 Packet filter
          &nbs=
p;            &=
nbsp;        The testing system enviro=
nment

 Isnt possible i succes to control the transfer r= ate of the application??

  


MSN 8 helps ELIM= INATE E-MAIL VIRUSES. Get 2 months FREE*. _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/