From owner-freebsd-questions@FreeBSD.ORG Wed Apr 2 12:38:07 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 9CE201065671 for ; Wed, 2 Apr 2008 12:38:07 +0000 (UTC) (envelope-from freebsd@top-consulting.net) Received: from mx.emailarray.com (mx1.polarismail.com [69.28.212.202]) by mx1.freebsd.org (Postfix) with ESMTP id 430208FC72 for ; Wed, 2 Apr 2008 12:38:07 +0000 (UTC) (envelope-from freebsd@top-consulting.net) Received: (qmail 80281 invoked from network); 2 Apr 2008 12:38:06 -0000 Received: from cust02.top-consulting.net (HELO localhost) (freebsd@top-consulting.net@69.28.212.222) (POLARISLOCAL) by mx.emailarray.com with SMTP; 2 Apr 2008 12:38:04 -0000 Received: from vpn.top-consulting.net (vpn.top-consulting.net [69.90.179.8]) by mail.top-consulting.net (Horde Framework) with HTTP; Wed, 02 Apr 2008 08:38:04 -0400 Message-ID: <20080402083804.42843bk8hlfa07y8@mail.top-consulting.net> Date: Wed, 02 Apr 2008 08:38:04 -0400 From: freebsd@top-consulting.net To: freebsd-questions@freebsd.org References: <20080401181836.13596owuuxf9az48@mail.top-consulting.net> <20080401235522.GT21480@hal.rescomp.berkeley.edu> <003301c89474$efde4e60$cf9aeb20$@Org> <20080402032721.62016mpa11vodpc0@mail.top-consulting.net> <20080402040732.51643ek1xtz9dhk4@mail.top-consulting.net> In-Reply-To: <20080402040732.51643ek1xtz9dhk4@mail.top-consulting.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) X-Originating-IP: 69.90.179.8 X-DSPAM-Result: Innocent X-DSPAM-Processed: Wed Apr 2 08:38:06 2008 X-DSPAM-Confidence: 0.9935 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 1,47f37e2e4571366521458 X-DSPAM-Factors: 27, >>>+>>, 0.00379, >>+>>>, 0.00392, References*consulting.net>, 0.00464, References*consulting.net>, 0.00464, >>>+Original, 0.00471, In-Reply-To*consulting.net>, 0.00487, >>>+To, 0.00523, >>>+To, 0.00523, >>>+From, 0.00526, >>>+Subject, 0.00531, >+_______________________________________________, 0.00537, _______________________________________________+>, 0.00568, Message+>>>, 0.00588, >>>+Sent, 0.00633, In-Reply-To*mail.top+consulting.net>, 0.00696, In-Reply-To*mail.top, 0.00696, Url*//lists, 0.00735, Url*//lists, 0.00735, References*mail.top, 0.00784, References*mail.top, 0.00784, References*mail.top+consulting.net>, 0.00784, References*mail.top+consulting.net>, 0.00784, PM+>>>, 0.00817, Message-ID*mail.top, 0.00882, Message-ID*mail.top+consulting.net>, 0.00969, >>>+>>>, 0.00995, >>>+>>>, 0.00995 Subject: RE: FreeBSD Traffic Shaping 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: Wed, 02 Apr 2008 12:38:07 -0000 I can now confirm that these two commands do exactly what I mentioned =20 originally. All outbound connections towards any host port 80 will have a maximum =20 bandwidth of 100Kbit/s individually ( output ) ipfw pipe 2 config mask all bw 100Kbit/s ipfw add 10 pipe 2 tcp from localip to any 80 Problem solved :) > Hmm, > > I've tried > > ipfw pipe 2 config mask all bw 100Kbit/s > ipfw add 10 pipe 2 tcp from localip to any 80 > > it appears to be working but I don't have enough connections on =20 > right now to find out if it really gives 100kbit/sec to each or if =20 > it shares the bw > > will come back with an update :) > > >> I gave port 80 as an example but I need this configuration for =20 >> limiting other services as well. >> >> If you have a 100mbps connection and only one client, you want him =20 >> to only use 50kbps, not the full pipe. If you have 200 clients, =20 >> they still get 50kbps each. >> >> Is this feature that I need so complicated that it can't be =20 >> implemented easily into FreeBSD or is it that not many people need =20 >> it ? It sounds quite useful to me :) >> >> >>> I have personally tried that before and it did not worked as described, = in >>> fact it didn't work at all to limit anything on FBSD6. >>> >>> -----Original Message----- >>> From: owner-freebsd-questions@freebsd.org >>> [mailto:owner-freebsd-questions@freebsd.org] On Behalf Of =20 >>> Christopher Cowart >>> Sent: Tuesday, April 01, 2008 7:55 PM >>> To: freebsd@top-consulting.net >>> Cc: freebsd-questions@freebsd.org >>> Subject: Re: FreeBSD Traffic Shaping >>> >>> freebsd@top-consulting.net wrote: >>>> I am trying to limit the bandwidth available to some connections and >>>> I'm not sure FreeBSD can handle this. Maybe some of you can help. >>>> Here's what I need to have exactly. >>>> >>>> No matter what the number of connections, each connection should have >>>> at most/least 50kbps guaranteed outbound on port 80. >>>> >>>> I've tried dummynet but it doesn't do what I need because if I define >>>> a pipe with 1mbps and if I have 1000 connections, each connection will >>>> have less than 50kbps. >>>> >>>> Any way to do this in FreeBSD ? >>> >>> The ipfw(8) man page describes a "mask" configuration parameter. >>> >>> # /sbin/ipfw pipe 1 config mask src-ip 0xffffffff bw 56Kbit/s >>> >>> This creates a separate dynamic pipe per source ip address. Each pipe ha= s a >>> dedicated 56kbps. The man page implies that the mask can combine fields,= so >>> to uniquely identify "each connection", you would mask all bits of sourc= e >>> and destination IP and ports. It looks like the "all" >>> keyword might do just the trick. >>> >>> -- >>> Chris Cowart >>> Network Technical Lead >>> Network & Infrastructure Services, RSSP-IT UC Berkeley >>> >>> _______________________________________________ >>> freebsd-questions@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions >>> To unsubscribe, send any mail to =20 >>> "freebsd-questions-unsubscribe@freebsd.org" >>> >> >> >> >> _______________________________________________ >> freebsd-questions@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-questions >> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" >> > > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.or= g" >