You probably want to change your default class to 12. This will send
your all traffic not matched by the filter to your BE class. Right now
your sending it to 1:1 by default. Also your filters don''t look
correct. I would just filter based on the tos bit.
Example EF
Tc filter add dev $DEV parent 1:0 protocol ip u32 match ip tos 0xb8 0xff
flowid 1:10
Jon Flechsenhaar
Boeing WNW Team
Network Services
(714)-762-1231
202-E7
-----Original Message-----
From: Sandrine.MASSON@fr.thalesgroup.com
[mailto:Sandrine.MASSON@fr.thalesgroup.com]
Sent: Wednesday, February 28, 2007 9:07 AM
To: lartc@mailman.ds9a.nl
Subject: [LARTC] Data rate with HTB
Dear all,
I''m making a script to implement DiffServ policies with HTB. Here it is
:
if test $1 = "help" -o $1 = "h" -o $# != 5 then echo
"usage: ds.sh
<DEVICE> <DS_RATE> <EF_RATE> <AF_RATE>
<BE_RATE>"
exit
fi
DEV=$1
DS_RATE=$2
EF_RATE=$3
AF_RATE=$4
BE_RATE=$5
sync
tc qdisc del root dev $DEV
tc qdisc add dev $DEV root handle 1: htb default 1
tc class add dev $DEV parent 1: classid 1:1 htb rate $DS_RATE ceil
$DS_RATE tc class add dev $DEV parent 1:1 classid 1:10 htb rate $EF_RATE
ceil $DS_RATE tc class add dev $DEV parent 1:1 classid 1:11 htb rate
$AF_RATE ceil $DS_RATE tc class add dev $DEV parent 1:1 classid 1:12 htb
rate $BE_RATE ceil $DS_RATE
# --- EF 1:10
#tc filter add dev $DEV parent 1:0 protocol ip prio 1 handle 0x2e
tcindex classid 1:10 # --- AF class 1:11 #tc filter add dev $DEV parent
1:0 protocol ip prio 1 handle 0xa tcindex classid 1:11
My problem is that the data rate I''ve measured with generated high rate
BE traffic is not reduced to DS_RATE as I expected. The rate is well
limited when only the class 1:1 is defined. But when I change the script
to include classes 1:10, 1:11 and 1:12, the rate is not controlled
anymore.
If any idea, thanks in advance,
Sandrine
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc