On 2011/01/14 00:24, Bonnie Packet wrote:
> Bingo! Thank you Kelley and (especially again) StuartH.
> 
> Seems I was confused because the "queue" directives will work without
> specifying an explicit interface....so I assumed it just used the
> interface given in the most recent "altq" given above it. But that's
> not the case - and it seems it works without an interface given **if
> there are queues defined on only one interface in total in the entire
> pf.conf**. As soon as you have multiple interfaces, it looks like need
> to specify the interface explictly in both the altq directive AND the
> individual queue directives "beneath" it.
>
> Not sure why this "feature" is helpful - personally I think the syntax
> checking should be a little tighter - but here's what I have, and it
> seems to be working beautifully:

It's simpler than that, actually; if you don't specify the interface
in the "queue" directive, it applies to all interfaces that use altq.
If you're using the same bandwidth/priority on every interface, you
only need list the queues once.

I'm not sure what the 3.9 docs said, this is what the current OS has
to say about "queue...on" in pf.conf(5):

     on <interface>
           Specifies the interface the queue operates on.  If not given, it
           operates on all matching interfaces.

I've tried to clean up the manual and faq in this area but despite
the fact it's not entirely clear as-is, it's been surprisingly
difficult to come up with anything better.

Glad you got it working (and that we now have some more in the
list archives to hopefully help others :-)



> #cat /etc/pf.conf
> ...
> altq on $int_if cbq bandwidth 5000Kb queue { std, slow, fast,
> tcpack }
> queue std   on $int_if   bandwidth 1200Kb priority 1 cbq(default
> borrow)
> queue slow  on $int_if bandwidth 400Kb priority 0 cbq(ecn)
> queue fast  on $int_if  bandwidth 3300Kb priority 2 cbq(borrow)
> queue tcpack  on $int_if  bandwidth 100Kb priority 3 cbq(borrow)
> #
> altq on $ext_if cbq bandwidth 900Kb queue { std, slow, fast, tcpack }
> queue std  on $ext_if bandwidth 400Kb priority 1 cbq(default borrow)
> queue slow on $ext_if bandwidth 50Kb priority 0 cbq(ecn)
> queue fast  on $ext_if bandwidth 400Kb priority 2 cbq(borrow)
> queue tcpack  on $ext_if bandwidth 50Kb priority 3 cbq(borrow)
> ...
> 
> Many thanks again for the help and discussion, all. This has been
> instructive and illuminating.
> 
> -BP-
> 
> On Jan 12, 12:08=A0pm, s...@spacehopper.org (Stuart Henderson) wrote:
> > On 2011/01/12 08:40, Bonnie Packet wrote:
> >
> > > altq on $int_if cbq bandwidth 5000Kb queue { std, slow, fast, tcpack }
> > > queue std bandwidth 1200Kb priority 1 cbq(default borrow)
> >
> > you're looking for this format:
> >
> > queue std on $int_if bandwidth 1200Kb priority 1 cbq(default borrow)
> > ..etc..
> >
> > I don't recall many changes to altq since 3.9 (though of course there
> > have been many other fixes, including some related to DoS issues in
> > certain circumstances).
> 

Reply via email to