Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Nov 2008 22:18:31 -0300
From:      Mario Lobo <mlobo@digiart.art.br>
To:        freebsd-questions@freebsd.org
Subject:   Qemu network question
Message-ID:  <200811032218.32267.mlobo@digiart.art.br>

next in thread | raw e-mail | index | archive | help
Hi:

Please use a fixed font to see the diagram bellow:


       FBSD HOST(7.1-PRERELEASE)
      +-----------------+
      |    10.10.10.1   |=20
 LAN -+----- re0        |=20
      |                 |=20
      |    +-----+      |
  +---+----+tap0 |      | =20
  |  ++----+tap1 |      |=20
  |  ||    +-----+      | =20
  |  ||    bridge0      |  (if_bridge)
  |  || 192.168.100.254 | =20
  |  |+-----------------+
  |  |
  |  |      QEMU GUEST 1 (linux Fedora core 5)
  |  |   +-----------------+
  |  |   |                 |
  |  +---+---- eth0        |=20
  |      | 192.168.100.1   |=20
  |      |                 |=20
  |      +-----------------+=20
  |         QEMU GUEST 2  (windows XP)
  |      +-----------------+
  |      |                 |
  +------+--- realtek      |=20
         | 192.168.100.2   |=20
         |                 |=20
         +-----------------+=20

It's working like a charm !=20

I turned my FBSD desktop into a router/gateway, put pf to nat everything an=
d=20
set up an independent smb server on the host. Pings travel on any direction=
!.=20
The guests have access to ALL the host's files and vice versa, BOTH guests=
=20
have internet access and best of all, I can access the linux guest through =
an=20
ssh shell and the windows guest through vncviewer, and, of course, the 2=20
guests see each other ! Imagine how happy I am !

I tried this without turning my desktop into a gateway. The guests had=20
internet access but the host was invisible to them and I got tired of tryin=
g=20
to make qemu's -smb option work, so I adapted this "a-bit radical" approach=
 I=20
saw on a how-to for Sun OS I found on the net.

I'm really impressed with qemu performance !. I=B4ve compiled kernels, buil=
t=20
RPMs and the reduction in performance from doing these things in a separate=
=20
machine is really endurable.

My question is: If I don't put re0 into promiscous mode, all of this falls=
=20
apart ! The network goes totally down for the host<->guests, but the host=20
retains its internet conectivity. I discovered that by chance! I was trying=
=20
to find out what was happening with conectivity so I tried pinging the host=
=20
from the linux guest. As soon as I started tcpdump on the host, the pings=20
went through so I found out what I needed from there.

Is this normal or is there something wrong with my NIC? setup?

Thanks,
=2D-=20
Mario Lobo
http://www.mallavoodoo.com.br
=46reeBSD since version 2.2.8 [not Pro-Audio.... YET!!] (99,7% winedows FRE=
E)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811032218.32267.mlobo>