queueing: give some BW to each addr (in a table)?

McLone mclone at gmail.com
Tue Jun 27 12:21:48 UTC 2006


Hello.

I work for small isp, and we want to make
customer plan look like this:

client A has N kbits/s while business day;
  he has N*2 kbits/s at night and weekends;
  and we guarantee to him minimum speed of N/2.

(we also buying our main uplink BW according to this formula)

We have many clients here, so i wanted to do it
on my freebsd6 router, with simple cron job switching
tables in PF, but pf doesn't support a thing like
"give EACH ip in that table N kbits/s".

So i thought i will be able to do it using anchors for
pass rules AND for queues (many subqueues,
every client has one). But, unfortunately,  PF in
freebsd6.1 and in openbsd3.9 does not support
anchors in queue declarations (i looked at man page).

So i have one option now - write some pf.conf
preprocessor, with soem frontend to edit it.

Also i have two feature suggestions (i'd be happy
to see just one of them implemented):

a) make pf+altq able to do things like
=============== >8 =====
table <cli512> persist {
  ip-one;  ip-two;
...
queue int_cli512 bandwidth 8192Kb priority 2 \
  cbq(ecn rio each=512Kb)
...
pass out quick on $int_if  to <cli512> keep state \
    queue int_cli512
===== 8< ===============

b) make anchors work also for queues, not only
   for rdr, nat and filtering rules

p.s. i used cbq in example, but i need hfsc here, so
if someone has a good documentation on hfsc,
please let me know where i can find it.
(i grok some hfsc only with this list archive's help)

Also, i may be on totally wrong way, and things i need
can be done in some other way i missed?...
-- 
wbr,                        |\      _,,,---,,_           dog bless ya!
`                       Zzz /,`.-'`'    -.  ;-;;,_
McLone at GMail dot com    |,4-  ) )-,_. ,\ (  `'-'
, net- and *BSD admin     '---''(_/--'  `-'\_)   ...translit rawx


More information about the freebsd-pf mailing list