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

Support for tables in ALTQ



Hello, I've been looking for this issue on the archive and Google but
I didn't find anything useful. Anyone has done any work with tables
and altq?
I'm working on a wireless ISP and we are currently shaping our users
with FreeBSD ipfw and pipes. I would like to migrate the server to
OpenBSD with PF to make the rules easier to understand using tables
for common rules (quite common in my configuration) but the problem is
that altq doesn't support tables like filtering does.
I would like to setup something like this:
altq on $iface_inet cbq bandwidth 1Gb queue { default_up, clientes_up }
altq on $iface_radio cbq bandwidth 1Gb queue { default_down, clientes_down }
queue default_up cbq(default)
queue clientes_up bandwidth 8Mb cbq { upload, bronze_up, prata_up,
ouro_up, diamante_up }
queue default_down cbq(default)
queue clientes_down bandwidth 8Mb cbq { download, bronze_down,
prata_down, ouro_down, diamante_down }
queue upload cbq(default)
queue bronze_up bandwidth 64Kb cbq
queue prata_up bandwidth 128Kb cbq
queue ouro_up bandwidth 256Kb cbq
queue diamante_up bandwidth 256Kb cbq
queue download cbq(default)
queue bronze_down bandwidth 64Kb cbq
queue prata_down bandwidth 256Kb cbq
queue ouro_down bandwidth 512Kb cbq
queue diamante_down bandwidth 1Mb cbq
And then apply a rule like this:
pass out on $iface_inet inet from <clientes_ouro> to any keep state
queue ouro_up
pass out on $iface_radio inet from any to <clientes_ouro> keep state
queue ouro_down
Actually this configuration make every client in <clientes_ouro> table
be inside the same queue "ouro_up" or "ouro_down", I would like to
have n queues based on "ouro_up" or "ouro_down" without having to
create every queue.
Is this possible with some modification in the actual code base or it
is a completly different approach? If it is possible without changing
too much code I would probably spend some time making this feature and
releasing it.
Thanks in advance.
Augusto