From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CmIyJ-0003CB-U7 for qemu-devel@nongnu.org; Wed, 05 Jan 2005 16:45:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CmIyJ-0003BY-CS for qemu-devel@nongnu.org; Wed, 05 Jan 2005 16:45:39 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CmIyJ-0003BT-34 for qemu-devel@nongnu.org; Wed, 05 Jan 2005 16:45:39 -0500 Received: from [38.113.3.71] (helo=smtp-out.hotpop.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CmImt-0003zB-4U for qemu-devel@nongnu.org; Wed, 05 Jan 2005 16:33:51 -0500 Received: from phreaker.net (kubrick.hotpop.com [38.113.3.103]) by smtp-out.hotpop.com (Postfix) with SMTP id A6DAC132B316 for ; Wed, 5 Jan 2005 21:33:41 +0000 (UTC) Received: from jbrown.mylinuxbox.org (pcp03144805pcs.midval01.tn.comcast.net [68.59.228.236]) by smtp-3.hotpop.com (Postfix) with ESMTP id 2E485132B429 for ; Wed, 5 Jan 2005 21:33:41 +0000 (UTC) Date: Wed, 5 Jan 2005 16:33:19 -0500 From: "Jim C. Brown" Subject: Re: [Qemu-devel] NETDEV WATCHDOG: eth0: transmit timed out Message-ID: <20050105213319.GA14108@jbrown.mylinuxbox.org> References: <1104899444.20758.26.camel@localhost.localdomain> <20050105154352.GA11125@jbrown.mylinuxbox.org> <1104948769.29588.11.camel@localhost.localdomain> <20050105195042.GA13437@jbrown.mylinuxbox.org> <1104955592.29588.15.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1104955592.29588.15.camel@localhost.localdomain> 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 On Wed, Jan 05, 2005 at 09:06:31PM +0100, Horst Schlonz wrote: > > Show us what is in your /etc/qemu-ifup script. > > > user@host # cat /etc/qemu-ifup > #!/bin/sh > sudo -p "Password for $0:" /sbin/ifconfig $1 172.20.0.1 > user@host # Yes, you are missing the iptables lines. (Personally I prefer ipchains to iptables, but alas ...) (the following script was "borrowed" from http://www.scaramanga.co.uk/stuff/qemu-ifup) --CUT HERE-- #!/bin/sh ## Setup your guest OS with the following parameters ## IP - 192.168.1.1 ## Mask - 255.255.255.0 ## Gateway - 192.168.1.254 ## DNS - whatver is in your resolv.conf # Remember to have the following in sysctl.conf and do sysctl -p # net.ipv4.ip_forward = 1 # Set these to the IP/mask you want to your qemu vm to have on the network qemu_ip="152.78.192.217" qemu_netmask="255.255.252.0" # Setup an interface for the vm to use ifconfig eth0:1 up $qemu_ip netmask $qemu_netmask # Clear iptables iptables -t nat -F PREROUTING iptables -t nat -F POSTROUTING # Setup NAT iptables -t nat -A PREROUTING -d $qemu_ip \ -j DNAT --to-destination 192.168.1.1 iptables -t nat -A POSTROUTING -s 192.168.1.1 \ -j SNAT --to-source $qemu_ip # Bring up the TUN interface sudo -p "Password for $0:" /sbin/ifconfig $1 192.168.1.254 --CUT HERE-- can you test out that script and see if it works? > > That isn't good enough, you need to add several rules to get it to work. > > > > i just followed the documentation: > > quote > 3.7.1 Using tun/tap network interface > This is the standard way to emulate network. QEMU adds a virtual network > device on your host (called tun0), and you can then configure it as if > it was a real ethernet card. > > As an example, you can download the `linux-test-xxx.tar.gz' archive and > copy the script `qemu-ifup' in `/etc' and configure properly sudo so > that the command ifconfig contained in `qemu-ifup' can be executed as > root. You must verify that your host kernel supports the TUN/TAP network > interfaces: the device `/dev/net/tun' must be present. > /quote > Did you copy the qemu-ifup script from the one in linux-test-xxx.tar.gz? I've never looked at it (since I use VDE) but I'd be suprised if that script contained only what you showed me. -- Infinite complexity begets infinite beauty. Infinite precision begets infinite perfection.