wfq scripts needed help

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
hai all

i need to implement CBWFQ in linux

As i wrote script in edge as:
which mark the EF traffic
____________________________________________________________________-__
#!/bin/sh

DEV=eth0


tc qdisc add dev $DEV handle 1: root dsmark indices 8

tc class change dev $DEV classid 1:1 dsmark mask 0x3 value 0xb8


# making two filters
tc filter add dev $DEV parent 1:0 prio 4 protocol ip u32
tc filter add dev $DEV parent 1:0 prio 4 handle 2: protocol ip u32 \ divisor 1


#  adding conditions to filter
tc filter add dev $DEV protocol ip parent 1:0 prio 4 u32 match ip \ 
    sport 80 0xffff ht 2:0 match ip dst 192.168.3.2 \
    police rate  5mbps burst 800K drop flowid 1:1

tc filter add dev $DEV protocol ip parent 1:0 prio 4 u32 ht 800:: \
  match ip dst 192.168.0.0/16 hashkey mask 0x0000ffff at 16 \
  link 2:

----------------------------------------------------------------------


And for the CORE routes the WFQ is implemented like this

#!/bin/sh

$what=_ _ _ _
$what1=_ _ _ _
$what2=_ _ _ _

#  setting the qdisc
tc qdisc add dev eth0 handle 1:0 root dsmark indices 8

set_tc_index

#  setting the tcindex filter
tc filter add dev eth0 parent 1:0 protocol ip prio 1 tcindex \
    mask 0xfc shift 2

#  adding WFQ
tc qdisc add dev eth0 parent 1:0 handle 2:0 wfq $what ifspeed \
    10485760

#  creating WFQ classes....
tc class add dev eth0 parent 2:0  classid 2:1 wfq $what1
tc class add dev eth0 parent 2:0  classid 2:2 wfq $what2

#  adding filter
tc filter add dev eth0 parent 2:0 protocol ip prio 2 handle 0x2e \
    tcindex classid 2:1 pass_on
tc filter add dev eth0 parent 2:0 protocol ip prio 7 handle 0x00 \
    tcindex classid 2:2 pass_on

----------------------------------------------------------------------
DO any body knows which weights ($what,$what1,$what2) to

give, so that marked EF traffic will get a bandwidth of 10%

of total Bw 100Mbps
-------------------------------------------------------------

-------------------------------
Is this correct or whether i need to change it Please help

please help

*********
*Sunil*
*********

_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux