pf + altq + cbq(borrow) not borrowing from parent...

Peter fbsdq at
Wed Mar 18 12:46:11 PDT 2009

   Can't figure this out - seems as if others are having the same issue
searching online:
The queues will not borrow from parent.

pf.conf [cut and snipped]

altq on fxp0 cbq bandwidth 100Mb qlimit 500 queue {intranet, extranet}
        queue extranet bandwidth 876Kb { poshta,abakan,usrx11,imvas }
                queue poshta bandwidth 34% priority 7 cbq(borrow)
                queue abakan bandwidth 22% priority 2 cbq(borrow)
                queue usrx11 bandwidth 22% priority 1 cbq(borrow)
                queue imvas  bandwidth 22% priority 1 cbq(borrow)
        queue intranet bandwidth 90Mb cbq(default)

pass in quick proto tcp from any to $poshta_ip port {http} keep state
queue poshta
pass in quick proto tcp from to $poshta_intranet_ip keep
state queue intranet

On fxp0 I have both internal address and several external addresses.
Doing an http get on a large file internally = fast
Although all other IPs are not in use, doing the same http get via
external address, max transfer rate I get is ~37KB

If I change that line from 'queue poshta' to 'queue intranet' the same
http get goes at ~100KB - So I'm sure it's that one line causing the

So, it seems that the queue is not borrowing from the parent.
I've changed all other queues from 22% to 12% [leaving poshta at 34%], my
http is still not going faster than ~37KB.

Does cbq(borrow) work as advertised?
  borrow - the queue can borrow bandwidth from its parent. This can only
be specified when using the cbq scheduler.

With only one NIC, I'm trying to always guarantee the intranet high speed,
and the external IPs prioritized - With no ability to nest with priq,
can't use that.

Whats a good way to dynamically prioritize/queue traffic based on IP?
Anyone done this successfully with pf, altq, cbq(borrow)?


More information about the freebsd-pf mailing list