2005. jĂșlius 20. 02:29, "Martin G.H. Minkler" <[EMAIL PROTECTED]> -> [email protected],: > LeVA wrote: > > Yes, unfortunately we have to use an external D-LINK router, instead of a > > linux based pc. That router does not have the capability to control > > bandwidth rates, that is why I have to do it on my machine. > > Mark the packets going to the router in iptables with something like > 'iptables -t mangle -A PREROUTING -i <interface> -d <ip_router> -j MARK > --set-mark 5' and just shape those... > > A quite powerful trafshap solution built into debian is HTB-queues, > documentation is good at the official page > http://luxik.cdi.cz/~devik/qos/htb/ > Hi!
I have this setup now: iptables -t mangle -A PREROUTING -d <router_ip_address> -j MARK --set-mark 1 tc qdisc add dev eth0 root handle 1:0 htb default 10 tc class add dev eth0 parent 1:0 classid 1:1 htb rate 128kbit tc class add dev eth0 parent 1:1 classid 1:10 htb rate 100mbit tc filter add dev eth0 protocol ip parent 1:0 prio 1 handle 1 fw classid 1:1 Now the 128kbit/sec restriction doesn't apply to the internet uploads (which are marked with iptables, because these are going thru the router), but the LAN uploads are at full speed. What am I doing wrong? Thanks! Daniel -- LeVA

