Yes.  I think I posted this here before, but since I'm lazy at searching
the archives too, here is what I did (Using a recompiled kernel with
sys/altq/altq_hfsc.h set to support "#define HFSC_MAX_CLASSES 512" and
multiple external uplinks)

# cu** is the upload queue
# cd** is the download queue
...
altq on $ext_if1 hfsc bandwidth 700Kb queue { ack1, voip1, usert1 }
  queue ack1   bandwidth 35% priority 6 hfsc(upperlimit 80% realtime
10%)
  queue voip1  bandwidth 25% priority 4 hfsc(upperlimit 50%)
  queue usert1 bandwidth 40% {cu00, cu01, cu02, cu03, cu04, cu05, cu06,
cu07, cu08, cu09, \
                                cu10, cu11, cu12, cu13, cu14, cu15,
cu16, cu17, cu18, cu19, \
                                cu20, cu21, cu22, cu23, cu24, cu25,
cu26, cu27, cu28, cu29, \
                                cu30, cu31, cu32, cu33, cu34, cu35,
cu36, cu37, cu38, cu39, \
                                cu40, cu41, cu42, cu43, cu44, cu45,
cu46, cu47, cu48, cu49 }
      queue cu00 bandwidth 2Kb priority 2 hfsc(red upperlimit 90%
default)
      queue cu01 bandwidth 2Kb priority 2 hfsc(red upperlimit 90% )
      queue cu02 bandwidth 2Kb priority 2 hfsc(red upperlimit 90% )
      queue cu03 bandwidth 2Kb priority 2 hfsc(red upperlimit 90% )
      queue cu04 bandwidth 2Kb priority 2 hfsc(red upperlimit 90% )
...
altq on $int_if hfsc bandwidth 10Mb queue { ack4, voip4\
                                cd00, cd01, cd02, cd03, cd04, cd05,
cd06, cd07, cd08, cd09, \
                                cd10, cd11, cd12, cd13, cd14, cd15,
cd16, cd17, cd18, cd19, \
                                cd20, cd21, cd22, cd23, cd24, cd25,
cd26, cd27, cd28, cd29, \
                                cd30, cd31, cd32, cd33, cd34, cd35,
cd36, cd37, cd38, cd39, \
                                cd40, cd41, cd42, cd43, cd44, cd45,
cd46, cd47, cd48, cd49 }
      queue ack4 bandwidth 512Kb priority 6 hfsc(upperlimit 3Mb)
      queue voip4 bandwidth 512Kb priority 4 hfsc(upperlimit 3Mb)
      queue cd00 bandwidth 512Kb priority 2 hfsc(red upperlimit 3Mb
default)
      queue cd01 bandwidth 128Kb priority 2 hfsc(red upperlimit 1Mb )
      queue cd02 bandwidth 128Kb priority 2 hfsc(red upperlimit 1Mb )
      queue cd03 bandwidth 128Kb priority 2 hfsc(red upperlimit 1Mb )
....
pass out on $ext_if1 queue (cu00, ack1)
pass out on $ext_if1 tagged c01 queue (cu01, ack1)
pass out on $ext_if1 tagged c02 queue (cu02, ack1)
pass out on $ext_if1 tagged c03 queue (cu03, ack1)
pass out on $ext_if1 tagged c04 queue (cu04, ack1)
pass out on $ext_if1 tagged c05 queue (cu05, ack1)
...
pass in quick on $int_if route-to { ($ext_if3 $ext_gw3) } from
192.168.112.0/24 to any tag c02 queue (cd02, ack4)
pass in quick on $int_if route-to { ($ext_if3 $ext_gw3) } from
192.168.113.0/24 to any tag c03 queue (cd03, ack4)
pass in quick on $int_if route-to { ($ext_if1 $ext_gw1) } from
192.168.114.0/24 to any tag c04 queue (cd04, ack4)
pass in quick on $int_if route-to { ($ext_if2 $ext_gw2) } from
192.168.123.0/24 to any tag c05 queue (cd05, ack4)
pass in quick on $int_if route-to { ($ext_if3 $ext_gw3) } from
192.168.124.0/24 to any tag c06 queue (cd06, ack4)

-Steve S.

> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf
Of
> Georg Kahest
> Sent: Tuesday, May 12, 2009 5:36 AM
> To: Openbsd-Misc
> Subject: Traffic Shape for ISP on OpenBSD
>
> Hello!
>
> I would like to set up traffic shape on OpenBSD for my clients, i have
> many /30 networks and i need to shape all networks with some queue
lets
> say 5mbit for example(async on some cases) , but the thing is i need
> queue/filter per network in that case(or even two if its async), and
> that will make my pf ruleset really big, i was wondering if anyone has
> encountered smt similar, and what was their solution.
>
> Is the queue limit 256 queues per interface?
>
> Sidenote: all clients come from carp interface what has all the client
> networks as aliases.
>
>
> --
> Georg Kahest <[email protected]>
> ProGroup Holding

Reply via email to