I'm a bit confused coz of the following script i wrote. i build up a
server-router-client model to check the script. i configured no ingress but
the script limits the bandwidth to about 250 kbyte/s.
all the time i'm getting wrong bandwidth limits.
anyone an idea what the problem could be ? maybe something wrong with the
script or maybe not enough power of the hardware (P2 300MHz; 128 MB RAM) ?
#################################### #!/bin/bash
DOWNLINK=2000 UPLINK=2000 DEV=eth0 if [ "$1" = "status"
] then tc -s qdisc ls dev $DEV tc -s class ls dev
$DEV exit fi tc qdisc del dev $DEV root 2> /dev/null >
/dev/null tc qdisc del dev $DEV ingress 2> /dev/null > /dev/null if
[ "$1" = "stop" ] then exit fi tc qdisc add dev $DEV root handle 1:
cbq avpkt 1000 bandwidth 100mbit cell 8 tc class add dev $DEV parent 1:
classid 1:1 cbq bandwidth 100mbit \ rate 2000kbit allot 1500 prio 3
bounded tc class add dev $DEV parent 1:1 classid 1:3 cbq rate 2000kbit
\ allot 1600 prio 1 avpkt 1000 tc class add dev $DEV parent 1:1 classid
1:4 cbq rate 2000kbit \ allot 1600 prio 1 avpkt 1000 tc filter add dev
$DEV parent 1: protocol ip prio 2 u32 \ match ip src 62.8.206.0/25 flowid
1:3 tc filter add dev $DEV parent 1: protocol ip prio 2 u32 \ match ip src
62.8.206.160/27 flowid 1:3 tc filter add dev $DEV parent 1: protocol ip prio
2 u32 \ match ip src 62.8.206.192/26 flowid 1:3 tc filter add dev $DEV
parent 1: protocol ip prio 2 u32 \ match ip src 192.168.200.0/24 flowid
1:4 exit #################################
thx
Michael
|