more tests - pf + altq + cbq(borrow) not borrowing from parent
- all LAN
forn
forn at ngs.ru
Sat Mar 21 03:02:53 PDT 2009
Hello. I'm having the same problem. My system is 7.1-Stable i386.
Here's entire pf.conf:
ext_if="le0"
int_if="le1"
all_if="{" $ext_if $int_if "}"
localnet="10.20.41.0/24"
int_ip="10.20.41.1"
ext_ip="10.20.40.61"
self="{" $int_ip $ext_ip "}"
uplink="10.20.40.1"
set skip on lo
scrub in
altq on $int_if cbq bandwidth 2Mb qlimit 500 queue { defaultq, sshq,
localq }
queue defaultq bandwidth 500Kb cbq (default)
queue sshq bandwidth 100Kb cbq (borrow)
queue localq bandwidth 500Kb cbq { www, www5 }
queue www bandwidth 100Kb priority 1 cbq (borrow)
queue www5 bandwidth 250Kb priority 2 cbq (borrow)
nat on $ext_if from $localnet to any -> $ext_ip
rdr on $int_if proto tcp from $localnet to any port 80 -> 127.0.0.1
port 3128
block all
pass out quick from $self
pass in quick proto tcp to $self port ssh queue self_sshq
pass quick proto icmp
block return on $int_if all
pass in quick on $int_if proto tcp from $localnet to 127.0.0.1 port
3128 queue www
pass in quick on $int_if proto udp from $localnet to $self port 17094
pass in quick on $int_if proto udp from $localnet to $uplink port 53
pass in quick on $int_if proto tcp from $localnet to $uplink port
55080 queue www5
With this config, speed of traffic in queue www5 never goes higher
than 250Kb.
But, if queue localq is set to borrow, as follows:
altq on $int_if cbq bandwidth 2Mb qlimit 500 queue { defaultq, sshq,
localq }
queue defaultq bandwidth 500Kb cbq (default)
queue sshq bandwidth 100Kb cbq (borrow)
queue localq bandwidth 500Kb cbq (borrow) { www, www5 }
queue www bandwidth 100Kb priority 1 cbq (borrow)
queue www5 bandwidth 250Kb priority 2 cbq (borrow)
then queue www5 is able to take the full bandwidth of 2Mb (which is
correct).
The physical link speed far surpasses 2Mb (actually, these are all
virtual machines set up for testing on the same server), so this can't
be a problem.
More information about the freebsd-pf
mailing list