qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Jim C. Brown" <jbrown106@phreaker.net>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] NETDEV WATCHDOG: eth0: transmit timed out
Date: Wed, 5 Jan 2005 16:33:19 -0500	[thread overview]
Message-ID: <20050105213319.GA14108@jbrown.mylinuxbox.org> (raw)
In-Reply-To: <1104955592.29588.15.camel@localhost.localdomain>

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.

  reply	other threads:[~2005-01-05 21:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-05  4:30 [Qemu-devel] NETDEV WATCHDOG: eth0: transmit timed out Horst Schlonz
2005-01-05 15:43 ` Jim C. Brown
2005-01-05 15:50   ` Jim C. Brown
2005-01-05 18:12   ` Horst Schlonz
2005-01-05 18:25     ` Magnus Damm
2005-01-06 21:57       ` Jim C. Brown
2005-01-06 22:47         ` Magnus Damm
2005-01-05 19:50     ` Jim C. Brown
2005-01-05 20:06       ` Horst Schlonz
2005-01-05 21:33         ` Jim C. Brown [this message]
2005-01-06  0:27           ` Horst Schlonz
2005-01-06  0:58             ` Magnus Damm
2005-01-06  1:34               ` Horst Schlonz
2005-01-06  1:53                 ` Jim C. Brown
2005-01-06  3:09                   ` Horst Schlonz
2005-01-08 10:14                     ` [Qemu-devel] " Anand Kumria
2005-01-06  2:41 ` [Qemu-devel] " Herbert Poetzl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050105213319.GA14108@jbrown.mylinuxbox.org \
    --to=jbrown106@phreaker.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).