Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Apr 2010 10:45:08 +0200
From:      Anders Hagman <anders.hagman@halleforshunden.org>
To:        freebsd-ipfw@freebsd.org
Subject:   Re: dummynet and vnet kernel panic
Message-ID:  <4BBEE914.8030508@halleforshunden.org>
In-Reply-To: <20100407203802.GA91356@onelab2.iet.unipi.it>
References:  <4BBCE3EE.506@halleforshunden.org> <20100407203802.GA91356@onelab2.iet.unipi.it>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BBEE914.8030508>