From: Marco Matthies <marco-ml@gmx.net>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Setting up tun/tap network doesn't work
Date: Sat, 15 Oct 2005 00:28:53 +0200 [thread overview]
Message-ID: <43503125.7020204@gmx.net> (raw)
In-Reply-To: <43501FB5.5020303@mid.email-server.info>
Hi Alexander,
as I also struggled hard to get qemu networking running, so i will post
my notes that i made when i finally managed to get it going. But first a
resource that might help you:
faq in the unofficial qemu wiki:
http://lilly.csoft.net/~jeffryj/cgi-bin/moin.cgi/FrequentlyAskedQuestions
My setup below might be braindamaged, i simply kept going till I had it
running, there might be things that i did too complicated.. YMMV.
the info to get it running was scraped from various websites like the
abovementioned one:
-------------------------
1) install vde (http://vde.sourceforge.net/)
2) compile kernel with tun/tap and ipv4 masquerading, forwarding, ... i
don't remember anymore, i believe masquerading and forwarding was enough.
my network:
--------
host: 192.168.2.189 [assigned via dhcp]
gateway host/guest: 192.168.254.254 [guest sees host as this ip]
guest: 192.168.254.1
nameserver of isp 1.2.3.4
Host, as root:
------------------------------------------------
vde_switch -tap tap0 -daemon
ifconfig tap0 192.168.254.254 [netmask 255.255.255.0]
chmod 777 /tmp/vde.ctl # 755 is supposed to work as well
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
Host, as user (example):
------------------------
vdeq qemu-system-x86_64 -boot d -cdrom knoppix.iso
Guest, as root (this is for linux/bsd):
---------------------------------------
ifconfig eth0 192.168.254.1 [netmask 255.255.255.0]
route add default gw 192.168.254.254
echo "nameserver 1.2.3.4" >> /etc/resolv.conf
Obviously you'll have to replace the addresses with the appropriate ones
on your network. This setup should then allow the guest to communicate
with the host and the guest to also reach the internet.
Hope this helps,
Marco
next prev parent reply other threads:[~2005-10-14 22:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-14 21:14 [Qemu-devel] Setting up tun/tap network doesn't work Alexander Skwar
2005-10-14 22:28 ` Marco Matthies [this message]
2005-10-14 22:54 ` Jim C. Brown
2005-10-15 6:24 ` Alexander Skwar
2005-10-16 21:10 ` Henrik Nordstrom
2005-10-17 14:13 ` Alexander Skwar
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=43503125.7020204@gmx.net \
--to=marco-ml@gmx.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).