All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Gred/dsmark/htb
@ 2006-01-10 16:50 comp.techs
  2006-01-12 21:43 ` Andy Furniss
  2006-01-18 16:49 ` comp.techs
  0 siblings, 2 replies; 3+ messages in thread
From: comp.techs @ 2006-01-10 16:50 UTC (permalink / raw)
  To: lartc

[-- Attachment #1: Type: text/plain, Size: 206 bytes --]

--===============1564587340==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C61605.E879613C"

This is a multi-part message in MIME format.

[-- Attachment #2: Type: text/plain, Size: 4323 bytes --]

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
 
 

 

[-- Attachment #3: Type: text/html, Size: 5728 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-01-18 16:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-10 16:50 [LARTC] Gred/dsmark/htb comp.techs
2006-01-12 21:43 ` Andy Furniss
2006-01-18 16:49 ` comp.techs

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.