Alexander Trotsai wrote:
> May you need mark packets with iptables and one IMQ device
> with htb queue
> Something like
> iptables -t mangle -A PREROUTING -i intf1 -j MARK --set-mark 1
> .....
> iptables -t mangle -A PREROUTING -i intfN -j MARK --set-mark N
> iptables -t mangle -A PREROUTING -j IMQ
>
> And to imq0 attach HTB qdisc with shaping according to mark
> value

Yes, I thought about it, but it will make management a lot more 
complicated. If I have to change rate on one vlan only? At the 
moment:

Up:
iptables -t mangle -A PREROUTING -i eth1.$d+ -j IMQ --todev $d
tc qdisc add dev eth1.$d root tbf rate ...
tc qdisc add dev imq$d root tbf rate ...
ip link set imq$d up

Down:
iptables -t mangle -D PREROUTING -i eth1.$d+ -j IMQ --todev $d
tc qdisc del dev eth1.$d root
tc qdisc del dev imq$d root
ip link set imq$d down

I made wrapper script, which takes device number and shaping 
parameters from command line. I can change shaping parameters on any 
vlan without affecting others.

regards,

-- 
Hasso Tepper
Elion Enterprises Ltd.
WAN administrator

_______________________________________________
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

Reply via email to