From owner-freebsd-pf@FreeBSD.ORG Tue Jan 13 19:07:26 2009 Return-Path: Delivered-To: freebsd-pf@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E83A51065809 for ; Tue, 13 Jan 2009 19:07:26 +0000 (UTC) (envelope-from usgrishin@samaradom.ru) Received: from mx1.samaradom.ru (june.samaradom.ru [85.113.63.225]) by mx1.freebsd.org (Postfix) with ESMTP id 9AC998FC2D for ; Tue, 13 Jan 2009 19:07:26 +0000 (UTC) (envelope-from usgrishin@samaradom.ru) Received: from [10.62.116.37] (port=59456 helo=[192.168.0.15]) by mx1.samaradom.ru with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1LMnq2-000FFu-Ua for freebsd-pf@freebsd.org; Tue, 13 Jan 2009 22:18:07 +0400 Message-ID: <496CDAA6.1000600@samaradom.ru> Date: Tue, 13 Jan 2009 22:17:10 +0400 From: Yuriy Grishin User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19) Gecko/20081204 SeaMonkey/1.1.14 MIME-Version: 1.0 To: freebsd-pf@freebsd.org Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Subject: ALTQ cbq : borrowing when no tfaffic with higher priority X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: uzgrishin@mail.ru List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2009 19:07:27 -0000 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?