From owner-freebsd-ipfw@FreeBSD.ORG Sat Oct 23 22:11:12 2004 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BBF2C16A4CE for ; Sat, 23 Oct 2004 22:11:12 +0000 (GMT) Received: from starling.mail.pas.earthlink.net (starling.mail.pas.earthlink.net [207.217.120.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5BBD143D1D for ; Sat, 23 Oct 2004 22:11:12 +0000 (GMT) (envelope-from martes.wigglesworth@earthlink.net) Received: from [213.209.169.198] (helo=[192.168.1.50]) by starling.mail.pas.earthlink.net with asmtp (TLSv1:AES256-SHA:256) (Exim 4.34) id 1CLU6N-0003aK-Rh; Sat, 23 Oct 2004 15:11:12 -0700 From: Martes Wigglesworth To: Matej Puntar , ipfw-mailings In-Reply-To: <417AC21F.1030905@guest.arnes.si> References: <417AC21F.1030905@guest.arnes.si> Content-Type: text/plain Organization: Wiggtekmicro Corporation Message-Id: <1098569449.602.324.camel@Mobile1.276NET> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Sun, 24 Oct 2004 01:10:49 +0300 Content-Transfer-Encoding: 7bit X-ELNK-Trace: 532caf459ba90ce6996df0496707a79d9bea09fe345ed53d9ef193a6bfc3dd485c2db18be96c7992231f031cbba65a2199f37241381ec17c350badd9bab72f9c X-Originating-IP: 213.209.169.198 Subject: Re: advanced bandwidth limiting X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: martes.wigglesworth@earthlink.net List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Oct 2004 22:11:12 -0000 The answer from all documentation that I have read, would be simply empliment a single pipe 1 of bw xKbit/s and configure dynamic pipes that use the same pipe, hence splitting up the bandwidth dynamicly. Since the queue is a copy of the first one, then all dynamic pipe have the same queue weight, and will then have an equal segment of the bandwidth of the pipe that they are attached to, in this case pipe 1. Example: ipfw add queue 1 log ip from any to ${internaldudes} in recv ${extif} ipfw queue 1 config pipe 1 mask dst-ip 0xffffffff ipfw pipe 1 config bw 256Kbit/s In the above example, any ip traffic comming into a natd box with interface ${extif} attached to the internet, and ${internaldudes} being those ips that are behind the gateway. Whenever a host connects to the box, and has traffic come to it from the internet, a dynamic queue will drain bandwidth for pipe 1. Due to this functionality, the pipe 1 bw will get devided between the pipes that are created. When there is no client, then the queue is deleted. If you have multiple subnets, like me, then and you want to specify the internal interfaces, then use the following, thanks to Nicolas, earlier today: ${fwcmd_add} deny udp from 0.0.0.0 68 to 255.255.255.255 67 in \{ recv ${if_m} or recv ${if_g} \} -- M.G.W. Wiggtekmicro, Corp. System: Asus M6N Intel Dothan 1.7 512MB RAM 40GB HD 10/100/1000 NIC Wireless b/g (not working yet) BSD-5.2.1 KDE-3.1.4