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

Re: limit bandwidth per user

On Fri, Jul 18, 2003 at 08:37:04PM +0200, Angel Todorov wrote:
> limit the upload rate to a certain value for each IP in a certain network ?
> for example 10kbit/sec for each ip in
  it might be suboptimal, but you could create a queue for each IP, 
  and then a literal pass rule for every traffic from that IP you want
  to enqueue, such as:
pass on $ext_if from to any queue( q_170.16.10.3 )
  and then have one for each.
  i have tried this and quickly encountered the MAXQUEUES setup
  in /usr/src/sys/altq/altq_{queue type}.h
  i remember someone mentioning having set that to > 256 for cbq --
  hfsc is defaulted to 64...  but that might not be a problem
  if you aren't using the full /16 of the /16 you mention.
  if there is a snazzier way to to it than literal queueing into
  queues representitive of each IP, that would be swell to know.
[ openbsd 3.3 current/GENERIC ( jul 16 ) // i386 ]