<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML DIR=ltr><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"></HEAD><BODY><DIV><FONT face='Arial' color=#000000 size=2>Hi, I am trying to get assured forwarding/expedited
forwarding with gred and htb working. Below is the script I am
using.</FONT></DIV>
<DIV><FONT face=Arial size=2>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?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Any suggestion appreciated.</FONT></DIV>
<DIV><FONT face=Arial size=2>thx jason</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#000000 size=2> 1. The DS field is
marked by iptables in prerouting/mangle to the appropriate class.</FONT></DIV>
<DIV><FONT face=Arial size=2> 2. DSMark masks the ds and copies ths
dscp to the tcindex field. </FONT></DIV>
<DIV><FONT face=Arial size=2> 3. filters are selected as per
what dscp there handle is.</FONT></DIV>
<DIV><FONT face=Arial size=2> 4. the minor of the filter is returned back
to the dsmark and copied to the tcindex</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> </FONT> #!/bin/sh</DIV>
<DIV>tc qdisc del dev eth0 root</DIV>
<DIV>tc qdisc add dev eth0 handle 1:0 root dsmark indices 16 set_tc_index</DIV>
<DIV>tc filter add dev eth0 parent 1:0 protocol ip prio 1 tcindex \<BR>mask 0xfc
shift 2 pass_on</DIV>
<DIV>#af class 1<BR>tc filter add dev eth0 parent 1:0 protocol ip prio 1
\<BR>handle 10 tcindex classid 1:11</DIV>
<DIV>tc filter add dev eth0 parent 1:0 protocol ip prio 1 \<BR>handle 12 tcindex
classid 1:12</DIV>
<DIV>tc filter add dev eth0 parent 1:0 protocol ip prio 1 \<BR>handle 14 tcindex
classid 1:13</DIV>
<DIV>#af class 2<BR>tc filter add dev eth0 parent 1:0 protocol ip prio 1
\<BR>handle 18 tcindex classid 1:8</DIV>
<DIV>tc filter add dev eth0 parent 1:0 protocol ip prio 1 \<BR>handle 20 tcindex
classid 1:9</DIV>
<DIV>tc filter add dev eth0 parent 1:0 protocol ip prio 1 \<BR>handle 22 tcindex
classid 1:10</DIV>
<DIV>#af class 3<BR>tc filter add dev eth0 parent 1:0 protocol ip prio 1
\<BR>handle 26 tcindex classid 1:5</DIV>
<DIV>tc filter add dev eth0 parent 1:0 protocol ip prio 1 \<BR>handle 28 tcindex
classid 1:6</DIV>
<DIV>tc filter add dev eth0 parent 1:0 protocol ip prio 1 \<BR>handle 30 tcindex
classid 1:7</DIV>
<DIV>#af class 4<BR>tc filter add dev eth0 parent 1:0 protocol ip prio 1
\<BR>handle 34 tcindex classid 1:2</DIV>
<DIV>tc filter add dev eth0 parent 1:0 protocol ip prio 1 \<BR>handle 36 tcindex
classid 1:3</DIV>
<DIV>tc filter add dev eth0 parent 1:0 protocol ip prio 1 \<BR>handle 38 tcindex
classid 1:4</DIV>
<DIV>#ef<BR>tc filter add dev eth0 parent 1:0 protocol ip prio 1 \<BR>handle 46
tcindex classid 1:1</DIV>
<DIV>#limit egress to 1Mbit<BR>tc qdisc add dev eth0 parent 1:0 handle 2:0
htb<BR>tc class add dev eth0 parent 2:0 classid 2:1 htb rate 1Mbit ceil
1Mbit</DIV>
<DIV><BR>#create 13 gred's<BR>tc qdisc add dev eth0 parent 2:1 gred setup DPs 13
default 13 grio</DIV>
<DIV>#ef<BR>tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000 max
32000 \<BR>avpkt 1000 burst 40 probability 0.01 bandwidth 1024 DP 1 prio 1</DIV>
<DIV>#af41<BR>tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000
max 32000 \<BR>avpkt 1000 burst 40 probability 0.04 bandwidth 1024 DP 2 prio
2</DIV>
<DIV>#af42<BR>tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000
max 32000 \<BR>avpkt 1000 burst 40 probability 0.06 bandwidth 1024 DP 3 prio
3</DIV>
<DIV>#af43<BR>tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000
max 32000 \<BR>avpkt 1000 burst 40 probability 0.02 bandwidth 1024 DP 4 prio
4</DIV>
<DIV>#af31<BR>tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000
max 32000 \<BR>avpkt 1000 burst 40 probability 0.04 bandwidth 1024 DP 5 prio
5</DIV>
<DIV>#af32<BR>tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000
max 32000 \<BR>avpkt 1000 burst 40 probability 0.06 bandwidth 1024 DP 6 prio
6</DIV>
<DIV>#af33<BR>tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000
max 32000 \<BR>avpkt 1000 burst 40 probability 0.02 bandwidth 1024 DP 7 prio
7</DIV>
<DIV>#af21<BR>tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000
max 32000 \<BR>avpkt 1000 burst 40 probability 0.04 bandwidth 1024 DP 8 prio
8</DIV>
<DIV>#af22<BR>tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000
max 32000 \<BR>avpkt 1000 burst 40 probability 0.06 bandwidth 1024 DP 9 prio
9</DIV>
<DIV>#af23<BR>tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000
max 32000 \<BR>avpkt 1000 burst 40 probability 0.02 bandwidth 1024 DP 10 prio
10</DIV>
<DIV>#af11<BR>tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000
max 32000 \<BR>avpkt 1000 burst 40 probability 0.04 bandwidth 1024 DP 11 prio
11</DIV>
<DIV>#af12<BR>tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000
max 32000 \<BR>avpkt 1000 burst 40 probability 0.06 bandwidth 1024 DP 12 prio
12</DIV>
<DIV>#af13<BR>tc qdisc change dev eth0 parent 2:1 gred limit 512000 min 24000
max 32000 \<BR>avpkt 1000 burst 40 probability 0.06 bandwidth 1024 DP 13 prio
13</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><BR> </DIV></BODY></HTML>