From owner-freebsd-net@FreeBSD.ORG Thu Dec 14 12:53:16 2006 Return-Path: X-Original-To: net@freebsd.org Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2E57516A47E for ; Thu, 14 Dec 2006 12:53:16 +0000 (UTC) (envelope-from spadge@fromley.net) Received: from mtaout03-winn.ispmail.ntl.com (mtaout03-winn.ispmail.ntl.com [81.103.221.49]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D43743CA2 for ; Thu, 14 Dec 2006 12:50:24 +0000 (GMT) (envelope-from spadge@fromley.net) Received: from aamtaout03-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com with ESMTP id <20061214125124.DJHN1865.mtaout03-winn.ispmail.ntl.com@aamtaout03-winn.ispmail.ntl.com> for ; Thu, 14 Dec 2006 12:51:24 +0000 Received: from tobermory.home ([86.0.166.176]) by aamtaout03-winn.ispmail.ntl.com with ESMTP id <20061214125123.ILLD26699.aamtaout03-winn.ispmail.ntl.com@tobermory.home> for ; Thu, 14 Dec 2006 12:51:23 +0000 Received: from [192.168.124.185] (jupiter.home [192.168.124.185]) by tobermory.home (Postfix) with ESMTP id D2327A6C9F for ; Thu, 14 Dec 2006 12:51:20 +0000 (GMT) Message-ID: <458148C7.5050607@fromley.net> Date: Thu, 14 Dec 2006 12:51:19 +0000 From: Spadge User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Dummynet pipe causing system to lock up X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2006 12:53:16 -0000 Hi all I'm completely baffled by how to work this problem out that I am having with ipfw/dummynet. I have created some ipfw rules to use a pipe which dummynet then shapes. The problem I appear to be having is that whenever a packet is sent to the pipe, the entire system locks up and I have to reboot the machine using the power switch. Which is completely sub-optimal, I know. I have looked through dummynet manpages, been to the dummynet website ( http://info.iet.unipi.it/~luigi/ip_dummynet/ ), tried google; none of it successfully, other than I found someone who appeared to have had a similar problem a year or so ago, but it looks like his problem either just went away on its own or was never resolved, but no mention of which. ** Background Information ** OS information: spadge@tobermory$ uname -a FreeBSD tobermory.home 6.1-RELEASE-p11 FreeBSD 6.1-RELEASE-p11 #14: Mon Dec 11 15:08:53 GMT 2006 root@tobermory.home:/usr/obj/usr/src/sys/TOBERMORY i386 The kernconf has the following bits for the ipfw/dummynet stuff: # For ipfw/natd options IPFIREWALL options IPDIVERT options IPFIREWALL_DEFAULT_TO_ACCEPT options IPFIREWALL_VERBOSE # For DUMMYNET packet shaping options DUMMYNET options HZ=1000 And the following rules are what cause the problem I'm having: /sbin/ipfw add pipe 101 ip from any to any uid 1101 via $WAN in /sbin/ipfw add pipe 102 ip from any to any uid 1101 via $WAN out /sbin/ipfw pipe 101 config bw 4096kbit/s delay 200ms /sbin/ipfw pipe 102 config bw 512kbit/s delay 200ms $WAN is a variable set earlier in the /etc/rc.firewall rules: WAN="xl0" LAN="nge0" The machine is my internet gateway, running my natd, dhcpd, httpd, imapd, smtpd, ircd etc. What I am trying to achieve with this dummynet exercise is to put a delay onto everything that UID 1101 (which only runs mldonkey (multi-network p2p client)) sends/receives so that the rest of my LAN can do what it wants online (like playing online games and browsing the interwebs) and have mldonkey step aside gracefully when someone else wants the bandwidth. I got the idea from the mldonkey wiki page covering how to do this in linux - nice of them to spare us FreeBSD users an afterthought and a couple of lines at the end of the lengthy linux how-to, eh. link: http://mldonkey.sourceforge.net/TrafficShaping Am I missing something *completely* obvious here? What am I doing wrong? How can I find out more about how to do this right? The system runs fine right up until the user in the rules starts sending/receiving stuff, then it's goodbye system - and suddenly enough that I can't find a single error or panic entry in any logs covering it. Any hints or help would be great. Thanks. -- Spadge "Intoccabile" www.fromley.com