Gred/dsmark/htb

Linux Advanced Routing and Traffic Control

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

 



Hi, I am trying to get assured forwarding/expedited forwarding with gred and htb working. Below is the script I am using.
The following steps are what I thing is how the script works. My problem is that if I remove the HTB qdisc from the script and have the GREDS parent as the dsmark it works, but when I add the htb as a parent of GRED and DSmark the parent of htb it does not work?
 
Any suggestion appreciated.
thx jason
 
 1. The DS field is marked by iptables in prerouting/mangle to the appropriate class.
 2. DSMark masks the ds and copies ths dscp to the tcindex field.
 3. filters are selected as per what dscp there handle is.
 4. the minor of the filter is returned back to the dsmark and copied to the tcindex
 
 
   #!/bin/sh
tc qdisc del dev eth0 root
tc qdisc add dev eth0 handle 1:0 root dsmark indices 16 set_tc_index
tc filter add dev eth0 parent 1:0 protocol ip prio 1 tcindex \
mask 0xfc shift 2 pass_on
#af class 1
tc filter add dev eth0 parent 1:0 protocol ip prio 1 \
handle 10 tcindex classid 1:11
tc filter add dev eth0 parent 1:0 protocol ip prio 1 \
handle 12 tcindex classid 1:12
tc filter add dev eth0 parent 1:0 protocol ip prio 1 \
handle 14 tcindex classid 1:13
#af class 2
tc filter add dev eth0 parent 1:0 protocol ip prio 1 \
handle 18 tcindex classid 1:8
tc filter add dev eth0 parent 1:0 protocol ip prio 1 \
handle 20 tcindex classid 1:9
tc filter add dev eth0 parent 1:0 protocol ip prio 1 \
handle 22 tcindex classid 1:10
#af class 3
tc filter add dev eth0 parent 1:0 protocol ip prio 1 \
handle 26 tcindex classid 1:5
tc filter add dev eth0 parent 1:0 protocol ip prio 1 \
handle 28 tcindex classid 1:6
tc filter add dev eth0 parent 1:0 protocol ip prio 1 \
handle 30 tcindex classid 1:7
#af class 4
tc filter add dev eth0 parent 1:0 protocol ip prio 1 \
handle 34 tcindex classid 1:2
tc filter add dev eth0 parent 1:0 protocol ip prio 1 \
handle 36 tcindex classid 1:3
tc filter add dev eth0 parent 1:0 protocol ip prio 1 \
handle 38 tcindex classid 1:4
#ef
tc filter add dev eth0 parent 1:0 protocol ip prio 1 \
handle 46 tcindex classid 1:1
#limit egress to 1Mbit
tc qdisc add dev eth0 parent 1:0 handle 2:0 htb
tc class add dev eth0 parent 2:0 classid 2:1 htb rate 1Mbit ceil 1Mbit

#create 13 gred's
tc qdisc add dev eth0 parent 2:1 gred setup DPs 13 default 13 grio
#ef
tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000 max 32000 \
avpkt 1000 burst 40 probability 0.01 bandwidth 1024 DP 1 prio 1
#af41
tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000 max 32000 \
avpkt 1000 burst 40 probability 0.04 bandwidth 1024 DP 2 prio 2
#af42
tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000 max 32000 \
avpkt 1000 burst 40 probability 0.06 bandwidth 1024 DP 3 prio 3
#af43
tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000 max 32000 \
avpkt 1000 burst 40 probability 0.02 bandwidth 1024 DP 4 prio 4
#af31
tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000 max 32000 \
avpkt 1000 burst 40 probability 0.04 bandwidth 1024 DP 5 prio 5
#af32
tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000 max 32000 \
avpkt 1000 burst 40 probability 0.06 bandwidth 1024 DP 6 prio 6
#af33
tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000 max 32000 \
avpkt 1000 burst 40 probability 0.02 bandwidth 1024 DP 7 prio 7
#af21
tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000 max 32000 \
avpkt 1000 burst 40 probability 0.04 bandwidth 1024 DP 8 prio 8
#af22
tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000 max 32000 \
avpkt 1000 burst 40 probability 0.06 bandwidth 1024 DP 9 prio 9
#af23
tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000 max 32000 \
avpkt 1000 burst 40 probability 0.02 bandwidth 1024 DP 10 prio 10
#af11
tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000 max 32000 \
avpkt 1000 burst 40 probability 0.04 bandwidth 1024 DP 11 prio 11
#af12
tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000 max 32000 \
avpkt 1000 burst 40 probability 0.06 bandwidth 1024 DP 12 prio 12
#af13
tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000 max 32000 \
avpkt 1000 burst 40 probability 0.06 bandwidth 1024 DP 13 prio 13
 
 

 
_______________________________________________
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