Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jan 2009 22:17:10 +0400
From:      Yuriy Grishin <usgrishin@samaradom.ru>
To:        freebsd-pf@freebsd.org
Subject:   ALTQ cbq : borrowing when no tfaffic with higher priority
Message-ID:  <496CDAA6.1000600@samaradom.ru>

next in thread | raw e-mail | index | archive | help
Hello,

I have a gate with some traffic comes directly from it (wget, rtorrent).
And I have two computers behind the gate with NAT.

My target is to allow to borrow full bandwith for traffic that comes 
directly from the gate
BUT throttle this traffic to minimum rate when the computers behind the 
gate are active.

I wrote the rule set :
-------------------------------
...
##--queues
## real bandwith 1Mb symmetrical channel
## use altq at 97%
altq on $ext_if cbq bandwidth 970Kb queue { qme, qmywife, qgateway, qack }
   queue qme bandwidth 50% priority 3 cbq ( borrow )
   queue qmywife bandwidth 30% priority 2 cbq ( borrow )
   queue qgateway bandwidth 1% priority 0 cbq ( default borrow )
   queue qack bandwidth 19% priority 5 cbq ( borrow )

##--nat & rdr
nat on $ext_if from $int_if:network to any -> $ext_if

##--rules
block all
pass in on $int_if from $me to any queue (qme, qack)
pass in on $int_if from $mywife to any queue (qmywife, qack)
....
pass out on $ext_if from $ext_if to any
...
-------------------------------

In fact it allows to use ~30% of the link throughput for my wife and 50% 
for me while the gateway is downloading.
It seems that it guarantees bandwidth parameter values only. I don't 
understand the duty of priority parameter then!
How to make the gate get off the link while other computers are 
downloading?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?496CDAA6.1000600>