PF ALTQ CBQ rules

Ovi ovi at unixservers.us
Fri Oct 12 14:18:47 PDT 2007


Hello guys

I have this example from OpenBSD:

altq on $br1_if cbq bandwidth 20Mb qlimit 100 tbrsize 1000 queue { std1, customer_1 }
queue customer_1 bandwidth 1Mb cbq(red,ecn) { customer_1_bulk, customer_1_ack }
queue customer_1_ack priority 7
queue customer_1_bulk priority 0

I want to use CBQ on FreeBSD, with similar rules still I have the 
following problem:
On a 20Mb internet line I have 100 users. I want to limit (cap) 
bandwidth per user at 1 Mb and to add queues for all 100 users.
The problem is that on FreeBSD this rules are not working, instead I 
must use this:

altq on $br1_if cbq bandwidth 20Mb qlimit 100 tbrsize 1000 queue { std1, customer_1 }
queue customer_1 bandwidth 1Mb cbq(red,ecn) { customer_1_bulk, customer_1_ack }
queue customer_1_ack bandwidth 800Kb priority 7
queue customer_1_bulk bandwidth 128Kb priority 0


This "bandwidth" option does not help me because I must not exceed 1 Mb.
My second problem is if I have 100 users, then toal of 1Mb x 100 will be 
100Mb and I exceed total bandwidth of 20 Mb.

So my question is: how I do bandwidthupper limit with CBQ per user, like 
no more than 1 Mb, and add rules for 100 users?

best regards,
ovi



More information about the freebsd-questions mailing list