From owner-freebsd-ipfw@FreeBSD.ORG Fri Apr 9 08:45:24 2010 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CCD51065670 for ; Fri, 9 Apr 2010 08:45:24 +0000 (UTC) (envelope-from anders.hagman@halleforshunden.org) Received: from mailfront1.netatonce.net (mailfront1.netatonce.net [217.10.96.36]) by mx1.freebsd.org (Postfix) with ESMTP id C1E6A8FC14 for ; Fri, 9 Apr 2010 08:45:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mailfront1.netatonce.net (Postfix) with ESMTP id 8F65D605CB for ; Fri, 9 Apr 2010 10:41:30 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mailfront1.netatonce.net X-Spam-Flag: NO X-Spam-Score: -1.075 X-Spam-Level: X-Spam-Status: No, score=-1.075 required=5 tests=[AWL=-0.065, BAYES_05=-1.11, RDNS_DYNAMIC=0.1] Received: from mailfront1.netatonce.net ([127.0.0.1]) by localhost (mailfront1.netatonce.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tosO5Pod1sBn for ; Fri, 9 Apr 2010 10:41:24 +0200 (CEST) Received: from ns.halleforshunden.org (user55.85-195-9.netatonce.net [85.195.9.55]) by mailfront1.netatonce.net (Postfix) with ESMTPS for ; Fri, 9 Apr 2010 10:41:23 +0200 (CEST) Received: from dator6.halleforshunden.org (dator6 [10.1.10.6]) by ns.halleforshunden.org (8.13.3/8.13.3) with ESMTP id o398jCOm062819 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 9 Apr 2010 10:45:13 +0200 (CEST) (envelope-from anders.hagman@halleforshunden.org) Received: from anders-dell.halleforshunden.org (anders-dell.halleforshunden.org [10.1.10.27]) by dator6.halleforshunden.org (8.14.2/8.14.2) with ESMTP id o398j7DR073584 for ; Fri, 9 Apr 2010 10:45:07 +0200 (CEST) (envelope-from anders.hagman@halleforshunden.org) Message-ID: <4BBEE914.8030508@halleforshunden.org> Date: Fri, 09 Apr 2010 10:45:08 +0200 From: Anders Hagman User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; sv-SE; rv:1.9.1.7) Gecko/20100215 Thunderbird/3.0.1 MIME-Version: 1.0 To: freebsd-ipfw@freebsd.org References: <4BBCE3EE.506@halleforshunden.org> <20100407203802.GA91356@onelab2.iet.unipi.it> In-Reply-To: <20100407203802.GA91356@onelab2.iet.unipi.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: dummynet and vnet kernel panic 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: Fri, 09 Apr 2010 08:45:24 -0000 On 2010-04-07 22:38, Luigi Rizzo wrote: > On Wed, Apr 07, 2010 at 09:58:38PM +0200, Anders Hagman wrote: > >> Hi >> >> When using dummynet inside a vnet node with a simple pipe the kernel >> panic on the first packet. >> >> I use 8.0-STABLE cvsuped at 7 Apr 15:28 >> The ipfw code with dummynet is largely changed and the patch in the url >> below will not work. >> http://www.freebsd.org/cgi/query-pr.cgi?pr=143621 >> >> Is there a fix in the near future? >> > haven't tried it myself, but adapting the patch seems > reasonably trivial. I'll see what i can do. > > Are there any vnet experts who can comment ? > Here is a small shell script to create a virtual network to test the dummynet. #!/bin/sh # Virtual network # # [H1-eth0]---[eth0-R1-eth1]---[eth0-H2] # # Create virtual nodes vimage -c H1 vimage -c H2 vimage -c R1 # Change hostnamn vimage H1 hostname H1 vimage H2 hostname H2 vimage R1 hostname R1 # Create interfaces ifconfig epair1 create ifconfig epair2 create # Move interfaces to v-nodes vimage -i H1 epair1b vimage -i H2 epair2b vimage -i R1 epair1a vimage -i R1 epair2a # Konfigurera interface vimage H1 ifconfig eth0 10.0.1.2/24 vimage H1 route add default 10.0.1.1 vimage H2 ifconfig eth0 10.0.2.2/24 vimage H2 route add default 10.0.2.1 vimage R1 ifconfig eth0 10.0.1.1/24 vimage R1 ifconfig eth1 10.0.2.1/24 # Turn on ip forwarding vimage R1 sysctl net.inet.ip.forwarding=1 # Configure firewall (the panic part) #kldload ipfw #kldload dummynet #vimage R1 ipfw pipe 1 config bw 2Mbit/s #vimage R1 ipfw add 100 pipe 1 ip from any to any #vimage H1 ipfw add permit ip from any to any #vimage H2 ipfw add permit ip from any to any /Anders