#--------------------------------------------
#WRT54 Script Generator v1.02
#(C) 2006-2007 Robert "Robson" Mytkowski
#--------------------------------------------
TCA="tc class add dev br0"
TFA="tc filter add dev br0"
TQA="tc qdisc add dev br0"
SFQ="sfq perturb 10"
tc qdisc del dev br0 root
tc qdisc add dev br0 root handle 1: htb
tc class add dev br0 parent 1: classid 1:1 htb rate 460kbit
$TCA parent 1:1 classid 1:10 htb rate 230kbit ceil 460kbit prio 2
$TCA parent 1:1 classid 1:11 htb rate 230kbit ceil 460kbit prio 2
$TQA parent 1:10 handle 10: $SFQ
$TQA parent 1:11 handle 11: $SFQ
$TFA parent 1:0 prio 2 protocol ip handle 10 fw flowid 1:10
$TFA parent 1:0 prio 2 protocol ip handle 11 fw flowid 1:11
iptables -t mangle -A POSTROUTING -d 192.168.1.4 -j MARK --set-mark 10
iptables -t mangle -A POSTROUTING -d 192.168.1.2 -j MARK --set-mark 11
TCAU="tc class add dev imq0"
TFAU="tc filter add dev imq0"
TQAU="tc qdisc add dev imq0"
modprobe imq
modprobe ipt_IMQ
ip link set imq0 up
tc qdisc del dev imq0 root
tc qdisc add dev imq0 root handle 1: htb
tc class add dev imq0 parent 1: classid 1:1 htb rate 230kbit
$TCAU parent 1:1 classid 1:10 htb rate 115kbit ceil 230kbit prio 2
$TCAU parent 1:1 classid 1:11 htb rate 115kbit ceil 230kbit prio 2
$TQAU parent 1:10 handle 10: $SFQ
$TQAU parent 1:11 handle 11: $SFQ
$TFAU parent 1:0 prio 2 protocol ip handle 10 fw flowid 1:10
$TFAU parent 1:0 prio 2 protocol ip handle 11 fw flowid 1:11
iptables -t mangle -A PREROUTING -s 192.168.1.4 -j MARK --set-mark 10
iptables -t mangle -A PREROUTING -s 192.168.1.2 -j MARK --set-mark 11
iptables -t mangle -A PREROUTING -j IMQ --todev 0
Zreszta chodzi mi tylko o to ze "bogiem" maja byc pakiety battlefielda a reszta moze sobie wtedy isc w cholere. Tzn. ma byc tak ze jak ja gram to nie wazne co kto robi na innym kompie - ja mam miec najnizsze pingi :)