From owner-freebsd-ipfw Tue May 15 23:39:39 2001 Delivered-To: freebsd-ipfw@freebsd.org Received: from info.iet.unipi.it (info.iet.unipi.it [131.114.9.184]) by hub.freebsd.org (Postfix) with ESMTP id BE9DC37B424; Tue, 15 May 2001 23:39:27 -0700 (PDT) (envelope-from luigi@info.iet.unipi.it) Received: (from luigi@localhost) by info.iet.unipi.it (8.9.3/8.9.3) id IAA44066; Wed, 16 May 2001 08:36:24 +0200 (CEST) (envelope-from luigi) From: Luigi Rizzo Message-Id: <200105160636.IAA44066@info.iet.unipi.it> Subject: Re: Bandwidth Limiting per IP In-Reply-To: from "Patrick O'Reilly" at "May 16, 2001 08:29:46 am" To: "Patrick O'Reilly" Date: Wed, 16 May 2001 08:36:24 +0200 (CEST) Cc: ipfw@FreeBSD.ORG, Holtor , questions@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL61 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-ipfw@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > There is additional overhead in processing so many pipes, but if the box in actually, if you use dynamic pipes e.g. ipfw add pipe 1 ip from 10.1.2.0/24 to any ipfw pipe 1 config bw 100Kbit/s mask src-ip 0x000000ff then everything works pretty fast -- the ruleset is short, and the pipe processing overhead is O(log n) where n is the number of _active_ pipes. In cases like these i would also suggest the use of fair queueing, which works well in 4.3 ipfw add queue 1 ip from 10.1.2.0/24 to any ipfw pipe 10 config bw 2Mbit/s ipfw queue 1 config pipe 1 weight 30 mask src-ip 0x000000ff so all active flows get an equal share of the total capacity. > question is doing nothing other than acting as a gateway/router then I doubt > that this will be a real problem. I have a vague memory that someone once > benchmarked a set if ipfw rules and found that with a set of 1000 rules (the > average search would therefore hit at about rule 500) the actual latency > induced was just a few milliseconds. yep -- but the 'mask' mechanism often saves you from using so many rules. cheers luigi -----------------------------------+------------------------------------- Luigi RIZZO, luigi@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL/FAX: +39-050-568.533/522 . via Diotisalvi 2, 56126 PISA (Italy) Mobile +39-347-0373137 -----------------------------------+------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ipfw" in the body of the message