From owner-freebsd-questions@FreeBSD.ORG Thu Apr 24 10:58:23 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9229106566B for ; Thu, 24 Apr 2008 10:58:23 +0000 (UTC) (envelope-from stapleton.41@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.183]) by mx1.freebsd.org (Postfix) with ESMTP id 9CA188FC1E for ; Thu, 24 Apr 2008 10:58:23 +0000 (UTC) (envelope-from stapleton.41@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so4972607waf.3 for ; Thu, 24 Apr 2008 03:58:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=LsUJRhhnCoeQp1ssOJPkE5iCtH77ZCxJDqg+O6z/tS8=; b=MRWQWUj1vKyqeIMLGuLKlA83tsJ1NmFR3GmvPNqSljMRaSfhIixMleOks0/fxs5lktPgf6oYXDkZrX566vz1GueXkpYrle9SGuzbObRonE1UXilJS6DJLLaHhmeXNhtAMNU+64Uc8bqNHgwU9fFZnYctoABRn0/Peazq99HZgjw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=xuJOWkvjZtUMd1TY8peBSWtbGiY1Ah9RnD7qqxOmmNNEWYodx5a3nMGt9WKYaJbc66OraQ3lJajG3BeN96lTo+tYo+LFFt613EBRX1NTwu3/abvLLQCJ3js6kTMeu218M3DKAzvJdPSXuCsV3oQ/hxlAA738vM2ZQ/Sx13b1T60= Received: by 10.114.38.2 with SMTP id l2mr1505509wal.69.1209034703160; Thu, 24 Apr 2008 03:58:23 -0700 (PDT) Received: by 10.114.113.11 with HTTP; Thu, 24 Apr 2008 03:58:23 -0700 (PDT) Message-ID: <80f4f2b20804240358j14796ae4t8e5576a9f82c6f4b@mail.gmail.com> Date: Thu, 24 Apr 2008 06:58:23 -0400 From: "Jim Stapleton" To: "Mario Lobo" In-Reply-To: <200804171440.43154.mario.lobo@ipad.com.br> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <80f4f2b20804081710k5af28466k17f3d38cdd6e344a@mail.gmail.com> <80f4f2b20804121013y5d980abereb05e4aa2a1a1b77@mail.gmail.com> <80f4f2b20804170809y1ae79a3dg2fb24346b132ea74@mail.gmail.com> <200804171440.43154.mario.lobo@ipad.com.br> Cc: freebsd-questions@freebsd.org Subject: Re: QEMU networking quirkiness on 7.0 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: Thu, 24 Apr 2008 10:58:23 -0000 On Thu, Apr 17, 2008 at 1:40 PM, Mario Lobo wrote: > On Thursday 17 April 2008, Jim Stapleton wrote: > > Sorry for the delayed reply, I didn't see this sent. > > > > On Thursday 10 April 2008 22:01:32 Mario Lobo wrote > > > > > I have a virtual Linux (Fedora 5) and winedows (XP) machines in QEMU and > > > they are both network functional. I use qemu-launch because it does > > > everything you need to create a virtual machine. Here are my pertinent > > > configs: > > > > > > ------------------------------------------------ > > > 1) # rc.conf > > > > > > ifconfig_re0="up polling" <- no IP here ! > > > autobridge_interfaces="bridge0" > > > autobridge_bridge0="tap0 re0" <- important even if tap0 does not > > > exist yet cloned_interfaces="bridge0" > > > # the bridge gets the IP > > > ifconfig_bridge0="inet 10.10.10.2 netmask 255.255.255.0" > > > > To verify, the 10.10.10.2 is the IP that everyone sees my host as on > > the network, correct? That's the IP that used to be set on re0? > > exactly ! > > > > > > > 2) tell QEMU launch to open a tap device > > > > Open a TUN/TAP interface in the network interface configuration > > yes > > > > > > > 3) tap up script to run when invoking the machine(s). > > > > > > # qemu-net > > > > > > #!/usr/local/bin/bash > > > $1 = tap ifac created > > > /sbin/ifconfig $1 up > > > # test if tap is already added > > > TEST=`ifconfig -a | grep -A 6 bridge | grep $1` > > > if [ "$TEST" == "" ]; then > > > /sbin/ifconfig bridge0 addm $1 > > > fi > > > # add a route to the virtual machine > > > /sbin/route add -host 10.10.10.100 -iface bridge0 > > > > This is the tun/tap configuration script, the IP on the last line is > > the IP I want the guest to look like to the network (i.e. > > 192.168.1.85)? > > correct ! You will configure the guest's network interface with this IP. > > > > > > > > Thanks, I'll play with this more when I get home (I don't want to mess > > with my machine's network configuration while I've only got network > > access). > > > > This worked so fine fine for me that I left the bridge as my main interface > for good. Even if QEMU is not up. It works just as well as re0 itself. > > > > > Thanks, > > -Jim Stapleton > > _______________________________________________ > > freebsd-questions@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > > To unsubscribe, send any mail to > > "freebsd-questions-unsubscribe@freebsd.org" > > You're welcome ! OK, I finally got to test it last night. It almost worked. I ran it from the console, and it spit out the command line. Something on the command line looked obviously off to me (I think it was the iface= part of the network section), anyway, I copied & pasted it, added the tap0 reference, and it works perfectly. Thanks again, -Jim Stapleton