From: "sunil r kumar" Date: Fri, 24 Jun 2005 12:50:17 +0000 Subject: [LARTC] wfq scripts needed help Message-Id: <20050624125017.27049.qmail@webmail9.rediffmail.com> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============1674254995==" List-Id: To: lartc@vger.kernel.org This is a multipart mime message --===============1674254995== Content-type: multipart/alternative; boundary="Next_1119617417---0-202.54.124.178-27042" This is a multipart mime message --Next_1119617417---0-202.54.124.178-27042 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =0Ahai all=0A=0Ai need to implement CBWFQ in linux=0A=0AAs i wrote script= in edge as:=0Awhich mark the EF traffic=0A________________________________= ____________________________________-__=0A#!/bin/sh=0A=0ADEV=3Deth0=0A=0A= =0Atc qdisc add dev $DEV handle 1: root dsmark indices 8=0A=0Atc class chan= ge dev $DEV classid 1:1 dsmark mask 0x3 value 0xb8=0A=0A=0A# making two fil= ters=0Atc filter add dev $DEV parent 1:0 prio 4 protocol ip u32=0Atc filter= add dev $DEV parent 1:0 prio 4 handle 2: protocol ip u32 \ divisor 1=0A=0A= =0A# adding conditions to filter=0Atc filter add dev $DEV protocol ip pare= nt 1:0 prio 4 u32 match ip \ =0A sport 80 0xffff ht 2:0 match ip dst 1= 92.168.3.2 \=0A police rate 5mbps burst 800K drop flowid 1:1=0A=0Atc fi= lter add dev $DEV protocol ip parent 1:0 prio 4 u32 ht 800:: \=0A match ip= dst 192.168.0.0/16 hashkey mask 0x0000ffff at 16 \=0A link 2:=0A=0A------= ----------------------------------------------------------------=0A=0A=0AAn= d for the CORE routes the WFQ is implemented like this=0A=0A#!/bin/sh=0A=0A= $what=3D_ _ _ _=0A$what1=3D_ _ _ _=0A$what2=3D_ _ _ _=0A=0A# setting the q= disc=0Atc qdisc add dev eth0 handle 1:0 root dsmark indices 8=0A=0Aset_tc_i= ndex=0A=0A# setting the tcindex filter=0Atc filter add dev eth0 parent 1:0= protocol ip prio 1 tcindex \=0A mask 0xfc shift 2=0A=0A# adding WFQ=0A= tc qdisc add dev eth0 parent 1:0 handle 2:0 wfq $what ifspeed \=0A 10485= 760=0A=0A# creating WFQ classes....=0Atc class add dev eth0 parent 2:0 cl= assid 2:1 wfq $what1=0Atc class add dev eth0 parent 2:0 classid 2:2 wfq $w= hat2=0A=0A# adding filter=0Atc filter add dev eth0 parent 2:0 protocol ip = prio 2 handle 0x2e \=0A tcindex classid 2:1 pass_on=0Atc filter add dev = eth0 parent 2:0 protocol ip prio 7 handle 0x00 \ =0A tcindex classid 2:2= pass_on=0A=0A-------------------------------------------------------------= ---------=0ADO any body knows which weights ($what,$what1,$what2) to=0A=0Ag= ive, so that marked EF traffic will get a bandwidth of 10%=0A=0Aof total Bw= 100Mbps=0A-------------------------------------------------------------=0A= =0A-------------------------------=0AIs this correct or whether i need to c= hange it Please help=0A=0Aplease help=0A=0A*********=0D=0A *Sunil*=0D=0A***= ****** --Next_1119617417---0-202.54.124.178-27042 Content-type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline

=0A 
=0Ahai all
=0A
=0Ai need to implement CBWFQ in linux=
=0A
=0AAs i wrote script in edge as:
=0Awhich mark the EF traffic=
=0A____________________________________________________________________= -__
=0A#!/bin/sh
=0A
=0ADEV=3Deth0
=0A
=0A
=0Atc qdisc ad= d dev $DEV handle 1: root dsmark indices 8
=0A
=0Atc class change dev= $DEV classid 1:1 dsmark mask 0x3 value 0xb8
=0A
=0A
=0A# making t= wo filters
=0Atc filter add dev $DEV parent 1:0 prio 4 protocol ip u32=0Atc filter add dev $DEV parent 1:0 prio 4 handle 2: protocol ip u32 \ d= ivisor 1
=0A
=0A
=0A#  adding conditions to filter
=0Atc f= ilter add dev $DEV protocol ip parent 1:0 prio 4 u32 match ip \ 
= =0A    sport 80 0xffff ht 2:0 match ip dst 192.168.3.2 \
=0A&n= bsp;   police rate  5mbps burst 800K drop flowid 1:1
=0A
= =0Atc filter add dev $DEV protocol ip parent 1:0 prio 4 u32 ht 800:: \
= =0A  match ip dst 192.168.0.0/16 hashkey mask 0x0000ffff at 16 \
= =0A  link 2:
=0A
=0A--------------------------------------------= --------------------------
=0A
=0A
=0AAnd for the CORE routes the = WFQ is implemented like this
=0A
=0A#!/bin/sh
=0A
=0A$what=3D_ = _ _ _
=0A$what1=3D_ _ _ _
=0A$what2=3D_ _ _ _
=0A
=0A#  se= tting the qdisc
=0Atc qdisc add dev eth0 handle 1:0 root dsmark indices = 8
=0A
=0Aset_tc_index
=0A
=0A#  setting the tcindex filter=
=0Atc filter add dev eth0 parent 1:0 protocol ip prio 1 tcindex \
= =0A    mask 0xfc shift 2
=0A
=0A#  adding WFQ
=0Atc= qdisc add dev eth0 parent 1:0 handle 2:0 wfq $what ifspeed \
=0A  =   10485760
=0A
=0A#  creating WFQ classes....
=0Atc clas= s add dev eth0 parent 2:0  classid 2:1 wfq $what1
=0Atc class add d= ev eth0 parent 2:0  classid 2:2 wfq $what2
=0A
=0A#  adding= filter
=0Atc filter add dev eth0 parent 2:0 protocol ip prio 2 handle 0= x2e \
=0A    tcindex classid 2:1 pass_on
=0Atc filter add d= ev eth0 parent 2:0 protocol ip prio 7 handle 0x00 \
=0A    tc= index classid 2:2 pass_on
=0A
=0A------------------------------------= ----------------------------------
=0ADO any body knows which weights ($= what,$what1,$what2) to
=0A
=0Agive, so that marked EF traffic will ge= t a bandwidth of 10%
=0A
=0Aof total Bw 100Mbps
=0A---------------= ----------------------------------------------
=0A
=0A---------------= ----------------
=0AIs this correct or whether i need to change it Pleas= e help
=0A
=0Aplease help=0A

=0A=0A=0A*********=0D
=0A *Sunil*= =0D
=0A*********

=0A=0A --Next_1119617417---0-202.54.124.178-27042-- --===============1674254995== 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 --===============1674254995==--