pisales ze podobnie zrobiles w host_htb_up wiec mowa o upload Ale... skoro stworzyles nowa klase i wszystko co "siec<>user" wpada do niej to po co shape'owac upload z sieci do usera skoro wiadomo ze zaden user nie wysle danych wiecej niz ma swoj limit z taryfy???
Jasne oczywiście z uploadu zrezygnowałem szkoda dodawać roboty dla TC.
mam teraz tak:
$IPT -t mangle -A LIMITSTC -s 10.1.1.102 -j MARK --set-mark 101 $IPT -t mangle -A LIMITSTC -d 10.1.1.102 -j MARK --set-mark 101 $TC class add dev $WAN parent 2:1 classid 2:101 htb rate 32kbit ceil 512.00kbit $BURST prio 2 quantum 1500 $TC qdisc add dev $WAN parent 2:101 sfq perturb 10 $TC filter add dev $WAN parent 2:0 protocol ip prio 5 handle 101 fw flowid 2:101
$TC class add dev $LAN parent 1:2 classid 1:101 htb rate 64kbit ceil 512.00kbit $BURST prio 2 quantum 1500 $TC qdisc add dev $LAN parent 1:101 sfq perturb 10 $TC filter add dev $LAN parent 1:0 protocol ip prio 5 handle 101 fw flowid 1:101
$TC class add dev $LAN parent 1:3 classid 1:9101 htb rate 128kbit ceil 512.00kbit $BURST prio 2 quantum 1500 $TC qdisc add dev $LAN parent 1:9101 sfq perturb 10 $TC filter add dev $LAN parent 1:0 protocol ip prio 5 u32 match ip src 10.1.0.0/22 flowid 1:9101
w begin mam:
$IPT -t mangle -N LIMITSTC $IPT -t mangle -I FORWARD -i $WAN -j LIMITSTC $IPT -t mangle -I FORWARD -o $WAN -j LIMITSTC # incomming traffic $IPT -t mangle -A OUTPUT -j MARK --set-mark 1 $TC qdisc add dev $LAN root handle 1:0 htb default 3 r2q 1 $TC class add dev $LAN parent 1:0 classid 1:1 htb rate 99000kbit ceil 99000kbit quantum 1500 $TC class add dev $LAN parent 1:1 classid 1:2 htb rate 8192kbit ceil 8192kbit $TC class add dev $LAN parent 1:1 classid 1:3 htb rate 98500kbit ceil 98500kbit quantum 1500 $TC qdisc add dev $LAN parent 1:3 sfq perturb 10 # priorities for ICMP, TOS 0x10 and ports 22 and 53 $TC class add dev $LAN parent 1:2 classid 1:20 htb rate 4096kbit ceil 4096kbit $BURST prio 1 quantum 1500 $TC qdisc add dev $LAN parent 1:20 sfq perturb 10 $TC filter add dev $LAN parent 1:0 protocol ip prio 2 u32 match ip sport 25 0xffff flowid 1:20 $TC filter add dev $LAN parent 1:0 protocol ip prio 2 u32 match ip sport 53 0xffff flowid 1:20 $TC filter add dev $LAN parent 1:0 protocol ip prio 2 u32 match ip sport 110 0xffff flowid 1:20 $TC filter add dev $LAN parent 1:0 protocol ip prio 2 u32 match ip src 213.134.138.181/32 flowid 1:20 $TC filter add dev $LAN parent 1:0 protocol ip prio 2 u32 match ip src 212.191.227.115/32 flowid 1:20 $TC filter add dev $LAN parent 1:0 protocol ip prio 1 u32 match ip tos 0x10 0xff flowid 1:20 $TC filter add dev $LAN parent 1:0 protocol ip prio 1 u32 match ip protocol 1 0xff flowid 1:20 # serwer -> LAN $TC filter add dev $LAN parent 1:0 protocol ip prio 4 handle 1 fw flowid 1:3
...
i niestety po wywołaniu skryptu mam błędy:
RTNETLINK answers: Invalid argument RTNETLINK answers: Invalid argument RTNETLINK answers: Invalid argument
siędze nad tym od godziny i nie wiem w czym jest kłopot
KL