From owner-freebsd-ipfw@FreeBSD.ORG Mon Dec 18 06:59:59 2006 Return-Path: X-Original-To: freebsd-ipfw@freebsd.org Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8454016A412 for ; Mon, 18 Dec 2006 06:59:59 +0000 (UTC) (envelope-from if@hetzner.co.za) Received: from mail1a.your-server.co.za (mail1a.your-server.co.za [196.7.18.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id C85F243CB7 for ; Mon, 18 Dec 2006 06:59:23 +0000 (GMT) (envelope-from if@hetzner.co.za) Received: from [192.168.2.25] (helo=hetzner.co.za) by mail1a.your-server.co.za with esmtpa (Exim 4.63) (envelope-from ) id 1GwByj-0004D2-UL; Mon, 18 Dec 2006 08:28:01 +0200 Received: from localhost ([127.0.0.1]) by hetzner.co.za with esmtp (Exim 4.63 (FreeBSD)) (envelope-from ) id 1GwByh-0000mz-KP; Mon, 18 Dec 2006 08:27:59 +0200 To: Looza From: Ian FREISLICH In-Reply-To: Message from Looza of "Sun, 17 Dec 2006 17:31:53 PST." <7922408.post@talk.nabble.com> X-Attribution: BOFH Date: Mon, 18 Dec 2006 08:27:59 +0200 Message-Id: X-Authenticated-Sender: if@hetzner.co.za X-Virus-Scanned: Clear (ClamAV 0.88.4/2352/Sun Dec 17 22:22:59 2006) Cc: freebsd-ipfw@freebsd.org Subject: Re: problem simulating a LFN X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Dec 2006 06:59:59 -0000 Looza wrote: > > Hi, > > I'm trying to simulate a LFN(Long Fat Network) to test various TCP versions. > I am using iperf on the end PCs. I'm trying to use FreeBSD's ipfw to > simulate a LFN. > ex. throughput=1 Gbit/s and delay=100ms, trhoughput=100 Mbit/s and delay=1s > > This is how my hardware is connected. > > |Linux PC|--Gigabit--| FreeBSD box |--Gigabit--|Linux PC| > > > With this configuration: > > >ipfw 500 add allow ip from any to any > > I get speeds of about 200 to 300 Mbit/s and the CPU usage goes up > to 99%. I've googled this problem and it seems that some good > quality NIC do most of the processing so that the CPU doesn't have > to. Unfortunately I have bad quality NICs so the CPU does all the > processing, stoping the throughput at these speeds. Try sysctl net.inet.ip.fastforwarding=1 . With this set I can formard and filter in excess of 500kpps using less than 5% CPU on a Xeon. I highly recomend the Intel 82546GB chip based adaptors (em driver). Ian -- Ian Freislich