From owner-freebsd-net@FreeBSD.ORG Mon Sep 19 20:55:03 2005 Return-Path: X-Original-To: net@freebsd.org Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2273016A41F for ; Mon, 19 Sep 2005 20:55:03 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9651D43D45 for ; Mon, 19 Sep 2005 20:55:02 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.3/8.13.3) with ESMTP id j8JKt1e6069200; Mon, 19 Sep 2005 13:55:01 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.3/8.13.3/Submit) id j8JKt0Yc069177; Mon, 19 Sep 2005 13:55:00 -0700 (PDT) (envelope-from jmg) Date: Mon, 19 Sep 2005 13:54:59 -0700 From: John-Mark Gurney To: Brett Glass Message-ID: <20050919205459.GD821@funkthat.com> Mail-Followup-To: Brett Glass , Luigi Rizzo , net@freebsd.org References: <6.2.3.4.2.20050918205708.08cff430@localhost> <20050918235659.B60185@xorpc.icir.org> <6.2.3.4.2.20050919010035.07dfc448@localhost> <20050919094012.GB821@funkthat.com> <6.2.3.4.2.20050919091248.07f767e8@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6.2.3.4.2.20050919091248.07f767e8@localhost> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: Luigi Rizzo , net@freebsd.org Subject: Re: Efficient use of Dummynet pipes in IPFW X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2005 20:55:03 -0000 Brett Glass wrote this message on Mon, Sep 19, 2005 at 09:32 -0600: > At 03:40 AM 9/19/2005, John-Mark Gurney wrote: > > >What's awkward about: > >#define PIPE_FOO 1 > >#define PIPE_BAR 2 > > > >add pipe PIPE_FOO config bw 64kbit/sec > >/* ... etc ... */ > > I've done that, and unfortunately it does not solve the problem > I'm describing. If you paid attention to what I quoted, I never said my message addressed your overall problem... if you paid attention to what I quoted, you would see that I was simply replying to your message text: I've tried this. Alas, it quickly gets out of hand because objects in IPFW (for example pipes) aren't named. You wind up literally having to build a symbol table to keep track of rule numbers, pipe numbers, etc. Yes, you can do it, but it's very awkward. But with the suggestion of someone else, you can build a set of rules that do: #define PIPE_FOO 1 #define PIPE_BAR 1 #define FOO 10000 #define BAR 11000 #define CONT 30000 add skipto FOO tcp from any to any 22 add skipto BAR tcp from any to any 80 add skipto CONT ip from any to any add FOO pipe PIPE_FOO ip from any to any add skipto CONT ip from any to any add BAR pipe PIPE_BAR ip from any to any add skipto CONT ip from any to any add CONT count ip from any to any and there you go... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."