From owner-freebsd-net@FreeBSD.ORG Thu Dec 14 14:09:20 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 DDEFC16A407 for ; Thu, 14 Dec 2006 14:09:19 +0000 (UTC) (envelope-from oleg@lath.rinet.ru) Received: from lath.rinet.ru (lath.rinet.ru [195.54.192.90]) by mx1.FreeBSD.org (Postfix) with ESMTP id 358B143F00 for ; Thu, 14 Dec 2006 14:03:52 +0000 (GMT) (envelope-from oleg@lath.rinet.ru) Received: from lath.rinet.ru (localhost [127.0.0.1]) by lath.rinet.ru (8.13.8/8.13.8) with ESMTP id kBEE5FTd026694 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 14 Dec 2006 17:05:15 +0300 (MSK) (envelope-from oleg@lath.rinet.ru) Received: (from oleg@localhost) by lath.rinet.ru (8.13.8/8.13.8/Submit) id kBEE5Dkb026693; Thu, 14 Dec 2006 17:05:13 +0300 (MSK) (envelope-from oleg) Date: Thu, 14 Dec 2006 17:05:13 +0300 From: Oleg Bulyzhin To: Spadge Message-ID: <20061214140513.GA25504@lath.rinet.ru> References: <458148C7.5050607@fromley.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <458148C7.5050607@fromley.net> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: net@freebsd.org Subject: Re: 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 14:09:20 -0000 On Thu, Dec 14, 2006 at 12:51:19PM +0000, Spadge wrote: > 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 > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" sysctl debug.mpsafenet value? -- Oleg. ================================================================ === Oleg Bulyzhin -- OBUL-RIPN -- OBUL-RIPE -- oleg@rinet.ru === ================================================================