From owner-freebsd-net@FreeBSD.ORG Thu Nov 30 16:26:48 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 52E2516A56B for ; Thu, 30 Nov 2006 16:26:48 +0000 (UTC) (envelope-from tarkhil@webmail.sub.ru) Received: from mail.sub.ru (webmail.sub.ru [213.247.139.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 19B7E43D8C for ; Thu, 30 Nov 2006 16:15:24 +0000 (GMT) (envelope-from tarkhil@webmail.sub.ru) Received: (qmail 1224 invoked by uid 0); 30 Nov 2006 16:15:14 -0000 Received: from webmail.sub.ru (HELO localhost) (213.247.139.22) by techno.sub.ru with SMTP; 30 Nov 2006 16:15:14 -0000 Received: from unknown ([213.247.139.22]) by localhost (webmail.sub.ru [213.247.139.22]) (amavisd-new, port 10024) with SMTP id 92929-10; Thu, 30 Nov 2006 19:15:02 +0300 (MSK) Received: from unknown (HELO ?192.168.0.239?) (tarkhil%sub.ru@213.152.142.74) by techno.sub.ru with SMTP; 30 Nov 2006 16:15:01 -0000 Message-ID: <456F0382.70409@webmail.sub.ru> Date: Thu, 30 Nov 2006 19:14:58 +0300 From: Alex Povolotsky User-Agent: Thunderbird 1.5.0.8 (X11/20061128) MIME-Version: 1.0 To: "Tobias P. Santos" References: <456DF2DF.1070702@webmail.sub.ru> <456EB055.7030603@netconsultoria.com.br> In-Reply-To: <456EB055.7030603@netconsultoria.com.br> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at mail.sub.ru Cc: freebsd-net@freebsd.org Subject: Re: pipe dropping lots of packets X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Nov 2006 16:26:48 -0000 Tobias P. Santos wrote: > Hello! > > > Alex Povolotsky wrote: >> Hello! >> >> I'm trying to set up FreeBSD-based router, and got troubles with >> bandwidth limiting. My queues drops lots of packets. >> >> [23:38] gw:~ # ipfw pipe 200 config bw 30mbit/s queue 100 > > You should use 30Mbit/s (with capital M). > > >> [23:42] gw:~ # ipfw add 600 pipe 200 ip from any to any out via vlan333 >> 00600 pipe 200 ip from any to any out via vlan333 >> >> seems to be easy. now >> >> [23:43] gw:~ # ipfw zero >> Accounting cleared. >> >> make sure we'll catch packets out of pipe >> >> [23:43] gw:~ # sysctl net.inet.ip.fw.one_pass >> net.inet.ip.fw.one_pass: 0 >> >> and, waiting a bit >> >> [23:43] gw:~ # ipfw show | grep vlan333 >> 00600 2010 140730 pipe 200 ip from any to any out via vlan333 >> 00700 0 0 allow ip from any to table(1) via vlan333 >> 00710 840 142335 allow ip from table(1) to any via vlan333 >> >> whoops! No packets left pipe >> >> part of ipfw pipe list >> >> 00200: 30.000 bit/s 0 ms 100 sl. 1 queues (1 buckets) droptail > ^^^^^^^^^^^^ > > See, 30 bit/s will drop a lot of packets! ;) Whooops!!! Thanks. Alex.