Re: Downloads limiting with PF

2006-01-23 Thread Maxim Vetsalo
On Monday 23 January 2006 00:36, you wrote:
 On 2006/01/23 00:23, Maxim Vetsalo wrote:
  Greate thanks for your answer, Marco! I had read it, but didn't find
  solution for my problem yet.

 You missed the pf.conf(5) section on service curves, then.
Yes, you are right. I missed it. Shame on me. A read about queueing in PF FAQ 
mostly and only look by one eye in man :-( 

It's not exactly what I need. But is close to it. I think some experiments 
will help to determine proper delay insted of transfer size.

Maxim.



Re: Downloads limiting with PF

2006-01-23 Thread Darrin Chandler

Maxim Vetsalo wrote:


On Monday 23 January 2006 00:36, you wrote:
 


On 2006/01/23 00:23, Maxim Vetsalo wrote:
   


Greate thanks for your answer, Marco! I had read it, but didn't find
solution for my problem yet.
 


You missed the pf.conf(5) section on service curves, then.
   

Yes, you are right. I missed it. Shame on me. A read about queueing in PF FAQ 
mostly and only look by one eye in man :-( 

It's not exactly what I need. But is close to it. I think some experiments 
will help to determine proper delay insted of transfer size.


Maxim.


 



A non-technical suggestion:

Keep in mind your *real* goals instead of focusing too closely on one 
particular solution. If I read it right, what you really want to do is 
give all users a fair share of bandwidth even when one or more of them 
is doing a large download. This is a very different goal from limiting 
bandwidth if too much data is transfered! It may be that the way you're 
planning works out to be the best solution for you, but it may not. 
Keeping your real goal in mind while reading the docs may open up a 
better solution.


--
Darrin Chandler|  Phoenix BSD Users Group
[EMAIL PROTECTED]   |  http://bsd.phoenix.az.us/
http://www.stilyagin.com/  |



Re: Downloads limiting with PF

2006-01-23 Thread Maxim Vetsalo
On Monday 23 January 2006 21:18, you wrote:
 A non-technical suggestion:

 Keep in mind your *real* goals instead of focusing too closely on one
 particular solution. 

Thanks!  This is extremly usefull advice! Now I understand that I need rethink 
my problem. And misc@ was *very* helpfull.

Thanks everybody, who answered me.

Maxim.



Re: Downloads limiting with PF

2006-01-22 Thread Marco Peereboom
http://www.openbsd.org/faq/pf/queueing.html
http://www.openbsd.org/cgi-bin/man.cgi?query=pf.confapropos=0sektion=0manpath=OpenBSD+Currentarch=i386format=html

That should get you started.

On Sat, Jan 21, 2006 at 11:27:50PM +0200, Maxim Vetsalo wrote:
 Hi
 
 Sorry for my english first :-( I try to explain my problem as clean as I can.
 I have internet connection with very low bandwidth and many users. Bandwidth 
 is enough if users don't download large files, but if only one of them start 
 to download, others must wait long time for any webpage (and it's 
 understandable :-)). I tried to limit size of downloadable object with Sqiud, 
 but users start to complain. Ideal solution for me in such situation seems 
 follow: when user start download it got full bandwidth untill some (fixed) 
 limit in bytes reached, after that without breaking download connection got 
 restricted bandwitdh.
 The question is - can I achive this with PF+ALTQ on my OpenBSD 3.7-stable 
 router?
 
 Maxim.



Re: Downloads limiting with PF

2006-01-22 Thread Maxim Vetsalo
On Sunday 22 January 2006 15:29, you wrote:
 http://www.openbsd.org/faq/pf/queueing.html
 http://www.openbsd.org/cgi-bin/man.cgi?query=pf.confapropos=0sektion=0ma
npath=OpenBSD+Currentarch=i386format=html

 That should get you started.

Greate thanks for your answer, Marco! I had read it, but didn't find solution 
for my problem yet. 

As I think, the solution must be aware of connection. But present stateful 
tracking options in pf.conf allow only to limit numer of concurrent 
connections. Or, limit badwidth for whole connection insted of part of it.

In pf source I find, that struct pf_state have array member bytes[2].
I guess it is in/out bytes counter for connection. But I can't use it to solve 
problem right now :-( So, I think I need to code a little bit.

Maxim.  

 On Sat, Jan 21, 2006 at 11:27:50PM +0200, Maxim Vetsalo wrote:
  Hi
 
  Sorry for my english first :-( I try to explain my problem as clean as I
  can. I have internet connection with very low bandwidth and many users.
  Bandwidth is enough if users don't download large files, but if only one
  of them start to download, others must wait long time for any webpage
  (and it's understandable :-)). I tried to limit size of downloadable
  object with Sqiud, but users start to complain. Ideal solution for me in
  such situation seems follow: when user start download it got full
  bandwidth untill some (fixed) limit in bytes reached, after that without
  breaking download connection got restricted bandwitdh.
  The question is - can I achive this with PF+ALTQ on my OpenBSD 3.7-stable
  router?
 
  Maxim.



Re: Downloads limiting with PF

2006-01-22 Thread Stuart Henderson
On 2006/01/23 00:23, Maxim Vetsalo wrote:
 Greate thanks for your answer, Marco! I had read it, but didn't find solution 
 for my problem yet. 

You missed the pf.conf(5) section on service curves, then.