Re: Re: [LARTC] Out of IMQ interfaces

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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>

-- 
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


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux