Skip to contentSkip to conversation

Out of IMQ interfaces

LARTC Alexander Trotsai 1 participant 1 message Jul 8, 2003

lore
Share & tools
lore
#0 lore raw

On Tue, Jul 08, 2003 at 12:50:26PM +0300, Hasso Tepper wrote:
HT>Alexander Trotsai wrote:
HT>> May you need mark packets with iptables and one IMQ device HT>> with htb queue
HT>> Something like
HT>> iptables -t mangle -A PREROUTING -i intf1 -j MARK --set-mark 1 HT>> .....
HT>> iptables -t mangle -A PREROUTING -i intfN -j MARK --set-mark N HT>> iptables -t mangle -A PREROUTING -j IMQ
HT>>
HT>> And to imq0 attach HTB qdisc with shaping according to mark HT>> value

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

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

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

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

Set mark equal to vlan number
Then If you need change rate tell tc class change classid <MAJOR>:<VLANID> rate <new rate>

Signature · 6 lines
Best regard, Aleksander Trotsai aka MAGE-RIPE aka MAGE-UANIC
My PGP key at ftp://blackhole.adamant.ua/pgp/trotsai.key[.asc]
Big trouble - clock speed
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/