From owner-freebsd-pf@FreeBSD.ORG Tue Mar 24 15:39:25 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 00A3110656BF for ; Tue, 24 Mar 2009 15:39:25 +0000 (UTC) (envelope-from fbsdq@peterk.org) Received: from poshta.pknet.net (poshta.pknet.net [216.241.167.213]) by mx1.freebsd.org (Postfix) with SMTP id 9EFE08FC25 for ; Tue, 24 Mar 2009 15:39:24 +0000 (UTC) (envelope-from fbsdq@peterk.org) Received: (qmail 10043 invoked from network); 24 Mar 2009 15:39:23 -0000 Received: from poshta.pknet.net (HELO pop.pknet.net) (216.241.167.213) by poshta.pknet.net with SMTP; 24 Mar 2009 15:39:23 -0000 Received: from 216.241.167.212 (SquirrelMail authenticated user fbsdq@peterk.org) by webmail.pknet.net with HTTP; Tue, 24 Mar 2009 09:39:23 -0600 (MDT) Message-ID: <59094.216.241.167.212.1237909163.squirrel@webmail.pknet.net> Date: Tue, 24 Mar 2009 09:39:23 -0600 (MDT) From: "Peter" To: freebsd-pf@freebsd.org User-Agent: SquirrelMail/1.4.11 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: SOLVED-pf + altq + cbq(borrow) not borrowing from parent - all LAN X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list 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, 24 Mar 2009 15:39:25 -0000 iH, cbq does not work as advertised child will not borrow from parent unless parent borrows from root So a tree did not work: root parent1 p1.child1(borrow) p1.child2(borrow) parent2 p2.child1(borrow) p2.child2(borrow) *child* does not borrow, unless parent is set to borrow from root. parent borrows no problem. Tried this on openbsd 4.4 - same results. short answer: '%s/cbq/hfsc/g' solution that's worked for me: altq on fxp0 bandwidth 100Mb hfsc queue {internal external} queue internal bandwidth 98Mb hfsc(default) queue external bandwidth 876Kb hfsc(upperlimit 876Kb) {poshta abakan usrx11 imvas } queue poshta bandwidth 70% hfsc(realtime 70%) queue abakan bandwidth 10% hfsc(realtime 10%) queue usrx11 bandwidth 10% hfsc(realtime 10%) queue imvas bandwidth 10% hfsc(realtime 10%) When I did not put in the upperlimit for 'external' queue, it would borrow up to 100Mb from root queue. - making the external queue children pointless. This way interal LAN goes at 98Mb, and external WAN is limited to 876Kb and then I break it up further by IPs. Downloading from usrx11 - speed = ~100KB as soon as I start a dl from poshta, usrx11 speed drops to ~12KB, and poshta speed goes to ~86KB. As soon as dl from poshta is cancelled, dl from usrx11 goes to ~100KB ]Peter[ >> >> Hello. I'm having the same problem. My system is 7.1-Stable i386. >> Here's entire pf.conf: > snip >> With this config, speed of traffic in queue www5 never goes higher >> than 250Kb. >> But, if queue localq is set to borrow, as follows: > snip >> 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. > > iH, > Installed openbsd 4.4 [VM on ESX] - Still seeing the same problem - > Using one of the pf faq examples - still can't figure out what I'm > missing: > > OpenBSD openbsd.my.domain 4.4 GENERIC#1021 i386 > > # grep -v "^#" /etc/pf.conf |grep -v ^$ > set skip on lo0 > altq on vic0 cbq bandwidth 5Mb queue { std, ssh, ftp } > queue std bandwidth 1Mb cbq(default) > queue ssh bandwidth 500Kb { ssh_login, ssh_bulk } > queue ssh_login bandwidth 50% priority 4 cbq(borrow) > queue ssh_bulk bandwidth 50% cbq(borrow) > queue ftp bandwidth 500Kb priority 3 cbq(borrow red) > pass in quick on vic0 proto tcp from any to port 222 flags S/SA keep state > queue ssh_login > pass in on vic0 proto tcp from any flags S/SA keep state > pass out on vic0 proto tcp from any to any flags S/SA keep state queue > ssh_login > > pfctl -vvsq shows the 'ssh_login' queue is being used. > doing sftp transfer over sshd on port 222 [just to isolate it] > traffic stays at ~250Kb, does not borrow > > queue root_vic0 on vic0 bandwidth 5Mb priority 0 cbq( wrr root ) {std, > ssh, ftp} > [ pkts: 799 bytes: 781987 dropped pkts: 0 bytes: > 0 ] > [ qlength: 0/ 50 borrows: 0 suspends: 0 ] > [ measured: 32.4 packets/s, 271.97Kb/s ] > queue std on vic0 bandwidth 1Mb cbq( default ) > [ pkts: 115 bytes: 16978 dropped pkts: 0 bytes: > 0 ] > [ qlength: 0/ 50 borrows: 0 suspends: 0 ] > [ measured: 5.2 packets/s, 6.20Kb/s ] > queue ssh on vic0 bandwidth 500Kb {ssh_login, ssh_bulk} > [ pkts: 0 bytes: 0 dropped pkts: 0 bytes: > 0 ] > [ qlength: 0/ 50 borrows: 0 suspends: 0 ] > [ measured: 0.0 packets/s, 0 b/s ] > queue ssh_login on vic0 bandwidth 250Kb priority 4 cbq( borrow ) > [ pkts: 684 bytes: 765009 dropped pkts: 0 bytes: > 0 ] > [ qlength: 14/ 50 borrows: 508 suspends: 97 ] > [ measured: 27.2 packets/s, 265.77Kb/s ] > queue ssh_bulk on vic0 bandwidth 250Kb cbq( borrow ) > [ pkts: 0 bytes: 0 dropped pkts: 0 bytes: > 0 ] > [ qlength: 0/ 50 borrows: 0 suspends: 0 ] > [ measured: 0.0 packets/s, 0 b/s ] > queue ftp on vic0 bandwidth 500Kb priority 3 cbq( red borrow ) > [ pkts: 0 bytes: 0 dropped pkts: 0 bytes: > 0 ] > [ qlength: 0/ 50 borrows: 0 suspends: 0 ] > [ measured: 0.0 packets/s, 0 b/s ] > > > Changing the parent 'ssh' queue to borrow: > # grep -v "^#" /etc/pf.conf |grep -v ^$ > set skip on lo0 > altq on vic0 cbq bandwidth 5Mb queue { std, ssh, ftp } > queue std bandwidth 1Mb cbq(default) > queue ssh bandwidth 500Kb cbq(borrow) { ssh_login, ssh_bulk } > queue ssh_login bandwidth 50% priority 4 cbq(borrow) > queue ssh_bulk bandwidth 50% cbq(borrow) > queue ftp bandwidth 500Kb priority 3 cbq(borrow red) > pass in quick on vic0 proto tcp from any to port 222 flags S/SA keep state > queue ssh_login > pass in on vic0 proto tcp from any flags S/SA keep state > pass out on vic0 proto tcp from any to any flags S/SA keep state queue > ssh_login > > traffic pretty much uses up right near 5MB... > > So not a FreeBSD issue it almost seems like it. > Have not tried OpenBSD mailing list yet. > I'm misunderstanding how pf/cbq should work? > > ]Peter[ > > _______________________________________________ > freebsd-pf@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-pf > To unsubscribe, send any mail to "freebsd-pf-unsubscribe@freebsd.org" >