hi guys/gals, im trying to set up a sort of equally distributed limited bandwidth. i use the latest iproute2 package, and have decided to use HTB for the queuing.
i have used the tc binary provided by the HTB webside, and i have read their manual. however, im hitting the wall hard!
i've made a simple script, so i can have these rules every time the computer reboots.
here's the script:
Code:
#!/bin/sh
tc qdisc add dev eth1 root handle 1: htb default 100
tc class add dev eth1 parent 1: classid 1:1 htb rate 256kbps ceil 256kbps
tc class add dev eth1 parent 1:1 classid 1:10 htb rate 80kbps ceil 256kbps #may
tc class add dev eth1 parent 1:1 classid 1:20 htb rate 80kbps ceil 256kbps #sat
tc class add dev eth1 parent 1:1 classid 1:30 htb rate 80kbps ceil 256kbps #kap
tc class add dev eth1 parent 1:1 classid 1:40 htb rate 80kbps ceil 256kbps #xp1
tc class add dev eth1 parent 1:1 classid 1:50 htb rate 80kbps ceil 256kbps
#
tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10
tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10
tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10
tc qdisc add dev eth1 parent 1:40 handle 40: sfq perturb 10
tc qdisc add dev eth1 parent 1:50 handle 50: sfq perturb 10
#
U32="tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32"
$U32 match ip src 192.168.0.1 flowid 1:10
$U32 match ip src 192.168.0.2 flowid 1:20
$U32 match ip src 192.168.0.7 flowid 1:30
$U32 match ip src 192.168.0.6 flowid 1:40
now i've hard-copied everything from the lartc and htm howto/manual, only changing the desired numbers.
well it bombs on the last 4 commands, telling me this:
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
what am i missing here? how can i fix it? without the filters there's not much use for traffic shaping now is there
plz help me
