From owner-freebsd-questions@FreeBSD.ORG Tue Feb 12 22:45:53 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0585A16A417 for ; Tue, 12 Feb 2008 22:45:53 +0000 (UTC) (envelope-from ovi@unixservers.us) Received: from webserver.easyhosting.ro (unixware.iasi.rdsnet.ro [86.124.41.195]) by mx1.freebsd.org (Postfix) with ESMTP id 795A713C4DD for ; Tue, 12 Feb 2008 22:45:52 +0000 (UTC) (envelope-from ovi@unixservers.us) Received: from webserver.easyhosting.ro (localhost.easyhosting.ro [127.0.0.1]) by webserver.easyhosting.ro (Postfix) with ESMTP id 88E7DFD0BF; Wed, 13 Feb 2008 00:45:27 +0200 (EET) Received: from localhost.easyhosting.ro [127.0.0.1] by BitDefender SMTP Proxy on localhost.easyhosting.ro [127.0.0.1] for localhost.easyhosting.ro [127.0.0.1]; Wed, 13 Feb 2008 00:45:27 +0200 (EET) Received: from [10.0.0.14] (unknown [10.0.0.14]) (Authenticated sender: ovi@unixservers.us) by webserver.easyhosting.ro (Postfix) with ESMTP id 65362FD0BE; Wed, 13 Feb 2008 00:45:27 +0200 (EET) Message-ID: <47B22103.8060909@unixservers.us> Date: Wed, 13 Feb 2008 00:43:15 +0200 From: Ovi User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ovi References: <47B1B845.7070803@unixservers.us> In-Reply-To: <47B1B845.7070803@unixservers.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BitDefender-Scanner: Clean, Agent: BitDefender Smtp Proxy 2.1.0 on webserver.easyhosting.ro, sigver: 7.17278 X-BitDefender-Spam: No (0) X-BitDefender-SpamStamp: v1, build 2.5.30.31103, bayes score: 500, flags: [VALID_REPLY], total: 0 Cc: freebsd-questions@freebsd.org Subject: Re: Bug in PF (PF+ALTQ+CBQ, FreeBSD 6.2) ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Feb 2008 22:45:53 -0000 Ovi wrote: > Hello > > I am trying a simple setup to shape bandwidth on up and down using > FreeBSD 6.2, PF, ALTQ with CBQ and on download everything works well, > but on upload it works only at half of asigned bandwidth, with packets > dropped. > > Here is my pf.conf > > # ---------------- pf.conf --------------------------- > ext_if="fxp0" > int_if="fxp1" > lan="192.168.0.2" > > altq on $ext_if cbq bandwidth 10Mb queue {std,lan_up} > altq on $int_if cbq bandwidth 10Mb queue {std2,lan_down} > > queue std bandwidth 10% cbq(default) > queue std2 bandwidth 10% cbq(default) > > queue lan_up bandwidth 50% priority 6 cbq(red) > queue lan_down bandwidth 50% priority 6 cbq(red) > > #nat on $ext_if from $int_if:network to any -> ($ext_if) > > pass in quick on $ext_if from any to $lan > pass out quick on $int_if from any to $lan queue lan_down > > pass in quick on $int_if from $lan to any > pass out quick on $ext_if from $lan to any queue lan_up > > block quick all > # ---------------------- end pf.conf ---------------- > > Here is an output of: pfctl -vvsq > > queue root_fxp0 bandwidth 10Mb priority 0 cbq( wrr root ) {std, lan_up} > [ pkts: 254635 bytes: 225521035 dropped pkts: 0 > bytes: 0 ] > [ qlength: 0/ 50 borrows: 0 suspends: 0 ] > [ measured: 295.3 packets/s, 2.13Mb/s ] > queue std bandwidth 1Mb cbq( default ) > [ pkts: 700 bytes: 332720 dropped pkts: 0 > bytes: 0 ] > [ qlength: 0/ 50 borrows: 0 suspends: 0 ] > [ measured: 0.4 packets/s, 2.59Kb/s ] > queue lan_up bandwidth 5Mb priority 6 cbq( red ) > [ pkts: 253935 bytes: 225188315 dropped pkts: 3193 bytes: > 2751758 ] > [ qlength: 0/ 50 borrows: 0 suspends: 86645 ] > [ measured: 294.9 packets/s, 2.13Mb/s ] > queue root_fxp1 bandwidth 10Mb priority 0 cbq( wrr root ) {std2, > lan_down} > [ pkts: 155627 bytes: 24407867 dropped pkts: 0 > bytes: 0 ] > [ qlength: 0/ 50 borrows: 0 suspends: 0 ] > [ measured: 171.4 packets/s, 77.96Kb/s ] > queue std2 bandwidth 1Mb cbq( default ) > [ pkts: 2 bytes: 84 dropped pkts: 0 > bytes: 0 ] > [ qlength: 0/ 50 borrows: 0 suspends: 0 ] > [ measured: 0.0 packets/s, 1.30 b/s ] > queue lan_down bandwidth 5Mb priority 6 cbq( red ) > [ pkts: 155625 bytes: 24407783 dropped pkts: 95 bytes: > 143830 ] > [ qlength: 0/ 50 borrows: 0 suspends: 7094 ] > [ measured: 171.4 packets/s, 77.96Kb/s ] > > Any ideea where could be the problem? Upload should work at 5Mb/s too, > not at 2.2Mb/s. > > ovi > > I tried the same setup with HFSC and is working well, so i think the issue is from CBQ. ovi -- This mail was scanned by BitDefender For more informations please visit http://www.bitdefender.com