qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Help with tun/tap with qemu


From: Jesus M. Salvo Jr.
Subject: Re: [Qemu-devel] Help with tun/tap with qemu
Date: Wed, 11 Aug 2004 12:50:37 +1000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114

Jesus M. Salvo Jr. wrote:

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 ??

Not clear enough.
What I have done so far on the guest OS side is:

/sbin/ifconfig eth0 192.168.0.98 up
/sbin/route add default gw 192.168.0.1

However, the host and guest OS could not ping each other.

Also, how does one setup a bridge in the case where one only has a dial-up modem to the ISP, where all I have on the host OS is a ppp interface ?







reply via email to

[Prev in Thread] Current Thread [Next in Thread]