From owner-freebsd-questions@FreeBSD.ORG Fri Jul 28 19:35:05 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A8E7516A4DD for ; Fri, 28 Jul 2006 19:35:05 +0000 (UTC) (envelope-from artifact.one@googlemail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26CFD43D58 for ; Fri, 28 Jul 2006 19:33:46 +0000 (GMT) (envelope-from artifact.one@googlemail.com) Received: by ug-out-1314.google.com with SMTP id m2so964337uge for ; Fri, 28 Jul 2006 12:33:35 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=googlemail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=TGNiCJw0Nb6ewTDojp3l+rP5RAdCgij9OkMnMc58dT8rOp8tzIOuY+IJF2EfywNMbxdiyG4oyUo4yLYqd9gM6+Q/nl2XelNbdxZyi/OhkHy31LXKN6wz2IIx+8cw/tjc9SjHsv6J2jDEF+hJvdK+Oln603G5XBFjj5Un7KWz1BU= Received: by 10.78.123.4 with SMTP id v4mr275826huc; Fri, 28 Jul 2006 12:33:35 -0700 (PDT) Received: by 10.78.43.9 with HTTP; Fri, 28 Jul 2006 12:33:35 -0700 (PDT) Message-ID: <8e96a0b90607281233g20e46ce8k4dafd8424e8e0286@mail.gmail.com> Date: Fri, 28 Jul 2006 20:33:35 +0100 From: "mal content" To: freebsd-questions@freebsd.org In-Reply-To: <20060728212909.032e047c@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8e96a0b90607280942o7fb9d5e5s876ad7367379210@mail.gmail.com> <20060728212909.032e047c@localhost> Subject: Re: qemu with tap networking on FreeBSD 6.1 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2006 19:35:05 -0000 On 28/07/06, Fabian Keil wrote: > "mal content" wrote: > > > Followed instructions from various places and ended up with > > the following procedure: > > > > # kldload bridge.ko > > # sysctl net.link.ether.bridge_cfg=fxp0,tap0 > > # sysctl net.link.ether.bridge.enable=1 > > I don't think it's part of your problem, > but on FreeBSD 6.1 it is recommended to > use if_bridge instead of bridge. Ok, I'll try it anyway to be on the safe side. > > > I created 'if-up' for qemu: > > > > #!/bin/sh > > ifconfig ${1} 0.0.0.0 > > > I have a working OpenBSD image, 3.9. I started it up, > > set an IP address and default route, etc. Everything appears > > to be fine there. > > The network was working? I meant that as far as OpenBSD was concerned (had it been on a physical machine) the network would have been correctly configured. > > > I reboot the qemu image and just before the login prompt, > > qemu goes insane. For some reason, it blasts UDP packets: > > > > (on the host) > > # netstat -an > > > > udp4 0 0 *.62756 *.* > > udp4 0 0 *.62324 *.* > > udp4 0 0 *.62127 *.* > > udp4 0 0 *.62741 *.* > > udp4 0 0 *.59182 *.* > > udp4 0 0 *.63792 *.* > > > > How do you know that these connections came from qemu? Because as soon as I ctrl-C the qemu process, all of them stop instantly. They may not be coming FROM the qemu process, but may be being generated as a side effect of what the host is trying to do for the hosted image. > > Personally I prefer to use NAT to connect qemu > (and jails) with the world outside. This way you can > use pfctl -ss -r to see which connections come > from the host system and which don't. > How does this work? I really don't care how I get networking for qemu, as long as it works. I only picked tap because that seemed to be the most common choice. cheers, MC