My linux host has two 100M eth device, but I want to limit it's bandwidth to 1M for 
experiments.
Then allocate 150k to EF flow, 500k to best effort flow.
The script is fllowing:
-------------------------------------
 #/bin/sh

DEV="dev eth0"
echo $DEV
TC="/usr/src/redhat/SOURCES/iproute2-2.4.7src/iproute2/tc/tc"
$TC qdisc add $DEV handle 1:0 root dsmark indices 64 set_tc_index
$TC filter add $DEV parent 1:0 protocol ip prio 1 tcindex mask 0xfc shift 2
$TC qdisc add $DEV parent 1:0 handle 2:0 cbq bandwidth 1Mbit cell 8 avpkt 1000 mpu 64
$TC class add $DEV parent 2:0 classid 2:1 cbq bandwidth 1Mbit rate 150Kbit avpkt 500 
prio 1 bounded isolated allot 1514 weight 1 max
burst 10 
$TC qdisc add $DEV parent 2:1 pfifo limit 5
$TC filter add $DEV parent 2:0 protocol ip prio 1 handle 0x2e tcindex classid 2:1 
pass_on
#BE class(2:2) 
$TC class add $DEV parent 2:0 classid 2:2 cbq bandwidth 1Mbit rate 500Kbit avpkt 1000 
prio 7 allot 1514 weight 1 maxburst 21 borrow 
split 2:0 defmap 0xffff 
$TC qdisc add $DEV parent 2:2 red limit 10KB min 1KB max 8KB burst 4 avpkt 1000 
bandwidth 1Mbit probability 0.4
$TC filter add $DEV parent 2:0 protocol ip prio 2 handle 0 tcindex mask 0 classid 2:2 
pass_on
--------------------------------------------------------------

But I can download file from it with 40M speed. Why the limit    is invalid?

Please help me. Thanks.




_______________________________________________
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

Reply via email to