FreeBSD + MPD + PF + ALTQ

Bruno Afonso brunomiguel at dequim.ist.utl.pt
Sat Oct 22 08:52:26 PDT 2005


Bill Marquette wrote:
> On 10/22/05, Bruno Afonso <brunomiguel at dequim.ist.utl.pt> wrote:
>> The download part is the problematic one IF they're not all connected to
>> the same network interface. Why ? Because altq only works PER interface
>> and tun0, tun1, tun2, etc are each and single one, one interface on its own.
>>
>> You basically have to
>>
>> altq on tun0
>>
>> altq on tun1, etc..
>>
>> What we would need in this case would be a meta-interface that altq
>> would work on, but that is not available. Bottom line: you can't control
>> with PF global bw over an interface-span. This is probably necessary for
>> a full commercial deployment. Don't know of any plans to implement this...
>>
>> meta_if <meta_1> {tun0, tun1}
>>
>> altq on meta_1 ...
>>
>> would be nice. :-)
> 
> You mean something like:
> altq on { fxp0 fxp1 } bandwidth 100Mb hfsc queue { a b }
> queue a bandwidth 50Mb hfsc(default)
> queue b bandwidth 50Mb hfsc
> This works today :)

Yes, I have now tried and verified that it works, but not as we would 
like to in the sense of a meta interface, eg:

altq on { tun0 tun1 tun2 } cbq bandwidth 1Mb queue { a b }
  queue a bandwidth 700Kb cbq(default)
  queue b bandwidth 300Kb


which turns itself into... (from pfctl -sq)


queue root_tun0 bandwidth 1Mb priority 0 cbq( wrr root ) {a, b}
queue  a bandwidth 700Kb cbq( default )
queue  b bandwidth 300Kb
queue root_tun1 bandwidth 1Mb priority 0 cbq( wrr root ) {a, b}
queue  a bandwidth 700Kb cbq( default )
queue  b bandwidth 300Kb
queue root_tun2 bandwidth 1Mb priority 0 cbq( wrr root ) {a, b}
queue  a bandwidth 700Kb cbq( default )
queue  b bandwidth 300Kb


What would I want with this? To create a queue that is shared by every 
interface, so limiting globally every interface to a maximum of 1Mb each 
and all of them to 1Mb each too, in a cqb borrowing shared way. For 
examply, I'd like a to never exceed 700Kb taking into account every 
interface. This makes perfect sense if I have a limited ammount of bw to 
share among each client, which, in a real world, happens 99,9% of the 
time because resources are limited.

So, the syntax works, but it does achieve what I mentioned before, the 
meta interface concept. The example you give is only useful for 
simplifying rulesets, although it's more difficult for humans to understand.

BA
-- 
Bruno Afonso, Biological Engineer
Dana-Farber Cancer Institute
1 Jimmy Fund Way
Smith Building
Boston, MA 02115
phone: (617)-632-5105
GABBA Graduate Student (http://gabba.up.pt)
Homepage @ http://brunoafonso.net/


More information about the freebsd-pf mailing list