From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BujDm-0004Ug-1V for qemu-devel@nongnu.org; Tue, 10 Aug 2004 22:52:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BujDj-0004TQ-W8 for qemu-devel@nongnu.org; Tue, 10 Aug 2004 22:52:09 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BujDj-0004Sx-St for qemu-devel@nongnu.org; Tue, 10 Aug 2004 22:52:07 -0400 Received: from [144.140.70.43] (helo=gizmo12bw.bigpond.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1Buj9m-00035i-SI for qemu-devel@nongnu.org; Tue, 10 Aug 2004 22:48:03 -0400 Message-ID: <4119885E.3020002@migasia.com> Date: Wed, 11 Aug 2004 12:45:50 +1000 From: "Jesus M. Salvo Jr." MIME-Version: 1.0 Subject: Re: [Qemu-devel] Help with tun/tap with qemu References: <20040810150655.25395.qmail@webmail-au.server-secure.com> <4118EEBE.1020009@fabianowski.de> <1092163933.49245.2.camel@pcgem.rdg.cyberkinetica.com> In-Reply-To: <1092163933.49245.2.camel@pcgem.rdg.cyberkinetica.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Antony T Curtis wrote: >On Tue, 2004-08-10 at 16:50, Bartosz Fabianowski wrote: > > >>>So I am trying TUN/TAP. The guest and host OS can ping each other. >>>However, the guest OS cannot ping any other host >>> >>> >>If the setup on Linux is any similar to that on FreeBSD (and I am sure >>it is), the problem probably is routing. The guest and host are on >>different networks. So, you need to tell your host to forward packets to >>and from the guest's network. You didn't have that problem in slirp, >>because slirp bridges between the two networks for you, it implicitly >>does the forwarding. >> >>Unfortunately, I can't tell you how to add the route under Linux due to >>my lack of experience with that platform. >> >>- Bartosz >> >> > >When I am using TAP on FreeBSD, I use ng_bridge so the guest is on the >same network as the host. > >Info for configuring ng_bridge is in >/usr/share/examples/netgraph/ether.bridge > > > OK, I have now setup a bridge on linux as follows. On the host OS, I have the following script and ran it as root: #!/bin/sh /usr/sbin/brctl addbr br0 /sbin/ifconfig eth2 0.0.0.0 promisc up /sbin/ifconfig tap0 0.0.0.0 promisc up /sbin/ifconfig br0 192.168.0.199 netmask 255.255.255.0 broadcast 192.168.0.255 up /usr/sbin/brctl stp br0 off /usr/sbin/brctl setfd br0 1 /usr/sbin/brctl sethello br0 1 /usr/sbin/brctl addif br0 eth2 /usr/sbin/brctl addif br0 tap0 /sbin/route add default gw 192.168.0.1 I can confirm that the host still has network connectivity using the bridge. Now the question is, what to do on the qemu side ?? If I just run qemu as normal, qemu says: Connected to host network interface: tun0 ... because of the /etc/qemu-ifup script on the host OS ( and of course, tun0 has an IP address ) Shouldn't qemu use tap0 as per the bridge configuration on the host OS ? If so, how do u tell qemu to use tap0 instead of tun0 ? Or should I change the bridge configuration to use tun0 instead of tap0 on the host OS ?