From owner-freebsd-questions@FreeBSD.ORG Thu Apr 17 15:09:09 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 9170C1065672 for ; Thu, 17 Apr 2008 15:09:09 +0000 (UTC) (envelope-from stapleton.41@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.179]) by mx1.freebsd.org (Postfix) with ESMTP id 6AA218FC12 for ; Thu, 17 Apr 2008 15:09:09 +0000 (UTC) (envelope-from stapleton.41@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so150599waf.3 for ; Thu, 17 Apr 2008 08:09:09 -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=NJ3LlofmU1oOwrmaD8dJdVNUzmfA6BXebRW0BC6JZ+w=; b=KMVVA29p+aLWLtQkG9t0HsKSzdrJ7iUZu4S5hSeKC29KwB4wUy0QrXDLWb1JGNFJyotgxEkno6BwfBmLZ1L0+whM5IEyyr1fDaseLO3qJaFD/s9ayy7MHW5QnZCo7STVv97BkRQQouyXl9vjfHPFsav/yAuC3pWbUkZiJLyD3tk= 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=PZurK+1weh2Yt7Ite3XK1ybmqJZuvHk55iNN+4hR8SCZq4b6UuFPkHRlLFFqLhMduDeVuu8kp0QBduWnwXZ8XnDiF27I8zwibhydg1J4DpahfTsopICE5XPKYEd22ZEo+Bt0U94bXs5Ak0DrEOpKCcxCUffYvQOx+t3Tl3I3K2Q= Received: by 10.114.38.2 with SMTP id l2mr1580318wal.69.1208444948739; Thu, 17 Apr 2008 08:09:08 -0700 (PDT) Received: by 10.114.113.11 with HTTP; Thu, 17 Apr 2008 08:09:08 -0700 (PDT) Message-ID: <80f4f2b20804170809y1ae79a3dg2fb24346b132ea74@mail.gmail.com> Date: Thu, 17 Apr 2008 11:09:08 -0400 From: "Jim Stapleton" To: "Andrew Cid" In-Reply-To: <80f4f2b20804121013y5d980abereb05e4aa2a1a1b77@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <80f4f2b20804081710k5af28466k17f3d38cdd6e344a@mail.gmail.com> <20080409091859.GA14939@farnborough.darq.net> <80f4f2b20804091825y2a37bddehd68e91f57426dc04@mail.gmail.com> <20080410093625.GA95076@farnborough.darq.net> <80f4f2b20804121013y5d980abereb05e4aa2a1a1b77@mail.gmail.com> 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, 17 Apr 2008 15:09:09 -0000 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? > 2) tell QEMU launch to open a tap device Open a TUN/TAP interface in the network interface configuration > 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)? 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). Thanks, -Jim Stapleton