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

2006-06-28 Thread Travis H.

On 6/27/06, McLone [EMAIL PROTECTED] wrote:

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.


Yes, what you want is a list.


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


If you know python, check out dfd_keeper.

There is an OpenBSD port here:
http://www.lightconsulting.com/~travis/OpenBSD/

Basically you can, from a script that uses nc/netcat, add or delete
from a list relatively trivially.  It then renders the ruleset and
loads it into pf.  It looks intimidating at first but isn't really.
You have my permission to use it in your commercial environment.  Once
installed, you need to write a short python script; there is an
example in the dist (but it doesn't get installed by the port yet,
sorry).

If you have any further questions, or if you want [paid] help
implementing it, email me.
--
I sometimes have delusions of adequacy -- Woody Allen
Security guru for rent or hire - http://www.lightconsulting.com/~travis/ --
GPG fingerprint: 9D3F 395A DAC5 5CCC 9066  151D 0A6B 4098 0C55 1484


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

2006-06-27 Thread McLone

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